@igrejanoah/noah-app 0.0.1

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 (2) hide show
  1. package/dist/index.d.ts +3105 -0
  2. package/package.json +24 -0
@@ -0,0 +1,3105 @@
1
+ import * as z from 'zod';
2
+ import z__default from 'zod';
3
+
4
+ declare const ListAttendanceRequestQuerySchema: z__default.ZodObject<{
5
+ studentId: z__default.ZodOptional<z__default.ZodInt>;
6
+ lessonId: z__default.ZodOptional<z__default.ZodInt>;
7
+ courseId: z__default.ZodOptional<z__default.ZodInt>;
8
+ editionId: z__default.ZodOptional<z__default.ZodInt>;
9
+ }, z__default.z.core.$strip>;
10
+ type ListAttendanceRequestQuery = z__default.infer<typeof ListAttendanceRequestQuerySchema>;
11
+ declare const GetStudentAttendanceStatusRequestParamsSchema: z__default.ZodObject<{
12
+ studentId: z__default.z.ZodCoercedNumber<unknown>;
13
+ }, z__default.z.core.$strip>;
14
+ type GetStudentAttendanceStatusRequestParams = z__default.infer<typeof GetStudentAttendanceStatusRequestParamsSchema>;
15
+ declare const GetStudentAttendanceStatusRequestQuerySchema: z__default.ZodUnion<readonly [z__default.ZodObject<{
16
+ courseId: z__default.ZodOptional<z__default.ZodInt>;
17
+ editionId: z__default.ZodOptional<z__default.ZodInt>;
18
+ }, z__default.z.core.$strip>, z__default.ZodObject<{
19
+ courseId: z__default.ZodUndefined;
20
+ editionId: z__default.ZodUndefined;
21
+ }, z__default.z.core.$strip>]>;
22
+ type GetStudentAttendanceStatusRequestQuery = z__default.infer<typeof GetStudentAttendanceStatusRequestQuerySchema>;
23
+ declare const GetLessonStatusRequestParamsSchema: z__default.ZodObject<{
24
+ lessonId: z__default.z.ZodCoercedNumber<unknown>;
25
+ }, z__default.z.core.$strip>;
26
+ type GetLessonStatusRequestParams = z__default.infer<typeof GetLessonStatusRequestParamsSchema>;
27
+ declare const GetLessonsStatusBulkQuerySchema: z__default.ZodObject<{
28
+ lessonIds: z__default.ZodArray<z__default.ZodInt>;
29
+ }, z__default.z.core.$strip>;
30
+ type GetLessonsStatusBulkQuery = z__default.infer<typeof GetLessonsStatusBulkQuerySchema>;
31
+ declare const AttendanceStatusSchema: z__default.ZodEnum<{
32
+ PRESENT: "PRESENT";
33
+ ABSENT: "ABSENT";
34
+ JUSTIFIED: "JUSTIFIED";
35
+ }>;
36
+ declare const AttendanceSchema: z__default.ZodObject<{
37
+ lessonId: z__default.ZodInt;
38
+ studentId: z__default.ZodInt;
39
+ status: z__default.ZodEnum<{
40
+ PRESENT: "PRESENT";
41
+ ABSENT: "ABSENT";
42
+ JUSTIFIED: "JUSTIFIED";
43
+ }>;
44
+ }, z__default.z.core.$strip>;
45
+ declare const UpdateAttendanceRequestBodySchema: z__default.ZodObject<{
46
+ lessonId: z__default.ZodInt;
47
+ studentId: z__default.ZodInt;
48
+ status: z__default.ZodEnum<{
49
+ PRESENT: "PRESENT";
50
+ ABSENT: "ABSENT";
51
+ JUSTIFIED: "JUSTIFIED";
52
+ }>;
53
+ }, z__default.z.core.$strip>;
54
+ type UpdateAttendenceRequestBody = z__default.infer<typeof UpdateAttendanceRequestBodySchema>;
55
+ declare const DeleteAttendanceRequestParamsSchema: z__default.ZodObject<{
56
+ id: z__default.z.ZodCoercedNumber<unknown>;
57
+ }, z__default.z.core.$strip>;
58
+ type DeleteAttendanceRequestParams = z__default.infer<typeof DeleteAttendanceRequestParamsSchema>;
59
+ declare const CreateOrUpdateAttendancesBulkRequestBodySchema: z__default.ZodObject<{
60
+ lessonId: z__default.ZodInt;
61
+ attendances: z__default.ZodArray<z__default.ZodObject<{
62
+ studentId: z__default.ZodInt;
63
+ status: z__default.ZodEnum<{
64
+ readonly PRESENT: "PRESENT";
65
+ readonly ABSENT: "ABSENT";
66
+ readonly JUSTIFIED: "JUSTIFIED";
67
+ }>;
68
+ }, z__default.z.core.$strip>>;
69
+ }, z__default.z.core.$strip>;
70
+ type CreateOrUpdateAttendancesBulkRequestBody = z__default.infer<typeof CreateOrUpdateAttendancesBulkRequestBodySchema>;
71
+
72
+ declare class Ok<T> {
73
+ readonly _tag = "ok";
74
+ value: T;
75
+ constructor(value: T);
76
+ }
77
+ declare class Err<E> {
78
+ readonly _tag = "err";
79
+ error: E;
80
+ constructor(error: E);
81
+ }
82
+
83
+ declare const CredentialsProvider: {
84
+ readonly FIREBASE: "FIREBASE";
85
+ };
86
+ type CredentialsProvider = (typeof CredentialsProvider)[keyof typeof CredentialsProvider];
87
+ declare const Role: {
88
+ readonly USER: "USER";
89
+ readonly STUDENT: "STUDENT";
90
+ readonly TEACHER: "TEACHER";
91
+ readonly COORDINATOR: "COORDINATOR";
92
+ readonly ADMIN: "ADMIN";
93
+ readonly SUPERADMIN: "SUPERADMIN";
94
+ };
95
+ type Role = (typeof Role)[keyof typeof Role];
96
+ declare const EditionStatus: {
97
+ readonly UPCOMING: "UPCOMING";
98
+ readonly ACTIVE: "ACTIVE";
99
+ readonly FINISHED: "FINISHED";
100
+ };
101
+ type EditionStatus = (typeof EditionStatus)[keyof typeof EditionStatus];
102
+ declare const AttendanceStatus: {
103
+ readonly PRESENT: "PRESENT";
104
+ readonly ABSENT: "ABSENT";
105
+ readonly JUSTIFIED: "JUSTIFIED";
106
+ };
107
+ type AttendanceStatus = (typeof AttendanceStatus)[keyof typeof AttendanceStatus];
108
+ declare const MaterialCategory: {
109
+ readonly GERAL: "GERAL";
110
+ };
111
+ type MaterialCategory = (typeof MaterialCategory)[keyof typeof MaterialCategory];
112
+ declare const NotificationKind: {
113
+ readonly GENERAL: "GENERAL";
114
+ readonly REMINDER: "REMINDER";
115
+ };
116
+ type NotificationKind = (typeof NotificationKind)[keyof typeof NotificationKind];
117
+ declare const ContentKind: {
118
+ readonly RECORDING: "RECORDING";
119
+ readonly SUPPORT: "SUPPORT";
120
+ };
121
+ type ContentKind = (typeof ContentKind)[keyof typeof ContentKind];
122
+ declare const EnrollmentKind: {
123
+ readonly regular: "regular";
124
+ readonly reposicao: "reposicao";
125
+ };
126
+ type EnrollmentKind = (typeof EnrollmentKind)[keyof typeof EnrollmentKind];
127
+ declare const PaymentStatus: {
128
+ readonly canceled: "canceled";
129
+ readonly pending: "pending";
130
+ readonly paid: "paid";
131
+ };
132
+ type PaymentStatus = (typeof PaymentStatus)[keyof typeof PaymentStatus];
133
+
134
+ type BasicUserData = {
135
+ id: ID;
136
+ phone: bigint;
137
+ email: string | null;
138
+ roles: Role[];
139
+ };
140
+ type BasicRequest = {
141
+ headers: {
142
+ authorization?: string | undefined;
143
+ };
144
+ user?: BasicUserData | undefined;
145
+ params: unknown;
146
+ query: unknown;
147
+ body: unknown;
148
+ };
149
+ type AuthedRequest = Omit<BasicRequest, 'user'> & {
150
+ user: BasicUserData;
151
+ };
152
+ type TypedRequest<T extends {
153
+ params?: any;
154
+ query?: any;
155
+ body?: any;
156
+ } = {}> = BasicRequest & {
157
+ params: 'params' extends keyof T ? T['params'] : unknown;
158
+ query: 'query' extends keyof T ? T['query'] : unknown;
159
+ body: 'body' extends keyof T ? T['body'] : unknown;
160
+ };
161
+ type TypedAuthedRequest<T extends {
162
+ params?: any;
163
+ query?: any;
164
+ body?: any;
165
+ } = {}> = Omit<TypedRequest<T>, 'user'> & {
166
+ user: BasicUserData;
167
+ };
168
+ declare class UnauthenticatedError {
169
+ readonly _tag = "Unauthenticated";
170
+ message?: string;
171
+ constructor(message?: string);
172
+ }
173
+ declare class ForbiddenError {
174
+ readonly _tag = "Forbidden";
175
+ message?: string;
176
+ constructor(message?: string);
177
+ }
178
+ declare class UserNotFoundError {
179
+ readonly _tag = "UserNotFound";
180
+ message?: string;
181
+ constructor(message?: string);
182
+ }
183
+ declare class RoleRequiredError {
184
+ readonly _tag = "RoleRequired";
185
+ userRoles: Role[];
186
+ requiredRoles: Role[];
187
+ message?: string;
188
+ constructor(userRoles: Role[], requiredRoles: Role[], message?: string);
189
+ }
190
+ declare class ValidationError<W extends 'params' | 'body' | 'query', E> {
191
+ readonly _tag = "ValidationError";
192
+ where: W;
193
+ parseError: E;
194
+ message?: string;
195
+ constructor(where: W, parseError: E, message?: string);
196
+ }
197
+ declare class InternalServerError {
198
+ readonly _tag = "InternalServerError";
199
+ message: string;
200
+ constructor(message: string);
201
+ }
202
+ declare const IdSchema: z__default.ZodInt;
203
+ type ID = z__default.infer<typeof IdSchema>;
204
+
205
+ type AsyncReturn<T extends (arg0: any) => Promise<any>> = Awaited<ReturnType<T>>;
206
+
207
+ declare const ListLessonsRequestQuerySchema: z__default.ZodUnion<readonly [z__default.ZodObject<{
208
+ startDate: z__default.ZodOptional<z__default.z.ZodCoercedDate<unknown>>;
209
+ endDate: z__default.ZodOptional<z__default.z.ZodCoercedDate<unknown>>;
210
+ teacherId: z__default.ZodOptional<z__default.ZodInt>;
211
+ courseId: z__default.ZodInt;
212
+ editionId: z__default.ZodInt;
213
+ }, z__default.z.core.$strip>, z__default.ZodObject<{
214
+ startDate: z__default.ZodOptional<z__default.z.ZodCoercedDate<unknown>>;
215
+ endDate: z__default.ZodOptional<z__default.z.ZodCoercedDate<unknown>>;
216
+ teacherId: z__default.ZodOptional<z__default.ZodInt>;
217
+ courseId: z__default.ZodUndefined;
218
+ editionId: z__default.ZodUndefined;
219
+ }, z__default.z.core.$strip>]>;
220
+ type ListLessonsRequestQuery = z__default.infer<typeof ListLessonsRequestQuerySchema>;
221
+ declare const GetLessonRequestParamsSchema: z__default.ZodObject<{
222
+ id: z__default.z.ZodCoercedNumber<unknown>;
223
+ }, z__default.z.core.$strip>;
224
+ type GetLessonRequestParams = z__default.infer<typeof GetLessonRequestParamsSchema>;
225
+ declare const CreateLessonRequestBodySchema: z__default.ZodUnion<readonly [z__default.ZodObject<{
226
+ courseId: z__default.ZodInt;
227
+ editionId: z__default.ZodInt;
228
+ date: z__default.z.ZodCoercedDate<unknown>;
229
+ title: z__default.ZodString;
230
+ teacherId: z__default.ZodInt;
231
+ liveUrl: z__default.ZodURL;
232
+ livePassword: z__default.ZodOptional<z__default.ZodString>;
233
+ liveStartTime: z__default.z.ZodISOTime;
234
+ liveEndTime: z__default.z.ZodISOTime;
235
+ }, z__default.z.core.$strip>, z__default.ZodObject<{
236
+ courseId: z__default.ZodInt;
237
+ editionId: z__default.ZodInt;
238
+ date: z__default.z.ZodCoercedDate<unknown>;
239
+ title: z__default.ZodString;
240
+ teacherId: z__default.ZodInt;
241
+ liveUrl: z__default.ZodUndefined;
242
+ livePassword: z__default.ZodUndefined;
243
+ liveStartTime: z__default.ZodUndefined;
244
+ liveEndTime: z__default.ZodUndefined;
245
+ }, z__default.z.core.$strip>]>;
246
+ type CreateLessonRequestBody = z__default.infer<typeof CreateLessonRequestBodySchema>;
247
+ declare const UpdateLessonRequestParamsSchema: z__default.ZodObject<{
248
+ id: z__default.z.ZodCoercedNumber<unknown>;
249
+ }, z__default.z.core.$strip>;
250
+ type UpdateLessonRequestParams = z__default.infer<typeof UpdateLessonRequestParamsSchema>;
251
+ declare const UpdateLessonRequestBodySchema: z__default.ZodObject<{
252
+ courseId: z__default.ZodOptional<z__default.ZodInt>;
253
+ editionId: z__default.ZodOptional<z__default.ZodInt>;
254
+ date: z__default.ZodOptional<z__default.z.ZodCoercedDate<unknown>>;
255
+ title: z__default.ZodOptional<z__default.ZodString>;
256
+ teacherId: z__default.ZodOptional<z__default.ZodInt>;
257
+ liveUrl: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodURL>>;
258
+ livePassword: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodString>>;
259
+ liveStartTime: z__default.ZodOptional<z__default.ZodNullable<z__default.z.ZodISOTime>>;
260
+ liveEndTime: z__default.ZodOptional<z__default.ZodNullable<z__default.z.ZodISOTime>>;
261
+ }, z__default.z.core.$strip>;
262
+ type UpdateLessonRequestBody = z__default.infer<typeof UpdateLessonRequestBodySchema>;
263
+ declare const DeleteLessonRequestParamsSchema: z__default.ZodObject<{
264
+ id: z__default.z.ZodCoercedNumber<unknown>;
265
+ }, z__default.z.core.$strip>;
266
+ type DeleteLessonRequestParams = z__default.infer<typeof DeleteLessonRequestParamsSchema>;
267
+
268
+ declare const listLessonsRoute: (req: Omit<Omit<TypedAuthedRequest<{
269
+ query: ListLessonsRequestQuery;
270
+ }>, "params" | "query" | "body"> & {
271
+ params: unknown;
272
+ query: unknown;
273
+ body: unknown;
274
+ }, "user"> & {
275
+ user: BasicUserData | undefined;
276
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Ok<{
277
+ courseId: number;
278
+ editionId: number;
279
+ id: number;
280
+ createdAt: Date;
281
+ createdById: number;
282
+ updatedAt: Date;
283
+ updatedById: number;
284
+ date: Date;
285
+ title: string;
286
+ teacherId: number;
287
+ liveStartTime: Date | null;
288
+ liveEndTime: Date | null;
289
+ livePassword: string | null;
290
+ liveUrl: string | null;
291
+ }[]> | Err<ValidationError<"query", z.ZodError<{
292
+ courseId: number;
293
+ editionId: number;
294
+ startDate?: Date;
295
+ endDate?: Date;
296
+ teacherId?: number;
297
+ } | {
298
+ courseId: undefined;
299
+ editionId: undefined;
300
+ startDate?: Date;
301
+ endDate?: Date;
302
+ teacherId?: number;
303
+ }>>>>;
304
+ type ListLessonsResponseBody = AsyncReturn<typeof listLessonsRoute>;
305
+ declare class LessonNotFoundError extends Error {
306
+ readonly _tag = "LessonNotFound";
307
+ id: ID;
308
+ message: string;
309
+ constructor(id: ID, message: string);
310
+ }
311
+ declare const getLessonRoute: (req: Omit<Omit<TypedAuthedRequest<{
312
+ params: GetLessonRequestParams;
313
+ }>, "params" | "query" | "body"> & {
314
+ params: unknown;
315
+ query: unknown;
316
+ body: unknown;
317
+ }, "user"> & {
318
+ user: BasicUserData | undefined;
319
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<LessonNotFoundError> | Ok<{
320
+ courseId: number;
321
+ editionId: number;
322
+ id: number;
323
+ createdAt: Date;
324
+ createdById: number;
325
+ updatedAt: Date;
326
+ updatedById: number;
327
+ date: Date;
328
+ title: string;
329
+ teacherId: number;
330
+ liveStartTime: Date | null;
331
+ liveEndTime: Date | null;
332
+ livePassword: string | null;
333
+ liveUrl: string | null;
334
+ }> | Err<ValidationError<"params", z.ZodError<{
335
+ id: number;
336
+ }>>>>;
337
+ type GetLessonResponseBody = AsyncReturn<typeof getLessonRoute>;
338
+ declare class LessonAssociatedDataDoesNotExistError extends Error {
339
+ readonly _tag = "LessonAssociatedDataDoesNotExist";
340
+ field: string;
341
+ message: string;
342
+ constructor(field: string, message: string);
343
+ }
344
+ declare const createLessonRoute: (req: Omit<Omit<TypedAuthedRequest<{
345
+ body: CreateLessonRequestBody;
346
+ }>, "params" | "query" | "body"> & {
347
+ params: unknown;
348
+ query: unknown;
349
+ body: unknown;
350
+ } & {
351
+ user: BasicUserData;
352
+ }, "user"> & {
353
+ user: BasicUserData | undefined;
354
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<LessonAssociatedDataDoesNotExistError> | Ok<{
355
+ message: "Aula criada com sucesso";
356
+ leson: {
357
+ courseId: number;
358
+ editionId: number;
359
+ id: number;
360
+ createdAt: Date;
361
+ createdById: number;
362
+ updatedAt: Date;
363
+ updatedById: number;
364
+ date: Date;
365
+ title: string;
366
+ teacherId: number;
367
+ liveStartTime: Date | null;
368
+ liveEndTime: Date | null;
369
+ livePassword: string | null;
370
+ liveUrl: string | null;
371
+ };
372
+ }> | Err<ValidationError<"body", z.ZodError<{
373
+ courseId: number;
374
+ editionId: number;
375
+ date: Date;
376
+ title: string;
377
+ teacherId: number;
378
+ liveUrl: string;
379
+ liveStartTime: string;
380
+ liveEndTime: string;
381
+ livePassword?: string;
382
+ } | {
383
+ courseId: number;
384
+ editionId: number;
385
+ date: Date;
386
+ title: string;
387
+ teacherId: number;
388
+ liveUrl: undefined;
389
+ livePassword: undefined;
390
+ liveStartTime: undefined;
391
+ liveEndTime: undefined;
392
+ }>>>>;
393
+ type CreateLessonResponseBody = AsyncReturn<typeof createLessonRoute>;
394
+ declare class InconsistentLivePropertiesError extends Error {
395
+ readonly _tag = "InconsistentLiveProperties";
396
+ message: string;
397
+ constructor(message: string);
398
+ }
399
+ declare const updateLessonRoute: (req: Omit<Omit<TypedAuthedRequest<{
400
+ params: UpdateLessonRequestParams;
401
+ body: UpdateLessonRequestBody;
402
+ }>, "params" | "query" | "body"> & {
403
+ params: unknown;
404
+ query: unknown;
405
+ body: unknown;
406
+ } & {
407
+ user: BasicUserData;
408
+ }, "user"> & {
409
+ user: BasicUserData | undefined;
410
+ }) => Promise<Err<InternalServerError> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<LessonNotFoundError> | Err<LessonAssociatedDataDoesNotExistError> | Err<InconsistentLivePropertiesError> | Ok<{
411
+ message: "Aula atualizada com sucesso";
412
+ lesson: {
413
+ courseId: number;
414
+ editionId: number;
415
+ id: number;
416
+ createdAt: Date;
417
+ createdById: number;
418
+ updatedAt: Date;
419
+ updatedById: number;
420
+ date: Date;
421
+ title: string;
422
+ teacherId: number;
423
+ liveStartTime: Date | null;
424
+ liveEndTime: Date | null;
425
+ livePassword: string | null;
426
+ liveUrl: string | null;
427
+ };
428
+ }> | Err<ValidationError<"params", z.ZodError<{
429
+ id: number;
430
+ }>>> | Err<ValidationError<"body", z.ZodError<{
431
+ courseId?: number;
432
+ editionId?: number;
433
+ date?: Date;
434
+ title?: string;
435
+ teacherId?: number;
436
+ liveUrl?: string;
437
+ livePassword?: string;
438
+ liveStartTime?: string;
439
+ liveEndTime?: string;
440
+ }>>>>;
441
+ type UpdateLessonResponseBody = AsyncReturn<typeof updateLessonRoute>;
442
+ declare class LessonHasAssociatedDataError extends Error {
443
+ readonly _tag = "LessonHasAssociatedData";
444
+ lessonId: ID;
445
+ field: string;
446
+ message: string;
447
+ constructor(lessonId: ID, field: string, message: string);
448
+ }
449
+ declare const deleteLessonRoute: (req: Omit<Omit<TypedAuthedRequest<{
450
+ params: DeleteLessonRequestParams;
451
+ }>, "params" | "query" | "body"> & {
452
+ params: unknown;
453
+ query: unknown;
454
+ body: unknown;
455
+ } & {
456
+ user: BasicUserData;
457
+ }, "user"> & {
458
+ user: BasicUserData | undefined;
459
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<LessonNotFoundError> | Err<LessonHasAssociatedDataError> | Ok<{
460
+ message: "Aula removida com sucesso!";
461
+ lessonId: number;
462
+ }> | Err<ValidationError<"params", z.ZodError<{
463
+ id: number;
464
+ }>>>>;
465
+ type DeleteLessonResponseBody = AsyncReturn<typeof deleteLessonRoute>;
466
+
467
+ declare const listAttendanceRoute: (req: Omit<Omit<TypedAuthedRequest<{
468
+ query: ListAttendanceRequestQuery;
469
+ }>, "params" | "query" | "body"> & {
470
+ params: unknown;
471
+ query: unknown;
472
+ body: unknown;
473
+ }, "user"> & {
474
+ user: BasicUserData | undefined;
475
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Ok<{
476
+ studentId: number;
477
+ lessonId: number;
478
+ id: number;
479
+ status: AttendanceStatus;
480
+ createdAt: Date;
481
+ createdById: number;
482
+ updatedAt: Date;
483
+ updatedById: number;
484
+ }[]> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"query", z.ZodError<{
485
+ studentId?: number;
486
+ lessonId?: number;
487
+ courseId?: number;
488
+ editionId?: number;
489
+ }>>> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError>>;
490
+ type ListAttendenceResponseBody = AsyncReturn<typeof listAttendanceRoute>;
491
+ declare const getLessonStatusRoute: (req: Omit<Omit<TypedAuthedRequest<{
492
+ params: GetLessonStatusRequestParams;
493
+ }>, "params" | "query" | "body"> & {
494
+ params: unknown;
495
+ query: unknown;
496
+ body: unknown;
497
+ } & {
498
+ user: BasicUserData;
499
+ }, "user"> & {
500
+ user: BasicUserData | undefined;
501
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<LessonNotFoundError> | Ok<{
502
+ lessonId: number;
503
+ hasAttendance: boolean;
504
+ count: number;
505
+ }> | Err<ValidationError<"params", z.ZodError<{
506
+ lessonId: number;
507
+ }>>>>;
508
+ type GetLessonStatusResponseBody = AsyncReturn<typeof getLessonStatusRoute>;
509
+ declare const getLessonsStatusBulkRoute: (req: Omit<Omit<TypedAuthedRequest<{
510
+ query: GetLessonsStatusBulkQuery;
511
+ }>, "params" | "query" | "body"> & {
512
+ params: unknown;
513
+ query: unknown;
514
+ body: unknown;
515
+ } & {
516
+ user: BasicUserData;
517
+ }, "user"> & {
518
+ user: BasicUserData | undefined;
519
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<LessonNotFoundError> | Ok<Record<number, {
520
+ hasAttendance: boolean;
521
+ count: number;
522
+ }>> | Err<ValidationError<"query", z.ZodError<{
523
+ lessonIds: number[];
524
+ }>>>>;
525
+ type GetLessonsStatusBulkResponse = AsyncReturn<typeof getLessonsStatusBulkRoute>;
526
+ declare class AttendanceNotFoundError extends Error {
527
+ readonly _tag = "AttendanceNotFound";
528
+ id: ID;
529
+ message: string;
530
+ constructor(id: ID, message: string);
531
+ }
532
+ declare const getStudentAttendanceStatusRoute: (req: Omit<Omit<TypedAuthedRequest<{
533
+ params: GetStudentAttendanceStatusRequestParams;
534
+ query: GetStudentAttendanceStatusRequestQuery;
535
+ }>, "params" | "query" | "body"> & {
536
+ params: unknown;
537
+ query: unknown;
538
+ body: unknown;
539
+ }, "user"> & {
540
+ user: BasicUserData | undefined;
541
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Ok<{
542
+ studentId: number;
543
+ courseId: number | "all";
544
+ totalLessons: number;
545
+ present: number;
546
+ absent: number;
547
+ justified: number;
548
+ attendanceRate: number;
549
+ absenceRate: number;
550
+ isAtRisk: boolean;
551
+ }> | Err<ValidationError<"params", z.ZodError<{
552
+ studentId: number;
553
+ }>>> | Err<ValidationError<"query", z.ZodError<{
554
+ courseId?: number;
555
+ editionId?: number;
556
+ } | {
557
+ courseId: undefined;
558
+ editionId: undefined;
559
+ }>>>>;
560
+ type GetStudentAttendanceStatusResponseBody = AsyncReturn<typeof getStudentAttendanceStatusRoute>;
561
+ declare const updateAttendanceRoute: (req: Omit<Omit<TypedAuthedRequest<{
562
+ body: UpdateAttendenceRequestBody;
563
+ }>, "params" | "query" | "body"> & {
564
+ params: unknown;
565
+ query: unknown;
566
+ body: unknown;
567
+ } & {
568
+ user: BasicUserData;
569
+ }, "user"> & {
570
+ user: BasicUserData | undefined;
571
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Ok<{
572
+ id: number;
573
+ }> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<ValidationError<"body", z.ZodError<{
574
+ lessonId: number;
575
+ studentId: number;
576
+ status: "PRESENT" | "ABSENT" | "JUSTIFIED";
577
+ }>>>>;
578
+ type UpdateAttendanceResponse = AsyncReturn<typeof updateAttendanceRoute>;
579
+ declare const updateAttendancesBulkRoute: (req: Omit<Omit<TypedAuthedRequest<{
580
+ body: CreateOrUpdateAttendancesBulkRequestBody;
581
+ }>, "params" | "query" | "body"> & {
582
+ params: unknown;
583
+ query: unknown;
584
+ body: unknown;
585
+ } & {
586
+ user: BasicUserData;
587
+ }, "user"> & {
588
+ user: BasicUserData | undefined;
589
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<LessonNotFoundError> | Ok<{
590
+ message: string;
591
+ count: number;
592
+ attendances: {
593
+ studentId: number;
594
+ lessonId: number;
595
+ id: number;
596
+ status: AttendanceStatus;
597
+ createdAt: Date;
598
+ createdById: number;
599
+ updatedAt: Date;
600
+ updatedById: number;
601
+ }[];
602
+ }> | Err<ValidationError<"body", z.ZodError<{
603
+ lessonId: number;
604
+ attendances: {
605
+ studentId: number;
606
+ status: "PRESENT" | "ABSENT" | "JUSTIFIED";
607
+ }[];
608
+ }>>>>;
609
+ type CreateOrUpdateAttendancesBulkResponseBody = AsyncReturn<typeof updateAttendancesBulkRoute>;
610
+ declare const deleteAttendanceRoute: (req: Omit<Omit<TypedAuthedRequest<{
611
+ params: DeleteAttendanceRequestParams;
612
+ }>, "params" | "query" | "body"> & {
613
+ params: unknown;
614
+ query: unknown;
615
+ body: unknown;
616
+ } & {
617
+ user: BasicUserData;
618
+ }, "user"> & {
619
+ user: BasicUserData | undefined;
620
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<AttendanceNotFoundError> | Ok<{
621
+ message: string;
622
+ }> | Err<ValidationError<"params", z.ZodError<{
623
+ id: number;
624
+ }>>>>;
625
+ type DeleteAttendanceResponse = AsyncReturn<typeof deleteAttendanceRoute>;
626
+
627
+ declare const VerifyPhoneRequestBodySchema: z__default.ZodObject<{
628
+ phone: z__default.ZodInt;
629
+ }, z__default.z.core.$strip>;
630
+ type VerifyPhoneRequestBody = z__default.infer<typeof VerifyPhoneRequestBodySchema>;
631
+ declare const CreateCustomTokenRequestBodySchema: z__default.ZodObject<{
632
+ phone: z__default.ZodInt;
633
+ }, z__default.z.core.$strip>;
634
+ type CreateCustomTokenRequestBody = z__default.infer<typeof CreateCustomTokenRequestBodySchema>;
635
+
636
+ declare class EmailNotLinked {
637
+ readonly _tag = "EmailNotLinked";
638
+ message: string;
639
+ constructor(message: string);
640
+ }
641
+ declare const verifyPhoneRoute: (req: Omit<TypedRequest<{
642
+ body: VerifyPhoneRequestBody;
643
+ }>, "params" | "query" | "body"> & {
644
+ params: unknown;
645
+ query: unknown;
646
+ body: unknown;
647
+ }) => Promise<Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<UserNotFoundError> | Ok<{
648
+ registered: boolean;
649
+ message: string;
650
+ userName: string;
651
+ roles: Role[];
652
+ }> | Err<ValidationError<"body", z.ZodError<{
653
+ phone: number;
654
+ }>>>>;
655
+ type VerifyPhoneResponse = AsyncReturn<typeof verifyPhoneRoute>;
656
+ declare const createCustomTokenRoute: (req: Omit<TypedRequest<{
657
+ body: CreateCustomTokenRequestBody;
658
+ }>, "params" | "query" | "body"> & {
659
+ params: unknown;
660
+ query: unknown;
661
+ body: unknown;
662
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<UserNotFoundError> | Err<EmailNotLinked> | Ok<{
663
+ customToken: unknown;
664
+ user: {
665
+ id: number;
666
+ credentialsProvider: "FIREBASE";
667
+ credentialsProviderId: string;
668
+ email: string;
669
+ phone: bigint;
670
+ };
671
+ }> | Err<ValidationError<"body", z.ZodError<{
672
+ phone: number;
673
+ }>>>>;
674
+ type CreateCustomTokenResponse = AsyncReturn<typeof createCustomTokenRoute>;
675
+ declare const getUserRoute$1: (req: Omit<AuthedRequest, "user"> & {
676
+ user: BasicUserData | undefined;
677
+ }) => Promise<Err<InternalServerError> | Err<UnauthenticatedError> | Ok<{
678
+ height: number;
679
+ id: number;
680
+ createdAt: Date;
681
+ createdById: number;
682
+ updatedAt: Date;
683
+ updatedById: number;
684
+ name: string;
685
+ credentialsProvider: CredentialsProvider;
686
+ credentialsProviderId: string | null;
687
+ email: string | null;
688
+ phone: bigint;
689
+ cellLeader: string | null;
690
+ discipler: string | null;
691
+ roles: Role[];
692
+ active: boolean;
693
+ }>>;
694
+ type GetUserResponse = AsyncReturn<typeof getUserRoute$1>;
695
+ declare const validateRoute: (req: Omit<AuthedRequest, "user"> & {
696
+ user: BasicUserData | undefined;
697
+ }) => Promise<Err<InternalServerError> | Err<UnauthenticatedError> | Ok<{
698
+ valid: boolean;
699
+ user: {
700
+ height: number;
701
+ id: number;
702
+ createdAt: Date;
703
+ createdById: number;
704
+ updatedAt: Date;
705
+ updatedById: number;
706
+ name: string;
707
+ credentialsProvider: CredentialsProvider;
708
+ credentialsProviderId: string | null;
709
+ email: string | null;
710
+ phone: bigint;
711
+ cellLeader: string | null;
712
+ discipler: string | null;
713
+ roles: Role[];
714
+ active: boolean;
715
+ };
716
+ }>>;
717
+ type ValidateResponse = AsyncReturn<typeof validateRoute>;
718
+
719
+ declare const ListContentsRequestQuerySchema: z__default.ZodObject<{
720
+ courseId: z__default.ZodOptional<z__default.ZodInt>;
721
+ kind: z__default.ZodOptional<z__default.ZodEnum<{
722
+ readonly RECORDING: "RECORDING";
723
+ readonly SUPPORT: "SUPPORT";
724
+ }>>;
725
+ category: z__default.ZodOptional<z__default.ZodString>;
726
+ }, z__default.z.core.$strip>;
727
+ type ListContentsRequestQuery = z__default.infer<typeof ListContentsRequestQuerySchema>;
728
+ declare const GetContentRequestParamsSchema: z__default.ZodObject<{
729
+ id: z__default.z.ZodCoercedNumber<unknown>;
730
+ }, z__default.z.core.$strip>;
731
+ type GetContentRequestParams = z__default.infer<typeof GetContentRequestParamsSchema>;
732
+ declare const CreateContentRequestBodySchema: z__default.ZodObject<{
733
+ courseId: z__default.ZodInt;
734
+ title: z__default.ZodString;
735
+ url: z__default.ZodString;
736
+ description: z__default.ZodOptional<z__default.ZodString>;
737
+ kind: z__default.ZodEnum<{
738
+ readonly RECORDING: "RECORDING";
739
+ readonly SUPPORT: "SUPPORT";
740
+ }>;
741
+ category: z__default.ZodOptional<z__default.ZodString>;
742
+ }, z__default.z.core.$strip>;
743
+ type CreateContentRequestBody = z__default.infer<typeof CreateContentRequestBodySchema>;
744
+ declare const UpdateContentRequestBodySchema: z__default.ZodObject<{
745
+ courseId: z__default.ZodOptional<z__default.ZodInt>;
746
+ title: z__default.ZodOptional<z__default.ZodString>;
747
+ url: z__default.ZodOptional<z__default.ZodString>;
748
+ description: z__default.ZodOptional<z__default.ZodString>;
749
+ kind: z__default.ZodOptional<z__default.ZodEnum<{
750
+ readonly RECORDING: "RECORDING";
751
+ readonly SUPPORT: "SUPPORT";
752
+ }>>;
753
+ category: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodString>>;
754
+ }, z__default.z.core.$strip>;
755
+ type UpdateContentRequestBody = z__default.infer<typeof UpdateContentRequestBodySchema>;
756
+ declare const UpdateContentRequestParamsSchema: z__default.ZodObject<{
757
+ id: z__default.z.ZodCoercedNumber<unknown>;
758
+ }, z__default.z.core.$strip>;
759
+ type UpdateContentRequestParams = z__default.infer<typeof UpdateContentRequestParamsSchema>;
760
+ declare const DeleteContentRequestParamsSchema: z__default.ZodObject<{
761
+ id: z__default.z.ZodCoercedNumber<unknown>;
762
+ }, z__default.z.core.$strip>;
763
+ type DeleteContentRequestParams = z__default.infer<typeof DeleteContentRequestParamsSchema>;
764
+
765
+ declare const GetCourseRequestParamsSchema: z__default.ZodObject<{
766
+ id: z__default.z.ZodCoercedNumber<unknown>;
767
+ }, z__default.z.core.$strip>;
768
+ type GetCourseRequestParams = z__default.infer<typeof GetCourseRequestParamsSchema>;
769
+ declare const CreateCourseRequestBodySchema: z__default.ZodObject<{
770
+ name: z__default.ZodString;
771
+ duration: z__default.ZodInt;
772
+ }, z__default.z.core.$strip>;
773
+ type CreateCourseRequestBody = z__default.infer<typeof CreateCourseRequestBodySchema>;
774
+ declare const UpdateCourseRequestParamsSchema: z__default.ZodObject<{
775
+ id: z__default.z.ZodCoercedNumber<unknown>;
776
+ }, z__default.z.core.$strip>;
777
+ type UpdateCourseRequestParams = z__default.infer<typeof UpdateCourseRequestParamsSchema>;
778
+ declare const UpdateCourseRequestBodySchema: z__default.ZodObject<{
779
+ name: z__default.ZodOptional<z__default.ZodString>;
780
+ duration: z__default.ZodOptional<z__default.ZodInt>;
781
+ }, z__default.z.core.$strip>;
782
+ type UpdateCourseRequestBody = z__default.infer<typeof UpdateCourseRequestBodySchema>;
783
+ declare const DeleteCourseRequestParamsSchema: z__default.ZodObject<{
784
+ id: z__default.z.ZodCoercedNumber<unknown>;
785
+ }, z__default.z.core.$strip>;
786
+ type DeleteCourseRequestParams = z__default.infer<typeof DeleteCourseRequestParamsSchema>;
787
+
788
+ declare const getCoursesRoute: (req: Omit<AuthedRequest, "user"> & {
789
+ user: BasicUserData | undefined;
790
+ }) => Promise<Err<InternalServerError> | Err<UnauthenticatedError> | Ok<{
791
+ id: number;
792
+ createdAt: Date;
793
+ createdById: number;
794
+ updatedAt: Date;
795
+ updatedById: number;
796
+ name: string;
797
+ duration: number;
798
+ }[]>>;
799
+ type GetCoursesResponse = AsyncReturn<typeof getCoursesRoute>;
800
+ declare class CourseNotFoundError extends Error {
801
+ readonly _tag = "CourseNotFound";
802
+ id: ID;
803
+ message: string;
804
+ constructor(id: ID, message: string);
805
+ }
806
+ declare const getCourseRoute: (req: Omit<Omit<TypedAuthedRequest<{
807
+ params: GetCourseRequestParams;
808
+ }>, "params" | "query" | "body"> & {
809
+ params: unknown;
810
+ query: unknown;
811
+ body: unknown;
812
+ }, "user"> & {
813
+ user: BasicUserData | undefined;
814
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<CourseNotFoundError> | Ok<{
815
+ id: number;
816
+ createdAt: Date;
817
+ createdById: number;
818
+ updatedAt: Date;
819
+ updatedById: number;
820
+ name: string;
821
+ duration: number;
822
+ }> | Err<ValidationError<"params", z.ZodError<{
823
+ id: number;
824
+ }>>>>;
825
+ type GetCourseResponse = AsyncReturn<typeof getCourseRoute>;
826
+ declare const createCourseRoute: (req: Omit<Omit<TypedAuthedRequest<{
827
+ body: CreateCourseRequestBody;
828
+ }>, "params" | "query" | "body"> & {
829
+ params: unknown;
830
+ query: unknown;
831
+ body: unknown;
832
+ } & {
833
+ user: BasicUserData;
834
+ }, "user"> & {
835
+ user: BasicUserData | undefined;
836
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
837
+ message: string;
838
+ course: {
839
+ id: number;
840
+ createdAt: Date;
841
+ createdById: number;
842
+ updatedAt: Date;
843
+ updatedById: number;
844
+ name: string;
845
+ duration: number;
846
+ };
847
+ }> | Err<ValidationError<"body", z.ZodError<{
848
+ name: string;
849
+ duration: number;
850
+ }>>>>;
851
+ type CreateCourseResponse = AsyncReturn<typeof createCourseRoute>;
852
+ declare const updateCourseRoute: (req: Omit<Omit<TypedAuthedRequest<{
853
+ params: UpdateCourseRequestParams;
854
+ body: UpdateCourseRequestBody;
855
+ }>, "params" | "query" | "body"> & {
856
+ params: unknown;
857
+ query: unknown;
858
+ body: unknown;
859
+ } & {
860
+ user: BasicUserData;
861
+ }, "user"> & {
862
+ user: BasicUserData | undefined;
863
+ }) => Promise<Err<InternalServerError> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<CourseNotFoundError> | Ok<{
864
+ message: string;
865
+ course: {
866
+ id: number;
867
+ createdAt: Date;
868
+ createdById: number;
869
+ updatedAt: Date;
870
+ updatedById: number;
871
+ name: string;
872
+ duration: number;
873
+ };
874
+ }> | Err<ValidationError<"params", z.ZodError<{
875
+ id: number;
876
+ }>>> | Err<ValidationError<"body", z.ZodError<{
877
+ name?: string;
878
+ duration?: number;
879
+ }>>>>;
880
+ type UpdateCourseResponse = AsyncReturn<typeof updateCourseRoute>;
881
+ declare const deleteCourseRoute: (req: Omit<Omit<TypedAuthedRequest<{
882
+ params: DeleteCourseRequestParams;
883
+ }>, "params" | "query" | "body"> & {
884
+ params: unknown;
885
+ query: unknown;
886
+ body: unknown;
887
+ } & {
888
+ user: BasicUserData;
889
+ }, "user"> & {
890
+ user: BasicUserData | undefined;
891
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<CourseNotFoundError> | Ok<{
892
+ message: string;
893
+ }> | Err<ValidationError<"params", z.ZodError<{
894
+ id: number;
895
+ }>>>>;
896
+ type DeleteCourseResponse = AsyncReturn<typeof deleteCourseRoute>;
897
+
898
+ declare const getContentsRoute: (req: Omit<Omit<TypedAuthedRequest<{
899
+ query: ListContentsRequestQuery;
900
+ }>, "params" | "query" | "body"> & {
901
+ params: unknown;
902
+ query: unknown;
903
+ body: unknown;
904
+ }, "user"> & {
905
+ user: BasicUserData | undefined;
906
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Ok<{
907
+ courseId: number | null;
908
+ id: number;
909
+ createdAt: Date;
910
+ createdById: number;
911
+ updatedAt: Date;
912
+ updatedById: number;
913
+ title: string;
914
+ description: string;
915
+ kind: ContentKind;
916
+ category: string | null;
917
+ url: string;
918
+ }[]> | Err<ValidationError<"query", z.ZodError<{
919
+ courseId?: number;
920
+ kind?: "RECORDING" | "SUPPORT";
921
+ category?: string;
922
+ }>>>>;
923
+ type ListContentsResponseBody = AsyncReturn<typeof getContentsRoute>;
924
+ declare class ContentNotFoundError extends Error {
925
+ readonly _tag = "ContentNotFound";
926
+ message: string;
927
+ constructor(message: string);
928
+ }
929
+ declare const getContentRoute: (req: Omit<Omit<TypedAuthedRequest<{
930
+ params: GetContentRequestParams;
931
+ }>, "params" | "query" | "body"> & {
932
+ params: unknown;
933
+ query: unknown;
934
+ body: unknown;
935
+ }, "user"> & {
936
+ user: BasicUserData | undefined;
937
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
938
+ courseId: number | null;
939
+ id: number;
940
+ createdAt: Date;
941
+ createdById: number;
942
+ updatedAt: Date;
943
+ updatedById: number;
944
+ title: string;
945
+ description: string;
946
+ kind: ContentKind;
947
+ category: string | null;
948
+ url: string;
949
+ }> | Err<ContentNotFoundError> | Err<ValidationError<"params", z.ZodError<{
950
+ id: number;
951
+ }>>>>;
952
+ type GetContentResponse = AsyncReturn<typeof getContentRoute>;
953
+ declare const createContentRoute: (req: Omit<Omit<TypedAuthedRequest<{
954
+ body: CreateContentRequestBody;
955
+ }>, "params" | "query" | "body"> & {
956
+ params: unknown;
957
+ query: unknown;
958
+ body: unknown;
959
+ } & {
960
+ user: BasicUserData;
961
+ }, "user"> & {
962
+ user: BasicUserData | undefined;
963
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<CourseNotFoundError> | Ok<{
964
+ message: string;
965
+ content: {
966
+ courseId: number | null;
967
+ id: number;
968
+ createdAt: Date;
969
+ createdById: number;
970
+ updatedAt: Date;
971
+ updatedById: number;
972
+ title: string;
973
+ description: string;
974
+ kind: ContentKind;
975
+ category: string | null;
976
+ url: string;
977
+ };
978
+ }> | Err<ValidationError<"body", z.ZodError<{
979
+ courseId: number;
980
+ title: string;
981
+ url: string;
982
+ kind: "RECORDING" | "SUPPORT";
983
+ description?: string;
984
+ category?: string;
985
+ }>>>>;
986
+ type CreateContentResponseBody = AsyncReturn<typeof createContentRoute>;
987
+ declare const updateContentRoute: (req: Omit<Omit<TypedAuthedRequest<{
988
+ params: UpdateContentRequestParams;
989
+ body: UpdateContentRequestBody;
990
+ }>, "params" | "query" | "body"> & {
991
+ params: unknown;
992
+ query: unknown;
993
+ body: unknown;
994
+ } & {
995
+ user: BasicUserData;
996
+ }, "user"> & {
997
+ user: BasicUserData | undefined;
998
+ }) => Promise<Err<InternalServerError> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<CourseNotFoundError> | Ok<{
999
+ message: string;
1000
+ content: {
1001
+ courseId: number | null;
1002
+ id: number;
1003
+ createdAt: Date;
1004
+ createdById: number;
1005
+ updatedAt: Date;
1006
+ updatedById: number;
1007
+ title: string;
1008
+ description: string;
1009
+ kind: ContentKind;
1010
+ category: string | null;
1011
+ url: string;
1012
+ };
1013
+ }> | Err<ValidationError<"params", z.ZodError<{
1014
+ id: number;
1015
+ }>>> | Err<ValidationError<"body", z.ZodError<{
1016
+ courseId?: number;
1017
+ title?: string;
1018
+ url?: string;
1019
+ description?: string;
1020
+ kind?: "RECORDING" | "SUPPORT";
1021
+ category?: string;
1022
+ }>>>>;
1023
+ type UpdateContentResponseBody = AsyncReturn<typeof updateContentRoute>;
1024
+ declare const deleteContentRoute: (req: Omit<Omit<TypedAuthedRequest<{
1025
+ params: DeleteContentRequestParams;
1026
+ }>, "params" | "query" | "body"> & {
1027
+ params: unknown;
1028
+ query: unknown;
1029
+ body: unknown;
1030
+ } & {
1031
+ user: BasicUserData;
1032
+ }, "user"> & {
1033
+ user: BasicUserData | undefined;
1034
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
1035
+ message: string;
1036
+ }> | Err<ValidationError<"params", z.ZodError<{
1037
+ id: number;
1038
+ }>>>>;
1039
+ type DeleteContentResponseBody = AsyncReturn<typeof deleteContentRoute>;
1040
+
1041
+ declare const ListEditionsRequestQuerySchema: z__default.ZodObject<{
1042
+ status: z__default.ZodOptional<z__default.ZodEnum<{
1043
+ readonly UPCOMING: "UPCOMING";
1044
+ readonly ACTIVE: "ACTIVE";
1045
+ readonly FINISHED: "FINISHED";
1046
+ }>>;
1047
+ }, z__default.z.core.$strip>;
1048
+ type ListEditionsRequestQuery = z__default.infer<typeof ListEditionsRequestQuerySchema>;
1049
+ declare const GetEditionRequestParamsSchema: z__default.ZodObject<{
1050
+ id: z__default.z.ZodCoercedNumber<unknown>;
1051
+ }, z__default.z.core.$strip>;
1052
+ type GetEditionRequestParams = z__default.infer<typeof GetEditionRequestParamsSchema>;
1053
+ declare const CreateEditionRequestBodySchema: z__default.ZodObject<{
1054
+ name: z__default.ZodString;
1055
+ shortName: z__default.ZodString;
1056
+ startDate: z__default.z.ZodCoercedDate<unknown>;
1057
+ endDate: z__default.z.ZodCoercedDate<unknown>;
1058
+ status: z__default.ZodEnum<{
1059
+ readonly UPCOMING: "UPCOMING";
1060
+ readonly ACTIVE: "ACTIVE";
1061
+ readonly FINISHED: "FINISHED";
1062
+ }>;
1063
+ }, z__default.z.core.$strip>;
1064
+ type CreateEditionRequestBody = z__default.infer<typeof CreateEditionRequestBodySchema>;
1065
+ declare const UpdateEditionRequestParamsSchema: z__default.ZodObject<{
1066
+ id: z__default.z.ZodCoercedNumber<unknown>;
1067
+ }, z__default.z.core.$strip>;
1068
+ type UpdateEditionRequestParams = z__default.infer<typeof UpdateEditionRequestParamsSchema>;
1069
+ declare const UpdateEditionRequestBodySchema: z__default.ZodObject<{
1070
+ name: z__default.ZodOptional<z__default.ZodString>;
1071
+ shortName: z__default.ZodOptional<z__default.ZodString>;
1072
+ startDate: z__default.ZodOptional<z__default.z.ZodCoercedDate<unknown>>;
1073
+ endDate: z__default.ZodOptional<z__default.z.ZodCoercedDate<unknown>>;
1074
+ status: z__default.ZodOptional<z__default.ZodEnum<{
1075
+ readonly UPCOMING: "UPCOMING";
1076
+ readonly ACTIVE: "ACTIVE";
1077
+ readonly FINISHED: "FINISHED";
1078
+ }>>;
1079
+ }, z__default.z.core.$strip>;
1080
+ type UpdateEditionRequestBody = z__default.infer<typeof UpdateEditionRequestBodySchema>;
1081
+ declare const DeleteEditionRequestParamsSchema: z__default.ZodObject<{
1082
+ id: z__default.z.ZodCoercedNumber<unknown>;
1083
+ }, z__default.z.core.$strip>;
1084
+ type DeleteEditionRequestParams = z__default.infer<typeof DeleteEditionRequestParamsSchema>;
1085
+ declare const GetEditionStatsRequestParamsSchema: z__default.ZodObject<{
1086
+ id: z__default.z.ZodCoercedNumber<unknown>;
1087
+ }, z__default.z.core.$strip>;
1088
+ type GetEditionStatsRequestParams = z__default.infer<typeof GetEditionStatsRequestParamsSchema>;
1089
+
1090
+ declare const listEditionsRoute: (req: Omit<Omit<TypedAuthedRequest<{
1091
+ query: ListEditionsRequestQuery;
1092
+ }>, "params" | "query" | "body"> & {
1093
+ params: unknown;
1094
+ query: unknown;
1095
+ body: unknown;
1096
+ }, "user"> & {
1097
+ user: BasicUserData | undefined;
1098
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Ok<{
1099
+ id: number;
1100
+ status: EditionStatus;
1101
+ createdAt: Date;
1102
+ createdById: number;
1103
+ updatedAt: Date;
1104
+ updatedById: number;
1105
+ name: string;
1106
+ shortName: string;
1107
+ startDate: Date;
1108
+ endDate: Date;
1109
+ }[]> | Err<ValidationError<"query", z.ZodError<{
1110
+ status?: "UPCOMING" | "ACTIVE" | "FINISHED";
1111
+ }>>>>;
1112
+ type ListEditionsResponseBody = AsyncReturn<typeof listEditionsRoute>;
1113
+ declare class EditionNotFoundError extends Error {
1114
+ readonly _tag = "EditionNotFound";
1115
+ id: ID;
1116
+ message: string;
1117
+ constructor(id: ID, message: string);
1118
+ }
1119
+ declare const getEditionRoute: (req: Omit<Omit<TypedAuthedRequest<{
1120
+ params: GetEditionRequestParams;
1121
+ }>, "params" | "query" | "body"> & {
1122
+ params: unknown;
1123
+ query: unknown;
1124
+ body: unknown;
1125
+ }, "user"> & {
1126
+ user: BasicUserData | undefined;
1127
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
1128
+ id: number;
1129
+ status: EditionStatus;
1130
+ createdAt: Date;
1131
+ createdById: number;
1132
+ updatedAt: Date;
1133
+ updatedById: number;
1134
+ name: string;
1135
+ shortName: string;
1136
+ startDate: Date;
1137
+ endDate: Date;
1138
+ }> | Err<EditionNotFoundError> | Err<ValidationError<"params", z.ZodError<{
1139
+ id: number;
1140
+ }>>>>;
1141
+ type GetEditionResponseBody = AsyncReturn<typeof getEditionRoute>;
1142
+ declare const createEditionRoute: (req: Omit<Omit<TypedAuthedRequest<{
1143
+ body: CreateEditionRequestBody;
1144
+ }>, "params" | "query" | "body"> & {
1145
+ params: unknown;
1146
+ query: unknown;
1147
+ body: unknown;
1148
+ } & {
1149
+ user: BasicUserData;
1150
+ }, "user"> & {
1151
+ user: BasicUserData | undefined;
1152
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
1153
+ message: string;
1154
+ edition: {
1155
+ id: number;
1156
+ status: EditionStatus;
1157
+ createdAt: Date;
1158
+ createdById: number;
1159
+ updatedAt: Date;
1160
+ updatedById: number;
1161
+ name: string;
1162
+ shortName: string;
1163
+ startDate: Date;
1164
+ endDate: Date;
1165
+ };
1166
+ }> | Err<ValidationError<"body", z.ZodError<{
1167
+ name: string;
1168
+ shortName: string;
1169
+ startDate: Date;
1170
+ endDate: Date;
1171
+ status: "UPCOMING" | "ACTIVE" | "FINISHED";
1172
+ }>>>>;
1173
+ type CreateEditionResponseBody = AsyncReturn<typeof createEditionRoute>;
1174
+ declare const updateEditionRoute: (req: Omit<Omit<TypedAuthedRequest<{
1175
+ params: UpdateEditionRequestParams;
1176
+ body: UpdateEditionRequestBody;
1177
+ }>, "params" | "query" | "body"> & {
1178
+ params: unknown;
1179
+ query: unknown;
1180
+ body: unknown;
1181
+ } & {
1182
+ user: BasicUserData;
1183
+ }, "user"> & {
1184
+ user: BasicUserData | undefined;
1185
+ }) => Promise<Err<InternalServerError> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<EditionNotFoundError> | Ok<{
1186
+ message: string;
1187
+ edition: {
1188
+ id: number;
1189
+ status: EditionStatus;
1190
+ createdAt: Date;
1191
+ createdById: number;
1192
+ updatedAt: Date;
1193
+ updatedById: number;
1194
+ name: string;
1195
+ shortName: string;
1196
+ startDate: Date;
1197
+ endDate: Date;
1198
+ };
1199
+ }> | Err<ValidationError<"params", z.ZodError<{
1200
+ id: number;
1201
+ }>>> | Err<ValidationError<"body", z.ZodError<{
1202
+ name?: string;
1203
+ shortName?: string;
1204
+ startDate?: Date;
1205
+ endDate?: Date;
1206
+ status?: "UPCOMING" | "ACTIVE" | "FINISHED";
1207
+ }>>>>;
1208
+ type UpdateEditionResponseBody = AsyncReturn<typeof updateEditionRoute>;
1209
+ declare class EditionHasAssociatedDataError extends Error {
1210
+ readonly _tag = "EditionHasAssociatedData";
1211
+ editionId: ID;
1212
+ field: string;
1213
+ message: string;
1214
+ constructor(editionId: ID, field: string, message: string);
1215
+ }
1216
+ declare const deleteEditionRoute: (req: Omit<Omit<TypedAuthedRequest<{
1217
+ params: DeleteEditionRequestParams;
1218
+ }>, "params" | "query" | "body"> & {
1219
+ params: unknown;
1220
+ query: unknown;
1221
+ body: unknown;
1222
+ } & {
1223
+ user: BasicUserData;
1224
+ }, "user"> & {
1225
+ user: BasicUserData | undefined;
1226
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<EditionNotFoundError> | Err<EditionHasAssociatedDataError> | Ok<{
1227
+ message: string;
1228
+ editionId: number;
1229
+ }> | Err<ValidationError<"params", z.ZodError<{
1230
+ id: number;
1231
+ }>>>>;
1232
+ type DeleteEditionResponseBody = AsyncReturn<typeof deleteEditionRoute>;
1233
+ declare const getEditionStatsRoute: (req: Omit<Omit<TypedAuthedRequest<{
1234
+ params: GetEditionStatsRequestParams;
1235
+ }>, "params" | "query" | "body"> & {
1236
+ params: unknown;
1237
+ query: unknown;
1238
+ body: unknown;
1239
+ } & {
1240
+ user: BasicUserData;
1241
+ }, "user"> & {
1242
+ user: BasicUserData | undefined;
1243
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<EditionNotFoundError> | Ok<{
1244
+ edition: {
1245
+ lessons: any;
1246
+ enrollments: any;
1247
+ id: number;
1248
+ status: EditionStatus;
1249
+ createdAt: Date;
1250
+ createdById: number;
1251
+ updatedAt: Date;
1252
+ updatedById: number;
1253
+ name: string;
1254
+ shortName: string;
1255
+ startDate: Date;
1256
+ endDate: Date;
1257
+ };
1258
+ stats: {
1259
+ totalLessons: number;
1260
+ totalStudents: number;
1261
+ lessonsByCourse: Map<number, number>;
1262
+ };
1263
+ }> | Err<ValidationError<"params", z.ZodError<{
1264
+ id: number;
1265
+ }>>>>;
1266
+ type GetEditionStatsResponseBody = AsyncReturn<typeof getEditionStatsRoute>;
1267
+
1268
+ declare const ListEnrollmentsRequestQuerySchema: z__default.ZodObject<{
1269
+ courseId: z__default.ZodOptional<z__default.ZodInt>;
1270
+ editionId: z__default.ZodOptional<z__default.ZodInt>;
1271
+ }, z__default.z.core.$strip>;
1272
+ type ListEnrollmentsRequestQuery = z__default.infer<typeof ListEnrollmentsRequestQuerySchema>;
1273
+ declare const ListUserEnrollmentsRequestParamsSchema: z__default.ZodObject<{
1274
+ id: z__default.z.ZodCoercedNumber<unknown>;
1275
+ }, z__default.z.core.$strip>;
1276
+ type ListUserEnrollmentsRequestParams = z__default.infer<typeof ListUserEnrollmentsRequestParamsSchema>;
1277
+ declare const GetEnrollmentRequestParamsSchema: z__default.ZodObject<{
1278
+ id: z__default.z.ZodCoercedNumber<unknown>;
1279
+ }, z__default.z.core.$strip>;
1280
+ type GetEnrollmentRequestParams = z__default.infer<typeof GetEnrollmentRequestParamsSchema>;
1281
+ declare const CreateEnrollmentRequestBodySchema: z__default.ZodObject<{
1282
+ enrollmentDate: z__default.ZodOptional<z__default.z.ZodCoercedDate<unknown>>;
1283
+ kind: z__default.ZodEnum<{
1284
+ readonly regular: "regular";
1285
+ readonly reposicao: "reposicao";
1286
+ }>;
1287
+ paymentStatus: z__default.ZodOptional<z__default.ZodEnum<{
1288
+ readonly canceled: "canceled";
1289
+ readonly pending: "pending";
1290
+ readonly paid: "paid";
1291
+ }>>;
1292
+ studentId: z__default.ZodInt;
1293
+ courseId: z__default.ZodInt;
1294
+ editionId: z__default.ZodInt;
1295
+ }, z__default.z.core.$strip>;
1296
+ type CreateEnrollmentRequestBody = z__default.infer<typeof CreateEnrollmentRequestBodySchema>;
1297
+ declare const UpdateEnrollmentRequestParamsSchema: z__default.ZodObject<{
1298
+ id: z__default.z.ZodCoercedNumber<unknown>;
1299
+ }, z__default.z.core.$strip>;
1300
+ type UpdateEnrollmentRequestParams = z__default.infer<typeof UpdateEnrollmentRequestParamsSchema>;
1301
+ declare const UpdateEnrollmentRequestBodySchema: z__default.ZodObject<{
1302
+ enrollmentDate: z__default.ZodOptional<z__default.z.ZodCoercedDate<unknown>>;
1303
+ kind: z__default.ZodOptional<z__default.ZodEnum<{
1304
+ readonly regular: "regular";
1305
+ readonly reposicao: "reposicao";
1306
+ }>>;
1307
+ paymentStatus: z__default.ZodOptional<z__default.ZodEnum<{
1308
+ readonly canceled: "canceled";
1309
+ readonly pending: "pending";
1310
+ readonly paid: "paid";
1311
+ }>>;
1312
+ studentId: z__default.ZodOptional<z__default.ZodInt>;
1313
+ courseId: z__default.ZodOptional<z__default.ZodInt>;
1314
+ editionId: z__default.ZodOptional<z__default.ZodInt>;
1315
+ }, z__default.z.core.$strip>;
1316
+ type UpdateEnrollmentRequestBody = z__default.infer<typeof UpdateEnrollmentRequestBodySchema>;
1317
+ declare const DeleteEnrollmentRequestParamsSchema: z__default.ZodObject<{
1318
+ id: z__default.z.ZodCoercedNumber<unknown>;
1319
+ }, z__default.z.core.$strip>;
1320
+ type DeleteEnrollmentRequestParams = z__default.infer<typeof DeleteEnrollmentRequestParamsSchema>;
1321
+
1322
+ declare const GetPaymentsSummaryRequestQuerySchema: z__default.ZodUnion<readonly [z__default.ZodObject<{
1323
+ courseId: z__default.ZodInt;
1324
+ editionId: z__default.ZodInt;
1325
+ }, z__default.z.core.$strip>, z__default.ZodObject<{
1326
+ courseId: z__default.ZodUndefined;
1327
+ editionId: z__default.ZodUndefined;
1328
+ }, z__default.z.core.$strip>]>;
1329
+ type GetPaymentsSummaryRequestQuery = z__default.infer<typeof GetPaymentsSummaryRequestQuerySchema>;
1330
+ declare const ListUsersRequestQuerySchema: z__default.ZodUnion<readonly [z__default.ZodObject<{
1331
+ roles: z__default.ZodOptional<z__default.ZodArray<z__default.ZodEnum<{
1332
+ readonly USER: "USER";
1333
+ readonly STUDENT: "STUDENT";
1334
+ readonly TEACHER: "TEACHER";
1335
+ readonly COORDINATOR: "COORDINATOR";
1336
+ readonly ADMIN: "ADMIN";
1337
+ readonly SUPERADMIN: "SUPERADMIN";
1338
+ }>>>;
1339
+ courseId: z__default.ZodInt;
1340
+ editionId: z__default.ZodInt;
1341
+ }, z__default.z.core.$strip>, z__default.ZodObject<{
1342
+ roles: z__default.ZodOptional<z__default.ZodArray<z__default.ZodEnum<{
1343
+ readonly USER: "USER";
1344
+ readonly STUDENT: "STUDENT";
1345
+ readonly TEACHER: "TEACHER";
1346
+ readonly COORDINATOR: "COORDINATOR";
1347
+ readonly ADMIN: "ADMIN";
1348
+ readonly SUPERADMIN: "SUPERADMIN";
1349
+ }>>>;
1350
+ courseId: z__default.ZodUndefined;
1351
+ editionId: z__default.ZodUndefined;
1352
+ }, z__default.z.core.$strip>]>;
1353
+ type ListUsersRequestQuery = z__default.infer<typeof ListUsersRequestQuerySchema>;
1354
+ declare const GetUserRequestParamsSchema: z__default.ZodObject<{
1355
+ id: z__default.z.ZodCoercedNumber<unknown>;
1356
+ }, z__default.z.core.$strip>;
1357
+ type GetUserRequestParams = z__default.infer<typeof GetUserRequestParamsSchema>;
1358
+ declare const CreateUserRequestBodySchema: z__default.ZodObject<{
1359
+ phone: z__default.ZodInt;
1360
+ email: z__default.ZodOptional<z__default.ZodEmail>;
1361
+ name: z__default.ZodString;
1362
+ cellLeader: z__default.ZodOptional<z__default.ZodString>;
1363
+ discipler: z__default.ZodOptional<z__default.ZodString>;
1364
+ height: z__default.ZodNumber;
1365
+ roles: z__default.ZodOptional<z__default.ZodArray<z__default.ZodEnum<{
1366
+ readonly USER: "USER";
1367
+ readonly STUDENT: "STUDENT";
1368
+ readonly TEACHER: "TEACHER";
1369
+ readonly COORDINATOR: "COORDINATOR";
1370
+ readonly ADMIN: "ADMIN";
1371
+ readonly SUPERADMIN: "SUPERADMIN";
1372
+ }>>>;
1373
+ }, z__default.z.core.$strip>;
1374
+ type CreateUserRequestBody = z__default.infer<typeof CreateUserRequestBodySchema>;
1375
+ declare const UpdateUserRequestParamsSchema: z__default.ZodObject<{
1376
+ id: z__default.z.ZodCoercedNumber<unknown>;
1377
+ }, z__default.z.core.$strip>;
1378
+ type UpdateUserRequestParams = z__default.infer<typeof UpdateUserRequestParamsSchema>;
1379
+ declare const UpdateUserRequestBodySchema: z__default.ZodObject<{
1380
+ phone: z__default.ZodOptional<z__default.ZodInt>;
1381
+ email: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodEmail>>;
1382
+ name: z__default.ZodOptional<z__default.ZodString>;
1383
+ cellLeader: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodString>>;
1384
+ discipler: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodString>>;
1385
+ height: z__default.ZodOptional<z__default.ZodNumber>;
1386
+ roles: z__default.ZodOptional<z__default.ZodArray<z__default.ZodEnum<{
1387
+ readonly USER: "USER";
1388
+ readonly STUDENT: "STUDENT";
1389
+ readonly TEACHER: "TEACHER";
1390
+ readonly COORDINATOR: "COORDINATOR";
1391
+ readonly ADMIN: "ADMIN";
1392
+ readonly SUPERADMIN: "SUPERADMIN";
1393
+ }>>>;
1394
+ }, z__default.z.core.$strip>;
1395
+ type UpdateUserRequestBody = z__default.infer<typeof UpdateUserRequestBodySchema>;
1396
+ declare const PatchPaymentStatusRequestParamsSchema: z__default.ZodObject<{
1397
+ id: z__default.z.ZodCoercedNumber<unknown>;
1398
+ }, z__default.z.core.$strip>;
1399
+ type PatchPaymentStatusRequestParams = z__default.infer<typeof PatchPaymentStatusRequestParamsSchema>;
1400
+ declare const PatchPaymentStatusRequestBodySchema: z__default.ZodObject<{
1401
+ courseId: z__default.ZodInt;
1402
+ editionId: z__default.ZodInt;
1403
+ paymentStatus: z__default.ZodEnum<{
1404
+ readonly canceled: "canceled";
1405
+ readonly pending: "pending";
1406
+ readonly paid: "paid";
1407
+ }>;
1408
+ }, z__default.z.core.$strip>;
1409
+ type PatchPaymentStatusRequestBody = z__default.infer<typeof PatchPaymentStatusRequestBodySchema>;
1410
+ declare const DeleteUserRequestParamsSchema: z__default.ZodObject<{
1411
+ id: z__default.z.ZodCoercedNumber<unknown>;
1412
+ }, z__default.z.core.$strip>;
1413
+ type DeleteUserRequestParams = z__default.infer<typeof DeleteUserRequestParamsSchema>;
1414
+
1415
+ declare const getPaymentsSummaryRoute: (req: Omit<Omit<TypedAuthedRequest<{
1416
+ query: GetPaymentsSummaryRequestQuery;
1417
+ }>, "params" | "query" | "body"> & {
1418
+ params: unknown;
1419
+ query: unknown;
1420
+ body: unknown;
1421
+ } & {
1422
+ user: BasicUserData;
1423
+ }, "user"> & {
1424
+ user: BasicUserData | undefined;
1425
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Ok<{
1426
+ byCourse: Map<number, Map<number, Map<PaymentStatus, number>>>;
1427
+ clear(): void;
1428
+ delete(key: PaymentStatus): boolean;
1429
+ forEach(callbackfn: (value: number, key: PaymentStatus, map: Map<PaymentStatus, number>) => void, thisArg?: any): void;
1430
+ get(key: PaymentStatus): number;
1431
+ has(key: PaymentStatus): boolean;
1432
+ set(key: PaymentStatus, value: number): Map<PaymentStatus, number>;
1433
+ size: number;
1434
+ entries(): MapIterator<[PaymentStatus, number]>;
1435
+ keys(): MapIterator<PaymentStatus>;
1436
+ values(): MapIterator<number>;
1437
+ [Symbol.iterator](): MapIterator<[PaymentStatus, number]>;
1438
+ [Symbol.toStringTag]: string;
1439
+ total: number;
1440
+ }> | Err<ValidationError<"query", z.ZodError<{
1441
+ courseId: number;
1442
+ editionId: number;
1443
+ } | {
1444
+ courseId: undefined;
1445
+ editionId: undefined;
1446
+ }>>>>;
1447
+ type GetPaymentsSummaryResponseBody = AsyncReturn<typeof getPaymentsSummaryRoute>;
1448
+ declare const listUsersRoute: (req: Omit<Omit<TypedAuthedRequest<{
1449
+ query: ListUsersRequestQuery;
1450
+ }>, "params" | "query" | "body"> & {
1451
+ params: unknown;
1452
+ query: unknown;
1453
+ body: unknown;
1454
+ } & {
1455
+ user: BasicUserData;
1456
+ }, "user"> & {
1457
+ user: BasicUserData | undefined;
1458
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Ok<{
1459
+ height: number;
1460
+ enrollments: {
1461
+ studentId: number;
1462
+ courseId: number;
1463
+ editionId: number;
1464
+ id: number;
1465
+ createdAt: Date;
1466
+ createdById: number;
1467
+ updatedAt: Date;
1468
+ updatedById: number;
1469
+ enrollmentDate: Date;
1470
+ enrollmentKind: EnrollmentKind;
1471
+ paymentStatus: PaymentStatus;
1472
+ }[];
1473
+ id: number;
1474
+ createdAt: Date;
1475
+ createdById: number;
1476
+ updatedAt: Date;
1477
+ updatedById: number;
1478
+ name: string;
1479
+ credentialsProvider: CredentialsProvider;
1480
+ credentialsProviderId: string | null;
1481
+ email: string | null;
1482
+ phone: bigint;
1483
+ cellLeader: string | null;
1484
+ discipler: string | null;
1485
+ roles: Role[];
1486
+ active: boolean;
1487
+ }[]> | Err<ValidationError<"query", z.ZodError<{
1488
+ courseId: number;
1489
+ editionId: number;
1490
+ roles?: ("USER" | "STUDENT" | "TEACHER" | "COORDINATOR" | "ADMIN" | "SUPERADMIN")[];
1491
+ } | {
1492
+ courseId: undefined;
1493
+ editionId: undefined;
1494
+ roles?: ("USER" | "STUDENT" | "TEACHER" | "COORDINATOR" | "ADMIN" | "SUPERADMIN")[];
1495
+ }>>>>;
1496
+ type ListUsersResponseBody = AsyncReturn<typeof listUsersRoute>;
1497
+ declare const getUserRoute: (req: Omit<Omit<TypedAuthedRequest<{
1498
+ params: GetUserRequestParams;
1499
+ }>, "params" | "query" | "body"> & {
1500
+ params: unknown;
1501
+ query: unknown;
1502
+ body: unknown;
1503
+ }, "user"> & {
1504
+ user: BasicUserData | undefined;
1505
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<UserNotFoundError> | Ok<{
1506
+ height: number;
1507
+ id: number;
1508
+ createdAt: Date;
1509
+ createdById: number;
1510
+ updatedAt: Date;
1511
+ updatedById: number;
1512
+ name: string;
1513
+ credentialsProvider: CredentialsProvider;
1514
+ credentialsProviderId: string | null;
1515
+ email: string | null;
1516
+ phone: bigint;
1517
+ cellLeader: string | null;
1518
+ discipler: string | null;
1519
+ roles: Role[];
1520
+ active: boolean;
1521
+ }> | Err<ValidationError<"params", z.ZodError<{
1522
+ id: number;
1523
+ }>>>>;
1524
+ type GetUserResponseBody = AsyncReturn<typeof getUserRoute>;
1525
+ declare class UserAlreadyExistsError extends Error {
1526
+ readonly _tag = "UserAlreadyExists";
1527
+ field: string;
1528
+ message: string;
1529
+ constructor(field: string, message: string);
1530
+ }
1531
+ declare const createUserRoute: (req: Omit<Omit<TypedAuthedRequest<{
1532
+ body: CreateUserRequestBody;
1533
+ }>, "params" | "query" | "body"> & {
1534
+ params: unknown;
1535
+ query: unknown;
1536
+ body: unknown;
1537
+ } & {
1538
+ user: BasicUserData;
1539
+ }, "user"> & {
1540
+ user: BasicUserData | undefined;
1541
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<UserAlreadyExistsError> | Ok<{
1542
+ message: string;
1543
+ user: {
1544
+ height: number;
1545
+ id: number;
1546
+ createdAt: Date;
1547
+ createdById: number;
1548
+ updatedAt: Date;
1549
+ updatedById: number;
1550
+ name: string;
1551
+ credentialsProvider: CredentialsProvider;
1552
+ credentialsProviderId: string | null;
1553
+ email: string | null;
1554
+ phone: bigint;
1555
+ cellLeader: string | null;
1556
+ discipler: string | null;
1557
+ roles: Role[];
1558
+ active: boolean;
1559
+ };
1560
+ }> | Err<ValidationError<"body", z.ZodError<{
1561
+ phone: number;
1562
+ name: string;
1563
+ height: number;
1564
+ email?: string;
1565
+ cellLeader?: string;
1566
+ discipler?: string;
1567
+ roles?: ("USER" | "STUDENT" | "TEACHER" | "COORDINATOR" | "ADMIN" | "SUPERADMIN")[];
1568
+ }>>>>;
1569
+ type CreateUserResponseBody = AsyncReturn<typeof createUserRoute>;
1570
+ declare const updateUserRoute: (req: Omit<Omit<TypedAuthedRequest<{
1571
+ params: UpdateUserRequestParams;
1572
+ body: UpdateUserRequestBody;
1573
+ }>, "params" | "query" | "body"> & {
1574
+ params: unknown;
1575
+ query: unknown;
1576
+ body: unknown;
1577
+ } & {
1578
+ user: BasicUserData;
1579
+ }, "user"> & {
1580
+ user: BasicUserData | undefined;
1581
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<UserAlreadyExistsError> | Ok<{
1582
+ message: string;
1583
+ user: {
1584
+ height: number;
1585
+ id: number;
1586
+ createdAt: Date;
1587
+ createdById: number;
1588
+ updatedAt: Date;
1589
+ updatedById: number;
1590
+ name: string;
1591
+ credentialsProvider: CredentialsProvider;
1592
+ credentialsProviderId: string | null;
1593
+ email: string | null;
1594
+ phone: bigint;
1595
+ cellLeader: string | null;
1596
+ discipler: string | null;
1597
+ roles: Role[];
1598
+ active: boolean;
1599
+ };
1600
+ }> | Err<ValidationError<"params", z.ZodError<{
1601
+ id: number;
1602
+ }>>> | Err<ValidationError<"body", z.ZodError<{
1603
+ phone?: number;
1604
+ email?: string;
1605
+ name?: string;
1606
+ cellLeader?: string;
1607
+ discipler?: string;
1608
+ height?: number;
1609
+ roles?: ("USER" | "STUDENT" | "TEACHER" | "COORDINATOR" | "ADMIN" | "SUPERADMIN")[];
1610
+ }>>>>;
1611
+ type UpdateUserResponseBody = AsyncReturn<typeof updateUserRoute>;
1612
+ declare class EnrollmentNotFoundError extends Error {
1613
+ readonly _tag = "EnrollmentNotFound";
1614
+ message: string;
1615
+ constructor(message: string);
1616
+ }
1617
+ declare const patchPaymentStatusRoute: (req: Omit<Omit<TypedAuthedRequest<{
1618
+ params: PatchPaymentStatusRequestParams;
1619
+ body: PatchPaymentStatusRequestBody;
1620
+ }>, "params" | "query" | "body"> & {
1621
+ params: unknown;
1622
+ query: unknown;
1623
+ body: unknown;
1624
+ } & {
1625
+ user: BasicUserData;
1626
+ }, "user"> & {
1627
+ user: BasicUserData | undefined;
1628
+ }) => Promise<Err<InternalServerError> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<EnrollmentNotFoundError> | Ok<{
1629
+ message: string;
1630
+ }> | Err<ValidationError<"params", z.ZodError<{
1631
+ id: number;
1632
+ }>>> | Err<ValidationError<"body", z.ZodError<{
1633
+ courseId: number;
1634
+ editionId: number;
1635
+ paymentStatus: "canceled" | "pending" | "paid";
1636
+ }>>>>;
1637
+ type PatchPaymentStatusResponseBody = AsyncReturn<typeof patchPaymentStatusRoute>;
1638
+ declare const deleteUserRoute: (req: Omit<Omit<TypedAuthedRequest<{
1639
+ params: DeleteUserRequestParams;
1640
+ }>, "params" | "query" | "body"> & {
1641
+ params: unknown;
1642
+ query: unknown;
1643
+ body: unknown;
1644
+ }, "user"> & {
1645
+ user: BasicUserData | undefined;
1646
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
1647
+ message: string;
1648
+ }> | Err<ValidationError<"params", z.ZodError<{
1649
+ id: number;
1650
+ }>>>>;
1651
+ type DeleteUserResponseBody = AsyncReturn<typeof deleteUserRoute>;
1652
+
1653
+ declare const listEnrollmentsRoute: (req: Omit<Omit<TypedAuthedRequest<{
1654
+ query: ListEnrollmentsRequestQuery;
1655
+ }>, "params" | "query" | "body"> & {
1656
+ params: unknown;
1657
+ query: unknown;
1658
+ body: unknown;
1659
+ } & {
1660
+ user: BasicUserData;
1661
+ }, "user"> & {
1662
+ user: BasicUserData | undefined;
1663
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Ok<{
1664
+ studentId: number;
1665
+ courseId: number;
1666
+ editionId: number;
1667
+ id: number;
1668
+ createdAt: Date;
1669
+ createdById: number;
1670
+ updatedAt: Date;
1671
+ updatedById: number;
1672
+ enrollmentDate: Date;
1673
+ enrollmentKind: EnrollmentKind;
1674
+ paymentStatus: PaymentStatus;
1675
+ }[]> | Err<ValidationError<"query", z.ZodError<{
1676
+ courseId?: number;
1677
+ editionId?: number;
1678
+ }>>>>;
1679
+ type ListEnrollmentsResponseBody = AsyncReturn<typeof listEnrollmentsRoute>;
1680
+ declare const listUserEnrollmentsRoute: (req: Omit<Omit<TypedAuthedRequest<{
1681
+ params: ListUserEnrollmentsRequestParams;
1682
+ }>, "params" | "query" | "body"> & {
1683
+ params: unknown;
1684
+ query: unknown;
1685
+ body: unknown;
1686
+ } & {
1687
+ user: BasicUserData;
1688
+ }, "user"> & {
1689
+ user: BasicUserData | undefined;
1690
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
1691
+ studentId: number;
1692
+ courseId: number;
1693
+ editionId: number;
1694
+ id: number;
1695
+ createdAt: Date;
1696
+ createdById: number;
1697
+ updatedAt: Date;
1698
+ updatedById: number;
1699
+ enrollmentDate: Date;
1700
+ enrollmentKind: EnrollmentKind;
1701
+ paymentStatus: PaymentStatus;
1702
+ }[]> | Err<ValidationError<"params", z.ZodError<{
1703
+ id: number;
1704
+ }>>>>;
1705
+ type ListUserEnrollmentsResponseBody = AsyncReturn<typeof listUserEnrollmentsRoute>;
1706
+ declare const getEnrollmentRoute: (req: Omit<Omit<TypedAuthedRequest<{
1707
+ params: GetEnrollmentRequestParams;
1708
+ }>, "params" | "query" | "body"> & {
1709
+ params: unknown;
1710
+ query: unknown;
1711
+ body: unknown;
1712
+ } & {
1713
+ user: BasicUserData;
1714
+ }, "user"> & {
1715
+ user: BasicUserData | undefined;
1716
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
1717
+ studentId: number;
1718
+ courseId: number;
1719
+ editionId: number;
1720
+ id: number;
1721
+ createdAt: Date;
1722
+ createdById: number;
1723
+ updatedAt: Date;
1724
+ updatedById: number;
1725
+ enrollmentDate: Date;
1726
+ enrollmentKind: EnrollmentKind;
1727
+ paymentStatus: PaymentStatus;
1728
+ }> | Err<EnrollmentNotFoundError> | Err<ValidationError<"params", z.ZodError<{
1729
+ id: number;
1730
+ }>>>>;
1731
+ type GetEnrollmentResponseBody = AsyncReturn<typeof getEnrollmentRoute>;
1732
+ declare const createEnrollmentRoute: (req: Omit<Omit<TypedAuthedRequest<{
1733
+ body: CreateEnrollmentRequestBody;
1734
+ }>, "params" | "query" | "body"> & {
1735
+ params: unknown;
1736
+ query: unknown;
1737
+ body: unknown;
1738
+ } & {
1739
+ user: BasicUserData;
1740
+ }, "user"> & {
1741
+ user: BasicUserData | undefined;
1742
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<UserNotFoundError> | Err<CourseNotFoundError> | Err<EditionNotFoundError> | Ok<{
1743
+ message: string;
1744
+ enrollment: {
1745
+ studentId: number;
1746
+ courseId: number;
1747
+ editionId: number;
1748
+ id: number;
1749
+ createdAt: Date;
1750
+ createdById: number;
1751
+ updatedAt: Date;
1752
+ updatedById: number;
1753
+ enrollmentDate: Date;
1754
+ enrollmentKind: EnrollmentKind;
1755
+ paymentStatus: PaymentStatus;
1756
+ };
1757
+ }> | Err<ValidationError<"body", z.ZodError<{
1758
+ kind: "regular" | "reposicao";
1759
+ studentId: number;
1760
+ courseId: number;
1761
+ editionId: number;
1762
+ enrollmentDate?: Date;
1763
+ paymentStatus?: "canceled" | "pending" | "paid";
1764
+ }>>>>;
1765
+ type CreateEnrollmentResponseBody = AsyncReturn<typeof createEnrollmentRoute>;
1766
+ declare const updateEnrollmentRoute: (req: Omit<Omit<TypedAuthedRequest<{
1767
+ params: UpdateEnrollmentRequestParams;
1768
+ body: UpdateEnrollmentRequestBody;
1769
+ }>, "params" | "query" | "body"> & {
1770
+ params: unknown;
1771
+ query: unknown;
1772
+ body: unknown;
1773
+ } & {
1774
+ user: BasicUserData;
1775
+ }, "user"> & {
1776
+ user: BasicUserData | undefined;
1777
+ }) => Promise<Err<InternalServerError> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<UserNotFoundError> | Err<CourseNotFoundError> | Err<EditionNotFoundError> | Err<EnrollmentNotFoundError> | Ok<{
1778
+ message: string;
1779
+ enrollment: {
1780
+ studentId: number;
1781
+ courseId: number;
1782
+ editionId: number;
1783
+ id: number;
1784
+ createdAt: Date;
1785
+ createdById: number;
1786
+ updatedAt: Date;
1787
+ updatedById: number;
1788
+ enrollmentDate: Date;
1789
+ enrollmentKind: EnrollmentKind;
1790
+ paymentStatus: PaymentStatus;
1791
+ };
1792
+ }> | Err<ValidationError<"params", z.ZodError<{
1793
+ id: number;
1794
+ }>>> | Err<ValidationError<"body", z.ZodError<{
1795
+ enrollmentDate?: Date;
1796
+ kind?: "regular" | "reposicao";
1797
+ paymentStatus?: "canceled" | "pending" | "paid";
1798
+ studentId?: number;
1799
+ courseId?: number;
1800
+ editionId?: number;
1801
+ }>>>>;
1802
+ type UpdateEnrollmentResponseBody = AsyncReturn<typeof updateEnrollmentRoute>;
1803
+ declare const deleteEnrollmentRoute: (req: Omit<Omit<TypedAuthedRequest<{
1804
+ params: DeleteEnrollmentRequestParams;
1805
+ }>, "params" | "query" | "body"> & {
1806
+ params: unknown;
1807
+ query: unknown;
1808
+ body: unknown;
1809
+ } & {
1810
+ user: BasicUserData;
1811
+ }, "user"> & {
1812
+ user: BasicUserData | undefined;
1813
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
1814
+ message: string;
1815
+ }> | Err<ValidationError<"params", z.ZodError<{
1816
+ id: number;
1817
+ }>>>>;
1818
+ type DeleteEnrollmentResponseBody = AsyncReturn<typeof deleteEnrollmentRoute>;
1819
+
1820
+ declare const ConfirmFileUploadRequestParamsSchema: z__default.ZodObject<{
1821
+ fileId: z__default.z.ZodCoercedNumber<unknown>;
1822
+ }, z__default.z.core.$strip>;
1823
+ type ConfirmFileUploadRequestParams = z__default.infer<typeof ConfirmFileUploadRequestParamsSchema>;
1824
+
1825
+ declare class FileNotFoundError extends Error {
1826
+ readonly _tag = "FileNotFound";
1827
+ id: ID;
1828
+ message: string;
1829
+ constructor(id: ID, message: string);
1830
+ }
1831
+ declare class FileWasNotUploadedError extends Error {
1832
+ readonly _tag = "FileWasNotUploaded";
1833
+ message: string;
1834
+ constructor(message: string);
1835
+ }
1836
+ declare const confirmFileUploadRoute: (req: Omit<Omit<TypedAuthedRequest<{
1837
+ params: ConfirmFileUploadRequestParams;
1838
+ }>, "params" | "query" | "body"> & {
1839
+ params: unknown;
1840
+ query: unknown;
1841
+ body: unknown;
1842
+ }, "user"> & {
1843
+ user: BasicUserData | undefined;
1844
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<FileNotFoundError> | Err<FileWasNotUploadedError> | Ok<{
1845
+ message: string;
1846
+ }> | Err<ValidationError<"params", z.ZodError<{
1847
+ fileId: number;
1848
+ }>>>>;
1849
+ type ConfirmFileUploadResponseBody = AsyncReturn<typeof confirmFileUploadRoute>;
1850
+
1851
+ declare const ListJustificationsRequestQuerySchema: z__default.ZodUnion<readonly [z__default.ZodObject<{
1852
+ courseId: z__default.ZodInt;
1853
+ editionId: z__default.ZodInt;
1854
+ }, z__default.z.core.$strip>, z__default.ZodObject<{
1855
+ courseId: z__default.ZodUndefined;
1856
+ editionId: z__default.ZodUndefined;
1857
+ }, z__default.z.core.$strip>]>;
1858
+ type ListJustificationsRequestQuery = z__default.infer<typeof ListJustificationsRequestQuerySchema>;
1859
+ declare const UpdateJustificationRequestParamsSchema: z__default.ZodObject<{
1860
+ id: z__default.z.ZodCoercedNumber<unknown>;
1861
+ }, z__default.z.core.$strip>;
1862
+ type UpdateJustificationRequestParams = z__default.infer<typeof UpdateJustificationRequestParamsSchema>;
1863
+ declare const UpdateJustificationRequestBodySchema: z__default.ZodIntersection<z__default.ZodObject<{
1864
+ attendanceId: z__default.ZodOptional<z__default.ZodInt>;
1865
+ reason: z__default.ZodOptional<z__default.ZodString>;
1866
+ }, z__default.z.core.$strip>, z__default.ZodUnion<readonly [z__default.ZodObject<{
1867
+ provider: z__default.ZodUndefined;
1868
+ url: z__default.ZodUndefined;
1869
+ mimetype: z__default.ZodUndefined;
1870
+ kind: z__default.ZodUndefined;
1871
+ }, z__default.z.core.$strip>, z__default.ZodObject<{
1872
+ provider: z__default.ZodLiteral<"PUBLIC_URL">;
1873
+ url: z__default.ZodURL;
1874
+ mimetype: z__default.ZodEnum<{
1875
+ readonly PPTX: "PPTX";
1876
+ readonly PDF: "PDF";
1877
+ }>;
1878
+ kind: z__default.ZodEnum<{
1879
+ readonly DOCUMENT: "DOCUMENT";
1880
+ readonly VIDEO: "VIDEO";
1881
+ }>;
1882
+ }, z__default.z.core.$strip>, z__default.ZodObject<{
1883
+ provider: z__default.ZodLiteral<"S3_GARAGE">;
1884
+ url: z__default.ZodUndefined;
1885
+ mimetype: z__default.ZodEnum<{
1886
+ readonly PPTX: "PPTX";
1887
+ readonly PDF: "PDF";
1888
+ }>;
1889
+ kind: z__default.ZodEnum<{
1890
+ readonly DOCUMENT: "DOCUMENT";
1891
+ readonly VIDEO: "VIDEO";
1892
+ }>;
1893
+ }, z__default.z.core.$strip>]>>;
1894
+ type UpdateJustificationRequestBody = z__default.infer<typeof UpdateJustificationRequestBodySchema>;
1895
+
1896
+ declare const listJustificationsRoute: (req: Omit<Omit<TypedAuthedRequest<{
1897
+ query: ListJustificationsRequestQuery;
1898
+ }>, "params" | "query" | "body"> & {
1899
+ params: unknown;
1900
+ query: unknown;
1901
+ body: unknown;
1902
+ } & {
1903
+ user: BasicUserData;
1904
+ }, "user"> & {
1905
+ user: BasicUserData | undefined;
1906
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Ok<any[]> | Err<ValidationError<"query", z.ZodError<{
1907
+ courseId: number;
1908
+ editionId: number;
1909
+ } | {
1910
+ courseId: undefined;
1911
+ editionId: undefined;
1912
+ }>>>>;
1913
+ type ListJustificationsResponseBody = AsyncReturn<typeof listJustificationsRoute>;
1914
+ declare class JustificationNotFoundError extends Error {
1915
+ readonly _tag = "JustificationNotFound";
1916
+ id: ID;
1917
+ message: string;
1918
+ constructor(id: ID, message: string);
1919
+ }
1920
+ declare const updateJustificationRoute: (req: Omit<Omit<TypedAuthedRequest<{
1921
+ params: UpdateJustificationRequestParams;
1922
+ body: UpdateJustificationRequestBody;
1923
+ }>, "params" | "query" | "body"> & {
1924
+ params: unknown;
1925
+ query: unknown;
1926
+ body: unknown;
1927
+ } & {
1928
+ user: BasicUserData;
1929
+ }, "user"> & {
1930
+ user: BasicUserData | undefined;
1931
+ }) => Promise<Err<InternalServerError> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<AttendanceNotFoundError> | Err<JustificationNotFoundError> | Ok<{
1932
+ id: number;
1933
+ createdAt: Date;
1934
+ createdById: number;
1935
+ updatedAt: Date;
1936
+ updatedById: number;
1937
+ reason: string | null;
1938
+ attendanceId: number;
1939
+ attachmentId: number | null;
1940
+ confirmedAt: Date | null;
1941
+ confirmedById: number | null;
1942
+ }> | Err<ValidationError<"params", z.ZodError<{
1943
+ id: number;
1944
+ }>>> | Err<ValidationError<"body", z.ZodError<{
1945
+ attendanceId?: number;
1946
+ reason?: string;
1947
+ } & ({
1948
+ provider: undefined;
1949
+ url: undefined;
1950
+ mimetype: undefined;
1951
+ kind: undefined;
1952
+ } | {
1953
+ provider: "PUBLIC_URL";
1954
+ url: string;
1955
+ mimetype: "PPTX" | "PDF";
1956
+ kind: "DOCUMENT" | "VIDEO";
1957
+ } | {
1958
+ provider: "S3_GARAGE";
1959
+ url: undefined;
1960
+ mimetype: "PPTX" | "PDF";
1961
+ kind: "DOCUMENT" | "VIDEO";
1962
+ })>>>>;
1963
+ type UpdateJustificationResponseBody = AsyncReturn<typeof updateJustificationRoute>;
1964
+
1965
+ declare const SendMagicLinkRequestBodySchema: z__default.ZodObject<{
1966
+ email: z__default.ZodEmail;
1967
+ }, z__default.z.core.$strip>;
1968
+ type SendMagicLinkRequestBody = z__default.infer<typeof SendMagicLinkRequestBodySchema>;
1969
+ declare const VerifyMagicLinkRequestQuerySchema: z__default.ZodObject<{
1970
+ token: z__default.ZodString;
1971
+ }, z__default.z.core.$strip>;
1972
+ type VerifyMagicLinkRequestQuery = z__default.infer<typeof VerifyMagicLinkRequestQuerySchema>;
1973
+
1974
+ declare const sendMagicLinkRoute: (req: Omit<TypedRequest<{
1975
+ body: SendMagicLinkRequestBody;
1976
+ }>, "params" | "query" | "body"> & {
1977
+ params: unknown;
1978
+ query: unknown;
1979
+ body: unknown;
1980
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
1981
+ success: boolean;
1982
+ message: string;
1983
+ }> | Err<ValidationError<"body", z.ZodError<{
1984
+ email: string;
1985
+ }>>>>;
1986
+ type SendMagicLinkResponseBody = AsyncReturn<typeof sendMagicLinkRoute>;
1987
+ declare class TokenNotFoundError extends Error {
1988
+ readonly _tag = "TokenNotFound";
1989
+ token: string;
1990
+ message: string;
1991
+ constructor(token: string, message: string);
1992
+ }
1993
+ declare class TokenExpiredError extends Error {
1994
+ readonly _tag = "TokenExpired";
1995
+ token: string;
1996
+ message: string;
1997
+ constructor(token: string, message: string);
1998
+ }
1999
+ declare class TokenAlreadyUsedError extends Error {
2000
+ readonly _tag = "TokenAlreadyUsed";
2001
+ token: string;
2002
+ message: string;
2003
+ constructor(token: string, message: string);
2004
+ }
2005
+ declare const verifyMagicLinkRoute: (req: Omit<TypedRequest<{
2006
+ query: VerifyMagicLinkRequestQuery;
2007
+ }>, "params" | "query" | "body"> & {
2008
+ params: unknown;
2009
+ query: unknown;
2010
+ body: unknown;
2011
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<TokenNotFoundError> | Err<TokenExpiredError> | Err<TokenAlreadyUsedError> | Ok<{
2012
+ customToken: unknown;
2013
+ user: {
2014
+ id: number;
2015
+ credentialsProvider: "FIREBASE";
2016
+ credentialsProviderId: string;
2017
+ email: string;
2018
+ phone: bigint;
2019
+ };
2020
+ }> | Err<ValidationError<"query", z.ZodError<{
2021
+ token: string;
2022
+ }>>>>;
2023
+ type VerifyMagicLinkResponseBody = AsyncReturn<typeof verifyMagicLinkRoute>;
2024
+ declare const cleanupMagicLinksRoute: (req: Omit<Omit<BasicRequest, "user"> & {
2025
+ user: BasicUserData;
2026
+ } & {
2027
+ user: BasicUserData;
2028
+ }, "user"> & {
2029
+ user: BasicUserData | undefined;
2030
+ }) => Promise<Err<InternalServerError> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Ok<{
2031
+ message: string;
2032
+ deleted: number;
2033
+ }>>;
2034
+ type CleanupMagicLinksResponseBody = AsyncReturn<typeof cleanupMagicLinksRoute>;
2035
+
2036
+ declare const ListMaterialsRequestQuerySchema: z__default.ZodObject<{
2037
+ courseId: z__default.ZodOptional<z__default.ZodInt>;
2038
+ lessonId: z__default.ZodOptional<z__default.ZodInt>;
2039
+ mimetype: z__default.ZodOptional<z__default.ZodEnum<{
2040
+ readonly PPTX: "PPTX";
2041
+ readonly PDF: "PDF";
2042
+ }>>;
2043
+ category: z__default.ZodOptional<z__default.ZodEnum<{
2044
+ readonly GERAL: "GERAL";
2045
+ }>>;
2046
+ visibleToStudents: z__default.ZodOptional<z__default.ZodBoolean>;
2047
+ }, z__default.z.core.$strip>;
2048
+ type ListMaterialsRequestQuery = z__default.infer<typeof ListMaterialsRequestQuerySchema>;
2049
+ declare const GetMaterialRequestParamsSchema: z__default.ZodObject<{
2050
+ id: z__default.z.ZodCoercedNumber<unknown>;
2051
+ }, z__default.z.core.$strip>;
2052
+ type GetMaterialRequestParams = z__default.infer<typeof GetMaterialRequestParamsSchema>;
2053
+ declare const CreateMaterialRequestBodySchema: z__default.ZodIntersection<z__default.ZodObject<{
2054
+ title: z__default.ZodString;
2055
+ description: z__default.ZodString;
2056
+ mimetype: z__default.ZodEnum<{
2057
+ readonly PPTX: "PPTX";
2058
+ readonly PDF: "PDF";
2059
+ }>;
2060
+ category: z__default.ZodEnum<{
2061
+ readonly GERAL: "GERAL";
2062
+ }>;
2063
+ visibleToStudents: z__default.ZodBoolean;
2064
+ }, z__default.z.core.$strip>, z__default.ZodIntersection<z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{
2065
+ provider: z__default.ZodLiteral<"PUBLIC_URL">;
2066
+ url: z__default.ZodURL;
2067
+ }, z__default.z.core.$strip>, z__default.ZodObject<{
2068
+ provider: z__default.ZodLiteral<"S3_GARAGE">;
2069
+ url: z__default.ZodUndefined;
2070
+ }, z__default.z.core.$strip>], "provider">, z__default.ZodUnion<readonly [z__default.ZodObject<{
2071
+ courseId: z__default.ZodInt;
2072
+ lessonId: z__default.ZodUndefined;
2073
+ }, z__default.z.core.$strip>, z__default.ZodObject<{
2074
+ courseId: z__default.ZodUndefined;
2075
+ lessonId: z__default.ZodInt;
2076
+ }, z__default.z.core.$strip>]>>>;
2077
+ type CreateMaterialRequestBody = z__default.infer<typeof CreateMaterialRequestBodySchema>;
2078
+ declare const UpdateMaterialRequestParamsSchema: z__default.ZodObject<{
2079
+ id: z__default.z.ZodCoercedNumber<unknown>;
2080
+ }, z__default.z.core.$strip>;
2081
+ type UpdateMaterialRequestParams = z__default.infer<typeof UpdateMaterialRequestParamsSchema>;
2082
+ declare const UpdateMaterialRequestBodySchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{
2083
+ title: z__default.ZodOptional<z__default.ZodString>;
2084
+ description: z__default.ZodOptional<z__default.ZodString>;
2085
+ category: z__default.ZodOptional<z__default.ZodEnum<{
2086
+ readonly GERAL: "GERAL";
2087
+ }>>;
2088
+ visibleToStudents: z__default.ZodOptional<z__default.ZodBoolean>;
2089
+ courseId: z__default.ZodInt;
2090
+ lessonId: z__default.ZodNull;
2091
+ }, z__default.z.core.$strip>, z__default.ZodObject<{
2092
+ title: z__default.ZodOptional<z__default.ZodString>;
2093
+ description: z__default.ZodOptional<z__default.ZodString>;
2094
+ category: z__default.ZodOptional<z__default.ZodEnum<{
2095
+ readonly GERAL: "GERAL";
2096
+ }>>;
2097
+ visibleToStudents: z__default.ZodOptional<z__default.ZodBoolean>;
2098
+ courseId: z__default.ZodNull;
2099
+ lessonId: z__default.ZodInt;
2100
+ }, z__default.z.core.$strip>, z__default.ZodObject<{
2101
+ title: z__default.ZodOptional<z__default.ZodString>;
2102
+ description: z__default.ZodOptional<z__default.ZodString>;
2103
+ category: z__default.ZodOptional<z__default.ZodEnum<{
2104
+ readonly GERAL: "GERAL";
2105
+ }>>;
2106
+ visibleToStudents: z__default.ZodOptional<z__default.ZodBoolean>;
2107
+ courseId: z__default.ZodUndefined;
2108
+ lessonId: z__default.ZodUndefined;
2109
+ }, z__default.z.core.$strip>], "courseId">;
2110
+ type UpdateMaterialRequestBody = z__default.infer<typeof UpdateMaterialRequestBodySchema>;
2111
+ declare const DeleteMaterialRequestParamsSchema: z__default.ZodObject<{
2112
+ id: z__default.z.ZodCoercedNumber<unknown>;
2113
+ }, z__default.z.core.$strip>;
2114
+ type DeleteMaterialRequestParams = z__default.infer<typeof DeleteMaterialRequestParamsSchema>;
2115
+
2116
+ declare const listMaterialsRoute: (req: Omit<Omit<TypedAuthedRequest<{
2117
+ query: ListMaterialsRequestQuery;
2118
+ }>, "params" | "query" | "body"> & {
2119
+ params: unknown;
2120
+ query: unknown;
2121
+ body: unknown;
2122
+ } & {
2123
+ user: BasicUserData;
2124
+ }, "user"> & {
2125
+ user: BasicUserData | undefined;
2126
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Ok<any[]> | Err<ValidationError<"query", z.ZodError<{
2127
+ courseId?: number;
2128
+ lessonId?: number;
2129
+ mimetype?: "PPTX" | "PDF";
2130
+ category?: "GERAL";
2131
+ visibleToStudents?: boolean;
2132
+ }>>>>;
2133
+ type ListMaterialsResponseBody = AsyncReturn<typeof listMaterialsRoute>;
2134
+ declare class MaterialNotFoundError extends Error {
2135
+ readonly _tag = "MaterialNotFound";
2136
+ message: string;
2137
+ constructor(message: string);
2138
+ }
2139
+ declare const getMaterialRoute: (req: Omit<Omit<TypedAuthedRequest<{
2140
+ params: GetMaterialRequestParams;
2141
+ }>, "params" | "query" | "body"> & {
2142
+ params: unknown;
2143
+ query: unknown;
2144
+ body: unknown;
2145
+ } & {
2146
+ user: BasicUserData;
2147
+ }, "user"> & {
2148
+ user: BasicUserData | undefined;
2149
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<MaterialNotFoundError> | Ok<{
2150
+ fileId: any;
2151
+ file: any;
2152
+ url: string;
2153
+ lessonId: number | null;
2154
+ courseId: number | null;
2155
+ id: number;
2156
+ createdAt: Date;
2157
+ createdById: number;
2158
+ updatedAt: Date;
2159
+ updatedById: number;
2160
+ category: MaterialCategory;
2161
+ visibleToStudents: boolean;
2162
+ }> | Err<ValidationError<"params", z.ZodError<{
2163
+ id: number;
2164
+ }>>>>;
2165
+ type GetMaterialResponseBody = AsyncReturn<typeof getMaterialRoute>;
2166
+ declare const createMaterialRoute: (req: Omit<Omit<TypedAuthedRequest<{
2167
+ body: CreateMaterialRequestBody;
2168
+ }>, "params" | "query" | "body"> & {
2169
+ params: unknown;
2170
+ query: unknown;
2171
+ body: unknown;
2172
+ } & {
2173
+ user: BasicUserData;
2174
+ }, "user"> & {
2175
+ user: BasicUserData | undefined;
2176
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
2177
+ fileId: any;
2178
+ url: string;
2179
+ confirmationUrl: string;
2180
+ lessonId: number | null;
2181
+ courseId: number | null;
2182
+ id: number;
2183
+ createdAt: Date;
2184
+ createdById: number;
2185
+ updatedAt: Date;
2186
+ updatedById: number;
2187
+ category: MaterialCategory;
2188
+ visibleToStudents: boolean;
2189
+ }> | Err<ValidationError<"body", z.ZodError<{
2190
+ title: string;
2191
+ description: string;
2192
+ mimetype: "PPTX" | "PDF";
2193
+ category: "GERAL";
2194
+ visibleToStudents: boolean;
2195
+ } & (({
2196
+ provider: "PUBLIC_URL";
2197
+ url: string;
2198
+ } | {
2199
+ provider: "S3_GARAGE";
2200
+ url: undefined;
2201
+ }) & ({
2202
+ courseId: number;
2203
+ lessonId: undefined;
2204
+ } | {
2205
+ courseId: undefined;
2206
+ lessonId: number;
2207
+ }))>>>>;
2208
+ type CreateMaterialResponseBody = AsyncReturn<typeof createMaterialRoute>;
2209
+ declare const updateMaterialRoute: (req: Omit<Omit<TypedAuthedRequest<{
2210
+ params: UpdateMaterialRequestParams;
2211
+ body: UpdateMaterialRequestBody;
2212
+ }>, "params" | "query" | "body"> & {
2213
+ params: unknown;
2214
+ query: unknown;
2215
+ body: unknown;
2216
+ } & {
2217
+ user: BasicUserData;
2218
+ }, "user"> & {
2219
+ user: BasicUserData | undefined;
2220
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<LessonNotFoundError> | Err<MaterialNotFoundError> | Ok<{
2221
+ message: string;
2222
+ material: {
2223
+ lessonId: number | null;
2224
+ courseId: number | null;
2225
+ id: number;
2226
+ createdAt: Date;
2227
+ createdById: number;
2228
+ updatedAt: Date;
2229
+ updatedById: number;
2230
+ category: MaterialCategory;
2231
+ fileId: number;
2232
+ visibleToStudents: boolean;
2233
+ };
2234
+ }> | Err<ValidationError<"params", z.ZodError<{
2235
+ id: number;
2236
+ }>>> | Err<ValidationError<"body", z.ZodError<{
2237
+ courseId: number;
2238
+ lessonId: null;
2239
+ title?: string;
2240
+ description?: string;
2241
+ category?: "GERAL";
2242
+ visibleToStudents?: boolean;
2243
+ } | {
2244
+ courseId: null;
2245
+ lessonId: number;
2246
+ title?: string;
2247
+ description?: string;
2248
+ category?: "GERAL";
2249
+ visibleToStudents?: boolean;
2250
+ } | {
2251
+ courseId: undefined;
2252
+ lessonId: undefined;
2253
+ title?: string;
2254
+ description?: string;
2255
+ category?: "GERAL";
2256
+ visibleToStudents?: boolean;
2257
+ }>>>>;
2258
+ type UpdateMaterialResponseBody = AsyncReturn<typeof updateMaterialRoute>;
2259
+ declare const deleteMaterialRoute: (req: Omit<Omit<TypedAuthedRequest<{
2260
+ params: DeleteMaterialRequestParams;
2261
+ }>, "params" | "query" | "body"> & {
2262
+ params: unknown;
2263
+ query: unknown;
2264
+ body: unknown;
2265
+ } & {
2266
+ user: BasicUserData;
2267
+ }, "user"> & {
2268
+ user: BasicUserData | undefined;
2269
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<MaterialNotFoundError> | Ok<{
2270
+ message: string;
2271
+ }> | Err<ValidationError<"params", z.ZodError<{
2272
+ id: number;
2273
+ }>>>>;
2274
+ type DeleteMaterialResponseBody = AsyncReturn<typeof deleteMaterialRoute>;
2275
+
2276
+ declare const ListNotificationsRequestQuerySchema: z__default.ZodObject<{
2277
+ userId: z__default.ZodOptional<z__default.ZodInt>;
2278
+ unreadOnly: z__default.ZodOptional<z__default.ZodBoolean>;
2279
+ }, z__default.z.core.$strip>;
2280
+ type ListNotificationsRequestQuery = z__default.infer<typeof ListNotificationsRequestQuerySchema>;
2281
+ declare const GetNotificationRequestParamsSchema: z__default.ZodObject<{
2282
+ id: z__default.z.ZodCoercedNumber<unknown>;
2283
+ }, z__default.z.core.$strip>;
2284
+ type GetNotificationRequestParams = z__default.infer<typeof GetNotificationRequestParamsSchema>;
2285
+ declare const CountNotificationsRequestParamsSchema: z__default.ZodObject<{
2286
+ userId: z__default.z.ZodCoercedNumber<unknown>;
2287
+ }, z__default.z.core.$strip>;
2288
+ type CountNotificationsRequestParams = z__default.infer<typeof CountNotificationsRequestParamsSchema>;
2289
+ declare const CreateNotificationRequestBodySchema: z__default.ZodObject<{
2290
+ userId: z__default.ZodInt;
2291
+ title: z__default.ZodString;
2292
+ message: z__default.ZodString;
2293
+ kind: z__default.ZodOptional<z__default.ZodEnum<{
2294
+ readonly GENERAL: "GENERAL";
2295
+ readonly REMINDER: "REMINDER";
2296
+ }>>;
2297
+ }, z__default.z.core.$strip>;
2298
+ type CreateNotificationRequestBody = z__default.infer<typeof CreateNotificationRequestBodySchema>;
2299
+ declare const CreateNotificationsBulkRequestBodySchema: z__default.ZodObject<{
2300
+ userIds: z__default.ZodArray<z__default.ZodInt>;
2301
+ title: z__default.ZodString;
2302
+ message: z__default.ZodString;
2303
+ kind: z__default.ZodOptional<z__default.ZodEnum<{
2304
+ readonly GENERAL: "GENERAL";
2305
+ readonly REMINDER: "REMINDER";
2306
+ }>>;
2307
+ }, z__default.z.core.$strip>;
2308
+ type CreateNotificationsBulkRequestBody = z__default.infer<typeof CreateNotificationsBulkRequestBodySchema>;
2309
+ declare const ReadNotificationRequestParamsSchema: z__default.ZodObject<{
2310
+ id: z__default.z.ZodCoercedNumber<unknown>;
2311
+ }, z__default.z.core.$strip>;
2312
+ type ReadNotificationRequestParams = z__default.infer<typeof ReadNotificationRequestParamsSchema>;
2313
+ declare const ReadAllNotificationsRequestParamsSchema: z__default.ZodObject<{
2314
+ userId: z__default.z.ZodCoercedNumber<unknown>;
2315
+ }, z__default.z.core.$strip>;
2316
+ type ReadAllNotificationsRequestParams = z__default.infer<typeof ReadAllNotificationsRequestParamsSchema>;
2317
+ declare const DeleteNotificationRequestParamsSchema: z__default.ZodObject<{
2318
+ id: z__default.z.ZodCoercedNumber<unknown>;
2319
+ }, z__default.z.core.$strip>;
2320
+ type DeleteNotificationRequestParams = z__default.infer<typeof DeleteNotificationRequestParamsSchema>;
2321
+ declare const DeleteAllNotificationsRequestParamsSchema: z__default.ZodObject<{
2322
+ userId: z__default.z.ZodCoercedNumber<unknown>;
2323
+ }, z__default.z.core.$strip>;
2324
+ type DeleteAllNotificationsRequestParams = z__default.infer<typeof DeleteAllNotificationsRequestParamsSchema>;
2325
+
2326
+ declare const listNotificationsRoute: (req: Omit<Omit<TypedAuthedRequest<{
2327
+ query: ListNotificationsRequestQuery;
2328
+ }>, "params" | "query" | "body"> & {
2329
+ params: unknown;
2330
+ query: unknown;
2331
+ body: unknown;
2332
+ }, "user"> & {
2333
+ user: BasicUserData | undefined;
2334
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Ok<{
2335
+ id: number;
2336
+ createdAt: Date;
2337
+ createdById: number;
2338
+ updatedAt: Date;
2339
+ updatedById: number;
2340
+ date: Date;
2341
+ title: string;
2342
+ message: string;
2343
+ kind: NotificationKind;
2344
+ userId: number;
2345
+ read: boolean;
2346
+ }[]> | Err<ValidationError<"query", z.ZodError<{
2347
+ userId?: number;
2348
+ unreadOnly?: boolean;
2349
+ }>>>>;
2350
+ type ListNotificationsResponseBody = AsyncReturn<typeof listNotificationsRoute>;
2351
+ declare class NotificationNotFoundError extends Error {
2352
+ readonly _tag = "NotificationNotFound";
2353
+ message: string;
2354
+ constructor(message: string);
2355
+ }
2356
+ declare const getNotificationRoute: (req: Omit<Omit<TypedAuthedRequest<{
2357
+ params: GetNotificationRequestParams;
2358
+ }>, "params" | "query" | "body"> & {
2359
+ params: unknown;
2360
+ query: unknown;
2361
+ body: unknown;
2362
+ }, "user"> & {
2363
+ user: BasicUserData | undefined;
2364
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
2365
+ id: number;
2366
+ createdAt: Date;
2367
+ createdById: number;
2368
+ updatedAt: Date;
2369
+ updatedById: number;
2370
+ date: Date;
2371
+ title: string;
2372
+ message: string;
2373
+ kind: NotificationKind;
2374
+ userId: number;
2375
+ read: boolean;
2376
+ }> | Err<NotificationNotFoundError> | Err<ValidationError<"params", z.ZodError<{
2377
+ id: number;
2378
+ }>>>>;
2379
+ type GetNotificationResponseBody = AsyncReturn<typeof getNotificationRoute>;
2380
+ declare const countNotificationsRoute: (req: Omit<Omit<TypedAuthedRequest<{
2381
+ params: CountNotificationsRequestParams;
2382
+ }>, "params" | "query" | "body"> & {
2383
+ params: unknown;
2384
+ query: unknown;
2385
+ body: unknown;
2386
+ }, "user"> & {
2387
+ user: BasicUserData | undefined;
2388
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
2389
+ unreadCount: number;
2390
+ }> | Err<ValidationError<"params", z.ZodError<{
2391
+ userId: number;
2392
+ }>>>>;
2393
+ type CountNotificationsResponseBody = AsyncReturn<typeof countNotificationsRoute>;
2394
+ declare const createNotificationRoute: (req: Omit<Omit<TypedAuthedRequest<{
2395
+ body: CreateNotificationRequestBody;
2396
+ }>, "params" | "query" | "body"> & {
2397
+ params: unknown;
2398
+ query: unknown;
2399
+ body: unknown;
2400
+ } & {
2401
+ user: BasicUserData;
2402
+ }, "user"> & {
2403
+ user: BasicUserData | undefined;
2404
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
2405
+ message: string;
2406
+ id: number;
2407
+ }> | Err<ValidationError<"body", z.ZodError<{
2408
+ userId: number;
2409
+ title: string;
2410
+ message: string;
2411
+ kind?: "GENERAL" | "REMINDER";
2412
+ }>>>>;
2413
+ type CreateNotificationResponseBody = AsyncReturn<typeof createNotificationRoute>;
2414
+ declare const createNotificationsBulkRoute: (req: Omit<Omit<TypedAuthedRequest<{
2415
+ body: CreateNotificationsBulkRequestBody;
2416
+ }>, "params" | "query" | "body"> & {
2417
+ params: unknown;
2418
+ query: unknown;
2419
+ body: unknown;
2420
+ } & {
2421
+ user: BasicUserData;
2422
+ }, "user"> & {
2423
+ user: BasicUserData | undefined;
2424
+ }) => Promise<Err<InternalServerError> | Err<ValidationError<"params", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<RoleRequiredError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<UserNotFoundError> | Ok<{
2425
+ message: string;
2426
+ count: number;
2427
+ ids: number[];
2428
+ }> | Err<ValidationError<"body", z.ZodError<{
2429
+ userIds: number[];
2430
+ title: string;
2431
+ message: string;
2432
+ kind?: "GENERAL" | "REMINDER";
2433
+ }>>>>;
2434
+ type CreateNotificationsBulkResponseBody = AsyncReturn<typeof createNotificationsBulkRoute>;
2435
+ declare const readNotificationRoute: (req: Omit<Omit<TypedAuthedRequest<{
2436
+ params: ReadNotificationRequestParams;
2437
+ }>, "params" | "query" | "body"> & {
2438
+ params: unknown;
2439
+ query: unknown;
2440
+ body: unknown;
2441
+ }, "user"> & {
2442
+ user: BasicUserData | undefined;
2443
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<NotificationNotFoundError> | Ok<{
2444
+ message: string;
2445
+ }> | Err<ValidationError<"params", z.ZodError<{
2446
+ id: number;
2447
+ }>>>>;
2448
+ type ReadNotificationResponseBody = AsyncReturn<typeof readNotificationRoute>;
2449
+ declare const readAllNotificationsRoute: (req: Omit<Omit<TypedAuthedRequest<{
2450
+ params: ReadAllNotificationsRequestParams;
2451
+ }>, "params" | "query" | "body"> & {
2452
+ params: unknown;
2453
+ query: unknown;
2454
+ body: unknown;
2455
+ }, "user"> & {
2456
+ user: BasicUserData | undefined;
2457
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
2458
+ message: string;
2459
+ count: number;
2460
+ }> | Err<ValidationError<"params", z.ZodError<{
2461
+ userId: number;
2462
+ }>>>>;
2463
+ type ReadAllNotificationsResponseBody = AsyncReturn<typeof readAllNotificationsRoute>;
2464
+ declare const deleteNotificationRoute: (req: Omit<Omit<TypedAuthedRequest<{
2465
+ params: DeleteNotificationRequestParams;
2466
+ }>, "params" | "query" | "body"> & {
2467
+ params: unknown;
2468
+ query: unknown;
2469
+ body: unknown;
2470
+ }, "user"> & {
2471
+ user: BasicUserData | undefined;
2472
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Err<NotificationNotFoundError> | Ok<{
2473
+ message: string;
2474
+ }> | Err<ValidationError<"params", z.ZodError<{
2475
+ id: number;
2476
+ }>>>>;
2477
+ type DeleteNotificationResponseBody = AsyncReturn<typeof deleteNotificationRoute>;
2478
+ declare const deleteAllNotificationsRoute: (req: Omit<Omit<TypedAuthedRequest<{
2479
+ params: DeleteAllNotificationsRequestParams;
2480
+ }>, "params" | "query" | "body"> & {
2481
+ params: unknown;
2482
+ query: unknown;
2483
+ body: unknown;
2484
+ }, "user"> & {
2485
+ user: BasicUserData | undefined;
2486
+ }) => Promise<Err<ForbiddenError> | Err<InternalServerError> | Err<ValidationError<"body", z.ZodError<unknown>>> | Err<UnauthenticatedError> | Err<ValidationError<"query", z.ZodError<unknown>>> | Ok<{
2487
+ message: string;
2488
+ count: number;
2489
+ }> | Err<ValidationError<"params", z.ZodError<{
2490
+ userId: number;
2491
+ }>>>>;
2492
+ type DeleteAllNotificationsResponseBody = AsyncReturn<typeof deleteAllNotificationsRoute>;
2493
+
2494
+ type ApiRoutes = {
2495
+ /**
2496
+ * Routes for taking attendance
2497
+ */
2498
+ '/attendance': {
2499
+ '/': {
2500
+ /**
2501
+ * List attendances
2502
+ */
2503
+ 'GET': {
2504
+ query: ListAttendanceRequestQuery;
2505
+ response: ListAttendenceResponseBody;
2506
+ };
2507
+ /**
2508
+ * Create attendance record
2509
+ */
2510
+ 'POST': {
2511
+ body: UpdateAttendenceRequestBody;
2512
+ response: UpdateAttendanceResponse;
2513
+ };
2514
+ };
2515
+ '/:id': {
2516
+ /**
2517
+ * Delete attendance record
2518
+ */
2519
+ 'DELETE': {
2520
+ params: DeleteAttendanceRequestParams;
2521
+ reponse: DeleteAttendanceResponse;
2522
+ };
2523
+ };
2524
+ '/bulk': {
2525
+ /**
2526
+ * Create many attendance records for a lesson
2527
+ */
2528
+ 'POST': {
2529
+ body: CreateOrUpdateAttendancesBulkRequestBody;
2530
+ response: CreateOrUpdateAttendancesBulkResponseBody;
2531
+ };
2532
+ };
2533
+ '/lesson/:lessonId/status': {
2534
+ /**
2535
+ * Get attendance summary for a given lesson
2536
+ */
2537
+ 'GET': {
2538
+ params: GetLessonStatusRequestParams;
2539
+ response: GetLessonStatusResponseBody;
2540
+ };
2541
+ };
2542
+ '/lessons/status': {
2543
+ /**
2544
+ * Get attendance summary for all lessons of a course edition
2545
+ */
2546
+ 'GET': {
2547
+ query: GetLessonsStatusBulkQuery;
2548
+ response: GetLessonsStatusBulkResponse;
2549
+ };
2550
+ };
2551
+ '/student/:studentId/stats': {
2552
+ /**
2553
+ * Get attendance summary for a gien student
2554
+ */
2555
+ 'GET': {
2556
+ params: GetStudentAttendanceStatusRequestParams;
2557
+ query: GetStudentAttendanceStatusRequestQuery;
2558
+ response: GetStudentAttendanceStatusResponseBody;
2559
+ };
2560
+ };
2561
+ };
2562
+ /**
2563
+ * Routes for user signup
2564
+ */
2565
+ '/auth': {
2566
+ '/verify-phone': {
2567
+ 'POST': {
2568
+ body: VerifyPhoneRequestBody;
2569
+ response: VerifyPhoneResponse;
2570
+ };
2571
+ };
2572
+ '/create-custom-token': {
2573
+ 'POST': {
2574
+ body: CreateCustomTokenRequestBody;
2575
+ response: CreateCustomTokenResponse;
2576
+ };
2577
+ };
2578
+ '/get-user': {
2579
+ 'POST': {
2580
+ response: GetUserResponse;
2581
+ };
2582
+ };
2583
+ '/validate': {
2584
+ 'GET': {
2585
+ response: ValidateResponse;
2586
+ };
2587
+ };
2588
+ };
2589
+ /**
2590
+ * Routes for content management
2591
+ */
2592
+ '/contents': {
2593
+ '/': {
2594
+ /**
2595
+ * List contents (optionally filter by course, kind and category)
2596
+ */
2597
+ 'GET': {
2598
+ query: ListContentsRequestQuery;
2599
+ response: ListContentsResponseBody;
2600
+ };
2601
+ /**
2602
+ * Create a new content (admin and coordinator only)
2603
+ */
2604
+ 'POST': {
2605
+ body: CreateContentRequestBody;
2606
+ response: CreateContentResponseBody;
2607
+ };
2608
+ };
2609
+ '/:id': {
2610
+ /**
2611
+ * Get a specific content by id
2612
+ */
2613
+ 'GET': {
2614
+ params: GetContentRequestParams;
2615
+ response: GetContentResponse;
2616
+ };
2617
+ /**
2618
+ * Update a content (admin and coordinator only)
2619
+ */
2620
+ 'PUT': {
2621
+ params: UpdateContentRequestParams;
2622
+ body: UpdateContentRequestBody;
2623
+ response: UpdateContentResponseBody;
2624
+ };
2625
+ /**
2626
+ * Delete a content (admin only)
2627
+ */
2628
+ 'DELETE': {
2629
+ params: DeleteContentRequestParams;
2630
+ response: DeleteContentResponseBody;
2631
+ };
2632
+ };
2633
+ };
2634
+ /**
2635
+ * Routes for course management
2636
+ */
2637
+ '/courses': {
2638
+ '/': {
2639
+ /**
2640
+ * List all courses
2641
+ */
2642
+ 'GET': {
2643
+ response: GetCoursesResponse;
2644
+ };
2645
+ /**
2646
+ * Create a new course (admin only)
2647
+ */
2648
+ 'POST': {
2649
+ body: CreateCourseRequestBody;
2650
+ response: CreateCourseResponse;
2651
+ };
2652
+ };
2653
+ '/:id': {
2654
+ /**
2655
+ * Get a specific course by id
2656
+ */
2657
+ 'GET': {
2658
+ params: GetCourseRequestParams;
2659
+ response: GetCourseResponse;
2660
+ };
2661
+ /**
2662
+ * Update a course (admin only)
2663
+ */
2664
+ 'PUT': {
2665
+ params: UpdateCourseRequestParams;
2666
+ body: UpdateCourseRequestBody;
2667
+ response: UpdateCourseResponse;
2668
+ };
2669
+ /**
2670
+ * Delete a course (admin only)
2671
+ */
2672
+ 'DELETE': {
2673
+ params: DeleteCourseRequestParams;
2674
+ response: DeleteCourseResponse;
2675
+ };
2676
+ };
2677
+ };
2678
+ /**
2679
+ * Routes for course edition management
2680
+ */
2681
+ '/editions': {
2682
+ '/': {
2683
+ /**
2684
+ * List all editions
2685
+ */
2686
+ 'GET': {
2687
+ query: ListEditionsRequestQuery;
2688
+ response: ListEditionsResponseBody;
2689
+ };
2690
+ /**
2691
+ * Create a new edition (admin only)
2692
+ */
2693
+ 'POST': {
2694
+ body: CreateEditionRequestBody;
2695
+ response: CreateEditionResponseBody;
2696
+ };
2697
+ };
2698
+ '/:id': {
2699
+ /**
2700
+ * Get a specific edition by id
2701
+ */
2702
+ 'GET': {
2703
+ params: GetEditionRequestParams;
2704
+ response: GetEditionResponseBody;
2705
+ };
2706
+ /**
2707
+ * Update an edition (admin only)
2708
+ */
2709
+ 'PUT': {
2710
+ params: UpdateEditionRequestParams;
2711
+ body: UpdateEditionRequestBody;
2712
+ response: UpdateEditionResponseBody;
2713
+ };
2714
+ /**
2715
+ * Delete an edition (admin only). Fails if there are associated lessons/enrollments
2716
+ */
2717
+ 'DELETE': {
2718
+ params: DeleteEditionRequestParams;
2719
+ response: DeleteEditionResponseBody;
2720
+ };
2721
+ };
2722
+ '/:id/stats': {
2723
+ /**
2724
+ * Get statistics for an edition (total lessons, students, lessons by course)
2725
+ */
2726
+ 'GET': {
2727
+ params: GetEditionStatsRequestParams;
2728
+ response: GetEditionStatsResponseBody;
2729
+ };
2730
+ };
2731
+ };
2732
+ /**
2733
+ * Routes for enrollment management
2734
+ */
2735
+ '/enrollments': {
2736
+ '/': {
2737
+ /**
2738
+ * List enrollments. Scoped to what the user has access to
2739
+ * (admins/coordinators see all, teachers see their lessons' enrollments,
2740
+ * students see only their own)
2741
+ */
2742
+ 'GET': {
2743
+ query: ListEnrollmentsRequestQuery;
2744
+ response: ListEnrollmentsResponseBody;
2745
+ };
2746
+ /**
2747
+ * Create a new enrollment (admin and coordinator only)
2748
+ */
2749
+ 'POST': {
2750
+ body: CreateEnrollmentRequestBody;
2751
+ response: CreateEnrollmentResponseBody;
2752
+ };
2753
+ };
2754
+ '/user/:id': {
2755
+ /**
2756
+ * List enrollments for a specific user. Users can only view their own
2757
+ * enrollments unless they are admin/coordinator
2758
+ */
2759
+ 'GET': {
2760
+ params: ListUserEnrollmentsRequestParams;
2761
+ response: ListUserEnrollmentsResponseBody;
2762
+ };
2763
+ };
2764
+ '/:id': {
2765
+ /**
2766
+ * Get a specific enrollment. Requires full access role or ownership
2767
+ */
2768
+ 'GET': {
2769
+ params: GetEnrollmentRequestParams;
2770
+ response: GetEnrollmentResponseBody;
2771
+ };
2772
+ /**
2773
+ * Update an enrollment (admin and coordinator only)
2774
+ */
2775
+ 'PUT': {
2776
+ params: UpdateEnrollmentRequestParams;
2777
+ body: UpdateEnrollmentRequestBody;
2778
+ response: UpdateEnrollmentResponseBody;
2779
+ };
2780
+ /**
2781
+ * Delete an enrollment (admin and coordinator only)
2782
+ */
2783
+ 'DELETE': {
2784
+ params: DeleteEnrollmentRequestParams;
2785
+ response: DeleteEnrollmentResponseBody;
2786
+ };
2787
+ };
2788
+ };
2789
+ /**
2790
+ * Routes for file upload management
2791
+ */
2792
+ '/files': {
2793
+ '/:fileId/confirmUpload': {
2794
+ /**
2795
+ * Confirm that a file upload was completed successfully.
2796
+ * Only the file owner can confirm it (no-op for externally hosted files)
2797
+ */
2798
+ 'POST': {
2799
+ params: ConfirmFileUploadRequestParams;
2800
+ response: ConfirmFileUploadResponseBody;
2801
+ };
2802
+ };
2803
+ };
2804
+ /**
2805
+ * Routes for attendance justification management
2806
+ */
2807
+ '/justifications': {
2808
+ '/': {
2809
+ /**
2810
+ * List justifications for a course/edition, with resolved attachment
2811
+ * preview URLs (admin, coordinator only)
2812
+ */
2813
+ 'GET': {
2814
+ query: ListJustificationsRequestQuery;
2815
+ response: ListJustificationsResponseBody;
2816
+ };
2817
+ };
2818
+ '/:id': {
2819
+ /**
2820
+ * Update a justification (reason, attendance, and/or attachment).
2821
+ * Creates or replaces the attachment file when a provider is given
2822
+ * (admin, coordinator only)
2823
+ */
2824
+ 'PUT': {
2825
+ params: UpdateJustificationRequestParams;
2826
+ body: UpdateJustificationRequestBody;
2827
+ response: UpdateJustificationResponseBody;
2828
+ };
2829
+ };
2830
+ };
2831
+ /**
2832
+ * Routes for lesson management
2833
+ */
2834
+ '/lessons': {
2835
+ '/': {
2836
+ /**
2837
+ * List lessons (can filter by teacher, course, edition and date range)
2838
+ */
2839
+ 'GET': {
2840
+ query: ListLessonsRequestQuery;
2841
+ response: ListLessonsResponseBody;
2842
+ };
2843
+ /**
2844
+ * Create a new lesson (admin and coordinator only)
2845
+ */
2846
+ 'POST': {
2847
+ body: CreateLessonRequestBody;
2848
+ response: CreateLessonResponseBody;
2849
+ };
2850
+ };
2851
+ '/:id': {
2852
+ /**
2853
+ * Get a specific lesson
2854
+ */
2855
+ 'GET': {
2856
+ params: GetLessonRequestParams;
2857
+ response: GetLessonResponseBody;
2858
+ };
2859
+ /**
2860
+ * Update a lesson, including live class properties (admin and coordinator only)
2861
+ */
2862
+ 'PUT': {
2863
+ params: UpdateLessonRequestParams;
2864
+ body: UpdateLessonRequestBody;
2865
+ response: UpdateLessonResponseBody;
2866
+ };
2867
+ /**
2868
+ * Delete a lesson (admin only). Fails if there is associated data
2869
+ */
2870
+ 'DELETE': {
2871
+ params: DeleteLessonRequestParams;
2872
+ response: DeleteLessonResponseBody;
2873
+ };
2874
+ };
2875
+ };
2876
+ /**
2877
+ * Routes for magic link authentication
2878
+ */
2879
+ '/magiclink': {
2880
+ '/send': {
2881
+ /**
2882
+ * Send a magic link to the user's email if it's registered.
2883
+ * Always returns a generic success message to avoid leaking which emails exist
2884
+ */
2885
+ 'POST': {
2886
+ body: SendMagicLinkRequestBody;
2887
+ response: SendMagicLinkResponseBody;
2888
+ };
2889
+ };
2890
+ '/verify': {
2891
+ /**
2892
+ * Verify a magic link token and issue a custom auth token for the user
2893
+ */
2894
+ 'GET': {
2895
+ query: VerifyMagicLinkRequestQuery;
2896
+ response: VerifyMagicLinkResponseBody;
2897
+ };
2898
+ };
2899
+ '/cleanup': {
2900
+ /**
2901
+ * Delete expired magic link tokens (admin only)
2902
+ */
2903
+ 'DELETE': {
2904
+ response: CleanupMagicLinksResponseBody;
2905
+ };
2906
+ };
2907
+ };
2908
+ /**
2909
+ * Routes for course/lesson material management
2910
+ */
2911
+ '/materials': {
2912
+ '/': {
2913
+ /**
2914
+ * List materials the user has access to (students see only materials
2915
+ * for courses/lessons they're enrolled in; teachers see their lessons')
2916
+ */
2917
+ 'GET': {
2918
+ query: ListMaterialsRequestQuery;
2919
+ response: ListMaterialsResponseBody;
2920
+ };
2921
+ /**
2922
+ * Create a new material, uploading a file if needed. Teachers can
2923
+ * only attach materials to their own lessons
2924
+ */
2925
+ 'POST': {
2926
+ body: CreateMaterialRequestBody;
2927
+ response: CreateMaterialResponseBody;
2928
+ };
2929
+ };
2930
+ '/:id': {
2931
+ /**
2932
+ * Get a specific material with its resolved file URL, if the user has access
2933
+ */
2934
+ 'GET': {
2935
+ params: GetMaterialRequestParams;
2936
+ response: GetMaterialResponseBody;
2937
+ };
2938
+ /**
2939
+ * Update a material. Teachers can only update materials of their own lessons
2940
+ */
2941
+ 'PUT': {
2942
+ params: UpdateMaterialRequestParams;
2943
+ body: UpdateMaterialRequestBody;
2944
+ response: UpdateMaterialResponseBody;
2945
+ };
2946
+ /**
2947
+ * Delete a material and its file. Teachers can only delete materials of their own lessons
2948
+ */
2949
+ 'DELETE': {
2950
+ params: DeleteMaterialRequestParams;
2951
+ response: DeleteMaterialResponseBody;
2952
+ };
2953
+ };
2954
+ };
2955
+ /**
2956
+ * Routes for user notification management
2957
+ */
2958
+ '/notifications': {
2959
+ '/': {
2960
+ /**
2961
+ * List notifications for a user (own notifications, or any user's if admin)
2962
+ */
2963
+ 'GET': {
2964
+ query: ListNotificationsRequestQuery;
2965
+ response: ListNotificationsResponseBody;
2966
+ };
2967
+ /**
2968
+ * Create a notification for a single user (admin only)
2969
+ */
2970
+ 'POST': {
2971
+ body: CreateNotificationRequestBody;
2972
+ response: CreateNotificationResponseBody;
2973
+ };
2974
+ };
2975
+ '/:id': {
2976
+ /**
2977
+ * Get a specific notification (own notification, or any if admin)
2978
+ */
2979
+ 'GET': {
2980
+ params: GetNotificationRequestParams;
2981
+ response: GetNotificationResponseBody;
2982
+ };
2983
+ /**
2984
+ * Delete a notification (own notification, or any if admin)
2985
+ */
2986
+ 'DELETE': {
2987
+ params: DeleteNotificationRequestParams;
2988
+ response: DeleteNotificationResponseBody;
2989
+ };
2990
+ };
2991
+ '/:id/read': {
2992
+ /**
2993
+ * Mark a notification as read (own notification, or any if admin)
2994
+ */
2995
+ 'PUT': {
2996
+ params: ReadNotificationRequestParams;
2997
+ response: ReadNotificationResponseBody;
2998
+ };
2999
+ };
3000
+ '/bulk': {
3001
+ /**
3002
+ * Create the same notification for multiple users (admin only)
3003
+ */
3004
+ 'POST': {
3005
+ body: CreateNotificationsBulkRequestBody;
3006
+ response: CreateNotificationsBulkResponseBody;
3007
+ };
3008
+ };
3009
+ '/user/:userId/count': {
3010
+ /**
3011
+ * Count unread notifications for a user (own count, or any if admin)
3012
+ */
3013
+ 'GET': {
3014
+ params: CountNotificationsRequestParams;
3015
+ response: CountNotificationsResponseBody;
3016
+ };
3017
+ };
3018
+ '/user/:userId/read-all': {
3019
+ /**
3020
+ * Mark all notifications as read for a user (own notifications, or any if admin)
3021
+ */
3022
+ 'PUT': {
3023
+ params: ReadAllNotificationsRequestParams;
3024
+ response: ReadAllNotificationsResponseBody;
3025
+ };
3026
+ };
3027
+ '/user/:userId/all': {
3028
+ /**
3029
+ * Delete all notifications for a user (own notifications, or any if admin)
3030
+ */
3031
+ 'DELETE': {
3032
+ params: DeleteAllNotificationsRequestParams;
3033
+ response: DeleteAllNotificationsResponseBody;
3034
+ };
3035
+ };
3036
+ };
3037
+ /**
3038
+ * Routes for user management
3039
+ */
3040
+ '/users': {
3041
+ '/': {
3042
+ /**
3043
+ * List users (admin/coordinator only; coordinators are restricted to students)
3044
+ */
3045
+ 'GET': {
3046
+ query: ListUsersRequestQuery;
3047
+ response: ListUsersResponseBody;
3048
+ };
3049
+ /**
3050
+ * Create a new user (admin only)
3051
+ */
3052
+ 'POST': {
3053
+ body: CreateUserRequestBody;
3054
+ response: CreateUserResponseBody;
3055
+ };
3056
+ };
3057
+ '/:id': {
3058
+ /**
3059
+ * Get a specific user (own data, or any user if admin/coordinator with restrictions)
3060
+ */
3061
+ 'GET': {
3062
+ params: GetUserRequestParams;
3063
+ response: GetUserResponseBody;
3064
+ };
3065
+ /**
3066
+ * Update a user (own data, or any user if admin)
3067
+ */
3068
+ 'PUT': {
3069
+ params: UpdateUserRequestParams;
3070
+ body: UpdateUserRequestBody;
3071
+ response: UpdateUserResponseBody;
3072
+ };
3073
+ /**
3074
+ * Delete a user (soft delete: anonymizes personal data and deactivates account).
3075
+ * Own account, or any user if admin
3076
+ */
3077
+ 'DELETE': {
3078
+ params: DeleteUserRequestParams;
3079
+ response: DeleteUserResponseBody;
3080
+ };
3081
+ };
3082
+ '/:id/payment': {
3083
+ /**
3084
+ * Update payment status of a user's enrollment in a course/edition (admin and coordinator only)
3085
+ */
3086
+ 'PATCH': {
3087
+ params: PatchPaymentStatusRequestParams;
3088
+ body: PatchPaymentStatusRequestBody;
3089
+ response: PatchPaymentStatusResponseBody;
3090
+ };
3091
+ };
3092
+ '/payments/summary': {
3093
+ /**
3094
+ * Get a summary of enrollment payment statuses, optionally broken down by course/edition
3095
+ * (admin and coordinator only)
3096
+ */
3097
+ 'GET': {
3098
+ query: GetPaymentsSummaryRequestQuery;
3099
+ response: GetPaymentsSummaryResponseBody;
3100
+ };
3101
+ };
3102
+ };
3103
+ };
3104
+
3105
+ export { type ApiRoutes, AttendanceSchema, AttendanceStatusSchema, type CleanupMagicLinksResponseBody, type ConfirmFileUploadRequestParams, ConfirmFileUploadRequestParamsSchema, type ConfirmFileUploadResponseBody, type CountNotificationsRequestParams, CountNotificationsRequestParamsSchema, type CountNotificationsResponseBody, type CreateContentRequestBody, CreateContentRequestBodySchema, type CreateContentResponseBody, type CreateCourseRequestBody, CreateCourseRequestBodySchema, type CreateCourseResponse, type CreateCustomTokenRequestBody, CreateCustomTokenRequestBodySchema, type CreateCustomTokenResponse, type CreateEditionRequestBody, CreateEditionRequestBodySchema, type CreateEditionResponseBody, type CreateEnrollmentRequestBody, CreateEnrollmentRequestBodySchema, type CreateEnrollmentResponseBody, type CreateLessonRequestBody, CreateLessonRequestBodySchema, type CreateLessonResponseBody, type CreateMaterialRequestBody, CreateMaterialRequestBodySchema, type CreateMaterialResponseBody, type CreateNotificationRequestBody, CreateNotificationRequestBodySchema, type CreateNotificationResponseBody, type CreateNotificationsBulkRequestBody, CreateNotificationsBulkRequestBodySchema, type CreateNotificationsBulkResponseBody, type CreateOrUpdateAttendancesBulkRequestBody, CreateOrUpdateAttendancesBulkRequestBodySchema, type CreateOrUpdateAttendancesBulkResponseBody, type CreateUserRequestBody, CreateUserRequestBodySchema, type CreateUserResponseBody, type DeleteAllNotificationsRequestParams, DeleteAllNotificationsRequestParamsSchema, type DeleteAllNotificationsResponseBody, type DeleteAttendanceRequestParams, DeleteAttendanceRequestParamsSchema, type DeleteAttendanceResponse, type DeleteContentRequestParams, DeleteContentRequestParamsSchema, type DeleteContentResponseBody, type DeleteCourseRequestParams, DeleteCourseRequestParamsSchema, type DeleteCourseResponse, type DeleteEditionRequestParams, DeleteEditionRequestParamsSchema, type DeleteEditionResponseBody, type DeleteEnrollmentRequestParams, DeleteEnrollmentRequestParamsSchema, type DeleteEnrollmentResponseBody, type DeleteLessonRequestParams, DeleteLessonRequestParamsSchema, type DeleteLessonResponseBody, type DeleteMaterialRequestParams, DeleteMaterialRequestParamsSchema, type DeleteMaterialResponseBody, type DeleteNotificationRequestParams, DeleteNotificationRequestParamsSchema, type DeleteNotificationResponseBody, type DeleteUserRequestParams, DeleteUserRequestParamsSchema, type DeleteUserResponseBody, type GetContentRequestParams, GetContentRequestParamsSchema, type GetContentResponse, type GetCourseRequestParams, GetCourseRequestParamsSchema, type GetCourseResponse, type GetCoursesResponse, type GetEditionRequestParams, GetEditionRequestParamsSchema, type GetEditionResponseBody, type GetEditionStatsRequestParams, GetEditionStatsRequestParamsSchema, type GetEditionStatsResponseBody, type GetEnrollmentRequestParams, GetEnrollmentRequestParamsSchema, type GetEnrollmentResponseBody, type GetLessonRequestParams, GetLessonRequestParamsSchema, type GetLessonResponseBody, type GetLessonStatusRequestParams, GetLessonStatusRequestParamsSchema, type GetLessonStatusResponseBody, type GetLessonsStatusBulkQuery, GetLessonsStatusBulkQuerySchema, type GetLessonsStatusBulkResponse, type GetMaterialRequestParams, GetMaterialRequestParamsSchema, type GetMaterialResponseBody, type GetNotificationRequestParams, GetNotificationRequestParamsSchema, type GetNotificationResponseBody, type GetPaymentsSummaryRequestQuery, GetPaymentsSummaryRequestQuerySchema, type GetPaymentsSummaryResponseBody, type GetStudentAttendanceStatusRequestParams, GetStudentAttendanceStatusRequestParamsSchema, type GetStudentAttendanceStatusRequestQuery, GetStudentAttendanceStatusRequestQuerySchema, type GetStudentAttendanceStatusResponseBody, type GetUserRequestParams, GetUserRequestParamsSchema, type GetUserResponse, type GetUserResponseBody, type ListAttendanceRequestQuery, ListAttendanceRequestQuerySchema, type ListAttendenceResponseBody, type ListContentsRequestQuery, ListContentsRequestQuerySchema, type ListContentsResponseBody, type ListEditionsRequestQuery, ListEditionsRequestQuerySchema, type ListEditionsResponseBody, type ListEnrollmentsRequestQuery, ListEnrollmentsRequestQuerySchema, type ListEnrollmentsResponseBody, type ListJustificationsRequestQuery, ListJustificationsRequestQuerySchema, type ListJustificationsResponseBody, type ListLessonsRequestQuery, ListLessonsRequestQuerySchema, type ListLessonsResponseBody, type ListMaterialsRequestQuery, ListMaterialsRequestQuerySchema, type ListMaterialsResponseBody, type ListNotificationsRequestQuery, ListNotificationsRequestQuerySchema, type ListNotificationsResponseBody, type ListUserEnrollmentsRequestParams, ListUserEnrollmentsRequestParamsSchema, type ListUserEnrollmentsResponseBody, type ListUsersRequestQuery, ListUsersRequestQuerySchema, type ListUsersResponseBody, type PatchPaymentStatusRequestBody, PatchPaymentStatusRequestBodySchema, type PatchPaymentStatusRequestParams, PatchPaymentStatusRequestParamsSchema, type PatchPaymentStatusResponseBody, type ReadAllNotificationsRequestParams, ReadAllNotificationsRequestParamsSchema, type ReadAllNotificationsResponseBody, type ReadNotificationRequestParams, ReadNotificationRequestParamsSchema, type ReadNotificationResponseBody, type SendMagicLinkRequestBody, SendMagicLinkRequestBodySchema, type SendMagicLinkResponseBody, UpdateAttendanceRequestBodySchema, type UpdateAttendanceResponse, type UpdateAttendenceRequestBody, type UpdateContentRequestBody, UpdateContentRequestBodySchema, type UpdateContentRequestParams, UpdateContentRequestParamsSchema, type UpdateContentResponseBody, type UpdateCourseRequestBody, UpdateCourseRequestBodySchema, type UpdateCourseRequestParams, UpdateCourseRequestParamsSchema, type UpdateCourseResponse, type UpdateEditionRequestBody, UpdateEditionRequestBodySchema, type UpdateEditionRequestParams, UpdateEditionRequestParamsSchema, type UpdateEditionResponseBody, type UpdateEnrollmentRequestBody, UpdateEnrollmentRequestBodySchema, type UpdateEnrollmentRequestParams, UpdateEnrollmentRequestParamsSchema, type UpdateEnrollmentResponseBody, type UpdateJustificationRequestBody, UpdateJustificationRequestBodySchema, type UpdateJustificationRequestParams, UpdateJustificationRequestParamsSchema, type UpdateJustificationResponseBody, type UpdateLessonRequestBody, UpdateLessonRequestBodySchema, type UpdateLessonRequestParams, UpdateLessonRequestParamsSchema, type UpdateLessonResponseBody, type UpdateMaterialRequestBody, UpdateMaterialRequestBodySchema, type UpdateMaterialRequestParams, UpdateMaterialRequestParamsSchema, type UpdateMaterialResponseBody, type UpdateUserRequestBody, UpdateUserRequestBodySchema, type UpdateUserRequestParams, UpdateUserRequestParamsSchema, type UpdateUserResponseBody, type ValidateResponse, type VerifyMagicLinkRequestQuery, VerifyMagicLinkRequestQuerySchema, type VerifyMagicLinkResponseBody, type VerifyPhoneRequestBody, VerifyPhoneRequestBodySchema, type VerifyPhoneResponse };