najm-auth 0.1.7 → 0.1.8

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.

Potentially problematic release.


This version of najm-auth might be problematic. Click here for more details.

Files changed (40) hide show
  1. package/dist/index.d.ts +2337 -9
  2. package/dist/index.mjs +1887 -2110
  3. package/package.json +4 -5
  4. package/dist/auth/AuthController.d.ts +0 -48
  5. package/dist/auth/AuthService.d.ts +0 -29
  6. package/dist/auth/CookieService.d.ts +0 -4
  7. package/dist/auth/EncryptionService.d.ts +0 -5
  8. package/dist/auth/index.d.ts +0 -4
  9. package/dist/database/db.d.ts +0 -32
  10. package/dist/database/index.d.ts +0 -2
  11. package/dist/database/schema/PgEnum.d.ts +0 -4
  12. package/dist/database/schema/index.d.ts +0 -611
  13. package/dist/lib/ENUMS.d.ts +0 -224
  14. package/dist/lib/ZodEnum.d.ts +0 -163
  15. package/dist/lib/index.d.ts +0 -3
  16. package/dist/lib/validations.d.ts +0 -744
  17. package/dist/permissions/PermissionController.d.ts +0 -55
  18. package/dist/permissions/PermissionGuards.d.ts +0 -9
  19. package/dist/permissions/PermissionRepository.d.ts +0 -16
  20. package/dist/permissions/PermissionService.d.ts +0 -23
  21. package/dist/permissions/PermissionValidator.d.ts +0 -16
  22. package/dist/permissions/index.d.ts +0 -5
  23. package/dist/plugin.d.ts +0 -28
  24. package/dist/roles/RoleController.d.ts +0 -30
  25. package/dist/roles/RoleGuards.d.ts +0 -45
  26. package/dist/roles/RoleRepository.d.ts +0 -10
  27. package/dist/roles/RoleService.d.ts +0 -15
  28. package/dist/roles/RoleValidator.d.ts +0 -12
  29. package/dist/roles/index.d.ts +0 -5
  30. package/dist/shared/index.d.ts +0 -11
  31. package/dist/shared/logger.d.ts +0 -3
  32. package/dist/tokens/TokenRepository.d.ts +0 -15
  33. package/dist/tokens/TokenService.d.ts +0 -44
  34. package/dist/tokens/index.d.ts +0 -2
  35. package/dist/users/UserController.d.ts +0 -65
  36. package/dist/users/UserRepository.d.ts +0 -15
  37. package/dist/users/UserService.d.ts +0 -29
  38. package/dist/users/UserValidator.d.ts +0 -19
  39. package/dist/users/index.d.ts +0 -4
  40. package/dist/users/utils.d.ts +0 -1
