@brite-future-schools-contracts/contracts 2.0.12 → 2.0.16

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.
@@ -148,8 +148,12 @@ type SwitchBranchInput = z.infer<typeof SwitchBranchInputSchema>;
148
148
  * HR domain Zod schemas — staff creation, listing, and profiles.
149
149
  *
150
150
  * Phase History:
151
- * Phase 1 (2026-06-07): Initial creation — staff.create, staff.list,
152
- * staff.getById wire types
151
+ * Phase 1 (2026-06-07): Initial creation
152
+ * Phase 4.2 (2026-06-13): Removed hardcoded RoleNameSchema — role is now
153
+ * a plain string (DB-driven). Removed salary fields
154
+ * from CreateStaffInput — remuneration module owns
155
+ * salary. Added helbNo, saccoNo statutory fields.
156
+ * Updated StaffProfile to remove salary columns.
153
157
  *
154
158
  * @module src/schemas/hr
155
159
  * @since Phase 1
@@ -161,35 +165,6 @@ declare const EmploymentTypeSchema: z.ZodEnum<{
161
165
  temporary: "temporary";
162
166
  intern: "intern";
163
167
  }>;
164
- declare const RoleNameSchema: z.ZodEnum<{
165
- PROPRIETOR: "PROPRIETOR";
166
- DIRECTOR: "DIRECTOR";
167
- SYSTEM_ADMIN: "SYSTEM_ADMIN";
168
- PRINCIPAL: "PRINCIPAL";
169
- DEPUTY_PRINCIPAL: "DEPUTY_PRINCIPAL";
170
- HOD: "HOD";
171
- CLASS_TEACHER: "CLASS_TEACHER";
172
- SUBJECT_TEACHER: "SUBJECT_TEACHER";
173
- BURSAR: "BURSAR";
174
- HR_ADMIN: "HR_ADMIN";
175
- SCHOOL_NURSE: "SCHOOL_NURSE";
176
- LIBRARIAN: "LIBRARIAN";
177
- LAB_TECHNICIAN: "LAB_TECHNICIAN";
178
- SPORTS_COACH: "SPORTS_COACH";
179
- COUNSELLOR: "COUNSELLOR";
180
- CARETAKER: "CARETAKER";
181
- SECURITY: "SECURITY";
182
- KITCHEN_STAFF: "KITCHEN_STAFF";
183
- KITCHEN_MANAGER: "KITCHEN_MANAGER";
184
- DRIVER: "DRIVER";
185
- IT_ADMIN: "IT_ADMIN";
186
- BOARDING_MASTER: "BOARDING_MASTER";
187
- PREFECT: "PREFECT";
188
- STUDENT: "STUDENT";
189
- PARENT: "PARENT";
190
- ORG_SPONSOR: "ORG_SPONSOR";
191
- INDIVIDUAL_SPONSOR: "INDIVIDUAL_SPONSOR";
192
- }>;
193
168
  declare const CreateStaffInputSchema: z.ZodObject<{
194
169
  firstName: z.ZodString;
195
170
  middleName: z.ZodOptional<z.ZodString>;
@@ -197,35 +172,7 @@ declare const CreateStaffInputSchema: z.ZodObject<{
197
172
  email: z.ZodEmail;
198
173
  phone: z.ZodString;
199
174
  nationalId: z.ZodString;
200
- roleName: z.ZodEnum<{
201
- PROPRIETOR: "PROPRIETOR";
202
- DIRECTOR: "DIRECTOR";
203
- SYSTEM_ADMIN: "SYSTEM_ADMIN";
204
- PRINCIPAL: "PRINCIPAL";
205
- DEPUTY_PRINCIPAL: "DEPUTY_PRINCIPAL";
206
- HOD: "HOD";
207
- CLASS_TEACHER: "CLASS_TEACHER";
208
- SUBJECT_TEACHER: "SUBJECT_TEACHER";
209
- BURSAR: "BURSAR";
210
- HR_ADMIN: "HR_ADMIN";
211
- SCHOOL_NURSE: "SCHOOL_NURSE";
212
- LIBRARIAN: "LIBRARIAN";
213
- LAB_TECHNICIAN: "LAB_TECHNICIAN";
214
- SPORTS_COACH: "SPORTS_COACH";
215
- COUNSELLOR: "COUNSELLOR";
216
- CARETAKER: "CARETAKER";
217
- SECURITY: "SECURITY";
218
- KITCHEN_STAFF: "KITCHEN_STAFF";
219
- KITCHEN_MANAGER: "KITCHEN_MANAGER";
220
- DRIVER: "DRIVER";
221
- IT_ADMIN: "IT_ADMIN";
222
- BOARDING_MASTER: "BOARDING_MASTER";
223
- PREFECT: "PREFECT";
224
- STUDENT: "STUDENT";
225
- PARENT: "PARENT";
226
- ORG_SPONSOR: "ORG_SPONSOR";
227
- INDIVIDUAL_SPONSOR: "INDIVIDUAL_SPONSOR";
228
- }>;
175
+ roleName: z.ZodString;
229
176
  isPrimaryRole: z.ZodDefault<z.ZodBoolean>;
230
177
  departmentId: z.ZodOptional<z.ZodUUID>;
231
178
  designation: z.ZodString;
@@ -237,11 +184,6 @@ declare const CreateStaffInputSchema: z.ZodObject<{
237
184
  }>;
238
185
  contractStart: z.ZodISODate;
239
186
  contractEnd: z.ZodOptional<z.ZodISODate>;
240
- basicSalary: z.ZodNumber;
241
- houseAllowance: z.ZodDefault<z.ZodNumber>;
242
- transportAllowance: z.ZodDefault<z.ZodNumber>;
243
- helbDeduction: z.ZodDefault<z.ZodNumber>;
244
- saccoDeduction: z.ZodDefault<z.ZodNumber>;
245
187
  bankName: z.ZodOptional<z.ZodString>;
246
188
  bankAccount: z.ZodOptional<z.ZodString>;
247
189
  bankBranch: z.ZodOptional<z.ZodString>;
@@ -249,6 +191,8 @@ declare const CreateStaffInputSchema: z.ZodObject<{
249
191
  kraPin: z.ZodOptional<z.ZodString>;
250
192
  nhifNo: z.ZodOptional<z.ZodString>;
251
193
  nssfNo: z.ZodOptional<z.ZodString>;
194
+ helbNo: z.ZodOptional<z.ZodString>;
195
+ saccoNo: z.ZodOptional<z.ZodString>;
252
196
  }, z.core.$strip>;
253
197
  type CreateStaffInput = z.infer<typeof CreateStaffInputSchema>;
254
198
  declare const StaffProfileSchema: z.ZodObject<{
@@ -264,6 +208,8 @@ declare const StaffProfileSchema: z.ZodObject<{
264
208
  kraPin: z.ZodNullable<z.ZodString>;
265
209
  nhifNo: z.ZodNullable<z.ZodString>;
266
210
  nssfNo: z.ZodNullable<z.ZodString>;
211
+ helbNo: z.ZodNullable<z.ZodString>;
212
+ saccoNo: z.ZodNullable<z.ZodString>;
267
213
  designation: z.ZodString;
268
214
  employmentType: z.ZodEnum<{
269
215
  permanent: "permanent";
@@ -273,11 +219,6 @@ declare const StaffProfileSchema: z.ZodObject<{
273
219
  }>;
274
220
  contractStart: z.ZodString;
275
221
  contractEnd: z.ZodNullable<z.ZodString>;
276
- basicSalary: z.ZodString;
277
- houseAllowance: z.ZodString;
278
- transportAllowance: z.ZodString;
279
- helbDeduction: z.ZodNullable<z.ZodString>;
280
- saccoDeduction: z.ZodNullable<z.ZodString>;
281
222
  bankName: z.ZodNullable<z.ZodString>;
282
223
  bankAccount: z.ZodNullable<z.ZodString>;
283
224
  bankBranch: z.ZodNullable<z.ZodString>;
@@ -287,35 +228,7 @@ declare const StaffProfileSchema: z.ZodObject<{
287
228
  mustChangePassword: z.ZodBoolean;
288
229
  departmentId: z.ZodNullable<z.ZodUUID>;
289
230
  departmentName: z.ZodNullable<z.ZodString>;
290
- roleName: z.ZodNullable<z.ZodEnum<{
291
- PROPRIETOR: "PROPRIETOR";
292
- DIRECTOR: "DIRECTOR";
293
- SYSTEM_ADMIN: "SYSTEM_ADMIN";
294
- PRINCIPAL: "PRINCIPAL";
295
- DEPUTY_PRINCIPAL: "DEPUTY_PRINCIPAL";
296
- HOD: "HOD";
297
- CLASS_TEACHER: "CLASS_TEACHER";
298
- SUBJECT_TEACHER: "SUBJECT_TEACHER";
299
- BURSAR: "BURSAR";
300
- HR_ADMIN: "HR_ADMIN";
301
- SCHOOL_NURSE: "SCHOOL_NURSE";
302
- LIBRARIAN: "LIBRARIAN";
303
- LAB_TECHNICIAN: "LAB_TECHNICIAN";
304
- SPORTS_COACH: "SPORTS_COACH";
305
- COUNSELLOR: "COUNSELLOR";
306
- CARETAKER: "CARETAKER";
307
- SECURITY: "SECURITY";
308
- KITCHEN_STAFF: "KITCHEN_STAFF";
309
- KITCHEN_MANAGER: "KITCHEN_MANAGER";
310
- DRIVER: "DRIVER";
311
- IT_ADMIN: "IT_ADMIN";
312
- BOARDING_MASTER: "BOARDING_MASTER";
313
- PREFECT: "PREFECT";
314
- STUDENT: "STUDENT";
315
- PARENT: "PARENT";
316
- ORG_SPONSOR: "ORG_SPONSOR";
317
- INDIVIDUAL_SPONSOR: "INDIVIDUAL_SPONSOR";
318
- }>>;
231
+ roleName: z.ZodNullable<z.ZodString>;
319
232
  roleId: z.ZodNullable<z.ZodUUID>;
320
233
  }, z.core.$strip>;
321
234
  type StaffProfile = z.infer<typeof StaffProfileSchema>;
@@ -336,35 +249,7 @@ declare const StaffListItemSchema: z.ZodObject<{
336
249
  }>;
337
250
  status: z.ZodString;
338
251
  departmentName: z.ZodNullable<z.ZodString>;
339
- roleName: z.ZodNullable<z.ZodEnum<{
340
- PROPRIETOR: "PROPRIETOR";
341
- DIRECTOR: "DIRECTOR";
342
- SYSTEM_ADMIN: "SYSTEM_ADMIN";
343
- PRINCIPAL: "PRINCIPAL";
344
- DEPUTY_PRINCIPAL: "DEPUTY_PRINCIPAL";
345
- HOD: "HOD";
346
- CLASS_TEACHER: "CLASS_TEACHER";
347
- SUBJECT_TEACHER: "SUBJECT_TEACHER";
348
- BURSAR: "BURSAR";
349
- HR_ADMIN: "HR_ADMIN";
350
- SCHOOL_NURSE: "SCHOOL_NURSE";
351
- LIBRARIAN: "LIBRARIAN";
352
- LAB_TECHNICIAN: "LAB_TECHNICIAN";
353
- SPORTS_COACH: "SPORTS_COACH";
354
- COUNSELLOR: "COUNSELLOR";
355
- CARETAKER: "CARETAKER";
356
- SECURITY: "SECURITY";
357
- KITCHEN_STAFF: "KITCHEN_STAFF";
358
- KITCHEN_MANAGER: "KITCHEN_MANAGER";
359
- DRIVER: "DRIVER";
360
- IT_ADMIN: "IT_ADMIN";
361
- BOARDING_MASTER: "BOARDING_MASTER";
362
- PREFECT: "PREFECT";
363
- STUDENT: "STUDENT";
364
- PARENT: "PARENT";
365
- ORG_SPONSOR: "ORG_SPONSOR";
366
- INDIVIDUAL_SPONSOR: "INDIVIDUAL_SPONSOR";
367
- }>>;
252
+ roleName: z.ZodNullable<z.ZodString>;
368
253
  createdAt: z.ZodString;
369
254
  }, z.core.$strip>;
370
255
  type StaffListItem = z.infer<typeof StaffListItemSchema>;
@@ -373,35 +258,7 @@ declare const ListStaffInputSchema: z.ZodObject<{
373
258
  limit: z.ZodDefault<z.ZodInt>;
374
259
  search: z.ZodOptional<z.ZodString>;
375
260
  departmentId: z.ZodOptional<z.ZodUUID>;
376
- roleName: z.ZodOptional<z.ZodEnum<{
377
- PROPRIETOR: "PROPRIETOR";
378
- DIRECTOR: "DIRECTOR";
379
- SYSTEM_ADMIN: "SYSTEM_ADMIN";
380
- PRINCIPAL: "PRINCIPAL";
381
- DEPUTY_PRINCIPAL: "DEPUTY_PRINCIPAL";
382
- HOD: "HOD";
383
- CLASS_TEACHER: "CLASS_TEACHER";
384
- SUBJECT_TEACHER: "SUBJECT_TEACHER";
385
- BURSAR: "BURSAR";
386
- HR_ADMIN: "HR_ADMIN";
387
- SCHOOL_NURSE: "SCHOOL_NURSE";
388
- LIBRARIAN: "LIBRARIAN";
389
- LAB_TECHNICIAN: "LAB_TECHNICIAN";
390
- SPORTS_COACH: "SPORTS_COACH";
391
- COUNSELLOR: "COUNSELLOR";
392
- CARETAKER: "CARETAKER";
393
- SECURITY: "SECURITY";
394
- KITCHEN_STAFF: "KITCHEN_STAFF";
395
- KITCHEN_MANAGER: "KITCHEN_MANAGER";
396
- DRIVER: "DRIVER";
397
- IT_ADMIN: "IT_ADMIN";
398
- BOARDING_MASTER: "BOARDING_MASTER";
399
- PREFECT: "PREFECT";
400
- STUDENT: "STUDENT";
401
- PARENT: "PARENT";
402
- ORG_SPONSOR: "ORG_SPONSOR";
403
- INDIVIDUAL_SPONSOR: "INDIVIDUAL_SPONSOR";
404
- }>>;
261
+ roleName: z.ZodOptional<z.ZodString>;
405
262
  status: z.ZodOptional<z.ZodEnum<{
406
263
  active: "active";
407
264
  inactive: "inactive";
@@ -810,4 +667,111 @@ declare const StudentAttendanceRowSchema: z.ZodObject<{
810
667
  }, z.core.$strip>;
811
668
  type StudentAttendanceRow = z.infer<typeof StudentAttendanceRowSchema>;
812
669
 
813
- export { AttendanceRecordInputSchema, type AttendanceStatusEnum, AttendanceStatusSchema, BranchRefSchema, type BulkUploadStudentRow, BulkUploadStudentRowSchema, type BulkUploadStudentsInput, BulkUploadStudentsInputSchema, type BulkUploadStudentsOutput, BulkUploadStudentsOutputSchema, type ChangePasswordInput, ChangePasswordInputSchema, type ClassAttendanceRow, ClassAttendanceRowSchema, type ClassSummary, ClassSummarySchema, type CreateDepartmentInput, CreateDepartmentInputSchema, type CreateStaffInput, CreateStaffInputSchema, type CreateStaffOutput, CreateStaffOutputSchema, type CreateStudentInput, CreateStudentInputSchema, type CreateStudentOutput, CreateStudentOutputSchema, CuidSchema, type Department, DepartmentSchema, EmploymentTypeSchema, GenderSchema, type GetByClassInput, GetByClassInputSchema, type GetByStudentInput, GetByStudentInputSchema, GradeLevelSchema, type LinkGuardianInput, LinkGuardianInputSchema, type ListStaffInput, ListStaffInputSchema, type ListStudentsInput, ListStudentsInputSchema, type LoginInput, LoginInputSchema, type LoginOutput, LoginOutputSchema, LogoutInputSchema, type MarkAttendanceInput, MarkAttendanceInputSchema, type MarkAttendanceOutput, MarkAttendanceOutputSchema, type PaginationInput, PaginationInputSchema, type RefreshTokenInput, RefreshTokenInputSchema, type RefreshTokenOutput, RefreshTokenOutputSchema, RequestPasswordResetInputSchema, ResetPasswordInputSchema, RoleNameSchema, type SessionUserOutput, SessionUserOutputSchema, SessionUserRoleSchema, SessionUserSubRoleSchema, type SoftDelete, SoftDeleteSchema, type StaffListItem, StaffListItemSchema, type StaffProfile, StaffProfileSchema, type StudentAttendanceRow, StudentAttendanceRowSchema, type StudentListItem, StudentListItemSchema, type StudentProfile, StudentProfileSchema, StudentStatusSchema, type SwitchBranchInput, SwitchBranchInputSchema, type Term, TermSchema, type Timestamps, TimestampsSchema, UuidSchema, paginatedOutputSchema };
670
+ /**
671
+ * Brite Future Schools — bfs-contracts
672
+ * Calendar schemas — academic years and terms.
673
+ *
674
+ * Phase History:
675
+ * Phase 4.1 (2026-06-12): Initial creation
676
+ *
677
+ * @module src/schemas/calendar
678
+ * @since Phase 4.1
679
+ */
680
+
681
+ declare const AcademicYearSchema: z.ZodObject<{
682
+ id: z.ZodString;
683
+ branchId: z.ZodString;
684
+ name: z.ZodString;
685
+ startDate: z.ZodString;
686
+ endDate: z.ZodString;
687
+ isCurrent: z.ZodBoolean;
688
+ createdAt: z.ZodString;
689
+ }, z.core.$strip>;
690
+ declare const CreateYearInputSchema: z.ZodObject<{
691
+ name: z.ZodString;
692
+ startDate: z.ZodString;
693
+ endDate: z.ZodString;
694
+ }, z.core.$strip>;
695
+ declare const SetCurrentYearInputSchema: z.ZodObject<{
696
+ yearId: z.ZodString;
697
+ }, z.core.$strip>;
698
+ declare const AcademicTermSchema: z.ZodObject<{
699
+ id: z.ZodString;
700
+ branchId: z.ZodString;
701
+ academicYearId: z.ZodString;
702
+ name: z.ZodString;
703
+ startDate: z.ZodString;
704
+ endDate: z.ZodString;
705
+ isCurrent: z.ZodBoolean;
706
+ createdAt: z.ZodString;
707
+ }, z.core.$strip>;
708
+ declare const CreateTermInputSchema: z.ZodObject<{
709
+ academicYearId: z.ZodString;
710
+ name: z.ZodString;
711
+ startDate: z.ZodString;
712
+ endDate: z.ZodString;
713
+ }, z.core.$strip>;
714
+ declare const SetCurrentTermInputSchema: z.ZodObject<{
715
+ termId: z.ZodString;
716
+ }, z.core.$strip>;
717
+ declare const ListTermsInputSchema: z.ZodObject<{
718
+ yearId: z.ZodOptional<z.ZodString>;
719
+ }, z.core.$strip>;
720
+ type AcademicYear = z.infer<typeof AcademicYearSchema>;
721
+ type AcademicTerm = z.infer<typeof AcademicTermSchema>;
722
+ type CreateYearInput = z.infer<typeof CreateYearInputSchema>;
723
+ type CreateTermInput = z.infer<typeof CreateTermInputSchema>;
724
+
725
+ /**
726
+ * Brite Future Schools — bfs-contracts
727
+ * Grades schemas.
728
+ *
729
+ * Phase History:
730
+ * Phase 4.1 (2026-06-12): Initial creation
731
+ *
732
+ * @module src/schemas/grades
733
+ * @since Phase 4.1
734
+ */
735
+
736
+ declare const GRADE_LEVELS: readonly ["PP1", "PP2", "G1", "G2", "G3", "G4", "G5", "G6", "G7", "G8", "G9"];
737
+ type GradeLevel = typeof GRADE_LEVELS[number];
738
+ declare const GradeSchema: z.ZodObject<{
739
+ id: z.ZodString;
740
+ branchId: z.ZodString;
741
+ name: z.ZodString;
742
+ level: z.ZodEnum<{
743
+ PP1: "PP1";
744
+ PP2: "PP2";
745
+ G1: "G1";
746
+ G2: "G2";
747
+ G3: "G3";
748
+ G4: "G4";
749
+ G5: "G5";
750
+ G6: "G6";
751
+ G7: "G7";
752
+ G8: "G8";
753
+ G9: "G9";
754
+ }>;
755
+ description: z.ZodNullable<z.ZodString>;
756
+ }, z.core.$strip>;
757
+ declare const CreateGradeInputSchema: z.ZodObject<{
758
+ name: z.ZodString;
759
+ level: z.ZodEnum<{
760
+ PP1: "PP1";
761
+ PP2: "PP2";
762
+ G1: "G1";
763
+ G2: "G2";
764
+ G3: "G3";
765
+ G4: "G4";
766
+ G5: "G5";
767
+ G6: "G6";
768
+ G7: "G7";
769
+ G8: "G8";
770
+ G9: "G9";
771
+ }>;
772
+ description: z.ZodOptional<z.ZodString>;
773
+ }, z.core.$strip>;
774
+ type Grade = z.infer<typeof GradeSchema>;
775
+ type CreateGradeInput = z.infer<typeof CreateGradeInputSchema>;
776
+
777
+ export { type AcademicTerm, AcademicTermSchema, type AcademicYear, AcademicYearSchema, AttendanceRecordInputSchema, type AttendanceStatusEnum, AttendanceStatusSchema, BranchRefSchema, type BulkUploadStudentRow, BulkUploadStudentRowSchema, type BulkUploadStudentsInput, BulkUploadStudentsInputSchema, type BulkUploadStudentsOutput, BulkUploadStudentsOutputSchema, type ChangePasswordInput, ChangePasswordInputSchema, type ClassAttendanceRow, ClassAttendanceRowSchema, type ClassSummary, ClassSummarySchema, type CreateDepartmentInput, CreateDepartmentInputSchema, type CreateGradeInput, CreateGradeInputSchema, type CreateStaffInput, CreateStaffInputSchema, type CreateStaffOutput, CreateStaffOutputSchema, type CreateStudentInput, CreateStudentInputSchema, type CreateStudentOutput, CreateStudentOutputSchema, type CreateTermInput, CreateTermInputSchema, type CreateYearInput, CreateYearInputSchema, CuidSchema, type Department, DepartmentSchema, EmploymentTypeSchema, GRADE_LEVELS, GenderSchema, type GetByClassInput, GetByClassInputSchema, type GetByStudentInput, GetByStudentInputSchema, type Grade, type GradeLevel, GradeLevelSchema, GradeSchema, type LinkGuardianInput, LinkGuardianInputSchema, type ListStaffInput, ListStaffInputSchema, type ListStudentsInput, ListStudentsInputSchema, ListTermsInputSchema, type LoginInput, LoginInputSchema, type LoginOutput, LoginOutputSchema, LogoutInputSchema, type MarkAttendanceInput, MarkAttendanceInputSchema, type MarkAttendanceOutput, MarkAttendanceOutputSchema, type PaginationInput, PaginationInputSchema, type RefreshTokenInput, RefreshTokenInputSchema, type RefreshTokenOutput, RefreshTokenOutputSchema, RequestPasswordResetInputSchema, ResetPasswordInputSchema, type SessionUserOutput, SessionUserOutputSchema, SessionUserRoleSchema, SessionUserSubRoleSchema, SetCurrentTermInputSchema, SetCurrentYearInputSchema, type SoftDelete, SoftDeleteSchema, type StaffListItem, StaffListItemSchema, type StaffProfile, StaffProfileSchema, type StudentAttendanceRow, StudentAttendanceRowSchema, type StudentListItem, StudentListItemSchema, type StudentProfile, StudentProfileSchema, StudentStatusSchema, type SwitchBranchInput, SwitchBranchInputSchema, type Term, TermSchema, type Timestamps, TimestampsSchema, UuidSchema, paginatedOutputSchema };
@@ -1,5 +1,7 @@
1
- import "../chunk-PDCM3NIB.js";
1
+ import "../chunk-NCAGCDZV.js";
2
2
  import {
3
+ AcademicTermSchema,
4
+ AcademicYearSchema,
3
5
  AttendanceRecordInputSchema,
4
6
  AttendanceStatusSchema,
5
7
  BranchRefSchema,
@@ -10,20 +12,26 @@ import {
10
12
  ClassAttendanceRowSchema,
11
13
  ClassSummarySchema,
12
14
  CreateDepartmentInputSchema,
15
+ CreateGradeInputSchema,
13
16
  CreateStaffInputSchema,
14
17
  CreateStaffOutputSchema,
15
18
  CreateStudentInputSchema,
16
19
  CreateStudentOutputSchema,
20
+ CreateTermInputSchema,
21
+ CreateYearInputSchema,
17
22
  CuidSchema,
18
23
  DepartmentSchema,
19
24
  EmploymentTypeSchema,
25
+ GRADE_LEVELS,
20
26
  GenderSchema,
21
27
  GetByClassInputSchema,
22
28
  GetByStudentInputSchema,
23
29
  GradeLevelSchema,
30
+ GradeSchema,
24
31
  LinkGuardianInputSchema,
25
32
  ListStaffInputSchema,
26
33
  ListStudentsInputSchema,
34
+ ListTermsInputSchema,
27
35
  LoginInputSchema,
28
36
  LoginOutputSchema,
29
37
  LogoutInputSchema,
@@ -34,10 +42,11 @@ import {
34
42
  RefreshTokenOutputSchema,
35
43
  RequestPasswordResetInputSchema,
36
44
  ResetPasswordInputSchema,
37
- RoleNameSchema,
38
45
  SessionUserOutputSchema,
39
46
  SessionUserRoleSchema,
40
47
  SessionUserSubRoleSchema,
48
+ SetCurrentTermInputSchema,
49
+ SetCurrentYearInputSchema,
41
50
  SoftDeleteSchema,
42
51
  StaffListItemSchema,
43
52
  StaffProfileSchema,
@@ -50,8 +59,10 @@ import {
50
59
  TimestampsSchema,
51
60
  UuidSchema,
52
61
  paginatedOutputSchema
53
- } from "../chunk-TTAZOH4Y.js";
62
+ } from "../chunk-TBCAMVHG.js";
54
63
  export {
64
+ AcademicTermSchema,
65
+ AcademicYearSchema,
55
66
  AttendanceRecordInputSchema,
56
67
  AttendanceStatusSchema,
57
68
  BranchRefSchema,
@@ -62,20 +73,26 @@ export {
62
73
  ClassAttendanceRowSchema,
63
74
  ClassSummarySchema,
64
75
  CreateDepartmentInputSchema,
76
+ CreateGradeInputSchema,
65
77
  CreateStaffInputSchema,
66
78
  CreateStaffOutputSchema,
67
79
  CreateStudentInputSchema,
68
80
  CreateStudentOutputSchema,
81
+ CreateTermInputSchema,
82
+ CreateYearInputSchema,
69
83
  CuidSchema,
70
84
  DepartmentSchema,
71
85
  EmploymentTypeSchema,
86
+ GRADE_LEVELS,
72
87
  GenderSchema,
73
88
  GetByClassInputSchema,
74
89
  GetByStudentInputSchema,
75
90
  GradeLevelSchema,
91
+ GradeSchema,
76
92
  LinkGuardianInputSchema,
77
93
  ListStaffInputSchema,
78
94
  ListStudentsInputSchema,
95
+ ListTermsInputSchema,
79
96
  LoginInputSchema,
80
97
  LoginOutputSchema,
81
98
  LogoutInputSchema,
@@ -86,10 +103,11 @@ export {
86
103
  RefreshTokenOutputSchema,
87
104
  RequestPasswordResetInputSchema,
88
105
  ResetPasswordInputSchema,
89
- RoleNameSchema,
90
106
  SessionUserOutputSchema,
91
107
  SessionUserRoleSchema,
92
108
  SessionUserSubRoleSchema,
109
+ SetCurrentTermInputSchema,
110
+ SetCurrentYearInputSchema,
93
111
  SoftDeleteSchema,
94
112
  StaffListItemSchema,
95
113
  StaffProfileSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brite-future-schools-contracts/contracts",
3
- "version": "2.0.12",
3
+ "version": "2.0.16",
4
4
  "description": "oRPC contracts, Zod schemas, role helpers and shared TypeScript types for Brite Future Schools",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -16,15 +16,17 @@
16
16
  "dist"
17
17
  ],
18
18
  "scripts": {
19
- "build": "tsup",
19
+ "build": "pnpm test && tsup",
20
20
  "typecheck": "tsc --noEmit",
21
- "prepublishOnly": "pnpm build"
21
+ "prepublishOnly": "pnpm build",
22
+ "test": "bun test"
22
23
  },
23
24
  "dependencies": {
24
25
  "@orpc/contract": "^1.13.9",
25
26
  "zod": "^4.4.3"
26
27
  },
27
28
  "devDependencies": {
29
+ "bun-types": "^1.3.14",
28
30
  "tsup": "^8.0.0",
29
31
  "typescript": "^5.5.0"
30
32
  },
@@ -1 +0,0 @@
1
- //# sourceMappingURL=chunk-PDCM3NIB.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/schemas/base.ts","../src/schemas/auth.ts","../src/schemas/hr.ts","../src/schemas/students.ts","../src/schemas/attendance.ts"],"sourcesContent":["/**\n * Brite Future Schools — bfs-contracts\n * Base Zod schemas: reusable primitives shared across all domain schemas.\n *\n * Phase History:\n * Phase 0.1 (2026-06-05): Initial creation\n *\n * @module src/schemas/base\n * @since Phase 0.1\n */\n\nimport * as z from 'zod'\n\n// ── ID ─────────────────────────────────────────────────────────────────────────\n\nexport const CuidSchema = z\n .string()\n .regex(/^[a-z][a-z0-9]{24}$/, 'Invalid cuid2 identifier')\n .meta({ description: 'cuid2 — prefixed, collision-resistant identifier' })\n\n// ── UUID ───────────────────────────────────────────────────────────────────────\n\nexport const UuidSchema = z\n .uuidv4()\n .meta({ description: 'RFC-4122 UUID v4' })\n\n// ── Timestamps ─────────────────────────────────────────────────────────────────\n\nconst IsoDatetime = z.iso.datetime()\n\nexport const TimestampsSchema = z.object({\n createdAt: IsoDatetime.meta({ description: 'ISO-8601 creation time (UTC)' }),\n updatedAt: IsoDatetime.meta({ description: 'ISO-8601 last update time (UTC)' }),\n})\n\n// ── Soft-delete ────────────────────────────────────────────────────────────────\n\nexport const SoftDeleteSchema = z.object({\n deletedAt: IsoDatetime.nullable().meta({\n description: 'Set when the record is soft-deleted; null if active',\n }),\n})\n\n// ── Pagination ─────────────────────────────────────────────────────────────────\n\nexport const PaginationInputSchema = z.object({\n cursor: CuidSchema.optional().meta({\n description: 'Opaque cursor from the previous page response',\n }),\n limit: z\n .int()\n .min(1)\n .max(100)\n .default(20)\n .meta({ description: 'Number of items to return (1–100, default 20)' }),\n})\n\nexport function paginatedOutputSchema<T extends z.ZodTypeAny>(itemSchema: T) {\n return z.object({\n items: z.array(itemSchema),\n nextCursor: CuidSchema.nullable().meta({\n description: 'Pass as `cursor` on the next request; null when no more pages',\n }),\n total: z\n .int()\n .nonnegative()\n .meta({ description: 'Total matching records (before pagination)' }),\n })\n}\n\n// ── Branch reference ───────────────────────────────────────────────────────────\n\nexport const BranchRefSchema = z.object({\n branchId: CuidSchema.meta({ description: 'The branch this record belongs to' }),\n})\n\n// ── Inferred types ─────────────────────────────────────────────────────────────\n\nexport type Timestamps = z.infer<typeof TimestampsSchema>\nexport type SoftDelete = z.infer<typeof SoftDeleteSchema>\nexport type PaginationInput = z.infer<typeof PaginationInputSchema>","/**\n * Brite Future Schools — bfs-contracts\n * Auth-related Zod schemas.\n *\n * Phase History:\n * Phase 0.1 (2026-06-05): Initial creation\n * Phase 3 (2026-06-10): Replaced CuidSchema with z.string().uuid() per R-052\n *\n * @module src/schemas/auth\n * @since Phase 0.1\n */\n\nimport * as z from 'zod'\n\n// ── Session user (defined first — referenced by LoginOutputSchema below) ───────\n\nexport const SessionUserRoleSchema = z.object({\n id: z.string().uuid(),\n name: z.string().meta({ description: 'Role name, e.g. PRINCIPAL' }),\n branchId: z.string().uuid(),\n isPrimary: z.boolean(),\n})\n\nexport const SessionUserSubRoleSchema = z.object({\n id: z.string().uuid(),\n name: z.string().meta({ description: 'Sub-role name, e.g. HEAD_PREFECT' }),\n branchId: z.string().uuid(),\n})\n\nexport const SessionUserOutputSchema = z.object({\n id: z.string().uuid(),\n email: z.email(),\n firstName: z.string(),\n lastName: z.string(),\n activeBranchId: z.string().uuid(),\n roles: z.array(SessionUserRoleSchema),\n subRoles: z.array(SessionUserSubRoleSchema),\n isActive: z.boolean(),\n mustChangePassword: z.boolean(),\n})\n\n// ── Login ──────────────────────────────────────────────────────────────────────\n\nexport const LoginInputSchema = z.object({\n email: z.email().meta({ description: 'User email address' }),\n password: z.string().min(1).meta({ description: 'Plain-text password (sent over TLS)' }),\n branchId: z.string().uuid().optional().meta({\n description: 'Branch to activate on login; defaults to user primary branch',\n }),\n})\n\nexport const LoginOutputSchema = z.object({\n accessToken: z.string().meta({ description: 'Short-lived JWT (15 min)' }),\n refreshToken: z.string().meta({ description: 'Long-lived opaque refresh token (7 days)' }),\n expiresIn: z.int().positive().meta({ description: 'Access token TTL in seconds' }),\n user: SessionUserOutputSchema,\n})\n\n// ── Token refresh ──────────────────────────────────────────────────────────────\n\nexport const RefreshTokenInputSchema = z.object({\n refreshToken: z.string().min(1),\n})\n\nexport const RefreshTokenOutputSchema = z.object({\n accessToken: z.string(),\n expiresIn: z.int().positive(),\n})\n\n// ── Logout ─────────────────────────────────────────────────────────────────────\n\nexport const LogoutInputSchema = z.object({\n refreshToken: z.string().min(1).meta({\n description: 'The refresh token to revoke; also invalidated server-side',\n }),\n})\n\n// ── Password change ─────────────────────────────────────────────────────────────\n\nexport const ChangePasswordInputSchema = z\n .object({\n currentPassword: z.string().min(1),\n newPassword: z\n .string()\n .min(8, { error: 'Password must be at least 8 characters' }),\n confirmPassword: z.string().min(1),\n })\n .refine((v) => v.newPassword === v.confirmPassword, {\n error: 'Passwords do not match',\n path: ['confirmPassword'],\n })\n\n// ── Password reset ─────────────────────────────────────────────────────────────\n\nexport const RequestPasswordResetInputSchema = z.object({\n email: z.email(),\n})\n\nexport const ResetPasswordInputSchema = z\n .object({\n token: z.string().min(1).meta({ description: 'One-time reset token from email link' }),\n newPassword: z.string().min(8, { error: 'Password must be at least 8 characters' }),\n confirmPassword: z.string().min(1),\n })\n .refine((v) => v.newPassword === v.confirmPassword, {\n error: 'Passwords do not match',\n path: ['confirmPassword'],\n })\n\n// ── Branch switch ───────────────────────────────────────────────────────────────\n\nexport const SwitchBranchInputSchema = z.object({\n branchId: z.string().uuid().meta({ description: 'Branch to switch the active session to' }),\n})\n\n// ── Inferred types ──────────────────────────────────────────────────────────────\n\nexport type LoginInput = z.infer<typeof LoginInputSchema>\nexport type LoginOutput = z.infer<typeof LoginOutputSchema>\nexport type SessionUserOutput = z.infer<typeof SessionUserOutputSchema>\nexport type RefreshTokenInput = z.infer<typeof RefreshTokenInputSchema>\nexport type RefreshTokenOutput = z.infer<typeof RefreshTokenOutputSchema>\nexport type ChangePasswordInput = z.infer<typeof ChangePasswordInputSchema>\nexport type SwitchBranchInput = z.infer<typeof SwitchBranchInputSchema>","/**\n * Brite Future Schools — bfs-contracts\n * HR domain Zod schemas — staff creation, listing, and profiles.\n *\n * Phase History:\n * Phase 1 (2026-06-07): Initial creation — staff.create, staff.list,\n * staff.getById wire types\n *\n * @module src/schemas/hr\n * @since Phase 1\n */\n\nimport * as z from 'zod'\nimport { UuidSchema, PaginationInputSchema } from './base.js'\n\n// ── Enums ──────────────────────────────────────────────────────────────────────\n\nexport const EmploymentTypeSchema = z.enum([\n 'permanent',\n 'contract',\n 'temporary',\n 'intern',\n])\n\nexport const RoleNameSchema = z.enum([\n 'PROPRIETOR',\n 'DIRECTOR',\n 'SYSTEM_ADMIN',\n 'PRINCIPAL',\n 'DEPUTY_PRINCIPAL',\n 'HOD',\n 'CLASS_TEACHER',\n 'SUBJECT_TEACHER',\n 'BURSAR',\n 'HR_ADMIN',\n 'SCHOOL_NURSE',\n 'LIBRARIAN',\n 'LAB_TECHNICIAN',\n 'SPORTS_COACH',\n 'COUNSELLOR',\n 'CARETAKER',\n 'SECURITY',\n 'KITCHEN_STAFF',\n 'KITCHEN_MANAGER',\n 'DRIVER',\n 'IT_ADMIN',\n 'BOARDING_MASTER',\n 'PREFECT',\n 'STUDENT',\n 'PARENT',\n 'ORG_SPONSOR',\n 'INDIVIDUAL_SPONSOR',\n])\n\n// ── Create staff ───────────────────────────────────────────────────────────────\n\nexport const CreateStaffInputSchema = z.object({\n // Personal details\n firstName: z.string().min(1).max(100),\n middleName: z.string().max(100).optional(),\n lastName: z.string().min(1).max(100),\n email: z.email(),\n phone: z.string().min(9).max(30),\n nationalId: z.string().min(1).max(20),\n\n // Role assignment\n roleName: RoleNameSchema.meta({\n description: 'System role to assign — determines dashboard access and permissions',\n }),\n isPrimaryRole: z.boolean().default(true),\n\n // Employment details\n departmentId: UuidSchema.optional(),\n designation: z.string().min(1).max(100).meta({\n description: 'Job title, e.g. \"Mathematics Teacher\", \"Head of Finance\"',\n }),\n employmentType: EmploymentTypeSchema,\n contractStart: z.iso.date().meta({ description: 'ISO date, e.g. 2026-01-15' }),\n contractEnd: z.iso.date().optional(),\n\n // Payroll\n basicSalary: z.number().positive(),\n houseAllowance: z.number().nonnegative().default(0),\n transportAllowance: z.number().nonnegative().default(0),\n helbDeduction: z.number().nonnegative().default(0),\n saccoDeduction: z.number().nonnegative().default(0),\n\n // Banking\n bankName: z.string().max(100).optional(),\n bankAccount: z.string().max(30).optional(),\n bankBranch: z.string().max(100).optional(),\n\n // Statutory\n tscNumber: z.string().max(30).optional(),\n kraPin: z.string().max(20).optional(),\n nhifNo: z.string().max(20).optional(),\n nssfNo: z.string().max(20).optional(),\n})\n\nexport type CreateStaffInput = z.infer<typeof CreateStaffInputSchema>\n\n// ── Staff profile (output) ─────────────────────────────────────────────────────\n\nexport const StaffProfileSchema = z.object({\n // Staff record\n id: UuidSchema,\n userId: UuidSchema,\n branchId: UuidSchema,\n firstName: z.string(),\n middleName: z.string().nullable(),\n lastName: z.string(),\n phone: z.string(),\n nationalId: z.string(),\n tscNumber: z.string().nullable(),\n kraPin: z.string().nullable(),\n nhifNo: z.string().nullable(),\n nssfNo: z.string().nullable(),\n designation: z.string(),\n employmentType: EmploymentTypeSchema,\n contractStart: z.string(),\n contractEnd: z.string().nullable(),\n basicSalary: z.string(),\n houseAllowance: z.string(),\n transportAllowance: z.string(),\n helbDeduction: z.string().nullable(),\n saccoDeduction: z.string().nullable(),\n bankName: z.string().nullable(),\n bankAccount: z.string().nullable(),\n bankBranch: z.string().nullable(),\n status: z.string(),\n createdAt: z.string(),\n\n // From users join\n email: z.string(),\n mustChangePassword: z.boolean(),\n\n // Department (nullable — not all staff are in a department)\n departmentId: UuidSchema.nullable(),\n departmentName: z.string().nullable(),\n\n // Primary role\n roleName: RoleNameSchema.nullable(),\n roleId: UuidSchema.nullable(),\n})\n\nexport type StaffProfile = z.infer<typeof StaffProfileSchema>\n\n// ── Staff list item (lighter than full profile) ────────────────────────────────\n\nexport const StaffListItemSchema = z.object({\n id: UuidSchema,\n userId: UuidSchema,\n firstName: z.string(),\n middleName: z.string().nullable(),\n lastName: z.string(),\n email: z.string(),\n phone: z.string(),\n designation: z.string(),\n employmentType: EmploymentTypeSchema,\n status: z.string(),\n departmentName: z.string().nullable(),\n roleName: RoleNameSchema.nullable(),\n createdAt: z.string(),\n})\n\nexport type StaffListItem = z.infer<typeof StaffListItemSchema>\n\n// ── List staff input ───────────────────────────────────────────────────────────\n\nexport const ListStaffInputSchema = PaginationInputSchema.extend({\n search: z.string().optional().meta({\n description: 'Search by name or email',\n }),\n departmentId: UuidSchema.optional(),\n roleName: RoleNameSchema.optional(),\n status: z.enum(['active', 'inactive']).optional(),\n})\n\nexport type ListStaffInput = z.infer<typeof ListStaffInputSchema>\n\n// ── Create staff output ────────────────────────────────────────────────────────\n\nexport const CreateStaffOutputSchema = z.object({\n staffId: UuidSchema,\n userId: UuidSchema,\n email: z.string(),\n /** Temp password was emailed — not returned in response for security */\n emailSent: z.boolean(),\n})\n\nexport type CreateStaffOutput = z.infer<typeof CreateStaffOutputSchema>\n\n// ── Department ─────────────────────────────────────────────────────────────────\n\nexport const DepartmentSchema = z.object({\n id: UuidSchema,\n branchId: UuidSchema,\n name: z.string(),\n hodId: UuidSchema.nullable(),\n})\n\nexport type Department = z.infer<typeof DepartmentSchema>\n\nexport const CreateDepartmentInputSchema = z.object({\n name: z.string().min(1).max(100),\n hodId: UuidSchema.optional(),\n})\n\nexport type CreateDepartmentInput = z.infer<typeof CreateDepartmentInputSchema>","/**\n * Brite Future Schools — bfs-contracts\n * Students domain Zod schemas.\n *\n * Phase History:\n * Phase 1 (2026-06-07): Initial creation — student create, list,\n * bulk upload, guardian linkage\n *\n * @module src/schemas/students\n * @since Phase 1\n */\n\nimport * as z from 'zod'\nimport { UuidSchema, PaginationInputSchema } from './base.js'\n\n// ── Enums ──────────────────────────────────────────────────────────────────────\n\nexport const GenderSchema = z.enum(['male', 'female'])\n\nexport const StudentStatusSchema = z.enum([\n 'active',\n 'transferred',\n 'graduated',\n 'suspended',\n 'withdrawn',\n])\n\nexport const GradeLevelSchema = z.enum([\n 'PP1', 'PP2',\n 'G1', 'G2', 'G3', 'G4', 'G5', 'G6', 'G7', 'G8', 'G9',\n])\n\n// ── Create single student ──────────────────────────────────────────────────────\n\nexport const CreateStudentInputSchema = z.object({\n // Identity\n firstName: z.string().min(1).max(100),\n middleName: z.string().max(100).optional(),\n lastName: z.string().min(1).max(100),\n dateOfBirth: z.iso.date().meta({ description: 'ISO date, e.g. 2015-03-22' }),\n gender: GenderSchema,\n admissionNo: z.string().min(1).max(50).meta({\n description: 'School-assigned admission number — must be unique per branch',\n }),\n nemisNo: z.string().max(50).optional(),\n admissionDate: z.iso.date(),\n bloodGroup: z.string().max(10).optional(),\n medicalNotes: z.string().optional(),\n\n // Class placement (optional at creation — can be enrolled later)\n classId: UuidSchema.optional().meta({\n description: 'Class to enrol student in for the current term',\n }),\n termId: UuidSchema.optional().meta({\n description: 'Term for class enrolment — required if classId is provided',\n }),\n\n // Guardian (optional at creation — can be linked later)\n guardian: z.object({\n firstName: z.string().min(1).max(100),\n middleName: z.string().max(100).optional(),\n lastName: z.string().min(1).max(100),\n relationship: z.string().min(1).max(50).meta({\n description: 'e.g. mother, father, uncle, guardian',\n }),\n phone: z.string().min(9).max(30),\n email: z.email().optional(),\n nationalId: z.string().max(20).optional(),\n occupation: z.string().max(100).optional(),\n }).optional(),\n})\n\nexport type CreateStudentInput = z.infer<typeof CreateStudentInputSchema>\n\n// ── Student profile (output) ───────────────────────────────────────────────────\n\nexport const StudentProfileSchema = z.object({\n id: UuidSchema,\n branchId: UuidSchema,\n admissionNo: z.string(),\n nemisNo: z.string().nullable(),\n firstName: z.string(),\n middleName: z.string().nullable(),\n lastName: z.string(),\n dateOfBirth: z.string(),\n gender: GenderSchema,\n photoUrl: z.string().nullable(),\n bloodGroup: z.string().nullable(),\n medicalNotes: z.string().nullable(),\n admissionDate: z.string(),\n status: StudentStatusSchema,\n createdAt: z.string(),\n\n // Current class (from latest enrollment)\n currentClass: z.object({\n classId: UuidSchema,\n className: z.string(),\n gradeLevel: GradeLevelSchema,\n termId: UuidSchema,\n termName: z.string(),\n }).nullable(),\n\n // Guardians\n guardians: z.array(z.object({\n id: UuidSchema,\n firstName: z.string(),\n middleName: z.string().nullable(),\n lastName: z.string(),\n relationship: z.string(),\n phone: z.string(),\n email: z.string().nullable(),\n isPrimary: z.boolean(),\n })),\n})\n\nexport type StudentProfile = z.infer<typeof StudentProfileSchema>\n\n// ── Student list item ──────────────────────────────────────────────────────────\n\nexport const StudentListItemSchema = z.object({\n id: UuidSchema,\n admissionNo: z.string(),\n firstName: z.string(),\n middleName: z.string().nullable(),\n lastName: z.string(),\n gender: GenderSchema,\n status: StudentStatusSchema,\n className: z.string().nullable(),\n gradeLevel: GradeLevelSchema.nullable(),\n primaryGuardianName: z.string().nullable(),\n primaryGuardianPhone: z.string().nullable(),\n createdAt: z.string(),\n})\n\nexport type StudentListItem = z.infer<typeof StudentListItemSchema>\n\n// ── List students input ────────────────────────────────────────────────────────\n\nexport const ListStudentsInputSchema = PaginationInputSchema.extend({\n search: z.string().optional().meta({\n description: 'Search by name or admission number',\n }),\n classId: UuidSchema.optional(),\n gradeLevel: GradeLevelSchema.optional(),\n status: StudentStatusSchema.optional(),\n termId: UuidSchema.optional(),\n})\n\nexport type ListStudentsInput = z.infer<typeof ListStudentsInputSchema>\n\n// ── Bulk upload ────────────────────────────────────────────────────────────────\n\n/**\n * One row from a CSV bulk upload.\n * Column mapping is flexible — the upload endpoint accepts this shape\n * after the CSV parser maps headers to these field names.\n */\nexport const BulkUploadStudentRowSchema = z.object({\n firstName: z.string().min(1),\n middleName: z.string().optional(),\n lastName: z.string().min(1),\n dateOfBirth: z.string().min(1).meta({ description: 'Any parseable date string' }),\n gender: z.string().min(1).meta({ description: 'male | female (case-insensitive)' }),\n admissionNo: z.string().min(1),\n nemisNo: z.string().optional(),\n admissionDate: z.string().optional(),\n bloodGroup: z.string().optional(),\n\n // Guardian columns (all optional in CSV)\n guardianFirstName: z.string().optional(),\n guardianLastName: z.string().optional(),\n guardianRelationship: z.string().optional(),\n guardianPhone: z.string().optional(),\n guardianEmail: z.string().optional(),\n})\n\nexport type BulkUploadStudentRow = z.infer<typeof BulkUploadStudentRowSchema>\n\nexport const BulkUploadStudentsInputSchema = z.object({\n classId: UuidSchema.meta({\n description: 'Class to enrol all uploaded students into',\n }),\n termId: UuidSchema,\n rows: z.array(BulkUploadStudentRowSchema).min(1).max(500),\n})\n\nexport type BulkUploadStudentsInput = z.infer<typeof BulkUploadStudentsInputSchema>\n\nexport const BulkUploadStudentsOutputSchema = z.object({\n created: z.int().nonnegative(),\n skipped: z.int().nonnegative(),\n errors: z.array(z.object({\n row: z.int().positive(),\n admissionNo: z.string().optional(),\n reason: z.string(),\n })),\n})\n\nexport type BulkUploadStudentsOutput = z.infer<typeof BulkUploadStudentsOutputSchema>\n\n// ── Create student output ──────────────────────────────────────────────────────\n\nexport const CreateStudentOutputSchema = z.object({\n studentId: UuidSchema,\n admissionNo: z.string(),\n})\n\nexport type CreateStudentOutput = z.infer<typeof CreateStudentOutputSchema>\n\n// ── Link guardian ──────────────────────────────────────────────────────────────\n\nexport const LinkGuardianInputSchema = z.object({\n studentId: UuidSchema,\n firstName: z.string().min(1).max(100),\n middleName: z.string().max(100).optional(),\n lastName: z.string().min(1).max(100),\n relationship: z.string().min(1).max(50),\n phone: z.string().min(9).max(30),\n email: z.email().optional(),\n nationalId: z.string().max(20).optional(),\n occupation: z.string().max(100).optional(),\n isPrimary: z.boolean().default(false),\n})\n\nexport type LinkGuardianInput = z.infer<typeof LinkGuardianInputSchema>\n\n// ── Classes (for selectors) ────────────────────────────────────────────────────\n\nexport const ClassSummarySchema = z.object({\n id: UuidSchema,\n name: z.string(),\n gradeLevel: GradeLevelSchema,\n gradeName: z.string(),\n capacity: z.number().nullable(),\n enrolledCount: z.number(),\n classTeacherId: UuidSchema.nullable(),\n})\n\nexport type ClassSummary = z.infer<typeof ClassSummarySchema>","/**\n * Brite Future Schools — bfs-contracts\n * Attendance domain Zod schemas.\n *\n * Phase History:\n * Phase 2.1 (2026-06-08): Initial — class attendance mark, getByClass,\n * getByStudent, listTerms\n *\n * @module src/schemas/attendance\n * @since Phase 2.1\n */\n\nimport * as z from 'zod'\nimport { UuidSchema } from './base.js'\n\n// ── Enums ──────────────────────────────────────────────────────────────────────\n\nexport const AttendanceStatusSchema = z.enum([\n 'present',\n 'absent',\n 'late',\n 'excused',\n])\n\nexport type AttendanceStatusEnum = z.infer<typeof AttendanceStatusSchema>\n\n// ── Term ───────────────────────────────────────────────────────────────────────\n\nexport const TermSchema = z.object({\n id: UuidSchema,\n branchId: UuidSchema,\n academicYearId: UuidSchema,\n name: z.string(),\n startDate: z.string(),\n endDate: z.string(),\n isCurrent: z.boolean(),\n})\n\nexport type Term = z.infer<typeof TermSchema>\n\n// ── Mark attendance ────────────────────────────────────────────────────────────\n\nexport const AttendanceRecordInputSchema = z.object({\n studentId: UuidSchema,\n status: AttendanceStatusSchema,\n notes: z.string().max(500).optional(),\n})\n\nexport const MarkAttendanceInputSchema = z.object({\n classId: UuidSchema,\n termId: UuidSchema,\n date: z.iso.date(),\n records: z.array(AttendanceRecordInputSchema).min(1),\n})\n\nexport type MarkAttendanceInput = z.infer<typeof MarkAttendanceInputSchema>\n\nexport const MarkAttendanceOutputSchema = z.object({\n count: z.number(),\n date: z.string(),\n classId: UuidSchema,\n})\n\nexport type MarkAttendanceOutput = z.infer<typeof MarkAttendanceOutputSchema>\n\n// ── Get by class ───────────────────────────────────────────────────────────────\n\nexport const GetByClassInputSchema = z.object({\n classId: UuidSchema,\n date: z.iso.date(),\n})\n\nexport type GetByClassInput = z.infer<typeof GetByClassInputSchema>\n\nexport const ClassAttendanceRowSchema = z.object({\n id: UuidSchema,\n studentId: UuidSchema,\n firstName: z.string(),\n middleName: z.string().nullable(),\n lastName: z.string(),\n admissionNo: z.string(),\n status: AttendanceStatusSchema,\n notes: z.string().nullable(),\n markedBy: UuidSchema,\n updatedAt: z.string(),\n})\n\nexport type ClassAttendanceRow = z.infer<typeof ClassAttendanceRowSchema>\n\n// ── Get by student ─────────────────────────────────────────────────────────────\n\nexport const GetByStudentInputSchema = z.object({\n studentId: UuidSchema,\n termId: UuidSchema,\n})\n\nexport type GetByStudentInput = z.infer<typeof GetByStudentInputSchema>\n\nexport const StudentAttendanceRowSchema = z.object({\n id: UuidSchema,\n date: z.string(),\n status: AttendanceStatusSchema,\n notes: z.string().nullable(),\n classId: UuidSchema,\n className: z.string(),\n})\n\nexport type StudentAttendanceRow = z.infer<typeof StudentAttendanceRowSchema>"],"mappings":";AAWA,YAAY,OAAO;AAIZ,IAAM,aACR,SAAO,EACP,MAAM,uBAAuB,0BAA0B,EACvD,KAAK,EAAE,aAAa,wDAAmD,CAAC;AAItE,IAAM,aACR,SAAO,EACP,KAAK,EAAE,aAAa,mBAAmB,CAAC;AAI7C,IAAM,cAAgB,MAAI,SAAS;AAE5B,IAAM,mBAAqB,SAAO;AAAA,EACrC,WAAW,YAAY,KAAK,EAAE,aAAa,+BAA+B,CAAC;AAAA,EAC3E,WAAW,YAAY,KAAK,EAAE,aAAa,kCAAkC,CAAC;AAClF,CAAC;AAIM,IAAM,mBAAqB,SAAO;AAAA,EACrC,WAAW,YAAY,SAAS,EAAE,KAAK;AAAA,IACnC,aAAa;AAAA,EACjB,CAAC;AACL,CAAC;AAIM,IAAM,wBAA0B,SAAO;AAAA,EAC1C,QAAQ,WAAW,SAAS,EAAE,KAAK;AAAA,IAC/B,aAAa;AAAA,EACjB,CAAC;AAAA,EACD,OACK,MAAI,EACJ,IAAI,CAAC,EACL,IAAI,GAAG,EACP,QAAQ,EAAE,EACV,KAAK,EAAE,aAAa,qDAAgD,CAAC;AAC9E,CAAC;AAEM,SAAS,sBAA8C,YAAe;AACzE,SAAS,SAAO;AAAA,IACZ,OAAS,QAAM,UAAU;AAAA,IACzB,YAAY,WAAW,SAAS,EAAE,KAAK;AAAA,MACnC,aAAa;AAAA,IACjB,CAAC;AAAA,IACD,OACK,MAAI,EACJ,YAAY,EACZ,KAAK,EAAE,aAAa,6CAA6C,CAAC;AAAA,EAC3E,CAAC;AACL;AAIO,IAAM,kBAAoB,SAAO;AAAA,EACpC,UAAU,WAAW,KA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AO,EAAE,SAAS;AAAA,EAChC,UAAY,UAAO;AAAA,EACnB,aAAe,UAAO;AAAA,EACtB,QAAQ;AAAA,EACR,OAAS,UAAO,EAAE,SAAS;AAAA,EAC3B,UAAU;AAAA,EACV,WAAa,UAAO;AACxB,CAAC;AAMM,IAAM,0BAA4B,UAAO;AAAA,EAC5C,WAAW;AAAA,EACX,QAAQ;AACZ,CAAC;AAIM,IAAM,6BAA+B,UAAO;AAAA,EAC/C,IAAI;AAAA,EACJ,MAAQ,UAAO;AAAA,EACf,QAAQ;AAAA,EACR,OAAS,UAAO,EAAE,SAAS;AAAA,EAC3B,SAAS;AAAA,EACT,WAAa,UAAO;AACxB,CAAC;","names":["z","z","z","z"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/contracts/auth.ts","../src/contracts/hr.ts","../src/contracts/students.ts","../src/contracts/attendance.ts"],"sourcesContent":["/**\n * Brite Future Schools — bfs-contracts\n * Auth oRPC contract.\n *\n * Defines the API surface for authentication. The bfs-api module\n * imports this and passes it to `implement()` — no logic lives here.\n *\n * HTTP method + path pairs follow REST conventions and feed into the\n * OpenAPI spec that oRPC generates automatically.\n *\n * Phase History:\n * Phase 0.1 (2026-06-05): Initial creation\n *\n * @module src/contracts/auth\n * @since Phase 0.1\n */\n\nimport { oc } from '@orpc/contract'\nimport * as z from 'zod'\nimport {\n ChangePasswordInputSchema,\n LoginInputSchema,\n LoginOutputSchema,\n LogoutInputSchema,\n RefreshTokenInputSchema,\n RefreshTokenOutputSchema,\n RequestPasswordResetInputSchema,\n ResetPasswordInputSchema,\n SessionUserOutputSchema,\n SwitchBranchInputSchema,\n} from '../schemas/auth.js'\n\n/** Reusable empty-success output — used by mutations that return nothing */\nconst EmptyOutputSchema = z.object({}).meta({ description: 'Empty success response' })\n\n// ── Individual procedure contracts ────────────────────────────────────────────\n\n/** Exchange email + password for access/refresh token pair */\nexport const loginContract = oc\n .route({ method: 'POST', path: '/auth/login' })\n .input(LoginInputSchema)\n .output(LoginOutputSchema)\n\n/** Exchange a refresh token for a new access token */\nexport const refreshTokenContract = oc\n .route({ method: 'POST', path: '/auth/refresh' })\n .input(RefreshTokenInputSchema)\n .output(RefreshTokenOutputSchema)\n\n/** Revoke the current refresh token and end the session */\nexport const logoutContract = oc\n .route({ method: 'POST', path: '/auth/logout' })\n .input(LogoutInputSchema)\n .output(EmptyOutputSchema)\n\n/** Return the session user object for the current access token */\nexport const getMeContract = oc\n .route({ method: 'GET', path: '/auth/me' })\n .output(SessionUserOutputSchema)\n\n/** Change password (authenticated, requires current password) */\nexport const changePasswordContract = oc\n .route({ method: 'POST', path: '/auth/change-password' })\n .input(ChangePasswordInputSchema)\n .output(EmptyOutputSchema)\n\n/** Request a password-reset email */\nexport const requestPasswordResetContract = oc\n .route({ method: 'POST', path: '/auth/request-password-reset' })\n .input(RequestPasswordResetInputSchema)\n .output(EmptyOutputSchema)\n\n/** Complete a password reset using the emailed one-time token */\nexport const resetPasswordContract = oc\n .route({ method: 'POST', path: '/auth/reset-password' })\n .input(ResetPasswordInputSchema)\n .output(EmptyOutputSchema)\n\n/** Switch the active branch within an existing session */\nexport const switchBranchContract = oc\n .route({ method: 'POST', path: '/auth/switch-branch' })\n .input(SwitchBranchInputSchema)\n .output(SessionUserOutputSchema)\n\n// ── Auth contract router ──────────────────────────────────────────────────────\n\nexport const authContract = {\n login: loginContract,\n refreshToken: refreshTokenContract,\n logout: logoutContract,\n me: getMeContract,\n changePassword: changePasswordContract,\n requestPasswordReset: requestPasswordResetContract,\n resetPassword: resetPasswordContract,\n switchBranch: switchBranchContract,\n}\n","/**\n * Brite Future Schools — bfs-contracts\n * HR oRPC contract — staff and department procedure definitions.\n *\n * Phase History:\n * Phase 1 (2026-06-07): Initial creation\n *\n * @module src/contracts/hr\n * @since Phase 1\n */\n\nimport { oc } from '@orpc/contract'\nimport * as z from 'zod'\nimport { UuidSchema, PaginationInputSchema } from '../schemas/base.js'\nimport {\n CreateStaffInputSchema,\n CreateStaffOutputSchema,\n StaffProfileSchema,\n StaffListItemSchema,\n ListStaffInputSchema,\n DepartmentSchema,\n CreateDepartmentInputSchema,\n} from '../schemas/hr.js'\n\nconst EmptyOutput = z.object({})\n\n// ── Staff ──────────────────────────────────────────────────────────────────────\n\nexport const createStaffContract = oc\n .route({ method: 'POST', path: '/hr/staff' })\n .input(CreateStaffInputSchema)\n .output(CreateStaffOutputSchema)\n\nexport const listStaffContract = oc\n .route({ method: 'GET', path: '/hr/staff' })\n .input(ListStaffInputSchema)\n .output(z.object({\n items: z.array(StaffListItemSchema),\n total: z.number(),\n nextCursor: UuidSchema.nullable(),\n }))\n\nexport const getStaffByIdContract = oc\n .route({ method: 'GET', path: '/hr/staff/{id}' })\n .input(z.object({ id: UuidSchema }))\n .output(StaffProfileSchema)\n\nexport const updateStaffStatusContract = oc\n .route({ method: 'PATCH', path: '/hr/staff/{id}/status' })\n .input(z.object({\n id: UuidSchema,\n status: z.enum(['active', 'inactive', 'suspended']),\n }))\n .output(EmptyOutput)\n\n// ── Departments ────────────────────────────────────────────────────────────────\n\nexport const listDepartmentsContract = oc\n .route({ method: 'GET', path: '/hr/departments' })\n .input(z.object({ branchId: UuidSchema.optional() }))\n .output(z.array(DepartmentSchema))\n\nexport const createDepartmentContract = oc\n .route({ method: 'POST', path: '/hr/departments' })\n .input(CreateDepartmentInputSchema)\n .output(DepartmentSchema)\n\n// ── HR contract router ─────────────────────────────────────────────────────────\n\nexport const hrContract = {\n createStaff: createStaffContract,\n listStaff: listStaffContract,\n getStaffById: getStaffByIdContract,\n updateStaffStatus: updateStaffStatusContract,\n listDepartments: listDepartmentsContract,\n createDepartment: createDepartmentContract,\n}","/**\n * Brite Future Schools — bfs-contracts\n * Students oRPC contract — student and guardian procedure definitions.\n *\n * Phase History:\n * Phase 1 (2026-06-07): Initial creation\n *\n * @module src/contracts/students\n * @since Phase 1\n */\n\nimport { oc } from '@orpc/contract'\nimport * as z from 'zod'\nimport { UuidSchema } from '../schemas/base.js'\nimport {\n CreateStudentInputSchema,\n CreateStudentOutputSchema,\n StudentProfileSchema,\n StudentListItemSchema,\n ListStudentsInputSchema,\n BulkUploadStudentsInputSchema,\n BulkUploadStudentsOutputSchema,\n LinkGuardianInputSchema,\n ClassSummarySchema,\n} from '../schemas/students.js'\n\nconst EmptyOutput = z.object({})\n\n// ── Students ───────────────────────────────────────────────────────────────────\n\nexport const createStudentContract = oc\n .route({ method: 'POST', path: '/students' })\n .input(CreateStudentInputSchema)\n .output(CreateStudentOutputSchema)\n\nexport const bulkUploadStudentsContract = oc\n .route({ method: 'POST', path: '/students/bulk' })\n .input(BulkUploadStudentsInputSchema)\n .output(BulkUploadStudentsOutputSchema)\n\nexport const listStudentsContract = oc\n .route({ method: 'GET', path: '/students' })\n .input(ListStudentsInputSchema)\n .output(z.object({\n items: z.array(StudentListItemSchema),\n total: z.number(),\n nextCursor: UuidSchema.nullable(),\n }))\n\nexport const getStudentByIdContract = oc\n .route({ method: 'GET', path: '/students/{id}' })\n .input(z.object({ id: UuidSchema }))\n .output(StudentProfileSchema)\n\n// ── Guardians ──────────────────────────────────────────────────────────────────\n\nexport const linkGuardianContract = oc\n .route({ method: 'POST', path: '/students/guardians' })\n .input(LinkGuardianInputSchema)\n .output(z.object({ guardianId: UuidSchema }))\n\n// ── Classes (selector data) ────────────────────────────────────────────────────\n\nexport const listClassesContract = oc\n .route({ method: 'GET', path: '/students/classes' })\n .input(z.object({\n termId: UuidSchema.optional(),\n gradeLevel: z.string().optional(),\n }))\n .output(z.array(ClassSummarySchema))\n\n// ── Students contract router ───────────────────────────────────────────────────\n\nexport const studentsContract = {\n create: createStudentContract,\n bulkUpload: bulkUploadStudentsContract,\n list: listStudentsContract,\n getById: getStudentByIdContract,\n linkGuardian: linkGuardianContract,\n listClasses: listClassesContract,\n}","/**\n * Brite Future Schools — bfs-contracts\n * Attendance oRPC contract — class attendance procedure definitions.\n *\n * Phase History:\n * Phase 2.1 (2026-06-08): Initial — mark, getByClass, getByStudent, listTerms\n *\n * @module src/contracts/attendance\n * @since Phase 2.1\n */\n\nimport { oc } from '@orpc/contract'\nimport * as z from 'zod'\nimport { UuidSchema } from '../schemas/base.js'\nimport {\n MarkAttendanceInputSchema,\n MarkAttendanceOutputSchema,\n GetByClassInputSchema,\n GetByStudentInputSchema,\n ClassAttendanceRowSchema,\n StudentAttendanceRowSchema,\n TermSchema,\n} from '../schemas/attendance.js'\n\n// ── Class attendance ───────────────────────────────────────────────────────────\n\nexport const markAttendanceContract = oc\n .route({ method: 'POST', path: '/attendance/class/mark' })\n .input(MarkAttendanceInputSchema)\n .output(MarkAttendanceOutputSchema)\n\nexport const getByClassContract = oc\n .route({ method: 'GET', path: '/attendance/class' })\n .input(GetByClassInputSchema)\n .output(z.array(ClassAttendanceRowSchema))\n\nexport const getByStudentContract = oc\n .route({ method: 'GET', path: '/attendance/student' })\n .input(GetByStudentInputSchema)\n .output(z.array(StudentAttendanceRowSchema))\n\n// ── Terms ──────────────────────────────────────────────────────────────────────\n\nexport const listTermsContract = oc\n .route({ method: 'GET', path: '/terms' })\n .input(z.object({}))\n .output(z.array(TermSchema))\n\n// ── Attendance contract router ─────────────────────────────────────────────────\n\nexport const attendanceContract = {\n mark: markAttendanceContract,\n getByClass: getByClassContract,\n getByStudent: getByStudentContract,\n listTerms: listTermsContract,\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,SAAS,UAAU;AACnB,YAAY,OAAO;AAenB,IAAM,oBAAsB,SAAO,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,yBAAyB,CAAC;AAK9E,IAAM,gBAAgB,GAC1B,MAAM,EAAE,QAAQ,QAAQ,MAAM,cAAc,CAAC,EAC7C,MAAM,gBAAgB,EACtB,OAAO,iBAAiB;AAGpB,IAAM,uBAAuB,GACjC,MAAM,EAAE,QAAQ,QAAQ,MAAM,gBAAgB,CAAC,EAC/C,MAAM,uBAAuB,EAC7B,OAAO,wBAAwB;AAG3B,IAAM,iBAAiB,GAC3B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