@brite-future-schools-contracts/contracts 2.0.30 → 2.0.32

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.
@@ -74,7 +74,7 @@ import {
74
74
  UpdateBankAccountInputSchema,
75
75
  UpdateDiaryCategoryInputSchema,
76
76
  UuidSchema
77
- } from "./chunk-WGPI4GGP.js";
77
+ } from "./chunk-7AJ4LRST.js";
78
78
 
79
79
  // src/contracts/auth.ts
80
80
  import { oc } from "@orpc/contract";
@@ -371,4 +371,4 @@ export {
371
371
  respondToBlockContract,
372
372
  blocksContract
373
373
  };
374
- //# sourceMappingURL=chunk-LIPNVYGK.js.map
374
+ //# sourceMappingURL=chunk-2B5AQI2I.js.map
@@ -589,7 +589,11 @@ var CreateNotificationInputSchema = z8.object({
589
589
  redirectParams: z8.record(z8.string(), z8.string()).optional(),
590
590
  requiresResponse: z8.boolean().optional(),
591
591
  responseOptions: z8.array(z8.string()).optional(),
592
- deliveryChannels: z8.array(NotificationChannelSchema).optional(),
592
+ // Deliberately narrower than NotificationChannelSchema (excludes
593
+ // 'push') — matches the router's original inline restriction and
594
+ // NotificationsService's Channel type; 'push' exists in the DB enum
595
+ // but isn't yet wired end-to-end for template creation.
596
+ deliveryChannels: z8.array(z8.enum(["in_app", "sms", "email"])).optional(),
593
597
  scheduledAt: z8.string().datetime().optional(),
594
598
  recurrence: z8.record(z8.string(), z8.unknown()).optional(),
595
599
  audience: z8.array(NotificationAudienceItemSchema)
@@ -937,4 +941,4 @@ export {
937
941
  GradeSchema,
938
942
  CreateGradeInputSchema
939
943
  };
940
- //# sourceMappingURL=chunk-WGPI4GGP.js.map
944
+ //# sourceMappingURL=chunk-7AJ4LRST.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/schemas/base.ts","../src/schemas/auth.ts","../src/schemas/hr.ts","../src/schemas/students.ts","../src/schemas/attendance.ts","../src/schemas/calendar.ts","../src/schemas/banking.ts","../src/schemas/notifications.ts","../src/schemas/diary.ts","../src/schemas/grades.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: z.string().optional().meta({\n description: 'Opaque cursor from the previous page response',\n }),\n limit: z\n .int()\n .min(1)\n .max(200)\n .default(20)\n .meta({ description: 'Number of items to return (1–200, default 20)' }),\n})\n\nexport function paginatedOutputSchema<T extends z.ZodTypeAny>(itemSchema: T) {\n return z.object({\n items: z.array(itemSchema),\n nextCursor: z.string().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. HEAD_TEACHER' }),\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\n * Phase 4.2 (2026-06-13): Removed hardcoded RoleNameSchema — role is now\n * a plain string (DB-driven). Removed salary fields\n * from CreateStaffInput — remuneration module owns\n * salary. Added helbNo, saccoNo statutory fields.\n * Updated StaffProfile to remove salary columns.\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\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 — DB-driven, any valid role code accepted\n roleName: z.string().min(1).meta({\n description: 'Role code from the roles table — e.g. TEACHER, HEAD_TEACHER',\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 // Banking (optional at creation — can be completed later)\n bankName: z.string().max(100).optional(),\n bankAccount: z.string().max(30).optional(),\n bankBranch: z.string().max(100).optional(),\n\n // Statutory (optional at creation)\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 helbNo: z.string().max(20).optional(),\n saccoNo: 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 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 helbNo: z.string().nullable(),\n saccoNo: z.string().nullable(),\n designation: z.string(),\n employmentType: EmploymentTypeSchema,\n contractStart: z.string(),\n contractEnd: 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 email: z.string(),\n mustChangePassword: z.boolean(),\n departmentId: UuidSchema.nullable(),\n departmentName: z.string().nullable(),\n // Role — DB-driven code string, not a fixed enum\n roleName: z.string().nullable(),\n roleId: UuidSchema.nullable(),\n})\n\nexport type StaffProfile = z.infer<typeof StaffProfileSchema>\n\n// ── Staff list item ────────────────────────────────────────────────────────────\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: z.string().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: z.string().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 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().max(50).optional().meta({\n description: 'School-assigned admission number — auto-generated if not provided',\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>","/**\n * Brite Future Schools — bfs-contracts\n * Calendar schemas — academic years and terms.\n *\n * Phase History:\n * Phase 4.1 (2026-06-12): Initial creation\n *\n * @module src/schemas/calendar\n * @since Phase 4.1\n */\n\nimport * as z from 'zod'\n\n// ── Academic Year ──────────────────────────────────────────────────────────────\n\nexport const AcademicYearSchema = z.object({\n id: z.string().uuid(),\n branchId: z.string().uuid(),\n name: z.string(),\n startDate: z.string(),\n endDate: z.string(),\n isCurrent: z.boolean(),\n createdAt: z.string(),\n})\n\nexport const CreateYearInputSchema = z.object({\n name: z.string().min(1).max(50),\n startDate: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/, 'Must be YYYY-MM-DD'),\n endDate: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/, 'Must be YYYY-MM-DD'),\n})\n\nexport const SetCurrentYearInputSchema = z.object({\n yearId: z.string().uuid(),\n})\n\n// ── Academic Term ──────────────────────────────────────────────────────────────\n// Prefixed with \"Academic\" to avoid clash with attendance.ts TermSchema / Term\n\nexport const AcademicTermSchema = z.object({\n id: z.string().uuid(),\n branchId: z.string().uuid(),\n academicYearId: z.string().uuid(),\n name: z.string(),\n startDate: z.string(),\n endDate: z.string(),\n isCurrent: z.boolean(),\n createdAt: z.string(),\n})\n\nexport const CreateTermInputSchema = z.object({\n academicYearId: z.string().uuid(),\n name: z.string().min(1).max(50),\n startDate: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/, 'Must be YYYY-MM-DD'),\n endDate: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/, 'Must be YYYY-MM-DD'),\n})\n\nexport const SetCurrentTermInputSchema = z.object({\n termId: z.string().uuid(),\n})\n\nexport const ListTermsInputSchema = z.object({\n yearId: z.string().uuid().optional(),\n})\n\n// ── Inferred types ─────────────────────────────────────────────────────────────\n\nexport type AcademicYear = z.infer<typeof AcademicYearSchema>\nexport type AcademicTerm = z.infer<typeof AcademicTermSchema>\nexport type CreateYearInput = z.infer<typeof CreateYearInputSchema>\nexport type CreateTermInput = z.infer<typeof CreateTermInputSchema>","/**\n * Brite Future Schools — bfs-contracts\n * Banking schemas — branch bank account Zod shapes.\n *\n * Phase History:\n * Phase 8 (2026-07-20): Initial creation — Module 1 (Branch Banking)\n *\n * @module src/schemas/banking\n * @since Phase 8\n */\n\nimport * as z from 'zod'\nimport { UuidSchema } from './base.js'\n\n// ── Enums ──────────────────────────────────────────────────────────────────────\n\nexport const BankAccountTypeSchema = z.enum(['current', 'savings'])\n\n// ── Bank account (output) ───────────────────────────────────────────────────────\n\nexport const BranchBankAccountSchema = z.object({\n id: UuidSchema,\n branchId: UuidSchema,\n bankName: z.string(),\n bankCode: z.string().nullable(),\n bankBranchName: z.string().nullable(),\n accountNumber: z.string(),\n accountName: z.string(),\n accountType: BankAccountTypeSchema,\n currency: z.string(),\n isDefault: z.boolean(),\n isActive: z.boolean(),\n reconciliationContactId: UuidSchema.nullable(),\n notes: z.string().nullable(),\n createdAt: z.string(),\n updatedAt: z.string(),\n})\n\n// ── banking.create ───────────────────────────────────────────────────────────\n\nexport const CreateBankAccountInputSchema = z.object({\n branchId: UuidSchema,\n bankName: z.string().min(1).max(100),\n bankCode: z.string().max(10).optional(),\n bankBranchName: z.string().max(100).optional(),\n accountNumber: z.string().min(1).max(30),\n accountName: z.string().min(1).max(200),\n accountType: BankAccountTypeSchema,\n currency: z.string().length(3).optional(),\n isDefault: z.boolean().optional(),\n reconciliationContactId: UuidSchema.optional(),\n notes: z.string().optional(),\n})\n\nexport type CreateBankAccountInput = z.infer<typeof CreateBankAccountInputSchema>\n\n// ── banking.update ───────────────────────────────────────────────────────────\n\nexport const UpdateBankAccountInputSchema = z.object({\n id: UuidSchema,\n bankName: z.string().min(1).max(100).optional(),\n bankCode: z.string().max(10).optional(),\n bankBranchName: z.string().max(100).optional(),\n accountNumber: z.string().min(1).max(30).optional(),\n accountName: z.string().min(1).max(200).optional(),\n accountType: BankAccountTypeSchema.optional(),\n currency: z.string().length(3).optional(),\n reconciliationContactId: UuidSchema.optional(),\n notes: z.string().optional(),\n})\n\nexport type UpdateBankAccountInput = z.infer<typeof UpdateBankAccountInputSchema>\n\n// ── banking.listAccounts ─────────────────────────────────────────────────────\n\nexport const ListBankAccountsInputSchema = z.object({\n branchId: UuidSchema.optional(),\n})\n\n// ── Kenyan bank reference (output) ──────────────────────────────────────────\n\nexport const KenyanBankSchema = z.object({\n id: UuidSchema,\n name: z.string(),\n code: z.string(),\n isActive: z.boolean(),\n createdAt: z.string(),\n})\n","/**\n * Brite Future Schools — bfs-contracts\n * Notifications schemas — templates, audience, deliveries, portal blocks.\n *\n * Phase History:\n * Phase 8 (2026-07-20): Initial creation — Module 3 (Notification System)\n *\n * @module src/schemas/notifications\n * @since Phase 8\n */\n\nimport * as z from 'zod'\nimport { UuidSchema } from './base.js'\n\n// ── Enums ──────────────────────────────────────────────────────────────────────\n\nexport const NotificationUrgencySchema = z.enum(['critical', 'urgent', 'important', 'info'])\n\nexport const NotificationTemplateStatusSchema = z.enum([\n 'draft', 'pending_approval', 'approved', 'scheduled',\n 'sent', 'cancelled', 'recurring_active',\n])\n\nexport const NotificationAudienceTypeSchema = z.enum([\n 'all_branches', 'branch', 'grade', 'class', 'role', 'individual',\n])\n\nexport const NotificationChannelSchema = z.enum(['in_app', 'sms', 'email', 'push'])\n\nexport const PortalBlockTypeSchema = z.enum(['diary', 'notification', 'fee', 'custom'])\n\n// ── Audience item (shared input/output shape) ───────────────────────────────\n\nexport const NotificationAudienceItemSchema = z.object({\n audienceType: NotificationAudienceTypeSchema,\n audienceId: z.string(),\n})\n\n// ── notifications.create ─────────────────────────────────────────────────────\n\nexport const CreateNotificationInputSchema = z.object({\n branchId: UuidSchema.optional(),\n title: z.string().min(1).max(200),\n body: z.string().min(1),\n urgency: NotificationUrgencySchema,\n isBlocking: z.boolean().optional(),\n deadlineHours: z.number().int().positive().optional(),\n redirectPath: z.string().max(500).optional(),\n redirectParams: z.record(z.string(), z.string()).optional(),\n requiresResponse: z.boolean().optional(),\n responseOptions: z.array(z.string()).optional(),\n deliveryChannels: z.array(NotificationChannelSchema).optional(),\n scheduledAt: z.string().datetime().optional(),\n recurrence: z.record(z.string(), z.unknown()).optional(),\n audience: z.array(NotificationAudienceItemSchema),\n})\n\nexport type CreateNotificationInput = z.infer<typeof CreateNotificationInputSchema>\n\n// ── notifications.listTemplates ──────────────────────────────────────────────\n\nexport const ListNotificationTemplatesInputSchema = z.object({\n status: z.string().optional(),\n branchId: UuidSchema.optional(),\n})\n\n// ── Notification template (output) ──────────────────────────────────────────\n\nexport const NotificationTemplateSchema = z.object({\n id: UuidSchema,\n branchId: UuidSchema.nullable(),\n title: z.string(),\n body: z.string(),\n urgency: NotificationUrgencySchema,\n isBlocking: z.boolean(),\n deadlineHours: z.number().nullable(),\n redirectPath: z.string().nullable(),\n redirectParams: z.record(z.string(), z.string()).nullable(),\n requiresResponse: z.boolean(),\n responseOptions: z.array(z.string()).nullable(),\n deliveryChannels: z.array(NotificationChannelSchema),\n scheduledAt: z.string().nullable(),\n recurrence: z.record(z.string(), z.unknown()).nullable(),\n lastFiredAt: z.string().nullable(),\n nextFireAt: z.string().nullable(),\n status: NotificationTemplateStatusSchema,\n createdBy: UuidSchema,\n approvedBy: UuidSchema.nullable(),\n approvedAt: z.string().nullable(),\n sentAt: z.string().nullable(),\n createdAt: z.string(),\n updatedAt: z.string(),\n})\n\n// ── notifications.reject ─────────────────────────────────────────────────────\n\nexport const RejectNotificationInputSchema = z.object({\n id: UuidSchema,\n reason: z.string().optional(),\n})\n\n// ── notifications.listDeliveries ─────────────────────────────────────────────\n\nexport const ListDeliveriesInputSchema = z.object({\n isRead: z.boolean().optional(),\n isBlocking: z.boolean().optional(),\n})\n\n// ── Notification delivery (output) ──────────────────────────────────────────\n\nexport const NotificationDeliverySchema = z.object({\n id: UuidSchema,\n notificationId: UuidSchema,\n userId: UuidSchema,\n channel: NotificationChannelSchema,\n deliveredAt: z.string().nullable(),\n readAt: z.string().nullable(),\n isRead: z.boolean(),\n markedUnreadAt: z.string().nullable(),\n acknowledgedAt: z.string().nullable(),\n response: z.string().nullable(),\n isBlocking: z.boolean(),\n isResolved: z.boolean(),\n resolvedAt: z.string().nullable(),\n returnPath: z.string().nullable(),\n createdAt: z.string(),\n})\n\n// ── notifications.acknowledge / respond ──────────────────────────────────────\n\nexport const AcknowledgeDeliveryInputSchema = z.object({\n deliveryId: UuidSchema,\n response: z.string().optional(),\n})\n\nexport const RespondToDeliveryInputSchema = z.object({\n deliveryId: UuidSchema,\n response: z.string().min(1),\n})\n\n// ── notifications.getResponseSummary (output) ───────────────────────────────\n// Grouped counts keyed by exact response text (or 'unspecified' for\n// deliveries with a null response). Free-text responses will scatter\n// into many count-of-1 keys — see listResponses for the raw per-user\n// view this doesn't replace.\n\nexport const ResponseSummarySchema = z.record(z.string(), z.number())\n\n// ── notifications.listResponses (output) ────────────────────────────────────\n\nexport const NotificationResponseItemSchema = z.object({\n deliveryId: UuidSchema,\n userId: UuidSchema,\n userName: z.string(),\n userEmail: z.string(),\n response: z.string().nullable(),\n acknowledgedAt: z.string().nullable(),\n isResolved: z.boolean(),\n})\n\n// ── Portal block (output) ────────────────────────────────────────────────────\n\nexport const PortalBlockSchema = z.object({\n id: UuidSchema,\n userId: UuidSchema,\n blockType: PortalBlockTypeSchema,\n sourceId: UuidSchema,\n redirectPath: z.string(),\n redirectParams: z.record(z.string(), z.string()).nullable(),\n returnPath: z.string().nullable(),\n severity: NotificationUrgencySchema,\n isActive: z.boolean(),\n activatedAt: z.string(),\n resolvedAt: z.string().nullable(),\n resolvedBy: UuidSchema.nullable(),\n resolvedVia: z.string().nullable(),\n requiresResponse: z.boolean(),\n responseOptions: z.array(z.string()).nullable(),\n createdAt: z.string(),\n})\n\n// ── blocks.respond ────────────────────────────────────────────────────────────\n// Dispatches to either NotificationsService.respond or DiaryService.respond\n// at runtime depending on block.blockType — no single fixed return shape\n// exists across both branches. Left as z.unknown() deliberately rather\n// than guessed; this is an honest reflection of the router's own logic,\n// not a gap in this schema file.\n\nexport const RespondToBlockInputSchema = z.object({\n blockId: UuidSchema,\n response: z.string().min(1),\n})\n\nexport const RespondToBlockOutputSchema = z.unknown()\n","/**\n * Brite Future Schools — bfs-contracts\n * E-Diary schemas — categories, entries, acknowledgements, blocks.\n *\n * Phase History:\n * Phase 8 (2026-07-20): Initial creation — Module 2 (E-Diary)\n *\n * @module src/schemas/diary\n * @since Phase 8\n */\n\nimport * as z from 'zod'\nimport { UuidSchema } from './base.js'\n\n// ── Enums ──────────────────────────────────────────────────────────────────────\n\nexport const DiarySeveritySchema = z.enum(['info', 'moderate', 'serious', 'critical'])\n\nexport const DiaryEntryStatusSchema = z.enum(['active', 'resolved', 'lifted'])\n\nexport const BlockResolutionMethodSchema = z.enum(['guardian_acknowledge', 'staff_lift'])\n\n// ── Diary category (output) ──────────────────────────────────────────────────\n\nexport const DiaryCategorySchema = z.object({\n id: UuidSchema,\n branchId: UuidSchema,\n name: z.string(),\n description: z.string().nullable(),\n isActive: z.boolean(),\n createdBy: UuidSchema.nullable(),\n createdAt: z.string(),\n})\n\n// ── diary.createCategory ─────────────────────────────────────────────────────\n\nexport const CreateDiaryCategoryInputSchema = z.object({\n name: z.string().min(1).max(100),\n description: z.string().optional(),\n})\n\n// ── diary.updateCategory ─────────────────────────────────────────────────────\n\nexport const UpdateDiaryCategoryInputSchema = z.object({\n id: UuidSchema,\n name: z.string().min(1).max(100).optional(),\n description: z.string().optional(),\n isActive: z.boolean().optional(),\n})\n\n// ── diary.listEntries ─────────────────────────────────────────────────────────\n\nexport const ListDiaryEntriesInputSchema = z.object({\n classId: UuidSchema.optional(),\n studentId: UuidSchema.optional(),\n postedBy: UuidSchema.optional(),\n})\n\n// ── Diary entry (output) ─────────────────────────────────────────────────────\n\nexport const DiaryEntrySchema = z.object({\n id: UuidSchema,\n branchId: UuidSchema,\n classId: UuidSchema,\n studentId: UuidSchema.nullable(),\n postedBy: UuidSchema,\n categoryId: UuidSchema,\n title: z.string(),\n body: z.string(),\n severity: DiarySeveritySchema,\n requiresResponse: z.boolean(),\n responseDeadlineDays: z.number(),\n isBlockingPortal: z.boolean(),\n isBlockingReportCard: z.boolean(),\n status: DiaryEntryStatusSchema,\n resolvedAt: z.string().nullable(),\n resolvedBy: UuidSchema.nullable(),\n liftApprovedBy: UuidSchema.nullable(),\n liftApprovedAt: z.string().nullable(),\n createdAt: z.string(),\n updatedAt: z.string(),\n})\n\n// ── diary.createEntry ─────────────────────────────────────────────────────────\n\nexport const CreateDiaryEntryInputSchema = z.object({\n classId: UuidSchema,\n studentId: UuidSchema.optional(),\n categoryId: UuidSchema,\n title: z.string().min(1).max(200),\n body: z.string().min(1),\n severity: DiarySeveritySchema,\n requiresResponse: z.boolean().optional(),\n responseDeadlineDays: z.number().int().positive().optional(),\n isBlockingPortal: z.boolean().optional(),\n isBlockingReportCard: z.boolean().optional(),\n})\n\n// ── Diary acknowledgement (output) ───────────────────────────────────────────\n\nexport const DiaryAcknowledgementSchema = z.object({\n id: UuidSchema,\n entryId: UuidSchema,\n guardianId: UuidSchema,\n studentId: UuidSchema,\n acknowledgedAt: z.string().nullable(),\n response: z.string().nullable(),\n isAcknowledged: z.boolean(),\n createdAt: z.string(),\n})\n\n// ── Diary block (output) ─────────────────────────────────────────────────────\n\nexport const DiaryBlockSchema = z.object({\n id: UuidSchema,\n entryId: UuidSchema,\n guardianId: UuidSchema,\n studentId: UuidSchema,\n blockedAt: z.string(),\n resolvedAt: z.string().nullable(),\n resolvedBy: UuidSchema.nullable(),\n resolvedVia: BlockResolutionMethodSchema.nullable(),\n liftApprovedBy: UuidSchema.nullable(),\n liftApprovedAt: z.string().nullable(),\n isActive: z.boolean(),\n createdAt: z.string(),\n})\n\n// ── diary.getEntry (output) ──────────────────────────────────────────────────\n// entry fields spread at the top level, plus joined acknowledgements/blocks\n// and a guardian-scoped \"myAcknowledgement\" summary (null for staff callers\n// or guardians who haven't acknowledged yet). See diary.service.ts's\n// getEntry — this composed shape is real, not a simplification.\n\nexport const MyAcknowledgementSchema = z.object({\n isAcknowledged: z.boolean(),\n response: z.string().nullable(),\n})\n\nexport const DiaryEntryDetailSchema = DiaryEntrySchema.extend({\n acknowledgements: z.array(DiaryAcknowledgementSchema),\n blocks: z.array(DiaryBlockSchema),\n myAcknowledgement: MyAcknowledgementSchema.nullable(),\n})\n\n// ── diary.listForGuardian (output) ───────────────────────────────────────────\n// Each entry plus the calling guardian's own acknowledgement status —\n// see diary.service.ts's listForGuardian, which computes this per-entry\n// from a separate acknowledgements lookup, not a raw table row.\n\nexport const DiaryEntryForGuardianSchema = DiaryEntrySchema.extend({\n myAcknowledgement: MyAcknowledgementSchema.nullable(),\n})\n\n// ── diary.acknowledge ─────────────────────────────────────────────────────────\n\nexport const AcknowledgeDiaryEntryInputSchema = z.object({\n entryId: UuidSchema,\n studentId: UuidSchema,\n})\n\n// ── diary.respond ─────────────────────────────────────────────────────────────\n\nexport const RespondToDiaryEntryInputSchema = z.object({\n entryId: UuidSchema,\n studentId: UuidSchema,\n response: z.string().min(1),\n})\n\n// ── diary.requestLift / approveLift ──────────────────────────────────────────\n\nexport const DiaryBlockIdInputSchema = z.object({\n blockId: UuidSchema,\n})\n\n// ── diary.listAcknowledgements ───────────────────────────────────────────────\n\nexport const ListDiaryAcknowledgementsInputSchema = z.object({\n entryId: UuidSchema,\n})\n","/**\n * Brite Future Schools — bfs-contracts\n * Grades schemas.\n *\n * Phase History:\n * Phase 4.1 (2026-06-12): Initial creation\n *\n * @module src/schemas/grades\n * @since Phase 4.1\n */\n\nimport * as z from 'zod'\nimport { GradeLevelSchema } from './students.js'\n\n// Re-export so consumers can import GradeLevel from grades if needed\nexport { GradeLevelSchema }\n\nexport const GRADE_LEVELS = [\n 'PP1', 'PP2',\n 'G1', 'G2', 'G3', 'G4', 'G5', 'G6',\n 'G7', 'G8', 'G9',\n] as const\n\nexport type GradeLevel = typeof GRADE_LEVELS[number]\n\nexport const GradeSchema = z.object({\n id: z.string().uuid(),\n branchId: z.string().uuid(),\n name: z.string(),\n level: GradeLevelSchema,\n description: z.string().nullable(),\n})\n\nexport const CreateGradeInputSchema = z.object({\n name: z.string().min(1).max(50),\n level: GradeLevelSchema,\n description: z.string().max(300).optional(),\n})\n\n// ── Inferred types ─────────────────────────────────────────────────────────────\n\nexport type Grade = z.infer<typeof GradeSchema>\nexport type CreateGradeInput = z.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AAM;AAChB;AAIO,IAAM,cAAgB,WAAO;AAAA,EAChC,IAAM,WAAO,EAAE,KAAK;AAAA,EACpB,UAAY,WAAO,EAAE,KAAK;AAAA,EAC1B,MAAQ,WAAO;AAAA,EACf,OAAO;AAAA,EACP,aAAe,WAAO,EAAE,SAAS;AACrC,CAAC;AAEM,IAAM,yBAA2B,WAAO;AAAA,EAC3C,MAAQ,WAAO,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE;AAAA,EAC9B,OAAO;AAAA,EACP,aAAe,WAAO,EAAE,IAAI,GAAG,EAAE,SAAS;AAC9C,CAAC;","names":["z","z","z","z","z","z","z","z","z"]}
1
+ {"version":3,"sources":["../src/schemas/base.ts","../src/schemas/auth.ts","../src/schemas/hr.ts","../src/schemas/students.ts","../src/schemas/attendance.ts","../src/schemas/calendar.ts","../src/schemas/banking.ts","../src/schemas/notifications.ts","../src/schemas/diary.ts","../src/schemas/grades.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: z.string().optional().meta({\n description: 'Opaque cursor from the previous page response',\n }),\n limit: z\n .int()\n .min(1)\n .max(200)\n .default(20)\n .meta({ description: 'Number of items to return (1–200, default 20)' }),\n})\n\nexport function paginatedOutputSchema<T extends z.ZodTypeAny>(itemSchema: T) {\n return z.object({\n items: z.array(itemSchema),\n nextCursor: z.string().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. HEAD_TEACHER' }),\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\n * Phase 4.2 (2026-06-13): Removed hardcoded RoleNameSchema — role is now\n * a plain string (DB-driven). Removed salary fields\n * from CreateStaffInput — remuneration module owns\n * salary. Added helbNo, saccoNo statutory fields.\n * Updated StaffProfile to remove salary columns.\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\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 — DB-driven, any valid role code accepted\n roleName: z.string().min(1).meta({\n description: 'Role code from the roles table — e.g. TEACHER, HEAD_TEACHER',\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 // Banking (optional at creation — can be completed later)\n bankName: z.string().max(100).optional(),\n bankAccount: z.string().max(30).optional(),\n bankBranch: z.string().max(100).optional(),\n\n // Statutory (optional at creation)\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 helbNo: z.string().max(20).optional(),\n saccoNo: 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 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 helbNo: z.string().nullable(),\n saccoNo: z.string().nullable(),\n designation: z.string(),\n employmentType: EmploymentTypeSchema,\n contractStart: z.string(),\n contractEnd: 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 email: z.string(),\n mustChangePassword: z.boolean(),\n departmentId: UuidSchema.nullable(),\n departmentName: z.string().nullable(),\n // Role — DB-driven code string, not a fixed enum\n roleName: z.string().nullable(),\n roleId: UuidSchema.nullable(),\n})\n\nexport type StaffProfile = z.infer<typeof StaffProfileSchema>\n\n// ── Staff list item ────────────────────────────────────────────────────────────\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: z.string().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: z.string().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 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().max(50).optional().meta({\n description: 'School-assigned admission number — auto-generated if not provided',\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>","/**\n * Brite Future Schools — bfs-contracts\n * Calendar schemas — academic years and terms.\n *\n * Phase History:\n * Phase 4.1 (2026-06-12): Initial creation\n *\n * @module src/schemas/calendar\n * @since Phase 4.1\n */\n\nimport * as z from 'zod'\n\n// ── Academic Year ──────────────────────────────────────────────────────────────\n\nexport const AcademicYearSchema = z.object({\n id: z.string().uuid(),\n branchId: z.string().uuid(),\n name: z.string(),\n startDate: z.string(),\n endDate: z.string(),\n isCurrent: z.boolean(),\n createdAt: z.string(),\n})\n\nexport const CreateYearInputSchema = z.object({\n name: z.string().min(1).max(50),\n startDate: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/, 'Must be YYYY-MM-DD'),\n endDate: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/, 'Must be YYYY-MM-DD'),\n})\n\nexport const SetCurrentYearInputSchema = z.object({\n yearId: z.string().uuid(),\n})\n\n// ── Academic Term ──────────────────────────────────────────────────────────────\n// Prefixed with \"Academic\" to avoid clash with attendance.ts TermSchema / Term\n\nexport const AcademicTermSchema = z.object({\n id: z.string().uuid(),\n branchId: z.string().uuid(),\n academicYearId: z.string().uuid(),\n name: z.string(),\n startDate: z.string(),\n endDate: z.string(),\n isCurrent: z.boolean(),\n createdAt: z.string(),\n})\n\nexport const CreateTermInputSchema = z.object({\n academicYearId: z.string().uuid(),\n name: z.string().min(1).max(50),\n startDate: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/, 'Must be YYYY-MM-DD'),\n endDate: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/, 'Must be YYYY-MM-DD'),\n})\n\nexport const SetCurrentTermInputSchema = z.object({\n termId: z.string().uuid(),\n})\n\nexport const ListTermsInputSchema = z.object({\n yearId: z.string().uuid().optional(),\n})\n\n// ── Inferred types ─────────────────────────────────────────────────────────────\n\nexport type AcademicYear = z.infer<typeof AcademicYearSchema>\nexport type AcademicTerm = z.infer<typeof AcademicTermSchema>\nexport type CreateYearInput = z.infer<typeof CreateYearInputSchema>\nexport type CreateTermInput = z.infer<typeof CreateTermInputSchema>","/**\n * Brite Future Schools — bfs-contracts\n * Banking schemas — branch bank account Zod shapes.\n *\n * Phase History:\n * Phase 8 (2026-07-20): Initial creation — Module 1 (Branch Banking)\n *\n * @module src/schemas/banking\n * @since Phase 8\n */\n\nimport * as z from 'zod'\nimport { UuidSchema } from './base.js'\n\n// ── Enums ──────────────────────────────────────────────────────────────────────\n\nexport const BankAccountTypeSchema = z.enum(['current', 'savings'])\n\n// ── Bank account (output) ───────────────────────────────────────────────────────\n\nexport const BranchBankAccountSchema = z.object({\n id: UuidSchema,\n branchId: UuidSchema,\n bankName: z.string(),\n bankCode: z.string().nullable(),\n bankBranchName: z.string().nullable(),\n accountNumber: z.string(),\n accountName: z.string(),\n accountType: BankAccountTypeSchema,\n currency: z.string(),\n isDefault: z.boolean(),\n isActive: z.boolean(),\n reconciliationContactId: UuidSchema.nullable(),\n notes: z.string().nullable(),\n createdAt: z.string(),\n updatedAt: z.string(),\n})\n\n// ── banking.create ───────────────────────────────────────────────────────────\n\nexport const CreateBankAccountInputSchema = z.object({\n branchId: UuidSchema,\n bankName: z.string().min(1).max(100),\n bankCode: z.string().max(10).optional(),\n bankBranchName: z.string().max(100).optional(),\n accountNumber: z.string().min(1).max(30),\n accountName: z.string().min(1).max(200),\n accountType: BankAccountTypeSchema,\n currency: z.string().length(3).optional(),\n isDefault: z.boolean().optional(),\n reconciliationContactId: UuidSchema.optional(),\n notes: z.string().optional(),\n})\n\nexport type CreateBankAccountInput = z.infer<typeof CreateBankAccountInputSchema>\n\n// ── banking.update ───────────────────────────────────────────────────────────\n\nexport const UpdateBankAccountInputSchema = z.object({\n id: UuidSchema,\n bankName: z.string().min(1).max(100).optional(),\n bankCode: z.string().max(10).optional(),\n bankBranchName: z.string().max(100).optional(),\n accountNumber: z.string().min(1).max(30).optional(),\n accountName: z.string().min(1).max(200).optional(),\n accountType: BankAccountTypeSchema.optional(),\n currency: z.string().length(3).optional(),\n reconciliationContactId: UuidSchema.optional(),\n notes: z.string().optional(),\n})\n\nexport type UpdateBankAccountInput = z.infer<typeof UpdateBankAccountInputSchema>\n\n// ── banking.listAccounts ─────────────────────────────────────────────────────\n\nexport const ListBankAccountsInputSchema = z.object({\n branchId: UuidSchema.optional(),\n})\n\n// ── Kenyan bank reference (output) ──────────────────────────────────────────\n\nexport const KenyanBankSchema = z.object({\n id: UuidSchema,\n name: z.string(),\n code: z.string(),\n isActive: z.boolean(),\n createdAt: z.string(),\n})\n","/**\n * Brite Future Schools — bfs-contracts\n * Notifications schemas — templates, audience, deliveries, portal blocks.\n *\n * Phase History:\n * Phase 8 (2026-07-20): Initial creation — Module 3 (Notification System)\n *\n * @module src/schemas/notifications\n * @since Phase 8\n */\n\nimport * as z from 'zod'\nimport { UuidSchema } from './base.js'\n\n// ── Enums ──────────────────────────────────────────────────────────────────────\n\nexport const NotificationUrgencySchema = z.enum(['critical', 'urgent', 'important', 'info'])\n\nexport const NotificationTemplateStatusSchema = z.enum([\n 'draft', 'pending_approval', 'approved', 'scheduled',\n 'sent', 'cancelled', 'recurring_active',\n])\n\nexport const NotificationAudienceTypeSchema = z.enum([\n 'all_branches', 'branch', 'grade', 'class', 'role', 'individual',\n])\n\nexport const NotificationChannelSchema = z.enum(['in_app', 'sms', 'email', 'push'])\n\nexport const PortalBlockTypeSchema = z.enum(['diary', 'notification', 'fee', 'custom'])\n\n// ── Audience item (shared input/output shape) ───────────────────────────────\n\nexport const NotificationAudienceItemSchema = z.object({\n audienceType: NotificationAudienceTypeSchema,\n audienceId: z.string(),\n})\n\n// ── notifications.create ─────────────────────────────────────────────────────\n\nexport const CreateNotificationInputSchema = z.object({\n branchId: UuidSchema.optional(),\n title: z.string().min(1).max(200),\n body: z.string().min(1),\n urgency: NotificationUrgencySchema,\n isBlocking: z.boolean().optional(),\n deadlineHours: z.number().int().positive().optional(),\n redirectPath: z.string().max(500).optional(),\n redirectParams: z.record(z.string(), z.string()).optional(),\n requiresResponse: z.boolean().optional(),\n responseOptions: z.array(z.string()).optional(),\n // Deliberately narrower than NotificationChannelSchema (excludes\n // 'push') — matches the router's original inline restriction and\n // NotificationsService's Channel type; 'push' exists in the DB enum\n // but isn't yet wired end-to-end for template creation.\n deliveryChannels: z.array(z.enum(['in_app', 'sms', 'email'])).optional(),\n scheduledAt: z.string().datetime().optional(),\n recurrence: z.record(z.string(), z.unknown()).optional(),\n audience: z.array(NotificationAudienceItemSchema),\n})\n\nexport type CreateNotificationInput = z.infer<typeof CreateNotificationInputSchema>\n\n// ── notifications.listTemplates ──────────────────────────────────────────────\n\nexport const ListNotificationTemplatesInputSchema = z.object({\n status: z.string().optional(),\n branchId: UuidSchema.optional(),\n})\n\n// ── Notification template (output) ──────────────────────────────────────────\n\nexport const NotificationTemplateSchema = z.object({\n id: UuidSchema,\n branchId: UuidSchema.nullable(),\n title: z.string(),\n body: z.string(),\n urgency: NotificationUrgencySchema,\n isBlocking: z.boolean(),\n deadlineHours: z.number().nullable(),\n redirectPath: z.string().nullable(),\n redirectParams: z.record(z.string(), z.string()).nullable(),\n requiresResponse: z.boolean(),\n responseOptions: z.array(z.string()).nullable(),\n deliveryChannels: z.array(NotificationChannelSchema),\n scheduledAt: z.string().nullable(),\n recurrence: z.record(z.string(), z.unknown()).nullable(),\n lastFiredAt: z.string().nullable(),\n nextFireAt: z.string().nullable(),\n status: NotificationTemplateStatusSchema,\n createdBy: UuidSchema,\n approvedBy: UuidSchema.nullable(),\n approvedAt: z.string().nullable(),\n sentAt: z.string().nullable(),\n createdAt: z.string(),\n updatedAt: z.string(),\n})\n\n// ── notifications.reject ─────────────────────────────────────────────────────\n\nexport const RejectNotificationInputSchema = z.object({\n id: UuidSchema,\n reason: z.string().optional(),\n})\n\n// ── notifications.listDeliveries ─────────────────────────────────────────────\n\nexport const ListDeliveriesInputSchema = z.object({\n isRead: z.boolean().optional(),\n isBlocking: z.boolean().optional(),\n})\n\n// ── Notification delivery (output) ──────────────────────────────────────────\n\nexport const NotificationDeliverySchema = z.object({\n id: UuidSchema,\n notificationId: UuidSchema,\n userId: UuidSchema,\n channel: NotificationChannelSchema,\n deliveredAt: z.string().nullable(),\n readAt: z.string().nullable(),\n isRead: z.boolean(),\n markedUnreadAt: z.string().nullable(),\n acknowledgedAt: z.string().nullable(),\n response: z.string().nullable(),\n isBlocking: z.boolean(),\n isResolved: z.boolean(),\n resolvedAt: z.string().nullable(),\n returnPath: z.string().nullable(),\n createdAt: z.string(),\n})\n\n// ── notifications.acknowledge / respond ──────────────────────────────────────\n\nexport const AcknowledgeDeliveryInputSchema = z.object({\n deliveryId: UuidSchema,\n response: z.string().optional(),\n})\n\nexport const RespondToDeliveryInputSchema = z.object({\n deliveryId: UuidSchema,\n response: z.string().min(1),\n})\n\n// ── notifications.getResponseSummary (output) ───────────────────────────────\n// Grouped counts keyed by exact response text (or 'unspecified' for\n// deliveries with a null response). Free-text responses will scatter\n// into many count-of-1 keys — see listResponses for the raw per-user\n// view this doesn't replace.\n\nexport const ResponseSummarySchema = z.record(z.string(), z.number())\n\n// ── notifications.listResponses (output) ────────────────────────────────────\n\nexport const NotificationResponseItemSchema = z.object({\n deliveryId: UuidSchema,\n userId: UuidSchema,\n userName: z.string(),\n userEmail: z.string(),\n response: z.string().nullable(),\n acknowledgedAt: z.string().nullable(),\n isResolved: z.boolean(),\n})\n\n// ── Portal block (output) ────────────────────────────────────────────────────\n\nexport const PortalBlockSchema = z.object({\n id: UuidSchema,\n userId: UuidSchema,\n blockType: PortalBlockTypeSchema,\n sourceId: UuidSchema,\n redirectPath: z.string(),\n redirectParams: z.record(z.string(), z.string()).nullable(),\n returnPath: z.string().nullable(),\n severity: NotificationUrgencySchema,\n isActive: z.boolean(),\n activatedAt: z.string(),\n resolvedAt: z.string().nullable(),\n resolvedBy: UuidSchema.nullable(),\n resolvedVia: z.string().nullable(),\n requiresResponse: z.boolean(),\n responseOptions: z.array(z.string()).nullable(),\n createdAt: z.string(),\n})\n\n// ── blocks.respond ────────────────────────────────────────────────────────────\n// Dispatches to either NotificationsService.respond or DiaryService.respond\n// at runtime depending on block.blockType — no single fixed return shape\n// exists across both branches. Left as z.unknown() deliberately rather\n// than guessed; this is an honest reflection of the router's own logic,\n// not a gap in this schema file.\n\nexport const RespondToBlockInputSchema = z.object({\n blockId: UuidSchema,\n response: z.string().min(1),\n})\n\nexport const RespondToBlockOutputSchema = z.unknown()\n","/**\n * Brite Future Schools — bfs-contracts\n * E-Diary schemas — categories, entries, acknowledgements, blocks.\n *\n * Phase History:\n * Phase 8 (2026-07-20): Initial creation — Module 2 (E-Diary)\n *\n * @module src/schemas/diary\n * @since Phase 8\n */\n\nimport * as z from 'zod'\nimport { UuidSchema } from './base.js'\n\n// ── Enums ──────────────────────────────────────────────────────────────────────\n\nexport const DiarySeveritySchema = z.enum(['info', 'moderate', 'serious', 'critical'])\n\nexport const DiaryEntryStatusSchema = z.enum(['active', 'resolved', 'lifted'])\n\nexport const BlockResolutionMethodSchema = z.enum(['guardian_acknowledge', 'staff_lift'])\n\n// ── Diary category (output) ──────────────────────────────────────────────────\n\nexport const DiaryCategorySchema = z.object({\n id: UuidSchema,\n branchId: UuidSchema,\n name: z.string(),\n description: z.string().nullable(),\n isActive: z.boolean(),\n createdBy: UuidSchema.nullable(),\n createdAt: z.string(),\n})\n\n// ── diary.createCategory ─────────────────────────────────────────────────────\n\nexport const CreateDiaryCategoryInputSchema = z.object({\n name: z.string().min(1).max(100),\n description: z.string().optional(),\n})\n\n// ── diary.updateCategory ─────────────────────────────────────────────────────\n\nexport const UpdateDiaryCategoryInputSchema = z.object({\n id: UuidSchema,\n name: z.string().min(1).max(100).optional(),\n description: z.string().optional(),\n isActive: z.boolean().optional(),\n})\n\n// ── diary.listEntries ─────────────────────────────────────────────────────────\n\nexport const ListDiaryEntriesInputSchema = z.object({\n classId: UuidSchema.optional(),\n studentId: UuidSchema.optional(),\n postedBy: UuidSchema.optional(),\n})\n\n// ── Diary entry (output) ─────────────────────────────────────────────────────\n\nexport const DiaryEntrySchema = z.object({\n id: UuidSchema,\n branchId: UuidSchema,\n classId: UuidSchema,\n studentId: UuidSchema.nullable(),\n postedBy: UuidSchema,\n categoryId: UuidSchema,\n title: z.string(),\n body: z.string(),\n severity: DiarySeveritySchema,\n requiresResponse: z.boolean(),\n responseDeadlineDays: z.number(),\n isBlockingPortal: z.boolean(),\n isBlockingReportCard: z.boolean(),\n status: DiaryEntryStatusSchema,\n resolvedAt: z.string().nullable(),\n resolvedBy: UuidSchema.nullable(),\n liftApprovedBy: UuidSchema.nullable(),\n liftApprovedAt: z.string().nullable(),\n createdAt: z.string(),\n updatedAt: z.string(),\n})\n\n// ── diary.createEntry ─────────────────────────────────────────────────────────\n\nexport const CreateDiaryEntryInputSchema = z.object({\n classId: UuidSchema,\n studentId: UuidSchema.optional(),\n categoryId: UuidSchema,\n title: z.string().min(1).max(200),\n body: z.string().min(1),\n severity: DiarySeveritySchema,\n requiresResponse: z.boolean().optional(),\n responseDeadlineDays: z.number().int().positive().optional(),\n isBlockingPortal: z.boolean().optional(),\n isBlockingReportCard: z.boolean().optional(),\n})\n\n// ── Diary acknowledgement (output) ───────────────────────────────────────────\n\nexport const DiaryAcknowledgementSchema = z.object({\n id: UuidSchema,\n entryId: UuidSchema,\n guardianId: UuidSchema,\n studentId: UuidSchema,\n acknowledgedAt: z.string().nullable(),\n response: z.string().nullable(),\n isAcknowledged: z.boolean(),\n createdAt: z.string(),\n})\n\n// ── Diary block (output) ─────────────────────────────────────────────────────\n\nexport const DiaryBlockSchema = z.object({\n id: UuidSchema,\n entryId: UuidSchema,\n guardianId: UuidSchema,\n studentId: UuidSchema,\n blockedAt: z.string(),\n resolvedAt: z.string().nullable(),\n resolvedBy: UuidSchema.nullable(),\n resolvedVia: BlockResolutionMethodSchema.nullable(),\n liftApprovedBy: UuidSchema.nullable(),\n liftApprovedAt: z.string().nullable(),\n isActive: z.boolean(),\n createdAt: z.string(),\n})\n\n// ── diary.getEntry (output) ──────────────────────────────────────────────────\n// entry fields spread at the top level, plus joined acknowledgements/blocks\n// and a guardian-scoped \"myAcknowledgement\" summary (null for staff callers\n// or guardians who haven't acknowledged yet). See diary.service.ts's\n// getEntry — this composed shape is real, not a simplification.\n\nexport const MyAcknowledgementSchema = z.object({\n isAcknowledged: z.boolean(),\n response: z.string().nullable(),\n})\n\nexport const DiaryEntryDetailSchema = DiaryEntrySchema.extend({\n acknowledgements: z.array(DiaryAcknowledgementSchema),\n blocks: z.array(DiaryBlockSchema),\n myAcknowledgement: MyAcknowledgementSchema.nullable(),\n})\n\n// ── diary.listForGuardian (output) ───────────────────────────────────────────\n// Each entry plus the calling guardian's own acknowledgement status —\n// see diary.service.ts's listForGuardian, which computes this per-entry\n// from a separate acknowledgements lookup, not a raw table row.\n\nexport const DiaryEntryForGuardianSchema = DiaryEntrySchema.extend({\n myAcknowledgement: MyAcknowledgementSchema.nullable(),\n})\n\n// ── diary.acknowledge ─────────────────────────────────────────────────────────\n\nexport const AcknowledgeDiaryEntryInputSchema = z.object({\n entryId: UuidSchema,\n studentId: UuidSchema,\n})\n\n// ── diary.respond ─────────────────────────────────────────────────────────────\n\nexport const RespondToDiaryEntryInputSchema = z.object({\n entryId: UuidSchema,\n studentId: UuidSchema,\n response: z.string().min(1),\n})\n\n// ── diary.requestLift / approveLift ──────────────────────────────────────────\n\nexport const DiaryBlockIdInputSchema = z.object({\n blockId: UuidSchema,\n})\n\n// ── diary.listAcknowledgements ───────────────────────────────────────────────\n\nexport const ListDiaryAcknowledgementsInputSchema = z.object({\n entryId: UuidSchema,\n})\n","/**\n * Brite Future Schools — bfs-contracts\n * Grades schemas.\n *\n * Phase History:\n * Phase 4.1 (2026-06-12): Initial creation\n *\n * @module src/schemas/grades\n * @since Phase 4.1\n */\n\nimport * as z from 'zod'\nimport { GradeLevelSchema } from './students.js'\n\n// Re-export so consumers can import GradeLevel from grades if needed\nexport { GradeLevelSchema }\n\nexport const GRADE_LEVELS = [\n 'PP1', 'PP2',\n 'G1', 'G2', 'G3', 'G4', 'G5', 'G6',\n 'G7', 'G8', 'G9',\n] as const\n\nexport type GradeLevel = typeof GRADE_LEVELS[number]\n\nexport const GradeSchema = z.object({\n id: z.string().uuid(),\n branchId: z.string().uuid(),\n name: z.string(),\n level: GradeLevelSchema,\n description: z.string().nullable(),\n})\n\nexport const CreateGradeInputSchema = z.object({\n name: z.string().min(1).max(50),\n level: GradeLevelSchema,\n description: z.string().max(300).optional(),\n})\n\n// ── Inferred types ─────────────────────────────────────────────────────────────\n\nexport type Grade = z.infer<typeof GradeSchema>\nexport type CreateGradeInput = z.infer<typeof CreateGradeInputSchema>"],"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,QAAU,SAAO,EA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,UAAO,EAAE,SAAS;AAClC,CAAC;AAEM,IAAM,yBAAyB,iBAAiB,OAAO;AAAA,EAC1D,kBAAoB,SAAM,0BAA0B;AAAA,EACpD,QAAU,SAAM,gBAAgB;AAAA,EAChC,mBAAmB,wBAAwB,SAAS;AACxD,CAAC;AAOM,IAAM,8BAA8B,iBAAiB,OAAO;AAAA,EAC/D,mBAAmB,wBAAwB,SAAS;AACxD,CAAC;AAIM,IAAM,mCAAqC,UAAO;AAAA,EACrD,SAAS;AAAA,EACT,WAAW;AACf,CAAC;AAIM,IAAM,iCAAmC,UAAO;AAAA,EACnD,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAY,UAAO,EAAE,IAAI,CAAC;AAC9B,CAAC;AAIM,IAAM,0BAA4B,UAAO;AAAA,EAC5C,SAAS;AACb,CAAC;AAIM,IAAM,uCAAyC,UAAO;AAAA,EACzD,SAAS;AACb,CAAC;;;ACxKD,YAAYC,SAAO;AAMZ,IAAM,eAAe;AAAA,EACxB;AAAA,EAAO;AAAA,EACP;AAAA,EAAM;AAAA,EAAM;AAAA,EAAM;AAAA,EAAM;AAAA,EAAM;AAAA,EAC9B;AAAA,EAAM;AAAA,EAAM;AAChB;AAIO,IAAM,cAAgB,WAAO;AAAA,EAChC,IAAM,WAAO,EAAE,KAAK;AAAA,EACpB,UAAY,WAAO,EAAE,KAAK;AAAA,EAC1B,MAAQ,WAAO;AAAA,EACf,OAAO;AAAA,EACP,aAAe,WAAO,EAAE,SAAS;AACrC,CAAC;AAEM,IAAM,yBAA2B,WAAO;AAAA,EAC3C,MAAQ,WAAO,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE;AAAA,EAC9B,OAAO;AAAA,EACP,aAAe,WAAO,EAAE,IAAI,GAAG,EAAE,SAAS;AAC9C,CAAC;","names":["z","z","z","z","z","z","z","z","z"]}
@@ -1012,7 +1012,11 @@ var CreateNotificationInputSchema = z18.object({
1012
1012
  redirectParams: z18.record(z18.string(), z18.string()).optional(),
1013
1013
  requiresResponse: z18.boolean().optional(),
1014
1014
  responseOptions: z18.array(z18.string()).optional(),
1015
- deliveryChannels: z18.array(NotificationChannelSchema).optional(),
1015
+ // Deliberately narrower than NotificationChannelSchema (excludes
1016
+ // 'push') — matches the router's original inline restriction and
1017
+ // NotificationsService's Channel type; 'push' exists in the DB enum
1018
+ // but isn't yet wired end-to-end for template creation.
1019
+ deliveryChannels: z18.array(z18.enum(["in_app", "sms", "email"])).optional(),
1016
1020
  scheduledAt: z18.string().datetime().optional(),
1017
1021
  recurrence: z18.record(z18.string(), z18.unknown()).optional(),
1018
1022
  audience: z18.array(NotificationAudienceItemSchema)