@appcorp/fusion-storybook 0.2.13 → 0.2.14

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 (48) hide show
  1. package/base-modules/admission/context/use-admission-module.d.ts +88 -0
  2. package/base-modules/admission/context/use-admission-module.js +771 -0
  3. package/base-modules/admission/context.d.ts +1 -87
  4. package/base-modules/admission/context.js +3 -769
  5. package/base-modules/campus/more-actions.js +0 -1
  6. package/base-modules/class/more-actions.js +1 -6
  7. package/base-modules/expense/more-actions.js +1 -6
  8. package/base-modules/fee-structure/more-actions.js +1 -6
  9. package/base-modules/student-fee/context/shared.d.ts +178 -0
  10. package/base-modules/student-fee/context/shared.js +59 -0
  11. package/base-modules/student-fee/context/use-student-fee-module.d.ts +64 -0
  12. package/base-modules/student-fee/context/use-student-fee-module.js +610 -0
  13. package/base-modules/student-fee/context.d.ts +21 -235
  14. package/base-modules/student-fee/context.js +2 -674
  15. package/base-modules/student-fee/more-actions.js +1 -6
  16. package/base-modules/student-profile/context/module-base.d.ts +187 -0
  17. package/base-modules/student-profile/context/module-base.js +50 -0
  18. package/base-modules/student-profile/context/use-student-profile-module.d.ts +70 -0
  19. package/base-modules/student-profile/context/use-student-profile-module.js +506 -0
  20. package/base-modules/student-profile/context.d.ts +20 -256
  21. package/base-modules/student-profile/context.js +2 -601
  22. package/base-modules/teacher/avatar-upload.js +1 -4
  23. package/base-modules/teacher/more-actions.js +1 -6
  24. package/base-modules/user/context/use-user-module.d.ts +53 -0
  25. package/base-modules/user/context/use-user-module.js +546 -0
  26. package/base-modules/user/context.d.ts +1 -52
  27. package/base-modules/user/context.js +5 -547
  28. package/base-modules/workspace-user/more-actions.js +1 -6
  29. package/components/module-error.d.ts +9 -0
  30. package/components/module-error.js +3 -0
  31. package/package.json +5 -4
  32. package/tsconfig.build.tsbuildinfo +1 -1
  33. package/type.d.ts +3 -1242
  34. package/type.js +3 -445
  35. package/types/academics.d.ts +264 -0
  36. package/types/academics.js +8 -0
  37. package/types/admission.d.ts +85 -0
  38. package/types/admission.js +6 -0
  39. package/types/communication.d.ts +165 -0
  40. package/types/communication.js +7 -0
  41. package/types/enums.d.ts +411 -0
  42. package/types/enums.js +442 -0
  43. package/types/finance.d.ts +126 -0
  44. package/types/finance.js +7 -0
  45. package/types/index.d.ts +12 -0
  46. package/types/index.js +12 -0
  47. package/types/user-management.d.ts +236 -0
  48. package/types/user-management.js +7 -0
package/type.d.ts CHANGED
@@ -1,1244 +1,5 @@
1
1
  /**
2
- * TypeScript Types Generated from Prisma Schema
3
- *
4
- * This file contains TypeScript interfaces for all database models
5
- * and enums following the naming conventions:
6
- * - Models: TableName + BE (e.g., StudentBE)
7
- * - Enums: SCREAMING_SNAKE_CASE (e.g., USER_ROLE for UserRole)
2
+ * @deprecated Import types from `@/types` instead.
3
+ * This file is maintained for backward compatibility.
8
4
  */