package/dist/index.d.ts CHANGED
@@ -1,9 +1,2337 @@
1
- export * from './auth';
2
- export * from './lib';
3
- export * from './permissions';
4
- export * from './roles';
5
- export * from './shared';
6
- export * from './tokens';
7
- export * from './users';
8
- export { db, usersTable, rolesTable, tokensTable, permissionsTable, rolePermissionsTable, idField, } from './database';
9
- export { AuthPlugin } from './plugin';
1
+ import { DB as DB$1, PluginConfig } from 'najm-api';
2
+ import { z } from 'zod';
3
+ import { PostgresJsDatabase } from 'drizzle-orm/postgres-js';
4
+ import * as drizzle_orm from 'drizzle-orm';
5
+ import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
6
+
7
+ declare class EncryptionService {
8
+ constructor();
9
+ hashPassword(password: any): Promise<any>;
10
+ comparePassword(password: any, hashedPassword: any): Promise<any>;
11
+ }
12
+
13
+ declare class CookieService {
14
+ setRefreshCookie(refreshToken: any): void;
15
+ clearRefreshCookie(): void;
16
+ }
17
+
18
+ declare class UserRepository {
19
+ db: DB$1;
20
+ private getUser;
21
+ getAll(): Promise<any[]>;
22
+ getById(id: any): Promise<any>;
23
+ getByEmail(email: any): Promise<any>;
24
+ create(data: any): Promise<any>;
25
+ update(id: any, data: any): Promise<any>;
26
+ delete(id: any): Promise<any>;
27
+ deleteAll(): Promise<any>;
28
+ getRoleNameById(userId: any): Promise<any>;
29
+ getUserPassword(email: any): Promise<any>;
30
+ getUserPermissions(userId: any): Promise<any>;
31
+ }
32
+
33
+ declare class UserValidator {
34
+ private userRepository;
35
+ private encryptionService;
36
+ constructor(userRepository: UserRepository, encryptionService: EncryptionService);
37
+ validateCreateUser(data: any): Promise<any>;
38
+ isEmailExists(email: any): Promise<boolean>;
39
+ isPasswordValid(password: any, hashedPassword: any): Promise<boolean>;
40
+ isUserExist(id: any): Promise<boolean>;
41
+ checkUserIdIsUnique(id: any): Promise<void>;
42
+ isCorrectPass(password: any): Promise<boolean>;
43
+ hasRole(userId: any, roles: any): Promise<boolean>;
44
+ checkUserExistsByEmail(email: any): Promise<any>;
45
+ checkUserExists(id: any): Promise<true>;
46
+ checkEmailUnique(email: any, excludeId?: any): Promise<void>;
47
+ checkEmailExists(email: any): Promise<any>;
48
+ checkPasswordValid(password: any, hashedPassword: any): Promise<void>;
49
+ }
50
+
51
+ declare class RoleRepository {
52
+ db: DB$1;
53
+ getAll(): Promise<any>;
54
+ getById(id: string): Promise<any>;
55
+ getByName(name: string): Promise<any>;
56
+ create(data: any): Promise<any>;
57
+ update(id: any, data: any): Promise<any>;
58
+ delete(id: any): Promise<any>;
59
+ }
60
+
61
+ declare class RoleValidator {
62
+ private roleRepository;
63
+ constructor(roleRepository: RoleRepository);
64
+ validateCreateRole(data: any): Promise<any>;
65
+ isRoleNameExists(roleName: string): Promise<boolean>;
66
+ isRoleIdExists(id: string): Promise<boolean>;
67
+ checkNameUnique(roleName: string, excludeId?: any): Promise<void>;
68
+ checkRoleExists(id: string): Promise<void>;
69
+ checkRoleExistsByName(roleName: string): Promise<void>;
70
+ checkAdminRoleExists(): Promise<any>;
71
+ }
72
+
73
+ declare class TokenRepository {
74
+ db: DB$1;
75
+ storeRefreshToken(tokenData: {
76
+ userId: string;
77
+ token: string;
78
+ expiresAt: string;
79
+ }): Promise<any>;
80
+ getRefreshToken(userId: string): Promise<any>;
81
+ revokeToken(userId: string): Promise<any>;
82
+ isUserExists(userId: string): Promise<boolean>;
83
+ getRoleNameById(userId: string): Promise<any>;
84
+ getUserPermissions(userId: string): Promise<any>;
85
+ getUser(userId: string): Promise<any>;
86
+ }
87
+
88
+ interface JwtPayload {
89
+ userId: string;
90
+ exp?: number;
91
+ iat?: number;
92
+ }
93
+ declare class TokenService {
94
+ private tokenRepository;
95
+ private accessSecretKey;
96
+ private accessExpiresIn;
97
+ private refreshSecretKey;
98
+ private refreshExpiresIn;
99
+ constructor(tokenRepository: TokenRepository);
100
+ extractAccessToken(authorization: any): any;
101
+ verifyAccessToken(token: string): JwtPayload;
102
+ verifyRefreshToken(token: string): string;
103
+ getUserIdByAccessToken(header: string): Promise<string>;
104
+ storeRefreshToken(userId: any, refreshToken: any): Promise<void>;
105
+ getTokenExpire(token: any): number | undefined;
106
+ generateAccessToken(data: {
107
+ userId: string;
108
+ }): string;
109
+ generateRefreshToken(data: {
110
+ userId: string;
111
+ }): string;
112
+ generateTokens(userId: any): Promise<{
113
+ accessToken: string;
114
+ refreshToken: string;
115
+ accessTokenExpiresAt: number;
116
+ refreshTokenExpiresAt: number;
117
+ }>;
118
+ refreshTokens(): Promise<{
119
+ accessToken: string;
120
+ refreshToken: string;
121
+ accessTokenExpiresAt: number;
122
+ refreshTokenExpiresAt: number;
123
+ }>;
124
+ revokeToken(userId: any): Promise<any>;
125
+ getUserPermissions(auth: any): Promise<any>;
126
+ getUserRole(auth: any): Promise<any>;
127
+ getUser(auth: any): Promise<any>;
128
+ storeUserInCache(auth: any, ctx: any): Promise<any>;
129
+ }
130
+
131
+ declare const ROLES: {
132
+ readonly ADMIN: "admin";
133
+ readonly PRINCIPAL: "principal";
134
+ readonly ACCOUNTING: "accounting";
135
+ readonly SECRETARY: "secretary";
136
+ readonly TEACHER: "teacher";
137
+ readonly STUDENT: "student";
138
+ readonly PARENT: "parent";
139
+ };
140
+ declare const ROLE_GROUPS: {
141
+ readonly ADMINISTRATORS: readonly ["admin", "principal"];
142
+ readonly FINANCIAL: readonly ["admin", "accounting"];
143
+ readonly STAFF: readonly ["admin", "principal", "accounting", "secretary", "teacher"];
144
+ readonly END_USERS: readonly ["student", "parent"];
145
+ readonly ALL: readonly ["admin", "principal", "accounting", "secretary", "teacher", "student", "parent"];
146
+ };
147
+ type RoleGroup = typeof ROLE_GROUPS[keyof typeof ROLE_GROUPS];
148
+ declare class RoleChecker {
149
+ isInGroup(userRole: any, group: readonly string[]): boolean;
150
+ isAdministrator(userRole: any): boolean;
151
+ isStaff(userRole: any): boolean;
152
+ hasAnyRole(userRole: any, roles: readonly string[]): boolean;
153
+ hasExactRole(userRole: any, requiredRole: any): boolean;
154
+ }
155
+ declare class RoleGuards {
156
+ private roleChecker;
157
+ private tokenService;
158
+ constructor(roleChecker: RoleChecker, tokenService: TokenService);
159
+ isAuth(auth: any, ctx: any): Promise<boolean>;
160
+ hasRoles(auth: any, ctx: any, roles: any): Promise<boolean>;
161
+ }
162
+ declare const isAdmin: () => (target: any, propertyKey?: string) => void;
163
+ declare const isPrincipal: () => (target: any, propertyKey?: string) => void;
164
+ declare const isAccounting: () => (target: any, propertyKey?: string) => void;
165
+ declare const isSecretary: () => (target: any, propertyKey?: string) => void;
166
+ declare const isTeacher: () => (target: any, propertyKey?: string) => void;
167
+ declare const isParent: () => (target: any, propertyKey?: string) => void;
168
+ declare const isStudent: () => (target: any, propertyKey?: string) => void;
169
+ declare const isAdministrator: () => (target: any, propertyKey?: string) => void;
170
+ declare const isFinancial: () => (target: any, propertyKey?: string) => void;
171
+ declare const isStaff: () => (target: any, propertyKey?: string) => void;
172
+ declare const isAuth: (...params: any[]) => (target: any, propertyKey?: string) => void;
173
+ type Role$1 = typeof ROLES[keyof typeof ROLES];
174
+ declare const Role$1: (...roles: any[]) => (target: any, propertyKey?: string) => void;
175
+
176
+ declare class RoleService {
177
+ private roleRepository;
178
+ private roleValidator;
179
+ constructor(roleRepository: RoleRepository, roleValidator: RoleValidator);
180
+ getAll(): Promise<any>;
181
+ getById(id: any): Promise<any>;
182
+ getByName(name: any): Promise<any>;
183
+ create(data: any): Promise<any>;
184
+ update(id: any, data: any): Promise<any>;
185
+ delete(id: any): Promise<any>;
186
+ seedDefaultRoles(defaultRoles: any): Promise<any[]>;
187
+ getRoleIdByName(name: any): Promise<any>;
188
+ }
189
+
190
+ declare class RoleController {
191
+ private roleService;
192
+ constructor(roleService: RoleService);
193
+ getRoles(): Promise<{
194
+ data: any;
195
+ message: string;
196
+ status: string;
197
+ }>;
198
+ getRole(id: any): Promise<{
199
+ data: any;
200
+ message: string;
201
+ status: string;
202
+ }>;
203
+ createRole(body: any): Promise<{
204
+ data: any;
205
+ message: string;
206
+ status: string;
207
+ }>;
208
+ updateRole(id: any, body: any): Promise<{
209
+ data: any;
210
+ message: string;
211
+ status: string;
212
+ }>;
213
+ deleteRole(id: any): Promise<{
214
+ data: any;
215
+ message: string;
216
+ status: string;
217
+ }>;
218
+ }
219
+
220
+ declare class UserService {
221
+ private roleValidator;
222
+ private roleService;
223
+ private userRepository;
224
+ private userValidator;
225
+ private encryptionService;
226
+ constructor(roleValidator: RoleValidator, roleService: RoleService, userRepository: UserRepository, userValidator: UserValidator, encryptionService: EncryptionService);
227
+ private sanitizeUser;
228
+ private sanitizeUsers;
229
+ private resolveUserRole;
230
+ getAll(): Promise<any>;
231
+ getById(id: any): Promise<any>;
232
+ getByEmail(email: any): Promise<any>;
233
+ create(data: any): Promise<any>;
234
+ update(id: any, data: any): Promise<any>;
235
+ delete(id: any): Promise<any>;
236
+ deleteAll(): Promise<any>;
237
+ getRoleName(id: any): Promise<any>;
238
+ getPassword(email: any): Promise<any>;
239
+ assignRole(id: any, roleId: any, roleName?: any): Promise<any>;
240
+ removeRole(id: any): Promise<any>;
241
+ seedAdminUser(): Promise<any>;
242
+ updateLang(language: any): Promise<any>;
243
+ getLang(): Promise<string>;
244
+ }
245
+
246
+ declare class UserController {
247
+ private userService;
248
+ constructor(userService: UserService);
249
+ getUsers(): Promise<{
250
+ data: any;
251
+ message: string;
252
+ status: string;
253
+ }>;
254
+ getLang(): Promise<{
255
+ data: {
256
+ language: string;
257
+ };
258
+ message: string;
259
+ status: string;
260
+ }>;
261
+ updateLang(language: any): Promise<{
262
+ data: any;
263
+ message: string;
264
+ status: string;
265
+ }>;
266
+ getUser(id: any): Promise<{
267
+ data: any;
268
+ message: string;
269
+ status: string;
270
+ }>;
271
+ getByEmail(email: any): Promise<{
272
+ data: any;
273
+ message: string;
274
+ status: string;
275
+ }>;
276
+ getRole(userId: any): Promise<{
277
+ data: any;
278
+ message: string;
279
+ status: string;
280
+ }>;
281
+ create(body: any): Promise<{
282
+ data: any;
283
+ message: string;
284
+ status: string;
285
+ }>;
286
+ update(id: any, body: any): Promise<{
287
+ data: any;
288
+ message: string;
289
+ status: string;
290
+ }>;
291
+ delete(id: any): Promise<{
292
+ data: any;
293
+ message: string;
294
+ status: string;
295
+ }>;
296
+ deleteAll(): Promise<{
297
+ data: any;
298
+ message: string;
299
+ status: string;
300
+ }>;
301
+ assignRole(userId: any, roleId: any): Promise<{
302
+ message: string;
303
+ status: string;
304
+ }>;
305
+ removeRole(userId: any): Promise<{
306
+ message: string;
307
+ status: string;
308
+ }>;
309
+ }
310
+
311
+ declare class AuthService {
312
+ private tokenService;
313
+ private userService;
314
+ private userValidator;
315
+ private cookieService;
316
+ constructor(tokenService: TokenService, userService: UserService, userValidator: UserValidator, cookieService: CookieService);
317
+ registerUser(body: any): Promise<any>;
318
+ loginUser(body: any): Promise<{
319
+ accessToken: string;
320
+ refreshToken: string;
321
+ accessTokenExpiresAt: number;
322
+ refreshTokenExpiresAt: number;
323
+ }>;
324
+ refreshTokens(): Promise<{
325
+ accessToken: string;
326
+ refreshToken: string;
327
+ accessTokenExpiresAt: number;
328
+ refreshTokenExpiresAt: number;
329
+ }>;
330
+ logoutUser(userId: any): Promise<{
331
+ data: any;
332
+ message: string;
333
+ }>;
334
+ getUserProfile(userData: any): Promise<any>;
335
+ forgotPassword(email: any): Promise<void>;
336
+ }
337
+
338
+ declare class AuthController {
339
+ private authService;
340
+ constructor(authService: AuthService);
341
+ registerUser(body: any): Promise<{
342
+ data: any;
343
+ message: string;
344
+ status: string;
345
+ }>;
346
+ loginUser(body: any): Promise<{
347
+ data: {
348
+ accessToken: string;
349
+ refreshToken: string;
350
+ accessTokenExpiresAt: number;
351
+ refreshTokenExpiresAt: number;
352
+ };
353
+ message: string;
354
+ status: string;
355
+ }>;
356
+ refreshTokens(): Promise<{
357
+ data: {
358
+ accessToken: string;
359
+ refreshToken: string;
360
+ accessTokenExpiresAt: number;
361
+ refreshTokenExpiresAt: number;
362
+ };
363
+ message: string;
364
+ status: string;
365
+ }>;
366
+ logoutUser(id: any): Promise<{
367
+ data: {
368
+ data: any;
369
+ message: string;
370
+ };
371
+ message: string;
372
+ status: string;
373
+ }>;
374
+ userProfile(user: any): Promise<{
375
+ data: any;
376
+ message: string;
377
+ status: string;
378
+ }>;
379
+ forgotPassword(body: any): Promise<{
380
+ data: void;
381
+ message: string;
382
+ status: string;
383
+ }>;
384
+ }
385
+
386
+ declare const ENUMS: {
387
+ userType: {
388
+ values: string[];
389
+ translationKey: string;
390
+ };
391
+ userStatus: {
392
+ values: string[];
393
+ translationKey: string;
394
+ };
395
+ tokenStatus: {
396
+ values: string[];
397
+ translationKey: string;
398
+ };
399
+ tokenType: {
400
+ values: string[];
401
+ translationKey: string;
402
+ };
403
+ fileStatus: {
404
+ values: string[];
405
+ translationKey: string;
406
+ };
407
+ gender: {
408
+ values: string[];
409
+ translationKey: string;
410
+ };
411
+ studentStatus: {
412
+ values: string[];
413
+ translationKey: string;
414
+ };
415
+ teacherStatus: {
416
+ values: string[];
417
+ translationKey: string;
418
+ };
419
+ employmentType: {
420
+ values: string[];
421
+ translationKey: string;
422
+ };
423
+ relationshipType: {
424
+ values: string[];
425
+ translationKey: string;
426
+ };
427
+ semester: {
428
+ values: string[];
429
+ translationKey: string;
430
+ };
431
+ classStatus: {
432
+ values: string[];
433
+ translationKey: string;
434
+ };
435
+ sectionStatus: {
436
+ values: string[];
437
+ translationKey: string;
438
+ };
439
+ language: {
440
+ values: string[];
441
+ translationKey: string;
442
+ };
443
+ enrollmentStatus: {
444
+ values: string[];
445
+ translationKey: string;
446
+ };
447
+ assignmentStatus: {
448
+ values: string[];
449
+ translationKey: string;
450
+ };
451
+ calendarSystem: {
452
+ values: string[];
453
+ translationKey: string;
454
+ };
455
+ assessmentType: {
456
+ values: string[];
457
+ translationKey: string;
458
+ };
459
+ assessmentStatus: {
460
+ values: string[];
461
+ translationKey: string;
462
+ };
463
+ submissionType: {
464
+ values: string[];
465
+ translationKey: string;
466
+ };
467
+ examType: {
468
+ values: string[];
469
+ translationKey: string;
470
+ };
471
+ examSecurity: {
472
+ values: string[];
473
+ translationKey: string;
474
+ };
475
+ examStatus: {
476
+ values: string[];
477
+ translationKey: string;
478
+ };
479
+ gradeStatus: {
480
+ values: string[];
481
+ translationKey: string;
482
+ };
483
+ attendanceStatus: {
484
+ values: string[];
485
+ translationKey: string;
486
+ };
487
+ proficiencyLevel: {
488
+ values: string[];
489
+ translationKey: string;
490
+ };
491
+ dayOfWeek: {
492
+ values: string[];
493
+ translationKey: string;
494
+ };
495
+ alertType: {
496
+ values: string[];
497
+ translationKey: string;
498
+ };
499
+ alertPriority: {
500
+ values: string[];
501
+ translationKey: string;
502
+ };
503
+ alertStatus: {
504
+ values: string[];
505
+ translationKey: string;
506
+ };
507
+ feeTypeStatus: {
508
+ values: string[];
509
+ translationKey: string;
510
+ };
511
+ feeCategory: {
512
+ values: string[];
513
+ translationKey: string;
514
+ };
515
+ paymentType: {
516
+ values: string[];
517
+ translationKey: string;
518
+ };
519
+ schedule: {
520
+ values: string[];
521
+ translationKey: string;
522
+ };
523
+ feeStatus: {
524
+ values: string[];
525
+ translationKey: string;
526
+ };
527
+ feeInstallmentStatus: {
528
+ values: string[];
529
+ translationKey: string;
530
+ };
531
+ paymentMethod: {
532
+ values: string[];
533
+ translationKey: string;
534
+ };
535
+ paymentStatus: {
536
+ values: string[];
537
+ translationKey: string;
538
+ };
539
+ eventType: {
540
+ values: string[];
541
+ translationKey: string;
542
+ };
543
+ eventStatus: {
544
+ values: string[];
545
+ translationKey: string;
546
+ };
547
+ eventVisibility: {
548
+ values: string[];
549
+ translationKey: string;
550
+ };
551
+ participantType: {
552
+ values: string[];
553
+ translationKey: string;
554
+ };
555
+ expenseCategory: {
556
+ values: string[];
557
+ translationKey: string;
558
+ };
559
+ expenseStatus: {
560
+ values: string[];
561
+ translationKey: string;
562
+ };
563
+ trackerMode: {
564
+ values: string[];
565
+ translationKey: string;
566
+ };
567
+ driverStatus: {
568
+ values: string[];
569
+ translationKey: string;
570
+ };
571
+ vehicleStatus: {
572
+ values: string[];
573
+ translationKey: string;
574
+ };
575
+ vehicleType: {
576
+ values: string[];
577
+ translationKey: string;
578
+ };
579
+ vehicleDocumentType: {
580
+ values: string[];
581
+ translationKey: string;
582
+ };
583
+ busStatus: {
584
+ values: string[];
585
+ translationKey: string;
586
+ };
587
+ refuelStatus: {
588
+ values: string[];
589
+ translationKey: string;
590
+ };
591
+ fuelType: {
592
+ values: string[];
593
+ translationKey: string;
594
+ };
595
+ maintenanceType: {
596
+ values: string[];
597
+ translationKey: string;
598
+ };
599
+ maintenanceStatus: {
600
+ values: string[];
601
+ translationKey: string;
602
+ };
603
+ maritalStatus: {
604
+ values: string[];
605
+ translationKey: string;
606
+ };
607
+ };
608
+ declare const getEnumConfig: (enumKey: any) => any;
609
+ declare const getEnumValues: (enumKey: any) => any;
610
+
611
+ declare const userSchema: z.ZodObject<{
612
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
613
+ username: z.ZodOptional<z.ZodString>;
614
+ email: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
615
+ password: z.ZodString;
616
+ roleId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
617
+ roleName: z.ZodOptional<z.ZodString>;
618
+ lastLogin: z.ZodOptional<z.ZodNullable<z.ZodString>>;
619
+ image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<File, File>, z.ZodUndefined]>>;
620
+ emailVerified: z.ZodDefault<z.ZodBoolean>;
621
+ status: z.ZodEnum<{
622
+ [x: string]: any;
623
+ }>;
624
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
625
+ }, z.core.$strip>;
626
+ declare const roleSchema: z.ZodObject<{
627
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
628
+ name: z.ZodString;
629
+ description: z.ZodOptional<z.ZodString>;
630
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
631
+ }, z.core.$strip>;
632
+ declare const studentSchema: z.ZodObject<{
633
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
634
+ classId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
635
+ sectionId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
636
+ studentCode: z.ZodString;
637
+ name: z.ZodString;
638
+ email: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
639
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
640
+ address: z.ZodOptional<z.ZodString>;
641
+ dateOfBirth: z.ZodOptional<z.ZodNullable<z.ZodString>>;
642
+ gender: z.ZodEnum<{
643
+ [x: string]: any;
644
+ }>;
645
+ enrollmentDate: z.ZodString;
646
+ medicalConditions: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
647
+ previousSchool: z.ZodNullable<z.ZodOptional<z.ZodString>>;
648
+ image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<File, File>, z.ZodNull]>>;
649
+ status: z.ZodDefault<z.ZodEnum<{
650
+ [x: string]: any;
651
+ }>>;
652
+ }, z.core.$strip>;
653
+ declare const parentSchema: z.ZodObject<{
654
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
655
+ name: z.ZodString;
656
+ email: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
657
+ phone: z.ZodString;
658
+ gender: z.ZodOptional<z.ZodEnum<{
659
+ [x: string]: any;
660
+ }>>;
661
+ address: z.ZodOptional<z.ZodString>;
662
+ dateOfBirth: z.ZodOptional<z.ZodNullable<z.ZodString>>;
663
+ cin: z.ZodString;
664
+ occupation: z.ZodOptional<z.ZodString>;
665
+ nationality: z.ZodOptional<z.ZodString>;
666
+ maritalStatus: z.ZodOptional<z.ZodString>;
667
+ relationshipType: z.ZodEnum<{
668
+ [x: string]: any;
669
+ }>;
670
+ image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<File, File>, z.ZodNull]>>;
671
+ isEmergencyContact: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
672
+ financialResponsibility: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
673
+ }, z.core.$strip>;
674
+ declare const driverSchema: z.ZodObject<{
675
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
676
+ name: z.ZodString;
677
+ email: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
678
+ cin: z.ZodString;
679
+ phone: z.ZodString;
680
+ address: z.ZodOptional<z.ZodString>;
681
+ gender: z.ZodOptional<z.ZodEnum<{
682
+ [x: string]: any;
683
+ }>>;
684
+ licenseNumber: z.ZodString;
685
+ licenseType: z.ZodString;
686
+ licenseExpiry: z.ZodString;
687
+ hireDate: z.ZodString;
688
+ salary: any;
689
+ yearsOfExperience: any;
690
+ emergencyContact: z.ZodOptional<z.ZodString>;
691
+ emergencyPhone: z.ZodOptional<z.ZodString>;
692
+ image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<File, File>, z.ZodNull]>>;
693
+ status: z.ZodDefault<z.ZodEnum<{
694
+ [x: string]: any;
695
+ }>>;
696
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
697
+ }, z.core.$strip>;
698
+ declare const teacherPersonalSchema: z.ZodObject<{
699
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
700
+ name: z.ZodString;
701
+ cin: z.ZodString;
702
+ email: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
703
+ phone: z.ZodString;
704
+ address: z.ZodOptional<z.ZodString>;
705
+ gender: z.ZodOptional<z.ZodEnum<{
706
+ [x: string]: any;
707
+ }>>;
708
+ emergencyContact: z.ZodOptional<z.ZodString>;
709
+ emergencyPhone: z.ZodString;
710
+ status: z.ZodDefault<z.ZodEnum<{
711
+ [x: string]: any;
712
+ }>>;
713
+ image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<File, File>, z.ZodNull]>>;
714
+ }, z.core.$strip>;
715
+ declare const teacherProfessionalSchema: z.ZodObject<{
716
+ specialization: z.ZodOptional<z.ZodString>;
717
+ yearsOfExperience: any;
718
+ salary: any;
719
+ hireDate: z.ZodString;
720
+ bankAccount: z.ZodOptional<z.ZodCoercedString<unknown>>;
721
+ employmentType: z.ZodOptional<z.ZodEnum<{
722
+ [x: string]: any;
723
+ }>>;
724
+ workloadHours: any;
725
+ academicDegrees: z.ZodOptional<z.ZodString>;
726
+ }, z.core.$strip>;
727
+ declare const assignmentSchema: z.ZodObject<{
728
+ classId: z.ZodString;
729
+ sectionIds: z.ZodArray<z.ZodString>;
730
+ subjectIds: z.ZodArray<z.ZodString>;
731
+ academicYear: z.ZodOptional<z.ZodString>;
732
+ }, z.core.$strip>;
733
+ declare const assignmentsSchema: z.ZodObject<{
734
+ assignments: z.ZodArray<z.ZodObject<{
735
+ classId: z.ZodString;
736
+ sectionIds: z.ZodArray<z.ZodString>;
737
+ subjectIds: z.ZodArray<z.ZodString>;
738
+ academicYear: z.ZodOptional<z.ZodString>;
739
+ }, z.core.$strip>>;
740
+ }, z.core.$strip>;
741
+ declare const teacherFullSchema: z.ZodObject<{
742
+ assignments: z.ZodArray<z.ZodObject<{
743
+ classId: z.ZodString;
744
+ sectionIds: z.ZodArray<z.ZodString>;
745
+ subjectIds: z.ZodArray<z.ZodString>;
746
+ academicYear: z.ZodOptional<z.ZodString>;
747
+ }, z.core.$strip>>;
748
+ specialization: z.ZodOptional<z.ZodString>;
749
+ yearsOfExperience: any;
750
+ salary: any;
751
+ hireDate: z.ZodString;
752
+ bankAccount: z.ZodOptional<z.ZodCoercedString<unknown>>;
753
+ employmentType: z.ZodOptional<z.ZodEnum<{
754
+ [x: string]: any;
755
+ }>>;
756
+ workloadHours: any;
757
+ academicDegrees: z.ZodOptional<z.ZodString>;
758
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
759
+ name: z.ZodString;
760
+ cin: z.ZodString;
761
+ email: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
762
+ phone: z.ZodString;
763
+ address: z.ZodOptional<z.ZodString>;
764
+ gender: z.ZodOptional<z.ZodEnum<{
765
+ [x: string]: any;
766
+ }>>;
767
+ emergencyContact: z.ZodOptional<z.ZodString>;
768
+ emergencyPhone: z.ZodString;
769
+ status: z.ZodDefault<z.ZodEnum<{
770
+ [x: string]: any;
771
+ }>>;
772
+ image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<File, File>, z.ZodNull]>>;
773
+ }, z.core.$strip>;
774
+ declare const feeTypeSchema: z.ZodObject<{
775
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
776
+ name: z.ZodString;
777
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
778
+ category: z.ZodString;
779
+ amount: any;
780
+ paymentType: z.ZodDefault<z.ZodEnum<{
781
+ [x: string]: any;
782
+ }>>;
783
+ status: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
784
+ [x: string]: any;
785
+ }>>>;
786
+ }, z.core.$strip>;
787
+ declare const feeSchema: z.ZodObject<{
788
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
789
+ studentId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
790
+ feeTypeId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
791
+ academicYear: z.ZodOptional<z.ZodString>;
792
+ status: z.ZodOptional<z.ZodEnum<{
793
+ [x: string]: any;
794
+ }>>;
795
+ schedule: z.ZodEnum<{
796
+ [x: string]: any;
797
+ }>;
798
+ baseAmount: any;
799
+ grossAmount: any;
800
+ netAmount: any;
801
+ paidAmount: any;
802
+ discountAmount: any;
803
+ discountReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
804
+ assignedBy: z.ZodNullable<z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
805
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
806
+ }, z.core.$strip>;
807
+ declare const bulkFeeItemSchema: z.ZodObject<{
808
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
809
+ status: z.ZodOptional<z.ZodEnum<{
810
+ [x: string]: any;
811
+ }>>;
812
+ schedule: z.ZodEnum<{
813
+ [x: string]: any;
814
+ }>;
815
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
816
+ academicYear: z.ZodOptional<z.ZodString>;
817
+ feeTypeId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
818
+ baseAmount: any;
819
+ grossAmount: any;
820
+ netAmount: any;
821
+ paidAmount: any;
822
+ discountAmount: any;
823
+ discountReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
824
+ assignedBy: z.ZodNullable<z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
825
+ }, z.core.$strip>;
826
+ declare const bulkFeeFormSchema: z.ZodObject<{
827
+ studentId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
828
+ fees: z.ZodArray<z.ZodObject<{
829
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
830
+ status: z.ZodOptional<z.ZodEnum<{
831
+ [x: string]: any;
832
+ }>>;
833
+ schedule: z.ZodEnum<{
834
+ [x: string]: any;
835
+ }>;
836
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
837
+ academicYear: z.ZodOptional<z.ZodString>;
838
+ feeTypeId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
839
+ baseAmount: any;
840
+ grossAmount: any;
841
+ netAmount: any;
842
+ paidAmount: any;
843
+ discountAmount: any;
844
+ discountReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
845
+ assignedBy: z.ZodNullable<z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
846
+ }, z.core.$strip>>;
847
+ }, z.core.$strip>;
848
+ declare const feeInstallmentSchema: z.ZodObject<{
849
+ feeId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
850
+ number: any;
851
+ dueDate: z.ZodString;
852
+ amount: any;
853
+ paidAmount: any;
854
+ status: z.ZodOptional<z.ZodEnum<{
855
+ [x: string]: any;
856
+ }>>;
857
+ }, z.core.$strip>;
858
+ declare const feePaymentSchema: z.ZodObject<{
859
+ studentId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
860
+ amount: any;
861
+ paymentMethod: z.ZodEnum<{
862
+ [x: string]: any;
863
+ }>;
864
+ paymentDate: z.ZodString;
865
+ checkNumber: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodOptional<z.ZodString>>>;
866
+ checkDueDate: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
867
+ transactionRef: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodOptional<z.ZodString>>>;
868
+ receiptNumber: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodOptional<z.ZodString>>>;
869
+ status: z.ZodDefault<z.ZodEnum<{
870
+ [x: string]: any;
871
+ }>>;
872
+ processedBy: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
873
+ notes: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodOptional<z.ZodString>>>;
874
+ allocations: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
875
+ feeId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
876
+ number: z.ZodNumber;
877
+ amount: any;
878
+ }, z.core.$strip>>>>;
879
+ }, z.core.$strip>;
880
+ declare const paymentAllocationSchema: z.ZodObject<{
881
+ paymentId: z.ZodString;
882
+ feeId: z.ZodString;
883
+ installmentId: z.ZodOptional<z.ZodString>;
884
+ amount: z.ZodNumber;
885
+ type: z.ZodDefault<z.ZodEnum<{
886
+ fee: "fee";
887
+ installment: "installment";
888
+ }>>;
889
+ notes: z.ZodOptional<z.ZodString>;
890
+ }, z.core.$strip>;
891
+ declare const parentsSchema: z.ZodObject<{
892
+ parents: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
893
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
894
+ name: z.ZodString;
895
+ email: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
896
+ phone: z.ZodString;
897
+ gender: z.ZodOptional<z.ZodEnum<{
898
+ [x: string]: any;
899
+ }>>;
900
+ address: z.ZodOptional<z.ZodString>;
901
+ dateOfBirth: z.ZodOptional<z.ZodNullable<z.ZodString>>;
902
+ cin: z.ZodString;
903
+ occupation: z.ZodOptional<z.ZodString>;
904
+ nationality: z.ZodOptional<z.ZodString>;
905
+ maritalStatus: z.ZodOptional<z.ZodString>;
906
+ relationshipType: z.ZodEnum<{
907
+ [x: string]: any;
908
+ }>;
909
+ image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<File, File>, z.ZodNull]>>;
910
+ isEmergencyContact: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
911
+ financialResponsibility: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
912
+ }, z.core.$strip>>>>;
913
+ }, z.core.$strip>;
914
+ declare const feesSchema: z.ZodObject<{
915
+ fees: z.ZodArray<z.ZodObject<{
916
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
917
+ status: z.ZodOptional<z.ZodEnum<{
918
+ [x: string]: any;
919
+ }>>;
920
+ schedule: z.ZodEnum<{
921
+ [x: string]: any;
922
+ }>;
923
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
924
+ academicYear: z.ZodOptional<z.ZodString>;
925
+ feeTypeId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
926
+ baseAmount: any;
927
+ grossAmount: any;
928
+ netAmount: any;
929
+ paidAmount: any;
930
+ discountAmount: any;
931
+ discountReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
932
+ assignedBy: z.ZodNullable<z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
933
+ }, z.core.$strip>>;
934
+ }, z.core.$strip>;
935
+ declare const fullStudentSchema: z.ZodObject<{
936
+ fees: z.ZodArray<z.ZodObject<{
937
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
938
+ status: z.ZodOptional<z.ZodEnum<{
939
+ [x: string]: any;
940
+ }>>;
941
+ schedule: z.ZodEnum<{
942
+ [x: string]: any;
943
+ }>;
944
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
945
+ academicYear: z.ZodOptional<z.ZodString>;
946
+ feeTypeId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
947
+ baseAmount: any;
948
+ grossAmount: any;
949
+ netAmount: any;
950
+ paidAmount: any;
951
+ discountAmount: any;
952
+ discountReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
953
+ assignedBy: z.ZodNullable<z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
954
+ }, z.core.$strip>>;
955
+ parents: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
956
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
957
+ name: z.ZodString;
958
+ email: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
959
+ phone: z.ZodString;
960
+ gender: z.ZodOptional<z.ZodEnum<{
961
+ [x: string]: any;
962
+ }>>;
963
+ address: z.ZodOptional<z.ZodString>;
964
+ dateOfBirth: z.ZodOptional<z.ZodNullable<z.ZodString>>;
965
+ cin: z.ZodString;
966
+ occupation: z.ZodOptional<z.ZodString>;
967
+ nationality: z.ZodOptional<z.ZodString>;
968
+ maritalStatus: z.ZodOptional<z.ZodString>;
969
+ relationshipType: z.ZodEnum<{
970
+ [x: string]: any;
971
+ }>;
972
+ image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<File, File>, z.ZodNull]>>;
973
+ isEmergencyContact: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
974
+ financialResponsibility: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
975
+ }, z.core.$strip>>>>;
976
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
977
+ classId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
978
+ sectionId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
979
+ studentCode: z.ZodString;
980
+ name: z.ZodString;
981
+ email: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
982
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
983
+ address: z.ZodOptional<z.ZodString>;
984
+ dateOfBirth: z.ZodOptional<z.ZodNullable<z.ZodString>>;
985
+ gender: z.ZodEnum<{
986
+ [x: string]: any;
987
+ }>;
988
+ enrollmentDate: z.ZodString;
989
+ medicalConditions: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
990
+ previousSchool: z.ZodNullable<z.ZodOptional<z.ZodString>>;
991
+ image: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<File, File>, z.ZodNull]>>;
992
+ status: z.ZodDefault<z.ZodEnum<{
993
+ [x: string]: any;
994
+ }>>;
995
+ }, z.core.$strip>;
996
+ declare const subjectSchema: z.ZodObject<{
997
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
998
+ code: z.ZodString;
999
+ name: z.ZodString;
1000
+ description: z.ZodOptional<z.ZodString>;
1001
+ gradeLevel: any;
1002
+ }, z.core.$strip>;
1003
+ declare const sectionSchema: z.ZodObject<{
1004
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1005
+ classId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1006
+ name: z.ZodString;
1007
+ maxStudents: any;
1008
+ roomNumber: any;
1009
+ status: z.ZodDefault<z.ZodEnum<{
1010
+ [x: string]: any;
1011
+ }>>;
1012
+ }, z.core.$strip>;
1013
+ declare const classSchema: z.ZodObject<{
1014
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1015
+ name: z.ZodString;
1016
+ description: z.ZodOptional<z.ZodString>;
1017
+ academicYear: z.ZodString;
1018
+ level: z.ZodString;
1019
+ }, z.core.$strip>;
1020
+ declare const attendanceSchema: z.ZodObject<{
1021
+ studentId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1022
+ teacherId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1023
+ subjectId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1024
+ sectionId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1025
+ date: z.ZodString;
1026
+ status: z.ZodDefault<z.ZodEnum<{
1027
+ [x: string]: any;
1028
+ }>>;
1029
+ notes: z.ZodOptional<z.ZodString>;
1030
+ }, z.core.$strip>;
1031
+ declare const assessmentSchema: z.ZodObject<{
1032
+ classId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1033
+ sectionId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1034
+ subjectId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1035
+ teacherId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1036
+ teacherAssignmentId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1037
+ title: z.ZodString;
1038
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1039
+ type: z.ZodDefault<z.ZodEnum<{
1040
+ [x: string]: any;
1041
+ }>>;
1042
+ date: z.ZodString;
1043
+ duration: any;
1044
+ totalMarks: any;
1045
+ passingMarks: any;
1046
+ instructions: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1047
+ status: z.ZodDefault<z.ZodEnum<{
1048
+ [x: string]: any;
1049
+ }>>;
1050
+ assessmentId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1051
+ }, z.core.$strip>;
1052
+ declare const bulkAssessmentSchema: z.ZodObject<{
1053
+ assessments: z.ZodArray<z.ZodObject<{
1054
+ classId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1055
+ sectionId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1056
+ subjectId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1057
+ teacherId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1058
+ teacherAssignmentId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1059
+ title: z.ZodString;
1060
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1061
+ type: z.ZodDefault<z.ZodEnum<{
1062
+ [x: string]: any;
1063
+ }>>;
1064
+ date: z.ZodString;
1065
+ duration: any;
1066
+ totalMarks: any;
1067
+ passingMarks: any;
1068
+ instructions: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1069
+ status: z.ZodDefault<z.ZodEnum<{
1070
+ [x: string]: any;
1071
+ }>>;
1072
+ assessmentId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1073
+ }, z.core.$strip>>;
1074
+ }, z.core.$strip>;
1075
+ declare const gradeSchema: z.ZodObject<{
1076
+ assessmentId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1077
+ teacherId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1078
+ subjectId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1079
+ sectionId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1080
+ studentId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1081
+ gradeId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1082
+ assessmentTitle: z.ZodOptional<z.ZodString>;
1083
+ marksObtained: any;
1084
+ feedback: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1085
+ status: z.ZodDefault<z.ZodEnum<{
1086
+ [x: string]: any;
1087
+ }>>;
1088
+ }, z.core.$strip>;
1089
+ declare const examSchema: z.ZodObject<{
1090
+ classId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1091
+ sectionId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1092
+ subjectId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1093
+ teacherId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1094
+ examId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1095
+ teacherAssignmentId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
1096
+ title: z.ZodString;
1097
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1098
+ type: z.ZodDefault<z.ZodEnum<{
1099
+ [x: string]: any;
1100
+ }>>;
1101
+ date: z.ZodString;
1102
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1103
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1104
+ duration: any;
1105
+ totalMarks: any;
1106
+ passingMarks: any;
1107
+ roomNumber: any;
1108
+ allowedMaterials: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1109
+ instructions: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1110
+ status: z.ZodDefault<z.ZodEnum<{
1111
+ [x: string]: any;
1112
+ }>>;
1113
+ }, z.core.$strip>;
1114
+ declare const announcementSchema: z.ZodObject<{
1115
+ title: z.ZodString;
1116
+ content: z.ZodString;
1117
+ authorId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1118
+ targetAudience: z.ZodEnum<{
1119
+ teachers: "teachers";
1120
+ students: "students";
1121
+ parents: "parents";
1122
+ all: "all";
1123
+ class: "class";
1124
+ }>;
1125
+ classId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1126
+ isPublished: z.ZodDefault<z.ZodBoolean>;
1127
+ publishDate: z.ZodOptional<z.ZodString>;
1128
+ expiryDate: z.ZodOptional<z.ZodString>;
1129
+ }, z.core.$strip>;
1130
+ declare const alertSchema: z.ZodObject<{
1131
+ type: z.ZodEnum<{
1132
+ [x: string]: any;
1133
+ }>;
1134
+ title: z.ZodString;
1135
+ message: z.ZodString;
1136
+ priority: z.ZodDefault<z.ZodEnum<{
1137
+ [x: string]: any;
1138
+ }>>;
1139
+ status: z.ZodDefault<z.ZodEnum<{
1140
+ [x: string]: any;
1141
+ }>>;
1142
+ studentId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1143
+ teacherId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1144
+ classId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1145
+ subjectId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1146
+ targetAudience: z.ZodOptional<z.ZodEnum<{
1147
+ teachers: "teachers";
1148
+ students: "students";
1149
+ parents: "parents";
1150
+ all: "all";
1151
+ }>>;
1152
+ authorId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1153
+ isRead: z.ZodDefault<z.ZodBoolean>;
1154
+ }, z.core.$strip>;
1155
+ declare const eventSchema: z.ZodObject<{
1156
+ title: z.ZodString;
1157
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1158
+ type: z.ZodEnum<{
1159
+ [x: string]: any;
1160
+ }>;
1161
+ startDate: z.ZodString;
1162
+ endDate: z.ZodString;
1163
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1164
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1165
+ location: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1166
+ venue: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1167
+ organizerId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1168
+ classId: z.ZodNullable<z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
1169
+ sectionId: z.ZodNullable<z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
1170
+ visibility: z.ZodDefault<z.ZodEnum<{
1171
+ [x: string]: any;
1172
+ }>>;
1173
+ status: z.ZodDefault<z.ZodEnum<{
1174
+ [x: string]: any;
1175
+ }>>;
1176
+ capacity: any;
1177
+ registrationRequired: z.ZodDefault<z.ZodBoolean>;
1178
+ registrationDeadline: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1179
+ attachments: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
1180
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1181
+ }, z.core.$strip>;
1182
+ declare const eventParticipantSchema: z.ZodObject<{
1183
+ eventId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1184
+ participantId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1185
+ participantType: z.ZodEnum<{
1186
+ [x: string]: any;
1187
+ }>;
1188
+ attendanceStatus: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
1189
+ [x: string]: any;
1190
+ }>>>;
1191
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1192
+ }, z.core.$strip>;
1193
+ declare const expenseSchema: z.ZodObject<{
1194
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1195
+ category: z.ZodEnum<{
1196
+ [x: string]: any;
1197
+ }>;
1198
+ title: z.ZodString;
1199
+ amount: any;
1200
+ expenseDate: z.ZodString;
1201
+ paymentMethod: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
1202
+ [x: string]: any;
1203
+ }>>>;
1204
+ paymentDate: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1205
+ vendor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1206
+ invoiceNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1207
+ receiptNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1208
+ checkNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1209
+ transactionRef: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1210
+ status: z.ZodDefault<z.ZodEnum<{
1211
+ [x: string]: any;
1212
+ }>>;
1213
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1214
+ }, z.core.$strip>;
1215
+ declare const expenseApprovalSchema: z.ZodObject<{
1216
+ action: z.ZodEnum<{
1217
+ approve: "approve";
1218
+ reject: "reject";
1219
+ }>;
1220
+ rejectionReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1221
+ }, z.core.$strip>;
1222
+ declare const expensePaymentSchema: z.ZodObject<{
1223
+ paymentMethod: z.ZodEnum<{
1224
+ [x: string]: any;
1225
+ }>;
1226
+ paymentDate: z.ZodString;
1227
+ checkNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1228
+ transactionRef: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1229
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1230
+ }, z.core.$strip>;
1231
+ declare const vehicleSchema: z.ZodObject<{
1232
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1233
+ name: z.ZodString;
1234
+ brand: z.ZodString;
1235
+ model: z.ZodString;
1236
+ year: any;
1237
+ type: z.ZodDefault<z.ZodEnum<{
1238
+ [x: string]: any;
1239
+ }>>;
1240
+ capacity: any;
1241
+ licensePlate: z.ZodString;
1242
+ driverId: z.ZodNullable<z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
1243
+ image: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
1244
+ purchaseDate: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1245
+ purchasePrice: any;
1246
+ initialMileage: any;
1247
+ currentMileage: any;
1248
+ status: z.ZodDefault<z.ZodEnum<{
1249
+ [x: string]: any;
1250
+ }>>;
1251
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1252
+ }, z.core.$strip>;
1253
+ declare const refuelSchema: z.ZodObject<{
1254
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1255
+ busId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1256
+ refuelDate: z.ZodString;
1257
+ quantity: any;
1258
+ unitPrice: any;
1259
+ totalCost: any;
1260
+ fuelType: z.ZodDefault<z.ZodEnum<{
1261
+ [x: string]: any;
1262
+ }>>;
1263
+ odometer: any;
1264
+ fuelStation: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1265
+ invoiceNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1266
+ paymentMethod: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
1267
+ [x: string]: any;
1268
+ }>>>;
1269
+ paidBy: z.ZodNullable<z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
1270
+ status: z.ZodDefault<z.ZodEnum<{
1271
+ [x: string]: any;
1272
+ }>>;
1273
+ notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1274
+ }, z.core.$strip>;
1275
+ declare const settingsSchema: z.ZodObject<{
1276
+ schoolName: z.ZodString;
1277
+ schoolAddress: z.ZodOptional<z.ZodString>;
1278
+ schoolPhone: z.ZodString;
1279
+ schoolEmail: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
1280
+ schoolWebsite: z.ZodOptional<z.ZodString>;
1281
+ schoolLogo: z.ZodOptional<z.ZodString>;
1282
+ currentAcademicYear: z.ZodString;
1283
+ gradingScale: z.ZodOptional<z.ZodAny>;
1284
+ attendanceRequirement: any;
1285
+ maxClassSize: any;
1286
+ minimumPassingGrade: any;
1287
+ defaultExamDuration: any;
1288
+ calendarSystem: z.ZodDefault<z.ZodEnum<{
1289
+ [x: string]: any;
1290
+ }>>;
1291
+ startMonth: z.ZodDefault<z.ZodString>;
1292
+ endMonth: z.ZodDefault<z.ZodString>;
1293
+ academicAlerts: z.ZodDefault<z.ZodBoolean>;
1294
+ attendanceAlerts: z.ZodDefault<z.ZodBoolean>;
1295
+ eventAlerts: z.ZodDefault<z.ZodBoolean>;
1296
+ homeworkAlerts: z.ZodDefault<z.ZodBoolean>;
1297
+ feesReminder: z.ZodDefault<z.ZodBoolean>;
1298
+ feesOverdueAlerts: z.ZodDefault<z.ZodBoolean>;
1299
+ emailNotifications: z.ZodDefault<z.ZodBoolean>;
1300
+ smsNotifications: z.ZodDefault<z.ZodBoolean>;
1301
+ parentNotifications: z.ZodDefault<z.ZodBoolean>;
1302
+ lowGradeAlerts: z.ZodDefault<z.ZodBoolean>;
1303
+ allowLateSubmission: z.ZodDefault<z.ZodBoolean>;
1304
+ examResultsAlerts: z.ZodDefault<z.ZodBoolean>;
1305
+ disciplinaryAlerts: z.ZodDefault<z.ZodBoolean>;
1306
+ achievementAlerts: z.ZodDefault<z.ZodBoolean>;
1307
+ maintenanceNotifications: z.ZodDefault<z.ZodBoolean>;
1308
+ twoFactorEnabled: z.ZodDefault<z.ZodBoolean>;
1309
+ sessionTimeout: z.ZodDefault<z.ZodString>;
1310
+ passwordRequireSymbols: z.ZodDefault<z.ZodBoolean>;
1311
+ loginNotifications: z.ZodDefault<z.ZodBoolean>;
1312
+ parentAccessEnabled: z.ZodDefault<z.ZodBoolean>;
1313
+ teacherAccessEnabled: z.ZodDefault<z.ZodBoolean>;
1314
+ studentAccessEnabled: z.ZodDefault<z.ZodBoolean>;
1315
+ timeZone: z.ZodDefault<z.ZodString>;
1316
+ language: z.ZodDefault<z.ZodEnum<{
1317
+ [x: string]: any;
1318
+ }>>;
1319
+ theme: z.ZodDefault<z.ZodEnum<{
1320
+ system: "system";
1321
+ light: "light";
1322
+ dark: "dark";
1323
+ }>>;
1324
+ dateFormat: z.ZodDefault<z.ZodEnum<{
1325
+ "YYYY-MM-DD": "YYYY-MM-DD";
1326
+ "MM/DD/YYYY": "MM/DD/YYYY";
1327
+ "DD/MM/YYYY": "DD/MM/YYYY";
1328
+ "DD-MM-YY": "DD-MM-YY";
1329
+ "DD-MM-YYYY": "DD-MM-YYYY";
1330
+ }>>;
1331
+ timeFormat: z.ZodDefault<z.ZodEnum<{
1332
+ 12: "12";
1333
+ 24: "24";
1334
+ }>>;
1335
+ currency: z.ZodDefault<z.ZodString>;
1336
+ gradingPeriods: any;
1337
+ schoolStartTime: z.ZodDefault<z.ZodString>;
1338
+ schoolEndTime: z.ZodDefault<z.ZodString>;
1339
+ lunchBreakDuration: any;
1340
+ maintenanceMode: z.ZodDefault<z.ZodBoolean>;
1341
+ autoBackup: z.ZodDefault<z.ZodBoolean>;
1342
+ }, z.core.$strip>;
1343
+ declare const idParamSchema: z.ZodObject<{
1344
+ id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1345
+ }, z.core.$strip>;
1346
+ declare const paginationSchema: z.ZodObject<{
1347
+ page: any;
1348
+ limit: any;
1349
+ }, z.core.$strip>;
1350
+ declare const dateRangeSchema: z.ZodObject<{
1351
+ dateFrom: z.ZodString;
1352
+ dateTo: z.ZodString;
1353
+ }, z.core.$strip>;
1354
+
1355
+ declare const userTypeEnum: z.ZodEnum<{
1356
+ [x: string]: any;
1357
+ }>;
1358
+ declare const userStatusEnum: z.ZodEnum<{
1359
+ [x: string]: any;
1360
+ }>;
1361
+ declare const tokenStatusEnum: z.ZodEnum<{
1362
+ [x: string]: any;
1363
+ }>;
1364
+ declare const tokenTypeEnum: z.ZodEnum<{
1365
+ [x: string]: any;
1366
+ }>;
1367
+ declare const fileStatusEnum: z.ZodEnum<{
1368
+ [x: string]: any;
1369
+ }>;
1370
+ declare const genderEnum: z.ZodEnum<{
1371
+ [x: string]: any;
1372
+ }>;
1373
+ declare const studentStatusEnum: z.ZodEnum<{
1374
+ [x: string]: any;
1375
+ }>;
1376
+ declare const teacherStatusEnum: z.ZodEnum<{
1377
+ [x: string]: any;
1378
+ }>;
1379
+ declare const employmentTypeEnum: z.ZodEnum<{
1380
+ [x: string]: any;
1381
+ }>;
1382
+ declare const relationshipTypeEnum: z.ZodEnum<{
1383
+ [x: string]: any;
1384
+ }>;
1385
+ declare const semesterEnum: z.ZodEnum<{
1386
+ [x: string]: any;
1387
+ }>;
1388
+ declare const classStatusEnum: z.ZodEnum<{
1389
+ [x: string]: any;
1390
+ }>;
1391
+ declare const sectionStatusEnum: z.ZodEnum<{
1392
+ [x: string]: any;
1393
+ }>;
1394
+ declare const languageEnum: z.ZodEnum<{
1395
+ [x: string]: any;
1396
+ }>;
1397
+ declare const enrollmentStatusEnum: z.ZodEnum<{
1398
+ [x: string]: any;
1399
+ }>;
1400
+ declare const assignmentStatusEnum: z.ZodEnum<{
1401
+ [x: string]: any;
1402
+ }>;
1403
+ declare const calendarSystemEnum: z.ZodEnum<{
1404
+ [x: string]: any;
1405
+ }>;
1406
+ declare const assessmentTypeEnum: z.ZodEnum<{
1407
+ [x: string]: any;
1408
+ }>;
1409
+ declare const assessmentStatusEnum: z.ZodEnum<{
1410
+ [x: string]: any;
1411
+ }>;
1412
+ declare const submissionTypeEnum: z.ZodEnum<{
1413
+ [x: string]: any;
1414
+ }>;
1415
+ declare const examTypeEnum: z.ZodEnum<{
1416
+ [x: string]: any;
1417
+ }>;
1418
+ declare const examSecurityEnum: z.ZodEnum<{
1419
+ [x: string]: any;
1420
+ }>;
1421
+ declare const examStatusEnum: z.ZodEnum<{
1422
+ [x: string]: any;
1423
+ }>;
1424
+ declare const gradeStatusEnum: z.ZodEnum<{
1425
+ [x: string]: any;
1426
+ }>;
1427
+ declare const attendanceStatusEnum: z.ZodEnum<{
1428
+ [x: string]: any;
1429
+ }>;
1430
+ declare const proficiencyLevelEnum: z.ZodEnum<{
1431
+ [x: string]: any;
1432
+ }>;
1433
+ declare const dayOfWeekEnum: z.ZodEnum<{
1434
+ [x: string]: any;
1435
+ }>;
1436
+ declare const alertTypeEnum: z.ZodEnum<{
1437
+ [x: string]: any;
1438
+ }>;
1439
+ declare const alertPriorityEnum: z.ZodEnum<{
1440
+ [x: string]: any;
1441
+ }>;
1442
+ declare const alertStatusEnum: z.ZodEnum<{
1443
+ [x: string]: any;
1444
+ }>;
1445
+ declare const feeTypeStatusEnum: z.ZodEnum<{
1446
+ [x: string]: any;
1447
+ }>;
1448
+ declare const paymentTypeEnum: z.ZodEnum<{
1449
+ [x: string]: any;
1450
+ }>;
1451
+ declare const scheduleEnum: z.ZodEnum<{
1452
+ [x: string]: any;
1453
+ }>;
1454
+ declare const feeStatusEnum: z.ZodEnum<{
1455
+ [x: string]: any;
1456
+ }>;
1457
+ declare const feeInstallmentStatusEnum: z.ZodEnum<{
1458
+ [x: string]: any;
1459
+ }>;
1460
+ declare const paymentMethodEnum: z.ZodEnum<{
1461
+ [x: string]: any;
1462
+ }>;
1463
+ declare const paymentStatusEnum: z.ZodEnum<{
1464
+ [x: string]: any;
1465
+ }>;
1466
+ declare const eventTypeEnum: z.ZodEnum<{
1467
+ [x: string]: any;
1468
+ }>;
1469
+ declare const eventStatusEnum: z.ZodEnum<{
1470
+ [x: string]: any;
1471
+ }>;
1472
+ declare const eventVisibilityEnum: z.ZodEnum<{
1473
+ [x: string]: any;
1474
+ }>;
1475
+ declare const participantTypeEnum: z.ZodEnum<{
1476
+ [x: string]: any;
1477
+ }>;
1478
+ declare const expenseCategoryEnum: z.ZodEnum<{
1479
+ [x: string]: any;
1480
+ }>;
1481
+ declare const expenseStatusEnum: z.ZodEnum<{
1482
+ [x: string]: any;
1483
+ }>;
1484
+ declare const trackerModeEnum: z.ZodEnum<{
1485
+ [x: string]: any;
1486
+ }>;
1487
+ declare const driverStatusEnum: z.ZodEnum<{
1488
+ [x: string]: any;
1489
+ }>;
1490
+ declare const vehicleStatusEnum: z.ZodEnum<{
1491
+ [x: string]: any;
1492
+ }>;
1493
+ declare const vehicleTypeEnum: z.ZodEnum<{
1494
+ [x: string]: any;
1495
+ }>;
1496
+ declare const vehicleDocumentTypeEnum: z.ZodEnum<{
1497
+ [x: string]: any;
1498
+ }>;
1499
+ declare const busStatusEnum: z.ZodEnum<{
1500
+ [x: string]: any;
1501
+ }>;
1502
+ declare const refuelStatusEnum: z.ZodEnum<{
1503
+ [x: string]: any;
1504
+ }>;
1505
+ declare const fuelTypeEnum: z.ZodEnum<{
1506
+ [x: string]: any;
1507
+ }>;
1508
+ declare const maintenanceTypeEnum: z.ZodEnum<{
1509
+ [x: string]: any;
1510
+ }>;
1511
+ declare const maintenanceStatusEnum: z.ZodEnum<{
1512
+ [x: string]: any;
1513
+ }>;
1514
+ declare const maritalStatusEnum: z.ZodEnum<{
1515
+ [x: string]: any;
1516
+ }>;
1517
+
1518
+ declare class PermissionRepository {
1519
+ db: DB$1;
1520
+ getAll(): Promise<any>;
1521
+ getById(id: string): Promise<any>;
1522
+ getByName(name: string): Promise<any>;
1523
+ create(data: any): Promise<any>;
1524
+ update(id: string, data: any): Promise<any>;
1525
+ delete(id: string): Promise<any>;
1526
+ getPermissionsByRole(roleId: string): Promise<any>;
1527
+ getRolesByPermission(permissionId: string): Promise<any>;
1528
+ assignPermissionToRole(roleId: string, permissionId: string): Promise<any>;
1529
+ removePermissionFromRole(roleId: string, permissionId: string): Promise<any>;
1530
+ checkRoleHasPermission(roleId: string, permissionId: string): Promise<boolean>;
1531
+ deleteAll(): Promise<any>;
1532
+ }
1533
+
1534
+ declare class PermissionGuards {
1535
+ private tokenService;
1536
+ constructor(tokenService: TokenService);
1537
+ private getUserPermissions;
1538
+ private checkPermissionMatch;
1539
+ hasPermission(auth: any, ctx: any, requiredPermission: any): Promise<boolean>;
1540
+ }
1541
+ declare const Permission$1: (...permissions: any[]) => (target: any, propertyKey?: string) => void;
1542
+
1543
+ declare class PermissionValidator {
1544
+ private permissionRepository;
1545
+ private roleValidator;
1546
+ constructor(permissionRepository: PermissionRepository, roleValidator: RoleValidator);
1547
+ validateCreatePermission(data: any): Promise<any>;
1548
+ isPermissionExists(id: string): Promise<boolean>;
1549
+ isPermissionNameExists(name: string): Promise<boolean>;
1550
+ checkPermissionExists(id: string): Promise<true>;
1551
+ checkPermissionExistsByName(name: string): Promise<true>;
1552
+ checkPermissionNameUnique(name: string, excludeId?: any): Promise<void>;
1553
+ checkRoleExists(id: string): Promise<void>;
1554
+ checkRoleExistsByName(name: string): Promise<void>;
1555
+ checkRoleHasPermission(roleId: string, permissionId: string): Promise<void>;
1556
+ }
1557
+
1558
+ declare class PermissionService {
1559
+ private permissionRepository;
1560
+ private permissionValidator;
1561
+ private roleService;
1562
+ constructor(permissionRepository: PermissionRepository, permissionValidator: PermissionValidator, roleService: RoleService);
1563
+ getAll(): Promise<any>;
1564
+ getById(id: string): Promise<any>;
1565
+ getByName(name: string): Promise<any>;
1566
+ getByResource(resource: string): Promise<any>;
1567
+ create(data: any): Promise<any>;
1568
+ update(id: string, data: any): Promise<any>;
1569
+ delete(id: string): Promise<any>;
1570
+ getPermissionsByRole(roleId: string): Promise<any>;
1571
+ getRolesByPermission(permissionId: string): Promise<any>;
1572
+ assignPermissionToRole(roleId: string, permissionId: string): Promise<any>;
1573
+ removePermissionFromRole(roleId: string, permissionId: string): Promise<any>;
1574
+ seedDefaultPermissions(defaultPermissions: any): Promise<any[]>;
1575
+ seedDefaultRolePermissions(defaultRolePermissions: any): Promise<any[]>;
1576
+ deleteAll(): Promise<any>;
1577
+ }
1578
+
1579
+ declare class PermissionController {
1580
+ private permissionService;
1581
+ constructor(permissionService: PermissionService);
1582
+ getPermissions(): Promise<{
1583
+ data: any;
1584
+ message: string;
1585
+ status: string;
1586
+ }>;
1587
+ getPermission(id: string): Promise<{
1588
+ data: any;
1589
+ message: string;
1590
+ status: string;
1591
+ }>;
1592
+ create(body: any): Promise<{
1593
+ data: any;
1594
+ message: string;
1595
+ status: string;
1596
+ }>;
1597
+ update(id: string, body: any): Promise<{
1598
+ data: any;
1599
+ message: string;
1600
+ status: string;
1601
+ }>;
1602
+ delete(id: string): Promise<{
1603
+ data: any;
1604
+ message: string;
1605
+ status: string;
1606
+ }>;
1607
+ getByRole(roleId: string): Promise<{
1608
+ data: any;
1609
+ message: string;
1610
+ status: string;
1611
+ }>;
1612
+ getRolesByPermission(permissionId: string): Promise<{
1613
+ data: any;
1614
+ message: string;
1615
+ status: string;
1616
+ }>;
1617
+ assignToRole(roleId: string, permissionId: string): Promise<{
1618
+ data: any;
1619
+ message: string;
1620
+ status: string;
1621
+ }>;
1622
+ removeFromRole(roleId: string, permissionId: string): Promise<{
1623
+ data: any;
1624
+ message: string;
1625
+ status: string;
1626
+ }>;
1627
+ deleteAll(): Promise<{
1628
+ data: any;
1629
+ message: string;
1630
+ status: string;
1631
+ }>;
1632
+ }
1633
+
1634
+ declare const avatarsPath: string;
1635
+ declare const parseSchema: (schema: any, data: any) => Promise<any>;
1636
+ declare const clean: (obj: any) => any;
1637
+ declare const getAvatarFile: (fileName: any) => Promise<File>;
1638
+ declare const formatDate: (dateValue: any) => string;
1639
+ declare function calculateAge(dateOfBirth: any): number;
1640
+ declare function calculateYearsOfExperience(hireDate: any): number;
1641
+ declare function pickProps<T>(source: T, keys: any): Partial<T>;
1642
+ declare const isEmpty: any;
1643
+ declare const isPath: (img: any) => boolean;
1644
+ declare const isFile: (img: any) => boolean;
1645
+
1646
+ declare const timestamps: {
1647
+ createdAt: drizzle_orm.HasDefault<drizzle_orm_pg_core.PgTimestampStringBuilderInitial<"created_at">>;
1648
+ updatedAt: drizzle_orm.HasDefault<drizzle_orm.HasDefault<drizzle_orm_pg_core.PgTimestampStringBuilderInitial<"updated_at">>>;
1649
+ };
1650
+ declare const idField: (length?: number) => drizzle_orm.HasRuntimeDefault<drizzle_orm.HasDefault<drizzle_orm.NotNull<drizzle_orm.IsPrimaryKey<drizzle_orm.NotNull<drizzle_orm_pg_core.PgTextBuilderInitial<"id", [string, ...string[]]>>>>>>;
1651
+ declare const rolesTable: drizzle_orm_pg_core.PgTableWithColumns<{
1652
+ name: "roles";
1653
+ schema: undefined;
1654
+ columns: {
1655
+ id: drizzle_orm_pg_core.PgColumn<{
1656
+ name: "id";
1657
+ tableName: "roles";
1658
+ dataType: "string";
1659
+ columnType: "PgText";
1660
+ data: string;
1661
+ driverParam: string;
1662
+ notNull: true;
1663
+ hasDefault: true;
1664
+ isPrimaryKey: true;
1665
+ isAutoincrement: false;
1666
+ hasRuntimeDefault: true;
1667
+ enumValues: [string, ...string[]];
1668
+ baseColumn: never;
1669
+ identity: undefined;
1670
+ generated: undefined;
1671
+ }, {}, {}>;
1672
+ name: drizzle_orm_pg_core.PgColumn<{
1673
+ name: "name";
1674
+ tableName: "roles";
1675
+ dataType: "string";
1676
+ columnType: "PgText";
1677
+ data: string;
1678
+ driverParam: string;
1679
+ notNull: true;
1680
+ hasDefault: false;
1681
+ isPrimaryKey: false;
1682
+ isAutoincrement: false;
1683
+ hasRuntimeDefault: false;
1684
+ enumValues: [string, ...string[]];
1685
+ baseColumn: never;
1686
+ identity: undefined;
1687
+ generated: undefined;
1688
+ }, {}, {}>;
1689
+ description: drizzle_orm_pg_core.PgColumn<{
1690
+ name: "description";
1691
+ tableName: "roles";
1692
+ dataType: "string";
1693
+ columnType: "PgText";
1694
+ data: string;
1695
+ driverParam: string;
1696
+ notNull: false;
1697
+ hasDefault: false;
1698
+ isPrimaryKey: false;
1699
+ isAutoincrement: false;
1700
+ hasRuntimeDefault: false;
1701
+ enumValues: [string, ...string[]];
1702
+ baseColumn: never;
1703
+ identity: undefined;
1704
+ generated: undefined;
1705
+ }, {}, {}>;
1706
+ };
1707
+ dialect: "pg";
1708
+ }>;
1709
+ declare const usersTable: drizzle_orm_pg_core.PgTableWithColumns<{
1710
+ name: "users";
1711
+ schema: undefined;
1712
+ columns: {
1713
+ createdAt: drizzle_orm_pg_core.PgColumn<{
1714
+ name: "created_at";
1715
+ tableName: "users";
1716
+ dataType: "string";
1717
+ columnType: "PgTimestampString";
1718
+ data: string;
1719
+ driverParam: string;
1720
+ notNull: false;
1721
+ hasDefault: true;
1722
+ isPrimaryKey: false;
1723
+ isAutoincrement: false;
1724
+ hasRuntimeDefault: false;
1725
+ enumValues: undefined;
1726
+ baseColumn: never;
1727
+ identity: undefined;
1728
+ generated: undefined;
1729
+ }, {}, {}>;
1730
+ updatedAt: drizzle_orm_pg_core.PgColumn<{
1731
+ name: "updated_at";
1732
+ tableName: "users";
1733
+ dataType: "string";
1734
+ columnType: "PgTimestampString";
1735
+ data: string;
1736
+ driverParam: string;
1737
+ notNull: false;
1738
+ hasDefault: true;
1739
+ isPrimaryKey: false;
1740
+ isAutoincrement: false;
1741
+ hasRuntimeDefault: false;
1742
+ enumValues: undefined;
1743
+ baseColumn: never;
1744
+ identity: undefined;
1745
+ generated: undefined;
1746
+ }, {}, {}>;
1747
+ id: drizzle_orm_pg_core.PgColumn<{
1748
+ name: "id";
1749
+ tableName: "users";
1750
+ dataType: "string";
1751
+ columnType: "PgText";
1752
+ data: string;
1753
+ driverParam: string;
1754
+ notNull: true;
1755
+ hasDefault: true;
1756
+ isPrimaryKey: true;
1757
+ isAutoincrement: false;
1758
+ hasRuntimeDefault: true;
1759
+ enumValues: [string, ...string[]];
1760
+ baseColumn: never;
1761
+ identity: undefined;
1762
+ generated: undefined;
1763
+ }, {}, {}>;
1764
+ email: drizzle_orm_pg_core.PgColumn<{
1765
+ name: "email";
1766
+ tableName: "users";
1767
+ dataType: "string";
1768
+ columnType: "PgText";
1769
+ data: string;
1770
+ driverParam: string;
1771
+ notNull: true;
1772
+ hasDefault: false;
1773
+ isPrimaryKey: false;
1774
+ isAutoincrement: false;
1775
+ hasRuntimeDefault: false;
1776
+ enumValues: [string, ...string[]];
1777
+ baseColumn: never;
1778
+ identity: undefined;
1779
+ generated: undefined;
1780
+ }, {}, {}>;
1781
+ emailVerified: drizzle_orm_pg_core.PgColumn<{
1782
+ name: "email_verified";
1783
+ tableName: "users";
1784
+ dataType: "boolean";
1785
+ columnType: "PgBoolean";
1786
+ data: boolean;
1787
+ driverParam: boolean;
1788
+ notNull: false;
1789
+ hasDefault: true;
1790
+ isPrimaryKey: false;
1791
+ isAutoincrement: false;
1792
+ hasRuntimeDefault: false;
1793
+ enumValues: undefined;
1794
+ baseColumn: never;
1795
+ identity: undefined;
1796
+ generated: undefined;
1797
+ }, {}, {}>;
1798
+ password: drizzle_orm_pg_core.PgColumn<{
1799
+ name: "password";
1800
+ tableName: "users";
1801
+ dataType: "string";
1802
+ columnType: "PgText";
1803
+ data: string;
1804
+ driverParam: string;
1805
+ notNull: true;
1806
+ hasDefault: false;
1807
+ isPrimaryKey: false;
1808
+ isAutoincrement: false;
1809
+ hasRuntimeDefault: false;
1810
+ enumValues: [string, ...string[]];
1811
+ baseColumn: never;
1812
+ identity: undefined;
1813
+ generated: undefined;
1814
+ }, {}, {}>;
1815
+ image: drizzle_orm_pg_core.PgColumn<{
1816
+ name: "image";
1817
+ tableName: "users";
1818
+ dataType: "string";
1819
+ columnType: "PgText";
1820
+ data: string;
1821
+ driverParam: string;
1822
+ notNull: false;
1823
+ hasDefault: true;
1824
+ isPrimaryKey: false;
1825
+ isAutoincrement: false;
1826
+ hasRuntimeDefault: false;
1827
+ enumValues: [string, ...string[]];
1828
+ baseColumn: never;
1829
+ identity: undefined;
1830
+ generated: undefined;
1831
+ }, {}, {}>;
1832
+ status: drizzle_orm_pg_core.PgColumn<{
1833
+ name: "status";
1834
+ tableName: "users";
1835
+ dataType: "string";
1836
+ columnType: "PgEnumColumn";
1837
+ data: any;
1838
+ driverParam: string;
1839
+ notNull: false;
1840
+ hasDefault: true;
1841
+ isPrimaryKey: false;
1842
+ isAutoincrement: false;
1843
+ hasRuntimeDefault: false;
1844
+ enumValues: any;
1845
+ baseColumn: never;
1846
+ identity: undefined;
1847
+ generated: undefined;
1848
+ }, {}, {}>;
1849
+ roleId: drizzle_orm_pg_core.PgColumn<{
1850
+ name: "role_id";
1851
+ tableName: "users";
1852
+ dataType: "string";
1853
+ columnType: "PgText";
1854
+ data: string;
1855
+ driverParam: string;
1856
+ notNull: false;
1857
+ hasDefault: false;
1858
+ isPrimaryKey: false;
1859
+ isAutoincrement: false;
1860
+ hasRuntimeDefault: false;
1861
+ enumValues: [string, ...string[]];
1862
+ baseColumn: never;
1863
+ identity: undefined;
1864
+ generated: undefined;
1865
+ }, {}, {}>;
1866
+ lastLogin: drizzle_orm_pg_core.PgColumn<{
1867
+ name: "last_login";
1868
+ tableName: "users";
1869
+ dataType: "string";
1870
+ columnType: "PgTimestampString";
1871
+ data: string;
1872
+ driverParam: string;
1873
+ notNull: false;
1874
+ hasDefault: false;
1875
+ isPrimaryKey: false;
1876
+ isAutoincrement: false;
1877
+ hasRuntimeDefault: false;
1878
+ enumValues: undefined;
1879
+ baseColumn: never;
1880
+ identity: undefined;
1881
+ generated: undefined;
1882
+ }, {}, {}>;
1883
+ };
1884
+ dialect: "pg";
1885
+ }>;
1886
+ declare const tokensTable: drizzle_orm_pg_core.PgTableWithColumns<{
1887
+ name: "tokens";
1888
+ schema: undefined;
1889
+ columns: {
1890
+ createdAt: drizzle_orm_pg_core.PgColumn<{
1891
+ name: "created_at";
1892
+ tableName: "tokens";
1893
+ dataType: "string";
1894
+ columnType: "PgTimestampString";
1895
+ data: string;
1896
+ driverParam: string;
1897
+ notNull: false;
1898
+ hasDefault: true;
1899
+ isPrimaryKey: false;
1900
+ isAutoincrement: false;
1901
+ hasRuntimeDefault: false;
1902
+ enumValues: undefined;
1903
+ baseColumn: never;
1904
+ identity: undefined;
1905
+ generated: undefined;
1906
+ }, {}, {}>;
1907
+ updatedAt: drizzle_orm_pg_core.PgColumn<{
1908
+ name: "updated_at";
1909
+ tableName: "tokens";
1910
+ dataType: "string";
1911
+ columnType: "PgTimestampString";
1912
+ data: string;
1913
+ driverParam: string;
1914
+ notNull: false;
1915
+ hasDefault: true;
1916
+ isPrimaryKey: false;
1917
+ isAutoincrement: false;
1918
+ hasRuntimeDefault: false;
1919
+ enumValues: undefined;
1920
+ baseColumn: never;
1921
+ identity: undefined;
1922
+ generated: undefined;
1923
+ }, {}, {}>;
1924
+ id: drizzle_orm_pg_core.PgColumn<{
1925
+ name: "id";
1926
+ tableName: "tokens";
1927
+ dataType: "string";
1928
+ columnType: "PgText";
1929
+ data: string;
1930
+ driverParam: string;
1931
+ notNull: true;
1932
+ hasDefault: true;
1933
+ isPrimaryKey: true;
1934
+ isAutoincrement: false;
1935
+ hasRuntimeDefault: true;
1936
+ enumValues: [string, ...string[]];
1937
+ baseColumn: never;
1938
+ identity: undefined;
1939
+ generated: undefined;
1940
+ }, {}, {}>;
1941
+ userId: drizzle_orm_pg_core.PgColumn<{
1942
+ name: "user_id";
1943
+ tableName: "tokens";
1944
+ dataType: "string";
1945
+ columnType: "PgText";
1946
+ data: string;
1947
+ driverParam: string;
1948
+ notNull: true;
1949
+ hasDefault: false;
1950
+ isPrimaryKey: false;
1951
+ isAutoincrement: false;
1952
+ hasRuntimeDefault: false;
1953
+ enumValues: [string, ...string[]];
1954
+ baseColumn: never;
1955
+ identity: undefined;
1956
+ generated: undefined;
1957
+ }, {}, {}>;
1958
+ token: drizzle_orm_pg_core.PgColumn<{
1959
+ name: "token";
1960
+ tableName: "tokens";
1961
+ dataType: "string";
1962
+ columnType: "PgText";
1963
+ data: string;
1964
+ driverParam: string;
1965
+ notNull: true;
1966
+ hasDefault: false;
1967
+ isPrimaryKey: false;
1968
+ isAutoincrement: false;
1969
+ hasRuntimeDefault: false;
1970
+ enumValues: [string, ...string[]];
1971
+ baseColumn: never;
1972
+ identity: undefined;
1973
+ generated: undefined;
1974
+ }, {}, {}>;
1975
+ type: drizzle_orm_pg_core.PgColumn<{
1976
+ name: "type";
1977
+ tableName: "tokens";
1978
+ dataType: "string";
1979
+ columnType: "PgEnumColumn";
1980
+ data: any;
1981
+ driverParam: string;
1982
+ notNull: false;
1983
+ hasDefault: true;
1984
+ isPrimaryKey: false;
1985
+ isAutoincrement: false;
1986
+ hasRuntimeDefault: false;
1987
+ enumValues: any;
1988
+ baseColumn: never;
1989
+ identity: undefined;
1990
+ generated: undefined;
1991
+ }, {}, {}>;
1992
+ status: drizzle_orm_pg_core.PgColumn<{
1993
+ name: "status";
1994
+ tableName: "tokens";
1995
+ dataType: "string";
1996
+ columnType: "PgEnumColumn";
1997
+ data: any;
1998
+ driverParam: string;
1999
+ notNull: false;
2000
+ hasDefault: true;
2001
+ isPrimaryKey: false;
2002
+ isAutoincrement: false;
2003
+ hasRuntimeDefault: false;
2004
+ enumValues: any;
2005
+ baseColumn: never;
2006
+ identity: undefined;
2007
+ generated: undefined;
2008
+ }, {}, {}>;
2009
+ expiresAt: drizzle_orm_pg_core.PgColumn<{
2010
+ name: "expires_at";
2011
+ tableName: "tokens";
2012
+ dataType: "string";
2013
+ columnType: "PgTimestampString";
2014
+ data: string;
2015
+ driverParam: string;
2016
+ notNull: true;
2017
+ hasDefault: false;
2018
+ isPrimaryKey: false;
2019
+ isAutoincrement: false;
2020
+ hasRuntimeDefault: false;
2021
+ enumValues: undefined;
2022
+ baseColumn: never;
2023
+ identity: undefined;
2024
+ generated: undefined;
2025
+ }, {}, {}>;
2026
+ };
2027
+ dialect: "pg";
2028
+ }>;
2029
+ declare const permissionsTable: drizzle_orm_pg_core.PgTableWithColumns<{
2030
+ name: "permissions";
2031
+ schema: undefined;
2032
+ columns: {
2033
+ createdAt: drizzle_orm_pg_core.PgColumn<{
2034
+ name: "created_at";
2035
+ tableName: "permissions";
2036
+ dataType: "string";
2037
+ columnType: "PgTimestampString";
2038
+ data: string;
2039
+ driverParam: string;
2040
+ notNull: false;
2041
+ hasDefault: true;
2042
+ isPrimaryKey: false;
2043
+ isAutoincrement: false;
2044
+ hasRuntimeDefault: false;
2045
+ enumValues: undefined;
2046
+ baseColumn: never;
2047
+ identity: undefined;
2048
+ generated: undefined;
2049
+ }, {}, {}>;
2050
+ updatedAt: drizzle_orm_pg_core.PgColumn<{
2051
+ name: "updated_at";
2052
+ tableName: "permissions";
2053
+ dataType: "string";
2054
+ columnType: "PgTimestampString";
2055
+ data: string;
2056
+ driverParam: string;
2057
+ notNull: false;
2058
+ hasDefault: true;
2059
+ isPrimaryKey: false;
2060
+ isAutoincrement: false;
2061
+ hasRuntimeDefault: false;
2062
+ enumValues: undefined;
2063
+ baseColumn: never;
2064
+ identity: undefined;
2065
+ generated: undefined;
2066
+ }, {}, {}>;
2067
+ id: drizzle_orm_pg_core.PgColumn<{
2068
+ name: "id";
2069
+ tableName: "permissions";
2070
+ dataType: "string";
2071
+ columnType: "PgText";
2072
+ data: string;
2073
+ driverParam: string;
2074
+ notNull: true;
2075
+ hasDefault: true;
2076
+ isPrimaryKey: true;
2077
+ isAutoincrement: false;
2078
+ hasRuntimeDefault: true;
2079
+ enumValues: [string, ...string[]];
2080
+ baseColumn: never;
2081
+ identity: undefined;
2082
+ generated: undefined;
2083
+ }, {}, {}>;
2084
+ name: drizzle_orm_pg_core.PgColumn<{
2085
+ name: "name";
2086
+ tableName: "permissions";
2087
+ dataType: "string";
2088
+ columnType: "PgText";
2089
+ data: string;
2090
+ driverParam: string;
2091
+ notNull: true;
2092
+ hasDefault: false;
2093
+ isPrimaryKey: false;
2094
+ isAutoincrement: false;
2095
+ hasRuntimeDefault: false;
2096
+ enumValues: [string, ...string[]];
2097
+ baseColumn: never;
2098
+ identity: undefined;
2099
+ generated: undefined;
2100
+ }, {}, {}>;
2101
+ description: drizzle_orm_pg_core.PgColumn<{
2102
+ name: "description";
2103
+ tableName: "permissions";
2104
+ dataType: "string";
2105
+ columnType: "PgText";
2106
+ data: string;
2107
+ driverParam: string;
2108
+ notNull: false;
2109
+ hasDefault: false;
2110
+ isPrimaryKey: false;
2111
+ isAutoincrement: false;
2112
+ hasRuntimeDefault: false;
2113
+ enumValues: [string, ...string[]];
2114
+ baseColumn: never;
2115
+ identity: undefined;
2116
+ generated: undefined;
2117
+ }, {}, {}>;
2118
+ resource: drizzle_orm_pg_core.PgColumn<{
2119
+ name: "resource";
2120
+ tableName: "permissions";
2121
+ dataType: "string";
2122
+ columnType: "PgText";
2123
+ data: string;
2124
+ driverParam: string;
2125
+ notNull: true;
2126
+ hasDefault: false;
2127
+ isPrimaryKey: false;
2128
+ isAutoincrement: false;
2129
+ hasRuntimeDefault: false;
2130
+ enumValues: [string, ...string[]];
2131
+ baseColumn: never;
2132
+ identity: undefined;
2133
+ generated: undefined;
2134
+ }, {}, {}>;
2135
+ action: drizzle_orm_pg_core.PgColumn<{
2136
+ name: "action";
2137
+ tableName: "permissions";
2138
+ dataType: "string";
2139
+ columnType: "PgText";
2140
+ data: string;
2141
+ driverParam: string;
2142
+ notNull: true;
2143
+ hasDefault: false;
2144
+ isPrimaryKey: false;
2145
+ isAutoincrement: false;
2146
+ hasRuntimeDefault: false;
2147
+ enumValues: [string, ...string[]];
2148
+ baseColumn: never;
2149
+ identity: undefined;
2150
+ generated: undefined;
2151
+ }, {}, {}>;
2152
+ };
2153
+ dialect: "pg";
2154
+ }>;
2155
+ declare const rolePermissionsTable: drizzle_orm_pg_core.PgTableWithColumns<{
2156
+ name: "role_permissions";
2157
+ schema: undefined;
2158
+ columns: {
2159
+ createdAt: drizzle_orm_pg_core.PgColumn<{
2160
+ name: "created_at";
2161
+ tableName: "role_permissions";
2162
+ dataType: "string";
2163
+ columnType: "PgTimestampString";
2164
+ data: string;
2165
+ driverParam: string;
2166
+ notNull: false;
2167
+ hasDefault: true;
2168
+ isPrimaryKey: false;
2169
+ isAutoincrement: false;
2170
+ hasRuntimeDefault: false;
2171
+ enumValues: undefined;
2172
+ baseColumn: never;
2173
+ identity: undefined;
2174
+ generated: undefined;
2175
+ }, {}, {}>;
2176
+ updatedAt: drizzle_orm_pg_core.PgColumn<{
2177
+ name: "updated_at";
2178
+ tableName: "role_permissions";
2179
+ dataType: "string";
2180
+ columnType: "PgTimestampString";
2181
+ data: string;
2182
+ driverParam: string;
2183
+ notNull: false;
2184
+ hasDefault: true;
2185
+ isPrimaryKey: false;
2186
+ isAutoincrement: false;
2187
+ hasRuntimeDefault: false;
2188
+ enumValues: undefined;
2189
+ baseColumn: never;
2190
+ identity: undefined;
2191
+ generated: undefined;
2192
+ }, {}, {}>;
2193
+ id: drizzle_orm_pg_core.PgColumn<{
2194
+ name: "id";
2195
+ tableName: "role_permissions";
2196
+ dataType: "string";
2197
+ columnType: "PgText";
2198
+ data: string;
2199
+ driverParam: string;
2200
+ notNull: true;
2201
+ hasDefault: true;
2202
+ isPrimaryKey: true;
2203
+ isAutoincrement: false;
2204
+ hasRuntimeDefault: true;
2205
+ enumValues: [string, ...string[]];
2206
+ baseColumn: never;
2207
+ identity: undefined;
2208
+ generated: undefined;
2209
+ }, {}, {}>;
2210
+ roleId: drizzle_orm_pg_core.PgColumn<{
2211
+ name: "role_id";
2212
+ tableName: "role_permissions";
2213
+ dataType: "string";
2214
+ columnType: "PgText";
2215
+ data: string;
2216
+ driverParam: string;
2217
+ notNull: true;
2218
+ hasDefault: false;
2219
+ isPrimaryKey: false;
2220
+ isAutoincrement: false;
2221
+ hasRuntimeDefault: false;
2222
+ enumValues: [string, ...string[]];
2223
+ baseColumn: never;
2224
+ identity: undefined;
2225
+ generated: undefined;
2226
+ }, {}, {}>;
2227
+ permissionId: drizzle_orm_pg_core.PgColumn<{
2228
+ name: "permission_id";
2229
+ tableName: "role_permissions";
2230
+ dataType: "string";
2231
+ columnType: "PgText";
2232
+ data: string;
2233
+ driverParam: string;
2234
+ notNull: true;
2235
+ hasDefault: false;
2236
+ isPrimaryKey: false;
2237
+ isAutoincrement: false;
2238
+ hasRuntimeDefault: false;
2239
+ enumValues: [string, ...string[]];
2240
+ baseColumn: never;
2241
+ identity: undefined;
2242
+ generated: undefined;
2243
+ }, {}, {}>;
2244
+ };
2245
+ dialect: "pg";
2246
+ }>;
2247
+ type User = typeof usersTable.$inferSelect;
2248
+ type NewUser = typeof usersTable.$inferInsert;
2249
+ type Token = typeof tokensTable.$inferSelect;
2250
+ type NewToken = typeof tokensTable.$inferInsert;
2251
+ type Role = typeof rolesTable.$inferSelect;
2252
+ type NewRole = typeof rolesTable.$inferInsert;
2253
+ type Permission = typeof permissionsTable.$inferSelect;
2254
+ type NewPermission = typeof permissionsTable.$inferInsert;
2255
+ type RolePermission = typeof rolePermissionsTable.$inferSelect;
2256
+ type NewRolePermission = typeof rolePermissionsTable.$inferInsert;
2257
+
2258
+ type schema_NewPermission = NewPermission;
2259
+ type schema_NewRole = NewRole;
2260
+ type schema_NewRolePermission = NewRolePermission;
2261
+ type schema_NewToken = NewToken;
2262
+ type schema_NewUser = NewUser;
2263
+ type schema_Permission = Permission;
2264
+ type schema_Role = Role;
2265
+ type schema_RolePermission = RolePermission;
2266
+ type schema_Token = Token;
2267
+ type schema_User = User;
2268
+ declare const schema_idField: typeof idField;
2269
+ declare const schema_permissionsTable: typeof permissionsTable;
2270
+ declare const schema_rolePermissionsTable: typeof rolePermissionsTable;
2271
+ declare const schema_rolesTable: typeof rolesTable;
2272
+ declare const schema_timestamps: typeof timestamps;
2273
+ declare const schema_tokensTable: typeof tokensTable;
2274
+ declare const schema_usersTable: typeof usersTable;
2275
+ declare namespace schema {
2276
+ export { type schema_NewPermission as NewPermission, type schema_NewRole as NewRole, type schema_NewRolePermission as NewRolePermission, type schema_NewToken as NewToken, type schema_NewUser as NewUser, type schema_Permission as Permission, type schema_Role as Role, type schema_RolePermission as RolePermission, type schema_Token as Token, type schema_User as User, schema_idField as idField, schema_permissionsTable as permissionsTable, schema_rolePermissionsTable as rolePermissionsTable, schema_rolesTable as rolesTable, schema_timestamps as timestamps, schema_tokensTable as tokensTable, schema_usersTable as usersTable };
2277
+ }
2278
+
2279
+ type DB = PostgresJsDatabase<typeof schema>;
2280
+ /**
2281
+ * ⚠️ IMPORTANT: Development-Only Database Instance
2282
+ *
2283
+ * This DB instance is ONLY for standalone development and testing.
2284
+ * When used as a plugin in production, the database will be injected
2285
+ * automatically by the najm-api plugin system.
2286
+ *
2287
+ * DO NOT use this in production - it creates a duplicate connection!
2288
+ *
2289
+ * In production:
2290
+ * - Use najm-auth as a plugin: `import { AuthPlugin } from 'najm-auth/plugin'`
2291
+ * - The main app registers the database in DatabaseRegistry
2292
+ * - Repositories get the DB automatically injected via dependency injection
2293
+ *
2294
+ * @example Production Usage
2295
+ * ```typescript
2296
+ * import { Server, DatabaseRegistry } from 'najm-api';
2297
+ * import { AuthPlugin } from 'najm-auth/plugin';
2298
+ *
2299
+ * const app = await Server({
2300
+ * databases: {
2301
+ * auth: myDbInstance // Single source of truth
2302
+ * },
2303
+ * plugins: [AuthPlugin]
2304
+ * });
2305
+ * ```
2306
+ */
2307
+ declare const db: DB | DB$1;
2308
+
2309
+ /**
2310
+ * najm-auth Plugin Configuration
2311
+ *
2312
+ * This plugin provides comprehensive authentication and authorization features:
2313
+ * - User management with secure password hashing
2314
+ * - Role-based access control (RBAC)
2315
+ * - Permission management with guards
2316
+ * - JWT token authentication
2317
+ * - Session management with cookies
2318
+ * - Encryption utilities
2319
+ *
2320
+ * @example
2321
+ * ```typescript
2322
+ * import { Server } from 'najm-api';
2323
+ * import { AuthPlugin } from 'najm-auth/plugin';
2324
+ * import { db } from './database';
2325
+ *
2326
+ * const app = await Server({
2327
+ * databases: {
2328
+ * default: db,
2329
+ * auth: db // Can use same DB or separate
2330
+ * },
2331
+ * plugins: [AuthPlugin]
2332
+ * });
2333
+ * ```
2334
+ */
2335
+ declare const AuthPlugin: PluginConfig;
2336
+
2337
+ export { AuthController, AuthPlugin, AuthService, CookieService, ENUMS, EncryptionService, Permission$1 as Permission, PermissionController, PermissionGuards, PermissionRepository, PermissionService, PermissionValidator, ROLES, ROLE_GROUPS, Role$1 as Role, RoleChecker, RoleController, type RoleGroup, RoleGuards, RoleRepository, RoleService, RoleValidator, TokenRepository, TokenService, UserController, UserRepository, UserService, UserValidator, alertPriorityEnum, alertSchema, alertStatusEnum, alertTypeEnum, announcementSchema, assessmentSchema, assessmentStatusEnum, assessmentTypeEnum, assignmentSchema, assignmentStatusEnum, assignmentsSchema, attendanceSchema, attendanceStatusEnum, avatarsPath, bulkAssessmentSchema, bulkFeeFormSchema, bulkFeeItemSchema, busStatusEnum, calculateAge, calculateYearsOfExperience, calendarSystemEnum, classSchema, classStatusEnum, clean, dateRangeSchema, dayOfWeekEnum, db, driverSchema, driverStatusEnum, employmentTypeEnum, enrollmentStatusEnum, eventParticipantSchema, eventSchema, eventStatusEnum, eventTypeEnum, eventVisibilityEnum, examSchema, examSecurityEnum, examStatusEnum, examTypeEnum, expenseApprovalSchema, expenseCategoryEnum, expensePaymentSchema, expenseSchema, expenseStatusEnum, feeInstallmentSchema, feeInstallmentStatusEnum, feePaymentSchema, feeSchema, feeStatusEnum, feeTypeSchema, feeTypeStatusEnum, feesSchema, fileStatusEnum, formatDate, fuelTypeEnum, fullStudentSchema, genderEnum, getAvatarFile, getEnumConfig, getEnumValues, gradeSchema, gradeStatusEnum, idField, idParamSchema, isAccounting, isAdmin, isAdministrator, isAuth, isEmpty, isFile, isFinancial, isParent, isPath, isPrincipal, isSecretary, isStaff, isStudent, isTeacher, languageEnum, maintenanceStatusEnum, maintenanceTypeEnum, maritalStatusEnum, paginationSchema, parentSchema, parentsSchema, parseSchema, participantTypeEnum, paymentAllocationSchema, paymentMethodEnum, paymentStatusEnum, paymentTypeEnum, permissionsTable, pickProps, proficiencyLevelEnum, refuelSchema, refuelStatusEnum, relationshipTypeEnum, rolePermissionsTable, roleSchema, rolesTable, scheduleEnum, sectionSchema, sectionStatusEnum, semesterEnum, settingsSchema, studentSchema, studentStatusEnum, subjectSchema, submissionTypeEnum, teacherFullSchema, teacherPersonalSchema, teacherProfessionalSchema, teacherStatusEnum, tokenStatusEnum, tokenTypeEnum, tokensTable, trackerModeEnum, userSchema, userStatusEnum, userTypeEnum, usersTable, vehicleDocumentTypeEnum, vehicleSchema, vehicleStatusEnum, vehicleTypeEnum };