9
- /**
10
- * User roles across the multi-tenant system
11
- */
12
- export declare enum USER_ROLE {
13
- SUPER_ADMIN = "SUPER_ADMIN",
14
- SCHOOL_ADMIN = "SCHOOL_ADMIN",
15
- TEACHER = "TEACHER",
16
- STUDENT = "STUDENT",
17
- PARENT = "PARENT",
18
- STAFF = "STAFF"
19
- }
20
- /**
21
- * Student enrollment status
22
- */
23
- export declare enum STUDENT_STATUS {
24
- ACTIVE = "ACTIVE",
25
- INACTIVE = "INACTIVE",
26
- GRADUATED = "GRADUATED",
27
- TRANSFERRED = "TRANSFERRED",
28
- DROPPED = "DROPPED"
29
- }
30
- /**
31
- * Family member roles within a household
32
- */
33
- export declare enum FAMILY_MEMBER_ROLE {
34
- FATHER = "FATHER",
35
- MOTHER = "MOTHER",
36
- GUARDIAN = "GUARDIAN",
37
- STUDENT = "STUDENT"
38
- }
39
- /**
40
- * Gender options
41
- */
42
- export declare enum GENDER {
43
- MALE = "MALE",
44
- FEMALE = "FEMALE",
45
- OTHER = "OTHER",
46
- PREFER_NOT_TO_SAY = "PREFER_NOT_TO_SAY"
47
- }
48
- /**
49
- * Day of the week for scheduling
50
- */
51
- export declare enum DAY_OF_WEEK {
52
- MONDAY = "MONDAY",
53
- TUESDAY = "TUESDAY",
54
- WEDNESDAY = "WEDNESDAY",
55
- THURSDAY = "THURSDAY",
56
- FRIDAY = "FRIDAY",
57
- SATURDAY = "SATURDAY",
58
- SUNDAY = "SUNDAY"
59
- }
60
- /**
61
- * Attendance status
62
- */
63
- export declare enum ATTENDANCE_STATUS {
64
- PRESENT = "PRESENT",
65
- ABSENT = "ABSENT",
66
- LATE = "LATE",
67
- EXCUSED = "EXCUSED",
68
- HALF_DAY = "HALF_DAY"
69
- }
70
- /**
71
- * Grade type for assessments
72
- */
73
- export declare enum GRADE_TYPE {
74
- EXAM = "EXAM",
75
- QUIZ = "QUIZ",
76
- ASSIGNMENT = "ASSIGNMENT",
77
- PARTICIPATION = "PARTICIPATION",
78
- PRACTICAL = "PRACTICAL",
79
- PROJECT = "PROJECT"
80
- }
81
- /**
82
- * Fee type categories
83
- */
84
- export declare enum FEE_TYPE {
85
- TUITION = "TUITION",
86
- ADMISSION = "ADMISSION",
87
- EXAM = "EXAM",
88
- LIBRARY = "LIBRARY",
89
- LABORATORY = "LABORATORY",
90
- TRANSPORT = "TRANSPORT",
91
- SPORTS = "SPORTS",
92
- MISCELLANEOUS = "MISCELLANEOUS",
93
- LATE = "LATE"
94
- }
95
- /**
96
- * Discount type for fee reductions
97
- */
98
- export declare enum DISCOUNT_TYPE {
99
- PERCENTAGE = "PERCENTAGE",
100
- FIXED = "FIXED"
101
- }
102
- /**
103
- * Payment status
104
- */
105
- export declare enum PAYMENT_STATUS {
106
- PENDING = "PENDING",
107
- PARTIAL = "PARTIAL",
108
- PAID = "PAID",
109
- OVERDUE = "OVERDUE",
110
- CANCELLED = "CANCELLED",
111
- REFUNDED = "REFUNDED"
112
- }
113
- /**
114
- * Payment method
115
- */
116
- export declare enum PAYMENT_METHOD {
117
- CASH = "CASH",
118
- BANK_TRANSFER = "BANK_TRANSFER",
119
- CREDIT_CARD = "CREDIT_CARD",
120
- DEBIT_CARD = "DEBIT_CARD",
121
- CHEQUE = "CHEQUE",
122
- ONLINE = "ONLINE",
123
- MOBILE_WALLET = "MOBILE_WALLET"
124
- }
125
- /**
126
- * Expense category types
127
- */
128
- export declare enum EXPENSE_CATEGORY {
129
- SALARY = "SALARY",
130
- UTILITIES = "UTILITIES",
131
- MAINTENANCE = "MAINTENANCE",
132
- SUPPLIES = "SUPPLIES",
133
- TRANSPORT = "TRANSPORT",
134
- MARKETING = "MARKETING",
135
- INSURANCE = "INSURANCE",
136
- RENT = "RENT",
137
- TECHNOLOGY = "TECHNOLOGY",
138
- PROFESSIONAL = "PROFESSIONAL",
139
- TRAINING = "TRAINING",
140
- EVENTS = "EVENTS",
141
- FOOD = "FOOD",
142
- MISCELLANEOUS = "MISCELLANEOUS"
143
- }
144
- /**
145
- * Expense payment status
146
- */
147
- export declare enum EXPENSE_STATUS {
148
- PENDING = "PENDING",
149
- APPROVED = "APPROVED",
150
- PAID = "PAID",
151
- REJECTED = "REJECTED",
152
- CANCELLED = "CANCELLED"
153
- }
154
- /**
155
- * Currency options (ISO 4217 codes)
156
- */
157
- export declare enum CURRENCY {
158
- AED = "AED",
159
- AFN = "AFN",
160
- ALL = "ALL",
161
- AMD = "AMD",
162
- ANG = "ANG",
163
- AOA = "AOA",
164
- ARS = "ARS",
165
- AUD = "AUD",
166
- AWG = "AWG",
167
- AZN = "AZN",
168
- BAM = "BAM",
169
- BBD = "BBD",
170
- BDT = "BDT",
171
- BGN = "BGN",
172
- BHD = "BHD",
173
- BIF = "BIF",
174
- BMD = "BMD",
175
- BND = "BND",
176
- BOB = "BOB",
177
- BRL = "BRL",
178
- BSD = "BSD",
179
- BTN = "BTN",
180
- BWP = "BWP",
181
- BYN = "BYN",
182
- BZD = "BZD",
183
- CAD = "CAD",
184
- CDF = "CDF",
185
- CHF = "CHF",
186
- CLP = "CLP",
187
- CNY = "CNY",
188
- COP = "COP",
189
- CRC = "CRC",
190
- CVE = "CVE",
191
- CZK = "CZK",
192
- DJF = "DJF",
193
- DKK = "DKK",
194
- DOP = "DOP",
195
- DZD = "DZD",
196
- EGP = "EGP",
197
- ERN = "ERN",
198
- ETB = "ETB",
199
- EUR = "EUR",
200
- FJD = "FJD",
201
- FKP = "FKP",
202
- GBP = "GBP",
203
- GEL = "GEL",
204
- GHS = "GHS",
205
- GIP = "GIP",
206
- GMD = "GMD",
207
- GNF = "GNF",
208
- GTQ = "GTQ",
209
- GYD = "GYD",
210
- HKD = "HKD",
211
- HNL = "HNL",
212
- HTG = "HTG",
213
- HUF = "HUF",
214
- IDR = "IDR",
215
- ILS = "ILS",
216
- INR = "INR",
217
- IQD = "IQD",
218
- IRR = "IRR",
219
- ISK = "ISK",
220
- JMD = "JMD",
221
- JOD = "JOD",
222
- JPY = "JPY",
223
- KES = "KES",
224
- KGS = "KGS",
225
- KHR = "KHR",
226
- KMF = "KMF",
227
- KPW = "KPW",
228
- KRW = "KRW",
229
- KWD = "KWD",
230
- KYD = "KYD",
231
- KZT = "KZT",
232
- LAK = "LAK",
233
- LBP = "LBP",
234
- LKR = "LKR",
235
- LSL = "LSL",
236
- LYD = "LYD",
237
- MAD = "MAD",
238
- MDL = "MDL",
239
- MGA = "MGA",
240
- MKD = "MKD",
241
- MMK = "MMK",
242
- MNT = "MNT",
243
- MOP = "MOP",
244
- MRU = "MRU",
245
- MUR = "MUR",
246
- MWK = "MWK",
247
- MXN = "MXN",
248
- MYR = "MYR",
249
- MZN = "MZN",
250
- NAD = "NAD",
251
- NGN = "NGN",
252
- NIO = "NIO",
253
- NOK = "NOK",
254
- NPR = "NPR",
255
- NZD = "NZD",
256
- OMR = "OMR",
257
- PAB = "PAB",
258
- PEN = "PEN",
259
- PGK = "PGK",
260
- PHP = "PHP",
261
- PKR = "PKR",
262
- PLN = "PLN",
263
- PYG = "PYG",
264
- QAR = "QAR",
265
- RON = "RON",
266
- RSD = "RSD",
267
- RUB = "RUB",
268
- RWF = "RWF",
269
- SAR = "SAR",
270
- SBD = "SBD",
271
- SCR = "SCR",
272
- SDG = "SDG",
273
- SEK = "SEK",
274
- SGD = "SGD",
275
- SHP = "SHP",
276
- SLL = "SLL",
277
- SOS = "SOS",
278
- SRD = "SRD",
279
- SYP = "SYP",
280
- SZL = "SZL",
281
- THB = "THB",
282
- TJS = "TJS",
283
- TMT = "TMT",
284
- TND = "TND",
285
- TOP = "TOP",
286
- TRY = "TRY",
287
- TTD = "TTD",
288
- TWD = "TWD",
289
- TZS = "TZS",
290
- UAH = "UAH",
291
- UGX = "UGX",
292
- USD = "USD",
293
- UYU = "UYU",
294
- UZS = "UZS",
295
- VES = "VES",
296
- VND = "VND",
297
- VUV = "VUV",
298
- WST = "WST",
299
- XAF = "XAF",
300
- XCD = "XCD",
301
- XOF = "XOF",
302
- XPF = "XPF",
303
- YER = "YER",
304
- ZAR = "ZAR",
305
- ZMW = "ZMW",
306
- ZWL = "ZWL"
307
- }
308
- /**
309
- * Access level for module-scoped permission grants
310
- */
311
- export declare enum ACCESS_LEVEL {
312
- READ = "READ",
313
- READ_WRITE = "READ_WRITE"
314
- }
315
- /**
316
- * Plan types for subscription tiers
317
- */
318
- export declare enum PLAN_TYPE {
319
- BASIC = "BASIC",
320
- PRO = "PRO",
321
- ENTERPRISE = "ENTERPRISE"
322
- }
323
- /**
324
- * Billing interval used for charging (monthly or yearly)
325
- */
326
- export declare enum BILLING_INTERVAL {
327
- MONTHLY = "MONTHLY",
328
- YEARLY = "YEARLY"
329
- }
330
- /**
331
- * Admission status for student applications
332
- */
333
- export declare enum ADMISSION_STATUS {
334
- PENDING = "PENDING",
335
- APPROVED = "APPROVED",
336
- REJECTED = "REJECTED",
337
- ENROLLED = "ENROLLED",
338
- CANCELLED = "CANCELLED"
339
- }
340
- export interface AdmissionDetails {
341
- classForAdmission: string;
342
- previousSchool: string;
343
- siblings: string;
344
- }
345
- export interface FatherDetails {
346
- fatherIdNumber: string;
347
- fatherFirstName: string;
348
- fatherLastName: string;
349
- fatherMobile: string;
350
- fatherOccupation: string;
351
- fatherOrganization: string;
352
- emergencyContact: boolean;
353
- }
354
- export interface MotherDetails {
355
- motherIdNumber: string;
356
- motherFirstName: string;
357
- motherLastName: string;
358
- motherMobile: string;
359
- emergencyContact: boolean;
360
- }
361
- export interface HomeDetails {
362
- address: string;
363
- city: string;
364
- country: string;
365
- postalCode: string;
366
- state: string;
367
- }
368
- export interface StudentDetails {
369
- studentIdNumber: string;
370
- discountCode: string;
371
- dob: string;
372
- emergencyContact: string;
373
- firstName: string;
374
- gender: GENDER;
375
- hafiz: boolean;
376
- lastName: string;
377
- orphan: boolean;
378
- registrationCode: string;
379
- }
380
- export interface OfficeUse {
381
- admissionNotes: string;
382
- notes: string;
383
- }
384
- /**
385
- * StudentAdmission stores raw application payloads as JSON blobs.
386
- * This model mirrors the Prisma StudentAdmission model which keeps
387
- * structured form data in Json columns so the application layer can
388
- * process/transform it into domain entities on approval.
389
- */
390
- export interface AdmissionAIBE {
391
- id: string;
392
- admissionId: string;
393
- schoolId: string;
394
- score: number;
395
- decision: string;
396
- reasons: string[];
397
- confidence: number;
398
- processedAt: string;
399
- createdAt: string;
400
- updatedAt: string;
401
- }
402
- export interface AdmissionBE {
403
- admissionDetails: AdmissionDetails | null;
404
- createdAt: string;
405
- enabled: boolean;
406
- fatherDetails: FatherDetails | null;
407
- homeDetails: HomeDetails | null;
408
- id: string;
409
- motherDetails: MotherDetails | null;
410
- officeUse: OfficeUse | null;
411
- schoolId: string;
412
- status: ADMISSION_STATUS;
413
- studentDetails: StudentDetails | null;
414
- updatedAt: string;
415
- school?: SchoolBE;
416
- aiAnalysis?: AdmissionAIBE | null;
417
- }
418
- /**
419
- * Subscription plan defining usage limits and features for workspaces
420
- */
421
- export interface PlanBE {
422
- createdAt: string;
423
- currency: CURRENCY;
424
- enabled: boolean;
425
- id: string;
426
- maxClasses: number;
427
- maxCourses: number;
428
- maxFamilies: number;
429
- maxStaffAccounts: number;
430
- maxStudents: number;
431
- maxTeachers: number;
432
- name: string;
433
- priceMonthly: number;
434
- priceYearly: number;
435
- storageLimitMB: number;
436
- type: PLAN_TYPE;
437
- updatedAt: string;
438
- workspaces?: WorkspaceBE[];
439
- }
440
- /**
441
- * Workspace represents a tenant in the multi-vendor system
442
- * Each workspace has exactly ONE school (1:1 relationship)
443
- */
444
- export interface WorkspaceBE {
445
- agreedCurrency: CURRENCY;
446
- agreedPrice: number;
447
- billingDate: number;
448
- billingInterval: BILLING_INTERVAL;
449
- classesCount: number;
450
- coursesCount: number;
451
- createdAt: string;
452
- description: string | null;
453
- dueDateLength: number;
454
- enabled: boolean;
455
- familiesCount: number;
456
- id: string;
457
- logo: string | null;
458
- name: string;
459
- planEndDate: Date | string | null;
460
- planId: string | null;
461
- planStartDate: Date | string | null;
462
- secrets?: any | null;
463
- staffAccountsCount: number;
464
- storageUsedMB: number;
465
- studentsCount: number;
466
- subdomain: string;
467
- teachersCount: number;
468
- updatedAt: string;
469
- customRoles?: RoleBE[];
470
- plan?: PlanBE;
471
- rolePermissions?: RolePermissionBE[];
472
- school?: SchoolBE;
473
- users?: WorkspaceUserBE[];
474
- }
475
- /**
476
- * Join table managing user-workspace relationships and roles
477
- * Allows users to belong to multiple workspaces with different roles
478
- */
479
- export interface WorkspaceUserBE {
480
- createdAt: string;
481
- enabled: boolean;
482
- id: string;
483
- roleId: string | null;
484
- updatedAt: string;
485
- userId: string;
486
- workspaceId: string;
487
- role?: RoleBE;
488
- user?: UserBE;
489
- workspace?: WorkspaceBE;
490
- workspaceUserPermissions?: WorkspaceUserPermissionBE[];
491
- }
492
- /**
493
- * Role defines a named set of default permissions.
494
- * System roles (isSystem = true) are seeded once and map 1:1 with UserRole enum values.
495
- * Workspace custom roles (isSystem = false, workspaceId set) are created by SCHOOL_ADMINs.
496
- */
497
- export interface RoleBE {
498
- createdAt: string;
499
- description: string | null;
500
- id: string;
501
- isSystem: boolean;
502
- name: string;
503
- updatedAt: string;
504
- userRole: USER_ROLE | null;
505
- workspaceId: string | null;
506
- rolePermissions?: RolePermissionBE[];
507
- workspace?: WorkspaceBE;
508
- workspaceUsers?: WorkspaceBE[];
509
- }
510
- /**
511
- * Permission describes a module-level capability and access level (e.g., "courses", READ/READ_WRITE).
512
- */
513
- export interface PermissionBE {
514
- access: ACCESS_LEVEL;
515
- createdAt: string;
516
- description: string | null;
517
- id: string;
518
- module: string;
519
- updatedAt: string;
520
- rolePermissions?: RolePermissionBE[];
521
- workspaceUserPermissions?: WorkspaceUserPermissionBE[];
522
- }
523
- /**
524
- * RolePermission links a Permission to a Role, with an optional workspace scope.
525
- * workspaceId IS NULL → global default grant for the role (seeded by system)
526
- * workspaceId IS SET → workspace-level override set by SCHOOL_ADMIN for their workspace
527
- * allowed = true → explicitly grant the permission
528
- * allowed = false → explicitly deny/revoke the permission (overrides the global default)
529
- */
530
- export interface RolePermissionBE {
531
- allowed: boolean;
532
- createdAt: string;
533
- id: string;
534
- permissionId: string;
535
- roleId: string;
536
- updatedAt: string;
537
- workspaceId: string | null;
538
- permission?: PermissionBE;
539
- role?: RoleBE;
540
- workspace?: WorkspaceBE;
541
- }
542
- /**
543
- * WorkspaceUserPermission is a per-user override for a given Permission within a workspace.
544
- * allowed indicates explicit allow (true) or deny (false); overrides take precedence over role grants.
545
- */
546
- export interface WorkspaceUserPermissionBE {
547
- allowed: boolean;
548
- createdAt: string;
549
- id: string;
550
- permissionId: string;
551
- updatedAt: string;
552
- workspaceUserId: string;
553
- permission?: PermissionBE;
554
- workspaceUser?: WorkspaceUserBE;
555
- }
556
- /**
557
- * Family represents a household sharing a single user account
558
- * Contains parents and students using the same login credentials
559
- */
560
- export interface FamilyBE {
561
- address: string | null;
562
- city: string | null;
563
- country: string | null;
564
- createdAt: string;
565
- enabled: boolean;
566
- familyCode: string;
567
- id: string;
568
- postalCode: string | null;
569
- schoolId: string;
570
- state: string | null;
571
- updatedAt: string;
572
- members?: FamilyMemberBE[];
573
- school?: SchoolBE;
574
- studentFees?: StudentFeeBE[];
575
- }
576
- /**
577
- * FamilyMember represents individuals within a family
578
- * Multiple members (parents + students) share the family's user account
579
- */
580
- export interface FamilyMemberBE {
581
- avatar: string | null;
582
- bloodGroup: string | null;
583
- createdAt: string;
584
- dateOfBirth: Date | string | null;
585
- email: string | null;
586
- emergencyPhone: string | null;
587
- enabled: boolean;
588
- familyId: string;
589
- firstName: string;
590
- gender: GENDER;
591
- id: string;
592
- idNumber: string;
593
- isPrimary: boolean;
594
- lastName: string;
595
- occupation: string | null;
596
- organization: string | null;
597
- phone: string | null;
598
- relationship: string;
599
- role: FAMILY_MEMBER_ROLE;
600
- updatedAt: string;
601
- family?: FamilyBE;
602
- studentProfile?: StudentProfileBE;
603
- }
604
- /**
605
- * StudentProfile extends FamilyMember with student-specific data
606
- */
607
- export interface StudentProfileBE {
608
- campusId: string | null;
609
- computerNumber: number;
610
- createdAt: string;
611
- discountCode: string | null;
612
- enabled: boolean;
613
- familyMemberId: string;
614
- hafiz: boolean;
615
- id: string;
616
- notes: string | null;
617
- orphan: boolean;
618
- previousSchool: string | null;
619
- remarks: string | null;
620
- status: STUDENT_STATUS;
621
- studentCode: string;
622
- updatedAt: string;
623
- attendances?: AttendanceBE[];
624
- campus?: CampusBE;
625
- enrollments?: EnrollmentBE[];
626
- familyMember?: FamilyMemberBE;
627
- grades?: GradeBE[];
628
- studentFees?: StudentFeeBE[];
629
- }
630
- /**
631
- * School represents an individual educational institution
632
- * Has a 1:1 relationship with Workspace (each school is a separate tenant)
633
- */
634
- export interface SchoolBE {
635
- address: string | null;
636
- city: string | null;
637
- code: string;
638
- country: string | null;
639
- createdAt: string;
640
- currency: CURRENCY;
641
- email: string | null;
642
- enabled: boolean;
643
- id: string;
644
- logo: string | null;
645
- name: string;
646
- phone: string | null;
647
- postalCode: string | null;
648
- principalId: string | null;
649
- state: string | null;
650
- updatedAt: string;
651
- website: string | null;
652
- workspaceId: string;
653
- attendances?: AttendanceBE[];
654
- blogPosts?: BlogPostBE[];
655
- classes?: ClassBE[];
656
- courses?: CourseBE[];
657
- expenses?: ExpenseBE[];
658
- families?: FamilyBE[];
659
- feeStructures?: FeeStructureBE[];
660
- discountCodes?: DiscountCodeBE[];
661
- grades?: GradeBE[];
662
- schedules?: ScheduleBE[];
663
- sections?: SectionBE[];
664
- admissions?: AdmissionBE[];
665
- studentFees?: StudentFeeBE[];
666
- subjects?: SubjectBE[];
667
- teachers?: TeacherBE[];
668
- workspace?: WorkspaceBE;
669
- }
670
- /**
671
- * Core user model synchronized with Supabase Auth
672
- * Shared by entire family - parents and students use same login
673
- */
674
- export interface UserBE {
675
- avatar: string | null;
676
- createdAt: string;
677
- email: string;
678
- enabled: boolean;
679
- id: string;
680
- name: string | null;
681
- phone: string | null;
682
- updatedAt: string;
683
- blogCommentClaps?: BlogCommentClapBE[];
684
- blogComments?: BlogCommentBE[];
685
- blogPostClaps?: BlogPostClapBE[];
686
- blogPosts?: BlogPostBE[];
687
- mobileNotifications?: MobileNotificationBE[];
688
- notificationPreference?: NotificationPreferenceBE;
689
- pushTokens?: UserPushTokenBE[];
690
- teacherProfile?: TeacherBE;
691
- workspaces?: WorkspaceUserBE[];
692
- }
693
- /**
694
- * Class represents grade levels (e.g., Grade 1, Grade 2, Grade 10)
695
- */
696
- /**
697
- * Campus represents a physical branch/location of a school
698
- */
699
- export interface CampusBE {
700
- address: string | null;
701
- campusId?: string | null;
702
- city: string | null;
703
- code: string;
704
- country: string | null;
705
- createdAt: string;
706
- enabled: boolean;
707
- id: string;
708
- name: string;
709
- phone: string | null;
710
- schoolId: string;
711
- state: string | null;
712
- updatedAt: string;
713
- school?: SchoolBE;
714
- _count?: {
715
- classes: number;
716
- teachers: number;
717
- studentProfiles: number;
718
- };
719
- }
720
- export interface ClassBE {
721
- campusId: string | null;
722
- code: string;
723
- createdAt: string;
724
- description: string | null;
725
- enabled: boolean;
726
- id: string;
727
- name: string;
728
- schoolId: string;
729
- updatedAt: string;
730
- campus?: CampusBE;
731
- feeStructures?: FeeStructureBE[];
732
- school?: SchoolBE;
733
- sections?: SectionBE[];
734
- }
735
- /**
736
- * Section represents class divisions (e.g., Grade 1-A, Grade 1-B)
737
- */
738
- export interface SectionBE {
739
- capacity: number | null;
740
- classId: string;
741
- createdAt: string;
742
- enabled: boolean;
743
- id: string;
744
- name: string;
745
- schoolId: string;
746
- updatedAt: string;
747
- class?: ClassBE;
748
- courses?: CourseBE[];
749
- enrollments?: EnrollmentBE[];
750
- school?: SchoolBE;
751
- }
752
- /**
753
- * Subject represents academic subjects (e.g., Mathematics, English, Science)
754
- */
755
- export interface SubjectBE {
756
- code: string;
757
- createdAt: string;
758
- description: string | null;
759
- enabled: boolean;
760
- id: string;
761
- name: string;
762
- schoolId: string;
763
- updatedAt: string;
764
- courses?: CourseBE[];
765
- school?: SchoolBE;
766
- }
767
- /**
768
- * BlogPost metadata and content (MDX/Markdown stored in `content`).
769
- */
770
- export interface BlogPostBE {
771
- authorId: string | null;
772
- clapCount: number;
773
- commentCount: number;
774
- content: string;
775
- createdAt: string;
776
- enabled: boolean;
777
- excerpt: string | null;
778
- id: string;
779
- publishedAt: Date | string | null;
780
- schoolId: string | null;
781
- slug: string;
782
- title: string;
783
- updatedAt: string;
784
- author?: UserBE;
785
- claps?: BlogPostClapBE[];
786
- comments?: BlogCommentBE[];
787
- school?: SchoolBE | null;
788
- }
789
- export interface BlogCommentBE {
790
- authorId: string | null;
791
- clapCount: number;
792
- content: string;
793
- createdAt: string;
794
- enabled: boolean;
795
- id: string;
796
- parentId: string | null;
797
- postId: string;
798
- updatedAt: string;
799
- author?: UserBE | null;
800
- claps?: BlogCommentClapBE[];
801
- parent?: BlogCommentBE | null;
802
- post?: BlogPostBE;
803
- replies?: BlogCommentBE[];
804
- }
805
- export interface BlogPostClapBE {
806
- createdAt: string;
807
- id: string;
808
- postId: string;
809
- sessionId: string | null;
810
- userId: string | null;
811
- post?: BlogPostBE;
812
- user?: UserBE | null;
813
- }
814
- export interface BlogCommentClapBE {
815
- commentId: string;
816
- createdAt: string;
817
- id: string;
818
- sessionId: string | null;
819
- userId: string | null;
820
- comment?: BlogCommentBE;
821
- user?: UserBE | null;
822
- }
823
- /**
824
- * Course represents a subject taught in a specific section by a teacher
825
- */
826
- export interface CourseBE {
827
- code: string;
828
- createdAt: string;
829
- enabled: boolean;
830
- id: string;
831
- schoolId: string;
832
- sectionId: string;
833
- subjectId: string;
834
- teacherId: string;
835
- updatedAt: Date;
836
- enrollments?: EnrollmentBE[];
837
- grades?: GradeBE[];
838
- schedules?: ScheduleBE[];
839
- school?: SchoolBE;
840
- section?: SectionBE;
841
- subject?: SubjectBE;
842
- teacher?: TeacherBE;
843
- }
844
- /**
845
- * Teacher represents teaching staff
846
- */
847
- export interface TeacherBE {
848
- address: string | null;
849
- avatar: string | null;
850
- bio: string | null;
851
- campusId: string | null;
852
- city: string | null;
853
- country: string | null;
854
- createdAt: string;
855
- dateOfBirth: Date | string | null;
856
- emergencyPhone: string | null;
857
- enabled: boolean;
858
- experience: number | null;
859
- firstName: string;
860
- gender: GENDER | null;
861
- id: string;
862
- joiningDate: Date | string;
863
- lastName: string;
864
- phone: string | null;
865
- postalCode: string | null;
866
- qualification: string | null;
867
- schoolId: string;
868
- specialization: string | null;
869
- state: string | null;
870
- teacherCode: string;
871
- updatedAt: Date;
872
- userId: string | null;
873
- campus?: CampusBE;
874
- courses?: CourseBE[];
875
- school?: SchoolBE;
876
- user?: UserBE | null;
877
- }
878
- /**
879
- * Enrollment represents student enrollment in courses
880
- */
881
- export interface EnrollmentBE {
882
- courseId: string;
883
- createdAt: string;
884
- enabled: boolean;
885
- enrollmentDate: Date | string;
886
- id: string;
887
- sectionId: string;
888
- studentProfileId: string;
889
- updatedAt: string;
890
- course?: CourseBE;
891
- grades?: GradeBE[];
892
- section?: SectionBE;
893
- studentProfile?: StudentProfileBE;
894
- }
895
- /**
896
- * Attendance tracks daily student presence in courses
897
- */
898
- export interface AttendanceBE {
899
- createdAt: string;
900
- date: Date | string;
901
- enabled: boolean;
902
- id: string;
903
- remarks: string | null;
904
- schoolId: string;
905
- status: ATTENDANCE_STATUS;
906
- studentProfileId: string;
907
- updatedAt: string;
908
- school?: SchoolBE;
909
- studentProfile?: StudentProfileBE;
910
- }
911
- /**
912
- * Grade represents student assessment results
913
- */
914
- export interface GradeBE {
915
- assessmentDate: Date | string;
916
- courseId: string;
917
- createdAt: Date;
918
- enabled: boolean;
919
- enrollmentId: string;
920
- grade: string | null;
921
- gradeType: GRADE_TYPE;
922
- id: string;
923
- marksObtained: number;
924
- maxMarks: number;
925
- percentage: number | null;
926
- remarks: string | null;
927
- schoolId: string;
928
- studentProfileId: string;
929
- title: string;
930
- updatedAt: Date;
931
- course?: CourseBE;
932
- enrollment?: EnrollmentBE;
933
- school?: SchoolBE;
934
- studentProfile?: StudentProfileBE;
935
- }
936
- /**
937
- * Schedule represents class timetable
938
- */
939
- export interface ScheduleBE {
940
- courseId: string;
941
- createdAt: string;
942
- dayOfWeek: DAY_OF_WEEK;
943
- enabled: boolean;
944
- endTime: string;
945
- id: string;
946
- room: string | null;
947
- schoolId: string;
948
- startTime: string;
949
- updatedAt: string;
950
- course?: CourseBE;
951
- school?: SchoolBE;
952
- }
953
- /**
954
- * FeeStructure defines fee templates for different classes/categories
955
- */
956
- export interface FeeStructureBE {
957
- amount: number;
958
- classId?: string | null;
959
- createdAt: string;
960
- description: string | null;
961
- enabled: boolean;
962
- feeType: FEE_TYPE;
963
- frequency: string | null;
964
- id: string;
965
- name: string;
966
- schoolId: string;
967
- updatedAt: string;
968
- class?: ClassBE;
969
- school?: SchoolBE;
970
- studentFees?: StudentFeeBE[];
971
- }
972
- /**
973
- * DiscountCode represents discount codes available for fee reductions
974
- */
975
- export interface DiscountCodeBE {
976
- code: string;
977
- createdAt: string;
978
- description: string | null;
979
- discountType: DISCOUNT_TYPE;
980
- discountValue: number;
981
- enabled: boolean;
982
- id: string;
983
- schoolId: string;
984
- updatedAt: string;
985
- school?: SchoolBE;
986
- studentFees?: StudentFeeBE[];
987
- }
988
- /**
989
- * StudentFee represents fees assigned to individual students
990
- */
991
- export interface StudentFeeBE {
992
- amount: number;
993
- amountDue: number;
994
- amountPaid: number;
995
- createdAt: string;
996
- discountAmount: number | null;
997
- discountCodeId: string | null;
998
- dueDate: Date | string;
999
- enabled: boolean;
1000
- familyId: string;
1001
- feeStructureId: string;
1002
- id: string;
1003
- lastRemindedAt: Date | string | null;
1004
- nextFollowUpAt: Date | string | null;
1005
- reliabilityScore: number | null;
1006
- remarks: string | null;
1007
- riskLevel: FEE_RISK_LEVEL | null;
1008
- schoolId: string;
1009
- status: PAYMENT_STATUS;
1010
- studentProfileId: string;
1011
- updatedAt: string;
1012
- agentActivities?: FeeAgentActivityBE[];
1013
- conversations?: FeeConversationBE[];
1014
- discountCode?: DiscountCodeBE;
1015
- family?: FamilyBE;
1016
- feeStructure?: FeeStructureBE;
1017
- school?: SchoolBE;
1018
- studentProfile?: StudentProfileBE;
1019
- }
1020
- export declare enum FEE_RISK_LEVEL {
1021
- LOW = "LOW",
1022
- MEDIUM = "MEDIUM",
1023
- HIGH = "HIGH"
1024
- }
1025
- export declare enum FEE_AGENT_ACTION_TYPE {
1026
- ANALYSIS = "ANALYSIS",
1027
- MESSAGE = "MESSAGE",
1028
- FOLLOW_UP = "FOLLOW_UP",
1029
- RESPONSE = "RESPONSE"
1030
- }
1031
- export declare enum FEE_CONVERSATION_SENDER {
1032
- AGENT = "AGENT",
1033
- PARENT = "PARENT"
1034
- }
1035
- export declare enum FEE_CONVERSATION_INTENT {
1036
- PROMISE = "PROMISE",
1037
- PAID = "PAID",
1038
- DISPUTE = "DISPUTE",
1039
- UNKNOWN = "UNKNOWN"
1040
- }
1041
- export interface FeeAgentActivityBE {
1042
- actionType: FEE_AGENT_ACTION_TYPE;
1043
- createdAt: string;
1044
- id: string;
1045
- payload: Record<string, unknown>;
1046
- schoolId: string;
1047
- status: string;
1048
- studentFeeId: string;
1049
- updatedAt: string;
1050
- }
1051
- export interface FeeConversationBE {
1052
- createdAt: string;
1053
- id: string;
1054
- intent: FEE_CONVERSATION_INTENT;
1055
- message: string;
1056
- metadata: Record<string, unknown> | null;
1057
- schoolId: string;
1058
- sender: FEE_CONVERSATION_SENDER;
1059
- studentFeeId: string;
1060
- studentId: string;
1061
- updatedAt: string;
1062
- }
1063
- /**
1064
- * Expense represents outgoing payments and school expenditure tracking
1065
- */
1066
- export interface ExpenseBE {
1067
- amount: number;
1068
- approvedBy: string | null;
1069
- attachments: string[];
1070
- category: EXPENSE_CATEGORY;
1071
- createdAt: string;
1072
- description: string | null;
1073
- enabled: boolean;
1074
- expenseDate: Date | string;
1075
- id: string;
1076
- invoiceNumber: string | null;
1077
- paidBy: string | null;
1078
- paymentDate: Date | string | null;
1079
- paymentMethod: PAYMENT_METHOD | null;
1080
- receiptNumber: string | null;
1081
- remarks: string | null;
1082
- schoolId: string;
1083
- status: EXPENSE_STATUS;
1084
- title: string;
1085
- transactionId: string | null;
1086
- updatedAt: string;
1087
- vendorContact: string | null;
1088
- vendorName: string | null;
1089
- school?: SchoolBE;
1090
- }
1091
- /**
1092
- * Platform of the mobile device registering a push token
1093
- */
1094
- export declare enum DEVICE_PLATFORM {
1095
- IOS = "IOS",
1096
- ANDROID = "ANDROID",
1097
- WEB = "WEB"
1098
- }
1099
- /**
1100
- * Category of a mobile push notification
1101
- */
1102
- export declare enum NOTIFICATION_TYPE {
1103
- ASSIGNMENT = "ASSIGNMENT",
1104
- ATTENDANCE = "ATTENDANCE",
1105
- PAYMENT = "PAYMENT",
1106
- ALERT = "ALERT",
1107
- GENERAL = "GENERAL"
1108
- }
1109
- /**
1110
- * WhatsApp broadcast campaign status
1111
- */
1112
- export declare enum CAMPAIGN_STATUS {
1113
- DRAFT = "DRAFT",
1114
- RUNNING = "RUNNING",
1115
- COMPLETED = "COMPLETED",
1116
- FAILED = "FAILED",
1117
- PAUSED = "PAUSED"
1118
- }
1119
- /**
1120
- * Delivery status for an individual campaign contact
1121
- */
1122
- export declare enum CAMPAIGN_CONTACT_STATUS {
1123
- PENDING = "PENDING",
1124
- SENT = "SENT",
1125
- FAILED = "FAILED",
1126
- SKIPPED = "SKIPPED"
1127
- }
1128
- /**
1129
- * Individual recipient within a broadcast campaign
1130
- */
1131
- export interface CampaignContactBE {
1132
- campaignId: string;
1133
- createdAt: string;
1134
- errorMessage: string | null;
1135
- id: string;
1136
- name: string;
1137
- phoneNumber: string;
1138
- sentAt: string | null;
1139
- status: CAMPAIGN_CONTACT_STATUS;
1140
- updatedAt: string;
1141
- }
1142
- /**
1143
- * WhatsApp broadcast campaign
1144
- */
1145
- export interface CampaignBE {
1146
- createdAt: string;
1147
- enabled: boolean;
1148
- id: string;
1149
- messageTemplate: string;
1150
- name: string;
1151
- schoolId: string;
1152
- status: CAMPAIGN_STATUS;
1153
- updatedAt: string;
1154
- workerJobId: string | null;
1155
- contacts?: CampaignContactBE[];
1156
- _count?: {
1157
- contacts: number;
1158
- };
1159
- school?: SchoolBE;
1160
- }
1161
- /**
1162
- * Channel through which a referral invite was sent
1163
- */
1164
- export declare enum REFERRAL_CHANNEL {
1165
- EMAIL = "EMAIL",
1166
- WHATSAPP = "WHATSAPP",
1167
- BOTH = "BOTH"
1168
- }
1169
- /**
1170
- * Status of a school referral invite
1171
- */
1172
- export declare enum REFERRAL_STATUS {
1173
- PENDING = "PENDING",
1174
- SENT = "SENT",
1175
- FAILED = "FAILED"
1176
- }
1177
- /**
1178
- * A referral invite sent by a school user to encourage another school to join the platform
1179
- */
1180
- export interface ReferralBE {
1181
- channel: REFERRAL_CHANNEL;
1182
- createdAt: string;
1183
- enabled: boolean;
1184
- errorMessage: string | null;
1185
- id: string;
1186
- inviterUserId: string;
1187
- personalNote: string | null;
1188
- recipientEmail: string | null;
1189
- recipientName: string | null;
1190
- recipientPhone: string | null;
1191
- schoolId: string;
1192
- sentAt: string | null;
1193
- status: REFERRAL_STATUS;
1194
- updatedAt: string;
1195
- workerJobId: string | null;
1196
- school?: SchoolBE;
1197
- }
1198
- /**
1199
- * Expo push token registered by a mobile device for a specific user
1200
- */
1201
- export interface UserPushTokenBE {
1202
- appVersion: string | null;
1203
- createdAt: string;
1204
- deviceId: string | null;
1205
- id: string;
1206
- platform: DEVICE_PLATFORM;
1207
- pushToken: string;
1208
- updatedAt: string;
1209
- userId: string;
1210
- user?: UserBE;
1211
- }
1212
- /**
1213
- * Push notification delivered to a mobile user
1214
- */
1215
- export interface MobileNotificationBE {
1216
- archived: boolean;
1217
- body: string;
1218
- createdAt: string;
1219
- data: Record<string, unknown> | null;
1220
- id: string;
1221
- read: boolean;
1222
- title: string;
1223
- type: NOTIFICATION_TYPE;
1224
- updatedAt: string;
1225
- userId: string;
1226
- user?: UserBE;
1227
- }
1228
- /**
1229
- * Per-user notification category and channel preferences
1230
- */
1231
- export interface NotificationPreferenceBE {
1232
- alertEnabled: boolean;
1233
- assignmentEnabled: boolean;
1234
- attendanceEnabled: boolean;
1235
- createdAt: string;
1236
- emailEnabled: boolean;
1237
- generalEnabled: boolean;
1238
- id: string;
1239
- paymentEnabled: boolean;
1240
- pushEnabled: boolean;
1241
- updatedAt: string;
1242
- userId: string;
1243
- user?: UserBE;
1244
- }
5
+ export * from "./types";