@brite-future-schools-contracts/contracts 2.0.28 → 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.
- package/dist/chunk-2B5AQI2I.js +374 -0
- package/dist/chunk-2B5AQI2I.js.map +1 -0
- package/dist/{chunk-CL7UHAQE.js → chunk-7AJ4LRST.js} +366 -10
- package/dist/chunk-7AJ4LRST.js.map +1 -0
- package/dist/chunk-W3NAS6DL.js +1 -0
- package/dist/contracts/index.cjs +498 -0
- package/dist/contracts/index.cjs.map +1 -1
- package/dist/contracts/index.d.cts +2082 -1
- package/dist/contracts/index.d.ts +2082 -1
- package/dist/contracts/index.js +84 -2
- package/dist/index.cjs +617 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +171 -3
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.cjs +408 -9
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +544 -1
- package/dist/schemas/index.d.ts +544 -1
- package/dist/schemas/index.js +88 -2
- package/package.json +1 -1
- package/dist/chunk-CL7UHAQE.js.map +0 -1
- package/dist/chunk-NCAGCDZV.js +0 -1
- package/dist/chunk-YKK4SQI7.js +0 -204
- package/dist/chunk-YKK4SQI7.js.map +0 -1
- /package/dist/{chunk-NCAGCDZV.js.map → chunk-W3NAS6DL.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -32,8 +32,13 @@ var src_exports = {};
|
|
|
32
32
|
__export(src_exports, {
|
|
33
33
|
AcademicTermSchema: () => AcademicTermSchema,
|
|
34
34
|
AcademicYearSchema: () => AcademicYearSchema,
|
|
35
|
+
AcknowledgeDeliveryInputSchema: () => AcknowledgeDeliveryInputSchema,
|
|
36
|
+
AcknowledgeDiaryEntryInputSchema: () => AcknowledgeDiaryEntryInputSchema,
|
|
35
37
|
AttendanceRecordInputSchema: () => AttendanceRecordInputSchema,
|
|
36
38
|
AttendanceStatusSchema: () => AttendanceStatusSchema,
|
|
39
|
+
BankAccountTypeSchema: () => BankAccountTypeSchema,
|
|
40
|
+
BlockResolutionMethodSchema: () => BlockResolutionMethodSchema,
|
|
41
|
+
BranchBankAccountSchema: () => BranchBankAccountSchema,
|
|
37
42
|
BranchRefSchema: () => BranchRefSchema,
|
|
38
43
|
BulkUploadStudentRowSchema: () => BulkUploadStudentRowSchema,
|
|
39
44
|
BulkUploadStudentsInputSchema: () => BulkUploadStudentsInputSchema,
|
|
@@ -41,8 +46,12 @@ __export(src_exports, {
|
|
|
41
46
|
ChangePasswordInputSchema: () => ChangePasswordInputSchema,
|
|
42
47
|
ClassAttendanceRowSchema: () => ClassAttendanceRowSchema,
|
|
43
48
|
ClassSummarySchema: () => ClassSummarySchema,
|
|
49
|
+
CreateBankAccountInputSchema: () => CreateBankAccountInputSchema,
|
|
44
50
|
CreateDepartmentInputSchema: () => CreateDepartmentInputSchema,
|
|
51
|
+
CreateDiaryCategoryInputSchema: () => CreateDiaryCategoryInputSchema,
|
|
52
|
+
CreateDiaryEntryInputSchema: () => CreateDiaryEntryInputSchema,
|
|
45
53
|
CreateGradeInputSchema: () => CreateGradeInputSchema,
|
|
54
|
+
CreateNotificationInputSchema: () => CreateNotificationInputSchema,
|
|
46
55
|
CreateStaffInputSchema: () => CreateStaffInputSchema,
|
|
47
56
|
CreateStaffOutputSchema: () => CreateStaffOutputSchema,
|
|
48
57
|
CreateStudentInputSchema: () => CreateStudentInputSchema,
|
|
@@ -51,6 +60,15 @@ __export(src_exports, {
|
|
|
51
60
|
CreateYearInputSchema: () => CreateYearInputSchema,
|
|
52
61
|
CuidSchema: () => CuidSchema,
|
|
53
62
|
DepartmentSchema: () => DepartmentSchema,
|
|
63
|
+
DiaryAcknowledgementSchema: () => DiaryAcknowledgementSchema,
|
|
64
|
+
DiaryBlockIdInputSchema: () => DiaryBlockIdInputSchema,
|
|
65
|
+
DiaryBlockSchema: () => DiaryBlockSchema,
|
|
66
|
+
DiaryCategorySchema: () => DiaryCategorySchema,
|
|
67
|
+
DiaryEntryDetailSchema: () => DiaryEntryDetailSchema,
|
|
68
|
+
DiaryEntryForGuardianSchema: () => DiaryEntryForGuardianSchema,
|
|
69
|
+
DiaryEntrySchema: () => DiaryEntrySchema,
|
|
70
|
+
DiaryEntryStatusSchema: () => DiaryEntryStatusSchema,
|
|
71
|
+
DiarySeveritySchema: () => DiarySeveritySchema,
|
|
54
72
|
EmploymentTypeSchema: () => EmploymentTypeSchema,
|
|
55
73
|
GRADE_LEVELS: () => GRADE_LEVELS,
|
|
56
74
|
GenderSchema: () => GenderSchema,
|
|
@@ -58,7 +76,13 @@ __export(src_exports, {
|
|
|
58
76
|
GetByStudentInputSchema: () => GetByStudentInputSchema,
|
|
59
77
|
GradeLevelSchema: () => GradeLevelSchema,
|
|
60
78
|
GradeSchema: () => GradeSchema,
|
|
79
|
+
KenyanBankSchema: () => KenyanBankSchema,
|
|
61
80
|
LinkGuardianInputSchema: () => LinkGuardianInputSchema,
|
|
81
|
+
ListBankAccountsInputSchema: () => ListBankAccountsInputSchema,
|
|
82
|
+
ListDeliveriesInputSchema: () => ListDeliveriesInputSchema,
|
|
83
|
+
ListDiaryAcknowledgementsInputSchema: () => ListDiaryAcknowledgementsInputSchema,
|
|
84
|
+
ListDiaryEntriesInputSchema: () => ListDiaryEntriesInputSchema,
|
|
85
|
+
ListNotificationTemplatesInputSchema: () => ListNotificationTemplatesInputSchema,
|
|
62
86
|
ListStaffInputSchema: () => ListStaffInputSchema,
|
|
63
87
|
ListStudentsInputSchema: () => ListStudentsInputSchema,
|
|
64
88
|
ListTermsInputSchema: () => ListTermsInputSchema,
|
|
@@ -67,11 +91,28 @@ __export(src_exports, {
|
|
|
67
91
|
LogoutInputSchema: () => LogoutInputSchema,
|
|
68
92
|
MarkAttendanceInputSchema: () => MarkAttendanceInputSchema,
|
|
69
93
|
MarkAttendanceOutputSchema: () => MarkAttendanceOutputSchema,
|
|
94
|
+
MyAcknowledgementSchema: () => MyAcknowledgementSchema,
|
|
95
|
+
NotificationAudienceItemSchema: () => NotificationAudienceItemSchema,
|
|
96
|
+
NotificationAudienceTypeSchema: () => NotificationAudienceTypeSchema,
|
|
97
|
+
NotificationChannelSchema: () => NotificationChannelSchema,
|
|
98
|
+
NotificationDeliverySchema: () => NotificationDeliverySchema,
|
|
99
|
+
NotificationResponseItemSchema: () => NotificationResponseItemSchema,
|
|
100
|
+
NotificationTemplateSchema: () => NotificationTemplateSchema,
|
|
101
|
+
NotificationTemplateStatusSchema: () => NotificationTemplateStatusSchema,
|
|
102
|
+
NotificationUrgencySchema: () => NotificationUrgencySchema,
|
|
70
103
|
PaginationInputSchema: () => PaginationInputSchema,
|
|
104
|
+
PortalBlockSchema: () => PortalBlockSchema,
|
|
105
|
+
PortalBlockTypeSchema: () => PortalBlockTypeSchema,
|
|
71
106
|
RefreshTokenInputSchema: () => RefreshTokenInputSchema,
|
|
72
107
|
RefreshTokenOutputSchema: () => RefreshTokenOutputSchema,
|
|
108
|
+
RejectNotificationInputSchema: () => RejectNotificationInputSchema,
|
|
73
109
|
RequestPasswordResetInputSchema: () => RequestPasswordResetInputSchema,
|
|
74
110
|
ResetPasswordInputSchema: () => ResetPasswordInputSchema,
|
|
111
|
+
RespondToBlockInputSchema: () => RespondToBlockInputSchema,
|
|
112
|
+
RespondToBlockOutputSchema: () => RespondToBlockOutputSchema,
|
|
113
|
+
RespondToDeliveryInputSchema: () => RespondToDeliveryInputSchema,
|
|
114
|
+
RespondToDiaryEntryInputSchema: () => RespondToDiaryEntryInputSchema,
|
|
115
|
+
ResponseSummarySchema: () => ResponseSummarySchema,
|
|
75
116
|
SessionUserOutputSchema: () => SessionUserOutputSchema,
|
|
76
117
|
SessionUserRoleSchema: () => SessionUserRoleSchema,
|
|
77
118
|
SessionUserSubRoleSchema: () => SessionUserSubRoleSchema,
|
|
@@ -87,9 +128,17 @@ __export(src_exports, {
|
|
|
87
128
|
SwitchBranchInputSchema: () => SwitchBranchInputSchema,
|
|
88
129
|
TermSchema: () => TermSchema,
|
|
89
130
|
TimestampsSchema: () => TimestampsSchema,
|
|
131
|
+
UpdateBankAccountInputSchema: () => UpdateBankAccountInputSchema,
|
|
132
|
+
UpdateDiaryCategoryInputSchema: () => UpdateDiaryCategoryInputSchema,
|
|
90
133
|
UuidSchema: () => UuidSchema,
|
|
134
|
+
acknowledgeContract: () => acknowledgeContract,
|
|
135
|
+
acknowledgeDiaryEntryContract: () => acknowledgeDiaryEntryContract,
|
|
136
|
+
approveContract: () => approveContract,
|
|
137
|
+
approveLiftContract: () => approveLiftContract,
|
|
91
138
|
attendanceContract: () => attendanceContract,
|
|
92
139
|
authContract: () => authContract,
|
|
140
|
+
bankingContract: () => bankingContract,
|
|
141
|
+
blocksContract: () => blocksContract,
|
|
93
142
|
bulkUploadStudentsContract: () => bulkUploadStudentsContract,
|
|
94
143
|
calendarContract: () => calendarContract,
|
|
95
144
|
calendarListTermsContract: () => calendarListTermsContract,
|
|
@@ -130,18 +179,29 @@ __export(src_exports, {
|
|
|
130
179
|
canViewStaffList: () => canViewStaffList,
|
|
131
180
|
canViewStudentList: () => canViewStudentList,
|
|
132
181
|
canViewTransport: () => canViewTransport,
|
|
182
|
+
cancelContract: () => cancelContract,
|
|
133
183
|
changePasswordContract: () => changePasswordContract,
|
|
184
|
+
createBankAccountContract: () => createBankAccountContract,
|
|
185
|
+
createCategoryContract: () => createCategoryContract,
|
|
134
186
|
createDepartmentContract: () => createDepartmentContract,
|
|
187
|
+
createEntryContract: () => createEntryContract,
|
|
135
188
|
createGradeContract: () => createGradeContract,
|
|
189
|
+
createNotificationContract: () => createNotificationContract,
|
|
136
190
|
createStaffContract: () => createStaffContract,
|
|
137
191
|
createStudentContract: () => createStudentContract,
|
|
138
192
|
createTermContract: () => createTermContract,
|
|
139
193
|
createYearContract: () => createYearContract,
|
|
194
|
+
deactivateContract: () => deactivateContract,
|
|
195
|
+
diaryContract: () => diaryContract,
|
|
140
196
|
getByClassContract: () => getByClassContract,
|
|
197
|
+
getByIdContract: () => getByIdContract,
|
|
141
198
|
getByStudentContract: () => getByStudentContract,
|
|
199
|
+
getEntryContract: () => getEntryContract,
|
|
142
200
|
getMeContract: () => getMeContract,
|
|
201
|
+
getResponseSummaryContract: () => getResponseSummaryContract,
|
|
143
202
|
getStaffByIdContract: () => getStaffByIdContract,
|
|
144
203
|
getStudentByIdContract: () => getStudentByIdContract,
|
|
204
|
+
getTemplateContract: () => getTemplateContract,
|
|
145
205
|
gradesContract: () => gradesContract,
|
|
146
206
|
hrContract: () => hrContract,
|
|
147
207
|
isBoardingMaster: () => isBoardingMaster,
|
|
@@ -175,24 +235,48 @@ __export(src_exports, {
|
|
|
175
235
|
isSubjectTeacher: () => isSubjectTeacher,
|
|
176
236
|
isSystemAdmin: () => isSystemAdmin,
|
|
177
237
|
linkGuardianContract: () => linkGuardianContract,
|
|
238
|
+
listAccountsContract: () => listAccountsContract,
|
|
239
|
+
listAcknowledgementsContract: () => listAcknowledgementsContract,
|
|
240
|
+
listActiveBlocksContract: () => listActiveBlocksContract,
|
|
241
|
+
listBanksContract: () => listBanksContract,
|
|
242
|
+
listCategoriesContract: () => listCategoriesContract,
|
|
178
243
|
listClassesContract: () => listClassesContract,
|
|
244
|
+
listDeliveriesContract: () => listDeliveriesContract,
|
|
179
245
|
listDepartmentsContract: () => listDepartmentsContract,
|
|
246
|
+
listEntriesContract: () => listEntriesContract,
|
|
247
|
+
listForGuardianContract: () => listForGuardianContract,
|
|
180
248
|
listGradesContract: () => listGradesContract,
|
|
249
|
+
listResponsesContract: () => listResponsesContract,
|
|
181
250
|
listStaffContract: () => listStaffContract,
|
|
182
251
|
listStudentsContract: () => listStudentsContract,
|
|
252
|
+
listTemplatesContract: () => listTemplatesContract,
|
|
183
253
|
listTermsContract: () => listTermsContract,
|
|
184
254
|
listYearsContract: () => listYearsContract,
|
|
185
255
|
loginContract: () => loginContract,
|
|
186
256
|
logoutContract: () => logoutContract,
|
|
187
257
|
markAttendanceContract: () => markAttendanceContract,
|
|
258
|
+
markReadContract: () => markReadContract,
|
|
259
|
+
markUnreadContract: () => markUnreadContract,
|
|
260
|
+
notificationsContract: () => notificationsContract,
|
|
188
261
|
paginatedOutputSchema: () => paginatedOutputSchema,
|
|
189
262
|
refreshTokenContract: () => refreshTokenContract,
|
|
263
|
+
rejectContract: () => rejectContract,
|
|
264
|
+
requestLiftContract: () => requestLiftContract,
|
|
190
265
|
requestPasswordResetContract: () => requestPasswordResetContract,
|
|
191
266
|
resetPasswordContract: () => resetPasswordContract,
|
|
267
|
+
resolveBlockAltContract: () => resolveBlockAltContract,
|
|
268
|
+
resolveBlockContract: () => resolveBlockContract,
|
|
269
|
+
respondContract: () => respondContract,
|
|
270
|
+
respondToBlockContract: () => respondToBlockContract,
|
|
271
|
+
respondToDiaryEntryContract: () => respondToDiaryEntryContract,
|
|
192
272
|
setCurrentTermContract: () => setCurrentTermContract,
|
|
193
273
|
setCurrentYearContract: () => setCurrentYearContract,
|
|
274
|
+
setDefaultContract: () => setDefaultContract,
|
|
194
275
|
studentsContract: () => studentsContract,
|
|
276
|
+
submitContract: () => submitContract,
|
|
195
277
|
switchBranchContract: () => switchBranchContract,
|
|
278
|
+
updateBankAccountContract: () => updateBankAccountContract,
|
|
279
|
+
updateCategoryContract: () => updateCategoryContract,
|
|
196
280
|
updateStaffStatusContract: () => updateStaffStatusContract
|
|
197
281
|
});
|
|
198
282
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -695,8 +779,321 @@ var ListTermsInputSchema = z6.object({
|
|
|
695
779
|
yearId: z6.string().uuid().optional()
|
|
696
780
|
});
|
|
697
781
|
|
|
698
|
-
// src/schemas/
|
|
782
|
+
// src/schemas/banking.ts
|
|
699
783
|
var z7 = __toESM(require("zod"), 1);
|
|
784
|
+
var BankAccountTypeSchema = z7.enum(["current", "savings"]);
|
|
785
|
+
var BranchBankAccountSchema = z7.object({
|
|
786
|
+
id: UuidSchema,
|
|
787
|
+
branchId: UuidSchema,
|
|
788
|
+
bankName: z7.string(),
|
|
789
|
+
bankCode: z7.string().nullable(),
|
|
790
|
+
bankBranchName: z7.string().nullable(),
|
|
791
|
+
accountNumber: z7.string(),
|
|
792
|
+
accountName: z7.string(),
|
|
793
|
+
accountType: BankAccountTypeSchema,
|
|
794
|
+
currency: z7.string(),
|
|
795
|
+
isDefault: z7.boolean(),
|
|
796
|
+
isActive: z7.boolean(),
|
|
797
|
+
reconciliationContactId: UuidSchema.nullable(),
|
|
798
|
+
notes: z7.string().nullable(),
|
|
799
|
+
createdAt: z7.string(),
|
|
800
|
+
updatedAt: z7.string()
|
|
801
|
+
});
|
|
802
|
+
var CreateBankAccountInputSchema = z7.object({
|
|
803
|
+
branchId: UuidSchema,
|
|
804
|
+
bankName: z7.string().min(1).max(100),
|
|
805
|
+
bankCode: z7.string().max(10).optional(),
|
|
806
|
+
bankBranchName: z7.string().max(100).optional(),
|
|
807
|
+
accountNumber: z7.string().min(1).max(30),
|
|
808
|
+
accountName: z7.string().min(1).max(200),
|
|
809
|
+
accountType: BankAccountTypeSchema,
|
|
810
|
+
currency: z7.string().length(3).optional(),
|
|
811
|
+
isDefault: z7.boolean().optional(),
|
|
812
|
+
reconciliationContactId: UuidSchema.optional(),
|
|
813
|
+
notes: z7.string().optional()
|
|
814
|
+
});
|
|
815
|
+
var UpdateBankAccountInputSchema = z7.object({
|
|
816
|
+
id: UuidSchema,
|
|
817
|
+
bankName: z7.string().min(1).max(100).optional(),
|
|
818
|
+
bankCode: z7.string().max(10).optional(),
|
|
819
|
+
bankBranchName: z7.string().max(100).optional(),
|
|
820
|
+
accountNumber: z7.string().min(1).max(30).optional(),
|
|
821
|
+
accountName: z7.string().min(1).max(200).optional(),
|
|
822
|
+
accountType: BankAccountTypeSchema.optional(),
|
|
823
|
+
currency: z7.string().length(3).optional(),
|
|
824
|
+
reconciliationContactId: UuidSchema.optional(),
|
|
825
|
+
notes: z7.string().optional()
|
|
826
|
+
});
|
|
827
|
+
var ListBankAccountsInputSchema = z7.object({
|
|
828
|
+
branchId: UuidSchema.optional()
|
|
829
|
+
});
|
|
830
|
+
var KenyanBankSchema = z7.object({
|
|
831
|
+
id: UuidSchema,
|
|
832
|
+
name: z7.string(),
|
|
833
|
+
code: z7.string(),
|
|
834
|
+
isActive: z7.boolean(),
|
|
835
|
+
createdAt: z7.string()
|
|
836
|
+
});
|
|
837
|
+
|
|
838
|
+
// src/schemas/notifications.ts
|
|
839
|
+
var z8 = __toESM(require("zod"), 1);
|
|
840
|
+
var NotificationUrgencySchema = z8.enum(["critical", "urgent", "important", "info"]);
|
|
841
|
+
var NotificationTemplateStatusSchema = z8.enum([
|
|
842
|
+
"draft",
|
|
843
|
+
"pending_approval",
|
|
844
|
+
"approved",
|
|
845
|
+
"scheduled",
|
|
846
|
+
"sent",
|
|
847
|
+
"cancelled",
|
|
848
|
+
"recurring_active"
|
|
849
|
+
]);
|
|
850
|
+
var NotificationAudienceTypeSchema = z8.enum([
|
|
851
|
+
"all_branches",
|
|
852
|
+
"branch",
|
|
853
|
+
"grade",
|
|
854
|
+
"class",
|
|
855
|
+
"role",
|
|
856
|
+
"individual"
|
|
857
|
+
]);
|
|
858
|
+
var NotificationChannelSchema = z8.enum(["in_app", "sms", "email", "push"]);
|
|
859
|
+
var PortalBlockTypeSchema = z8.enum(["diary", "notification", "fee", "custom"]);
|
|
860
|
+
var NotificationAudienceItemSchema = z8.object({
|
|
861
|
+
audienceType: NotificationAudienceTypeSchema,
|
|
862
|
+
audienceId: z8.string()
|
|
863
|
+
});
|
|
864
|
+
var CreateNotificationInputSchema = z8.object({
|
|
865
|
+
branchId: UuidSchema.optional(),
|
|
866
|
+
title: z8.string().min(1).max(200),
|
|
867
|
+
body: z8.string().min(1),
|
|
868
|
+
urgency: NotificationUrgencySchema,
|
|
869
|
+
isBlocking: z8.boolean().optional(),
|
|
870
|
+
deadlineHours: z8.number().int().positive().optional(),
|
|
871
|
+
redirectPath: z8.string().max(500).optional(),
|
|
872
|
+
redirectParams: z8.record(z8.string(), z8.string()).optional(),
|
|
873
|
+
requiresResponse: z8.boolean().optional(),
|
|
874
|
+
responseOptions: z8.array(z8.string()).optional(),
|
|
875
|
+
// Deliberately narrower than NotificationChannelSchema (excludes
|
|
876
|
+
// 'push') — matches the router's original inline restriction and
|
|
877
|
+
// NotificationsService's Channel type; 'push' exists in the DB enum
|
|
878
|
+
// but isn't yet wired end-to-end for template creation.
|
|
879
|
+
deliveryChannels: z8.array(z8.enum(["in_app", "sms", "email"])).optional(),
|
|
880
|
+
scheduledAt: z8.string().datetime().optional(),
|
|
881
|
+
recurrence: z8.record(z8.string(), z8.unknown()).optional(),
|
|
882
|
+
audience: z8.array(NotificationAudienceItemSchema)
|
|
883
|
+
});
|
|
884
|
+
var ListNotificationTemplatesInputSchema = z8.object({
|
|
885
|
+
status: z8.string().optional(),
|
|
886
|
+
branchId: UuidSchema.optional()
|
|
887
|
+
});
|
|
888
|
+
var NotificationTemplateSchema = z8.object({
|
|
889
|
+
id: UuidSchema,
|
|
890
|
+
branchId: UuidSchema.nullable(),
|
|
891
|
+
title: z8.string(),
|
|
892
|
+
body: z8.string(),
|
|
893
|
+
urgency: NotificationUrgencySchema,
|
|
894
|
+
isBlocking: z8.boolean(),
|
|
895
|
+
deadlineHours: z8.number().nullable(),
|
|
896
|
+
redirectPath: z8.string().nullable(),
|
|
897
|
+
redirectParams: z8.record(z8.string(), z8.string()).nullable(),
|
|
898
|
+
requiresResponse: z8.boolean(),
|
|
899
|
+
responseOptions: z8.array(z8.string()).nullable(),
|
|
900
|
+
deliveryChannels: z8.array(NotificationChannelSchema),
|
|
901
|
+
scheduledAt: z8.string().nullable(),
|
|
902
|
+
recurrence: z8.record(z8.string(), z8.unknown()).nullable(),
|
|
903
|
+
lastFiredAt: z8.string().nullable(),
|
|
904
|
+
nextFireAt: z8.string().nullable(),
|
|
905
|
+
status: NotificationTemplateStatusSchema,
|
|
906
|
+
createdBy: UuidSchema,
|
|
907
|
+
approvedBy: UuidSchema.nullable(),
|
|
908
|
+
approvedAt: z8.string().nullable(),
|
|
909
|
+
sentAt: z8.string().nullable(),
|
|
910
|
+
createdAt: z8.string(),
|
|
911
|
+
updatedAt: z8.string()
|
|
912
|
+
});
|
|
913
|
+
var RejectNotificationInputSchema = z8.object({
|
|
914
|
+
id: UuidSchema,
|
|
915
|
+
reason: z8.string().optional()
|
|
916
|
+
});
|
|
917
|
+
var ListDeliveriesInputSchema = z8.object({
|
|
918
|
+
isRead: z8.boolean().optional(),
|
|
919
|
+
isBlocking: z8.boolean().optional()
|
|
920
|
+
});
|
|
921
|
+
var NotificationDeliverySchema = z8.object({
|
|
922
|
+
id: UuidSchema,
|
|
923
|
+
notificationId: UuidSchema,
|
|
924
|
+
userId: UuidSchema,
|
|
925
|
+
channel: NotificationChannelSchema,
|
|
926
|
+
deliveredAt: z8.string().nullable(),
|
|
927
|
+
readAt: z8.string().nullable(),
|
|
928
|
+
isRead: z8.boolean(),
|
|
929
|
+
markedUnreadAt: z8.string().nullable(),
|
|
930
|
+
acknowledgedAt: z8.string().nullable(),
|
|
931
|
+
response: z8.string().nullable(),
|
|
932
|
+
isBlocking: z8.boolean(),
|
|
933
|
+
isResolved: z8.boolean(),
|
|
934
|
+
resolvedAt: z8.string().nullable(),
|
|
935
|
+
returnPath: z8.string().nullable(),
|
|
936
|
+
createdAt: z8.string()
|
|
937
|
+
});
|
|
938
|
+
var AcknowledgeDeliveryInputSchema = z8.object({
|
|
939
|
+
deliveryId: UuidSchema,
|
|
940
|
+
response: z8.string().optional()
|
|
941
|
+
});
|
|
942
|
+
var RespondToDeliveryInputSchema = z8.object({
|
|
943
|
+
deliveryId: UuidSchema,
|
|
944
|
+
response: z8.string().min(1)
|
|
945
|
+
});
|
|
946
|
+
var ResponseSummarySchema = z8.record(z8.string(), z8.number());
|
|
947
|
+
var NotificationResponseItemSchema = z8.object({
|
|
948
|
+
deliveryId: UuidSchema,
|
|
949
|
+
userId: UuidSchema,
|
|
950
|
+
userName: z8.string(),
|
|
951
|
+
userEmail: z8.string(),
|
|
952
|
+
response: z8.string().nullable(),
|
|
953
|
+
acknowledgedAt: z8.string().nullable(),
|
|
954
|
+
isResolved: z8.boolean()
|
|
955
|
+
});
|
|
956
|
+
var PortalBlockSchema = z8.object({
|
|
957
|
+
id: UuidSchema,
|
|
958
|
+
userId: UuidSchema,
|
|
959
|
+
blockType: PortalBlockTypeSchema,
|
|
960
|
+
sourceId: UuidSchema,
|
|
961
|
+
redirectPath: z8.string(),
|
|
962
|
+
redirectParams: z8.record(z8.string(), z8.string()).nullable(),
|
|
963
|
+
returnPath: z8.string().nullable(),
|
|
964
|
+
severity: NotificationUrgencySchema,
|
|
965
|
+
isActive: z8.boolean(),
|
|
966
|
+
activatedAt: z8.string(),
|
|
967
|
+
resolvedAt: z8.string().nullable(),
|
|
968
|
+
resolvedBy: UuidSchema.nullable(),
|
|
969
|
+
resolvedVia: z8.string().nullable(),
|
|
970
|
+
requiresResponse: z8.boolean(),
|
|
971
|
+
responseOptions: z8.array(z8.string()).nullable(),
|
|
972
|
+
createdAt: z8.string()
|
|
973
|
+
});
|
|
974
|
+
var RespondToBlockInputSchema = z8.object({
|
|
975
|
+
blockId: UuidSchema,
|
|
976
|
+
response: z8.string().min(1)
|
|
977
|
+
});
|
|
978
|
+
var RespondToBlockOutputSchema = z8.unknown();
|
|
979
|
+
|
|
980
|
+
// src/schemas/diary.ts
|
|
981
|
+
var z9 = __toESM(require("zod"), 1);
|
|
982
|
+
var DiarySeveritySchema = z9.enum(["info", "moderate", "serious", "critical"]);
|
|
983
|
+
var DiaryEntryStatusSchema = z9.enum(["active", "resolved", "lifted"]);
|
|
984
|
+
var BlockResolutionMethodSchema = z9.enum(["guardian_acknowledge", "staff_lift"]);
|
|
985
|
+
var DiaryCategorySchema = z9.object({
|
|
986
|
+
id: UuidSchema,
|
|
987
|
+
branchId: UuidSchema,
|
|
988
|
+
name: z9.string(),
|
|
989
|
+
description: z9.string().nullable(),
|
|
990
|
+
isActive: z9.boolean(),
|
|
991
|
+
createdBy: UuidSchema.nullable(),
|
|
992
|
+
createdAt: z9.string()
|
|
993
|
+
});
|
|
994
|
+
var CreateDiaryCategoryInputSchema = z9.object({
|
|
995
|
+
name: z9.string().min(1).max(100),
|
|
996
|
+
description: z9.string().optional()
|
|
997
|
+
});
|
|
998
|
+
var UpdateDiaryCategoryInputSchema = z9.object({
|
|
999
|
+
id: UuidSchema,
|
|
1000
|
+
name: z9.string().min(1).max(100).optional(),
|
|
1001
|
+
description: z9.string().optional(),
|
|
1002
|
+
isActive: z9.boolean().optional()
|
|
1003
|
+
});
|
|
1004
|
+
var ListDiaryEntriesInputSchema = z9.object({
|
|
1005
|
+
classId: UuidSchema.optional(),
|
|
1006
|
+
studentId: UuidSchema.optional(),
|
|
1007
|
+
postedBy: UuidSchema.optional()
|
|
1008
|
+
});
|
|
1009
|
+
var DiaryEntrySchema = z9.object({
|
|
1010
|
+
id: UuidSchema,
|
|
1011
|
+
branchId: UuidSchema,
|
|
1012
|
+
classId: UuidSchema,
|
|
1013
|
+
studentId: UuidSchema.nullable(),
|
|
1014
|
+
postedBy: UuidSchema,
|
|
1015
|
+
categoryId: UuidSchema,
|
|
1016
|
+
title: z9.string(),
|
|
1017
|
+
body: z9.string(),
|
|
1018
|
+
severity: DiarySeveritySchema,
|
|
1019
|
+
requiresResponse: z9.boolean(),
|
|
1020
|
+
responseDeadlineDays: z9.number(),
|
|
1021
|
+
isBlockingPortal: z9.boolean(),
|
|
1022
|
+
isBlockingReportCard: z9.boolean(),
|
|
1023
|
+
status: DiaryEntryStatusSchema,
|
|
1024
|
+
resolvedAt: z9.string().nullable(),
|
|
1025
|
+
resolvedBy: UuidSchema.nullable(),
|
|
1026
|
+
liftApprovedBy: UuidSchema.nullable(),
|
|
1027
|
+
liftApprovedAt: z9.string().nullable(),
|
|
1028
|
+
createdAt: z9.string(),
|
|
1029
|
+
updatedAt: z9.string()
|
|
1030
|
+
});
|
|
1031
|
+
var CreateDiaryEntryInputSchema = z9.object({
|
|
1032
|
+
classId: UuidSchema,
|
|
1033
|
+
studentId: UuidSchema.optional(),
|
|
1034
|
+
categoryId: UuidSchema,
|
|
1035
|
+
title: z9.string().min(1).max(200),
|
|
1036
|
+
body: z9.string().min(1),
|
|
1037
|
+
severity: DiarySeveritySchema,
|
|
1038
|
+
requiresResponse: z9.boolean().optional(),
|
|
1039
|
+
responseDeadlineDays: z9.number().int().positive().optional(),
|
|
1040
|
+
isBlockingPortal: z9.boolean().optional(),
|
|
1041
|
+
isBlockingReportCard: z9.boolean().optional()
|
|
1042
|
+
});
|
|
1043
|
+
var DiaryAcknowledgementSchema = z9.object({
|
|
1044
|
+
id: UuidSchema,
|
|
1045
|
+
entryId: UuidSchema,
|
|
1046
|
+
guardianId: UuidSchema,
|
|
1047
|
+
studentId: UuidSchema,
|
|
1048
|
+
acknowledgedAt: z9.string().nullable(),
|
|
1049
|
+
response: z9.string().nullable(),
|
|
1050
|
+
isAcknowledged: z9.boolean(),
|
|
1051
|
+
createdAt: z9.string()
|
|
1052
|
+
});
|
|
1053
|
+
var DiaryBlockSchema = z9.object({
|
|
1054
|
+
id: UuidSchema,
|
|
1055
|
+
entryId: UuidSchema,
|
|
1056
|
+
guardianId: UuidSchema,
|
|
1057
|
+
studentId: UuidSchema,
|
|
1058
|
+
blockedAt: z9.string(),
|
|
1059
|
+
resolvedAt: z9.string().nullable(),
|
|
1060
|
+
resolvedBy: UuidSchema.nullable(),
|
|
1061
|
+
resolvedVia: BlockResolutionMethodSchema.nullable(),
|
|
1062
|
+
liftApprovedBy: UuidSchema.nullable(),
|
|
1063
|
+
liftApprovedAt: z9.string().nullable(),
|
|
1064
|
+
isActive: z9.boolean(),
|
|
1065
|
+
createdAt: z9.string()
|
|
1066
|
+
});
|
|
1067
|
+
var MyAcknowledgementSchema = z9.object({
|
|
1068
|
+
isAcknowledged: z9.boolean(),
|
|
1069
|
+
response: z9.string().nullable()
|
|
1070
|
+
});
|
|
1071
|
+
var DiaryEntryDetailSchema = DiaryEntrySchema.extend({
|
|
1072
|
+
acknowledgements: z9.array(DiaryAcknowledgementSchema),
|
|
1073
|
+
blocks: z9.array(DiaryBlockSchema),
|
|
1074
|
+
myAcknowledgement: MyAcknowledgementSchema.nullable()
|
|
1075
|
+
});
|
|
1076
|
+
var DiaryEntryForGuardianSchema = DiaryEntrySchema.extend({
|
|
1077
|
+
myAcknowledgement: MyAcknowledgementSchema.nullable()
|
|
1078
|
+
});
|
|
1079
|
+
var AcknowledgeDiaryEntryInputSchema = z9.object({
|
|
1080
|
+
entryId: UuidSchema,
|
|
1081
|
+
studentId: UuidSchema
|
|
1082
|
+
});
|
|
1083
|
+
var RespondToDiaryEntryInputSchema = z9.object({
|
|
1084
|
+
entryId: UuidSchema,
|
|
1085
|
+
studentId: UuidSchema,
|
|
1086
|
+
response: z9.string().min(1)
|
|
1087
|
+
});
|
|
1088
|
+
var DiaryBlockIdInputSchema = z9.object({
|
|
1089
|
+
blockId: UuidSchema
|
|
1090
|
+
});
|
|
1091
|
+
var ListDiaryAcknowledgementsInputSchema = z9.object({
|
|
1092
|
+
entryId: UuidSchema
|
|
1093
|
+
});
|
|
1094
|
+
|
|
1095
|
+
// src/schemas/grades.ts
|
|
1096
|
+
var z10 = __toESM(require("zod"), 1);
|
|
700
1097
|
var GRADE_LEVELS = [
|
|
701
1098
|
"PP1",
|
|
702
1099
|
"PP2",
|
|
@@ -710,23 +1107,23 @@ var GRADE_LEVELS = [
|
|
|
710
1107
|
"G8",
|
|
711
1108
|
"G9"
|
|
712
1109
|
];
|
|
713
|
-
var GradeSchema =
|
|
714
|
-
id:
|
|
715
|
-
branchId:
|
|
716
|
-
name:
|
|
1110
|
+
var GradeSchema = z10.object({
|
|
1111
|
+
id: z10.string().uuid(),
|
|
1112
|
+
branchId: z10.string().uuid(),
|
|
1113
|
+
name: z10.string(),
|
|
717
1114
|
level: GradeLevelSchema,
|
|
718
|
-
description:
|
|
1115
|
+
description: z10.string().nullable()
|
|
719
1116
|
});
|
|
720
|
-
var CreateGradeInputSchema =
|
|
721
|
-
name:
|
|
1117
|
+
var CreateGradeInputSchema = z10.object({
|
|
1118
|
+
name: z10.string().min(1).max(50),
|
|
722
1119
|
level: GradeLevelSchema,
|
|
723
|
-
description:
|
|
1120
|
+
description: z10.string().max(300).optional()
|
|
724
1121
|
});
|
|
725
1122
|
|
|
726
1123
|
// src/contracts/auth.ts
|
|
727
1124
|
var import_contract = require("@orpc/contract");
|
|
728
|
-
var
|
|
729
|
-
var EmptyOutputSchema =
|
|
1125
|
+
var z11 = __toESM(require("zod"), 1);
|
|
1126
|
+
var EmptyOutputSchema = z11.object({}).meta({ description: "Empty success response" });
|
|
730
1127
|
var loginContract = import_contract.oc.route({ method: "POST", path: "/auth/login" }).input(LoginInputSchema).output(LoginOutputSchema);
|
|
731
1128
|
var refreshTokenContract = import_contract.oc.route({ method: "POST", path: "/auth/refresh" }).input(RefreshTokenInputSchema).output(RefreshTokenOutputSchema);
|
|
732
1129
|
var logoutContract = import_contract.oc.route({ method: "POST", path: "/auth/logout" }).input(LogoutInputSchema).output(EmptyOutputSchema);
|
|
@@ -748,20 +1145,20 @@ var authContract = {
|
|
|
748
1145
|
|
|
749
1146
|
// src/contracts/hr.ts
|
|
750
1147
|
var import_contract2 = require("@orpc/contract");
|
|
751
|
-
var
|
|
752
|
-
var EmptyOutput =
|
|
1148
|
+
var z12 = __toESM(require("zod"), 1);
|
|
1149
|
+
var EmptyOutput = z12.object({});
|
|
753
1150
|
var createStaffContract = import_contract2.oc.route({ method: "POST", path: "/hr/staff" }).input(CreateStaffInputSchema).output(CreateStaffOutputSchema);
|
|
754
|
-
var listStaffContract = import_contract2.oc.route({ method: "GET", path: "/hr/staff" }).input(ListStaffInputSchema).output(
|
|
755
|
-
items:
|
|
756
|
-
total:
|
|
1151
|
+
var listStaffContract = import_contract2.oc.route({ method: "GET", path: "/hr/staff" }).input(ListStaffInputSchema).output(z12.object({
|
|
1152
|
+
items: z12.array(StaffListItemSchema),
|
|
1153
|
+
total: z12.number(),
|
|
757
1154
|
nextCursor: UuidSchema.nullable()
|
|
758
1155
|
}));
|
|
759
|
-
var getStaffByIdContract = import_contract2.oc.route({ method: "GET", path: "/hr/staff/{id}" }).input(
|
|
760
|
-
var updateStaffStatusContract = import_contract2.oc.route({ method: "PATCH", path: "/hr/staff/{id}/status" }).input(
|
|
1156
|
+
var getStaffByIdContract = import_contract2.oc.route({ method: "GET", path: "/hr/staff/{id}" }).input(z12.object({ id: UuidSchema })).output(StaffProfileSchema);
|
|
1157
|
+
var updateStaffStatusContract = import_contract2.oc.route({ method: "PATCH", path: "/hr/staff/{id}/status" }).input(z12.object({
|
|
761
1158
|
id: UuidSchema,
|
|
762
|
-
status:
|
|
1159
|
+
status: z12.enum(["active", "inactive", "suspended"])
|
|
763
1160
|
})).output(EmptyOutput);
|
|
764
|
-
var listDepartmentsContract = import_contract2.oc.route({ method: "GET", path: "/hr/departments" }).input(
|
|
1161
|
+
var listDepartmentsContract = import_contract2.oc.route({ method: "GET", path: "/hr/departments" }).input(z12.object({ branchId: UuidSchema.optional() })).output(z12.array(DepartmentSchema));
|
|
765
1162
|
var createDepartmentContract = import_contract2.oc.route({ method: "POST", path: "/hr/departments" }).input(CreateDepartmentInputSchema).output(DepartmentSchema);
|
|
766
1163
|
var hrContract = {
|
|
767
1164
|
createStaff: createStaffContract,
|
|
@@ -774,21 +1171,21 @@ var hrContract = {
|
|
|
774
1171
|
|
|
775
1172
|
// src/contracts/students.ts
|
|
776
1173
|
var import_contract3 = require("@orpc/contract");
|
|
777
|
-
var
|
|
778
|
-
var EmptyOutput2 =
|
|
1174
|
+
var z13 = __toESM(require("zod"), 1);
|
|
1175
|
+
var EmptyOutput2 = z13.object({});
|
|
779
1176
|
var createStudentContract = import_contract3.oc.route({ method: "POST", path: "/students" }).input(CreateStudentInputSchema).output(CreateStudentOutputSchema);
|
|
780
1177
|
var bulkUploadStudentsContract = import_contract3.oc.route({ method: "POST", path: "/students/bulk" }).input(BulkUploadStudentsInputSchema).output(BulkUploadStudentsOutputSchema);
|
|
781
|
-
var listStudentsContract = import_contract3.oc.route({ method: "GET", path: "/students" }).input(ListStudentsInputSchema).output(
|
|
782
|
-
items:
|
|
783
|
-
total:
|
|
1178
|
+
var listStudentsContract = import_contract3.oc.route({ method: "GET", path: "/students" }).input(ListStudentsInputSchema).output(z13.object({
|
|
1179
|
+
items: z13.array(StudentListItemSchema),
|
|
1180
|
+
total: z13.number(),
|
|
784
1181
|
nextCursor: UuidSchema.nullable()
|
|
785
1182
|
}));
|
|
786
|
-
var getStudentByIdContract = import_contract3.oc.route({ method: "GET", path: "/students/{id}" }).input(
|
|
787
|
-
var linkGuardianContract = import_contract3.oc.route({ method: "POST", path: "/students/guardians" }).input(LinkGuardianInputSchema).output(
|
|
788
|
-
var listClassesContract = import_contract3.oc.route({ method: "GET", path: "/students/classes" }).input(
|
|
1183
|
+
var getStudentByIdContract = import_contract3.oc.route({ method: "GET", path: "/students/{id}" }).input(z13.object({ id: UuidSchema })).output(StudentProfileSchema);
|
|
1184
|
+
var linkGuardianContract = import_contract3.oc.route({ method: "POST", path: "/students/guardians" }).input(LinkGuardianInputSchema).output(z13.object({ guardianId: UuidSchema }));
|
|
1185
|
+
var listClassesContract = import_contract3.oc.route({ method: "GET", path: "/students/classes" }).input(z13.object({
|
|
789
1186
|
termId: UuidSchema.optional(),
|
|
790
|
-
gradeLevel:
|
|
791
|
-
})).output(
|
|
1187
|
+
gradeLevel: z13.string().optional()
|
|
1188
|
+
})).output(z13.array(ClassSummarySchema));
|
|
792
1189
|
var studentsContract = {
|
|
793
1190
|
create: createStudentContract,
|
|
794
1191
|
bulkUpload: bulkUploadStudentsContract,
|
|
@@ -800,11 +1197,11 @@ var studentsContract = {
|
|
|
800
1197
|
|
|
801
1198
|
// src/contracts/attendance.ts
|
|
802
1199
|
var import_contract4 = require("@orpc/contract");
|
|
803
|
-
var
|
|
1200
|
+
var z14 = __toESM(require("zod"), 1);
|
|
804
1201
|
var markAttendanceContract = import_contract4.oc.route({ method: "POST", path: "/attendance/class/mark" }).input(MarkAttendanceInputSchema).output(MarkAttendanceOutputSchema);
|
|
805
|
-
var getByClassContract = import_contract4.oc.route({ method: "GET", path: "/attendance/class" }).input(GetByClassInputSchema).output(
|
|
806
|
-
var getByStudentContract = import_contract4.oc.route({ method: "GET", path: "/attendance/student" }).input(GetByStudentInputSchema).output(
|
|
807
|
-
var listTermsContract = import_contract4.oc.route({ method: "GET", path: "/terms" }).input(
|
|
1202
|
+
var getByClassContract = import_contract4.oc.route({ method: "GET", path: "/attendance/class" }).input(GetByClassInputSchema).output(z14.array(ClassAttendanceRowSchema));
|
|
1203
|
+
var getByStudentContract = import_contract4.oc.route({ method: "GET", path: "/attendance/student" }).input(GetByStudentInputSchema).output(z14.array(StudentAttendanceRowSchema));
|
|
1204
|
+
var listTermsContract = import_contract4.oc.route({ method: "GET", path: "/terms" }).input(z14.object({})).output(z14.array(TermSchema));
|
|
808
1205
|
var attendanceContract = {
|
|
809
1206
|
mark: markAttendanceContract,
|
|
810
1207
|
getByClass: getByClassContract,
|
|
@@ -814,11 +1211,11 @@ var attendanceContract = {
|
|
|
814
1211
|
|
|
815
1212
|
// src/contracts/calendar.ts
|
|
816
1213
|
var import_contract5 = require("@orpc/contract");
|
|
817
|
-
var
|
|
818
|
-
var listYearsContract = import_contract5.oc.route({ method: "GET", path: "/calendar/years" }).input(
|
|
1214
|
+
var z15 = __toESM(require("zod"), 1);
|
|
1215
|
+
var listYearsContract = import_contract5.oc.route({ method: "GET", path: "/calendar/years" }).input(z15.object({})).output(z15.array(AcademicYearSchema));
|
|
819
1216
|
var createYearContract = import_contract5.oc.route({ method: "POST", path: "/calendar/years" }).input(CreateYearInputSchema).output(AcademicYearSchema);
|
|
820
1217
|
var setCurrentYearContract = import_contract5.oc.route({ method: "POST", path: "/calendar/years/current" }).input(SetCurrentYearInputSchema).output(AcademicYearSchema);
|
|
821
|
-
var calendarListTermsContract = import_contract5.oc.route({ method: "GET", path: "/calendar/terms" }).input(ListTermsInputSchema).output(
|
|
1218
|
+
var calendarListTermsContract = import_contract5.oc.route({ method: "GET", path: "/calendar/terms" }).input(ListTermsInputSchema).output(z15.array(AcademicTermSchema));
|
|
822
1219
|
var createTermContract = import_contract5.oc.route({ method: "POST", path: "/calendar/terms" }).input(CreateTermInputSchema).output(AcademicTermSchema);
|
|
823
1220
|
var setCurrentTermContract = import_contract5.oc.route({ method: "POST", path: "/calendar/terms/current" }).input(SetCurrentTermInputSchema).output(AcademicTermSchema);
|
|
824
1221
|
var calendarContract = {
|
|
@@ -832,14 +1229,111 @@ var calendarContract = {
|
|
|
832
1229
|
|
|
833
1230
|
// src/contracts/grades.ts
|
|
834
1231
|
var import_contract6 = require("@orpc/contract");
|
|
835
|
-
var
|
|
836
|
-
var listGradesContract = import_contract6.oc.route({ method: "GET", path: "/grades" }).input(
|
|
1232
|
+
var z16 = __toESM(require("zod"), 1);
|
|
1233
|
+
var listGradesContract = import_contract6.oc.route({ method: "GET", path: "/grades" }).input(z16.object({})).output(z16.array(GradeSchema));
|
|
837
1234
|
var createGradeContract = import_contract6.oc.route({ method: "POST", path: "/grades" }).input(CreateGradeInputSchema).output(GradeSchema);
|
|
838
1235
|
var gradesContract = {
|
|
839
1236
|
list: listGradesContract,
|
|
840
1237
|
create: createGradeContract
|
|
841
1238
|
};
|
|
842
1239
|
|
|
1240
|
+
// src/contracts/diary.ts
|
|
1241
|
+
var import_contract7 = require("@orpc/contract");
|
|
1242
|
+
var z17 = __toESM(require("zod"), 1);
|
|
1243
|
+
var IdInput = z17.object({ id: UuidSchema });
|
|
1244
|
+
var listCategoriesContract = import_contract7.oc.route({ method: "GET", path: "/diary/categories" }).input(z17.object({})).output(z17.array(DiaryCategorySchema));
|
|
1245
|
+
var createCategoryContract = import_contract7.oc.route({ method: "POST", path: "/diary/categories" }).input(CreateDiaryCategoryInputSchema).output(DiaryCategorySchema);
|
|
1246
|
+
var updateCategoryContract = import_contract7.oc.route({ method: "PATCH", path: "/diary/categories/{id}" }).input(UpdateDiaryCategoryInputSchema).output(DiaryCategorySchema);
|
|
1247
|
+
var listEntriesContract = import_contract7.oc.route({ method: "GET", path: "/diary/entries" }).input(ListDiaryEntriesInputSchema).output(z17.array(DiaryEntrySchema));
|
|
1248
|
+
var listForGuardianContract = import_contract7.oc.route({ method: "GET", path: "/diary/entries/guardian" }).input(z17.object({})).output(z17.array(DiaryEntryForGuardianSchema));
|
|
1249
|
+
var getEntryContract = import_contract7.oc.route({ method: "GET", path: "/diary/entries/{id}" }).input(IdInput).output(DiaryEntryDetailSchema);
|
|
1250
|
+
var createEntryContract = import_contract7.oc.route({ method: "POST", path: "/diary/entries" }).input(CreateDiaryEntryInputSchema).output(DiaryEntrySchema);
|
|
1251
|
+
var acknowledgeDiaryEntryContract = import_contract7.oc.route({ method: "PATCH", path: "/diary/entries/{entryId}/acknowledge" }).input(AcknowledgeDiaryEntryInputSchema).output(DiaryAcknowledgementSchema);
|
|
1252
|
+
var respondToDiaryEntryContract = import_contract7.oc.route({ method: "PATCH", path: "/diary/entries/{entryId}/respond" }).input(RespondToDiaryEntryInputSchema).output(DiaryAcknowledgementSchema);
|
|
1253
|
+
var requestLiftContract = import_contract7.oc.route({ method: "PATCH", path: "/diary/blocks/{blockId}/request-lift" }).input(DiaryBlockIdInputSchema).output(DiaryBlockSchema);
|
|
1254
|
+
var approveLiftContract = import_contract7.oc.route({ method: "PATCH", path: "/diary/blocks/{blockId}/approve-lift" }).input(DiaryBlockIdInputSchema).output(DiaryBlockSchema);
|
|
1255
|
+
var listAcknowledgementsContract = import_contract7.oc.route({ method: "GET", path: "/diary/entries/{entryId}/acknowledgements" }).input(ListDiaryAcknowledgementsInputSchema).output(z17.array(DiaryAcknowledgementSchema));
|
|
1256
|
+
var diaryContract = {
|
|
1257
|
+
listCategories: listCategoriesContract,
|
|
1258
|
+
createCategory: createCategoryContract,
|
|
1259
|
+
updateCategory: updateCategoryContract,
|
|
1260
|
+
listEntries: listEntriesContract,
|
|
1261
|
+
listForGuardian: listForGuardianContract,
|
|
1262
|
+
getEntry: getEntryContract,
|
|
1263
|
+
createEntry: createEntryContract,
|
|
1264
|
+
acknowledge: acknowledgeDiaryEntryContract,
|
|
1265
|
+
respond: respondToDiaryEntryContract,
|
|
1266
|
+
requestLift: requestLiftContract,
|
|
1267
|
+
approveLift: approveLiftContract,
|
|
1268
|
+
listAcknowledgements: listAcknowledgementsContract
|
|
1269
|
+
};
|
|
1270
|
+
|
|
1271
|
+
// src/contracts/banking.ts
|
|
1272
|
+
var import_contract8 = require("@orpc/contract");
|
|
1273
|
+
var z18 = __toESM(require("zod"), 1);
|
|
1274
|
+
var listAccountsContract = import_contract8.oc.route({ method: "GET", path: "/banking/accounts" }).input(ListBankAccountsInputSchema).output(z18.array(BranchBankAccountSchema));
|
|
1275
|
+
var getByIdContract = import_contract8.oc.route({ method: "GET", path: "/banking/accounts/{id}" }).input(z18.object({ id: UuidSchema })).output(BranchBankAccountSchema);
|
|
1276
|
+
var createBankAccountContract = import_contract8.oc.route({ method: "POST", path: "/banking/accounts" }).input(CreateBankAccountInputSchema).output(BranchBankAccountSchema);
|
|
1277
|
+
var updateBankAccountContract = import_contract8.oc.route({ method: "PATCH", path: "/banking/accounts/{id}" }).input(UpdateBankAccountInputSchema).output(BranchBankAccountSchema);
|
|
1278
|
+
var setDefaultContract = import_contract8.oc.route({ method: "PATCH", path: "/banking/accounts/{id}/default" }).input(z18.object({ id: UuidSchema })).output(BranchBankAccountSchema);
|
|
1279
|
+
var deactivateContract = import_contract8.oc.route({ method: "PATCH", path: "/banking/accounts/{id}/deactivate" }).input(z18.object({ id: UuidSchema })).output(BranchBankAccountSchema);
|
|
1280
|
+
var listBanksContract = import_contract8.oc.route({ method: "GET", path: "/banking/banks" }).input(z18.object({})).output(z18.array(KenyanBankSchema));
|
|
1281
|
+
var bankingContract = {
|
|
1282
|
+
listAccounts: listAccountsContract,
|
|
1283
|
+
getById: getByIdContract,
|
|
1284
|
+
create: createBankAccountContract,
|
|
1285
|
+
update: updateBankAccountContract,
|
|
1286
|
+
setDefault: setDefaultContract,
|
|
1287
|
+
deactivate: deactivateContract,
|
|
1288
|
+
listBanks: listBanksContract
|
|
1289
|
+
};
|
|
1290
|
+
|
|
1291
|
+
// src/contracts/notifications.ts
|
|
1292
|
+
var import_contract9 = require("@orpc/contract");
|
|
1293
|
+
var z19 = __toESM(require("zod"), 1);
|
|
1294
|
+
var EmptyOutput3 = z19.object({});
|
|
1295
|
+
var IdInput2 = z19.object({ id: UuidSchema });
|
|
1296
|
+
var listTemplatesContract = import_contract9.oc.route({ method: "GET", path: "/notifications/templates" }).input(ListNotificationTemplatesInputSchema).output(z19.array(NotificationTemplateSchema));
|
|
1297
|
+
var getTemplateContract = import_contract9.oc.route({ method: "GET", path: "/notifications/templates/{id}" }).input(IdInput2).output(NotificationTemplateSchema);
|
|
1298
|
+
var createNotificationContract = import_contract9.oc.route({ method: "POST", path: "/notifications/templates" }).input(CreateNotificationInputSchema).output(NotificationTemplateSchema);
|
|
1299
|
+
var submitContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/templates/{id}/submit" }).input(IdInput2).output(NotificationTemplateSchema);
|
|
1300
|
+
var approveContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/templates/{id}/approve" }).input(IdInput2).output(NotificationTemplateSchema);
|
|
1301
|
+
var rejectContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/templates/{id}/reject" }).input(RejectNotificationInputSchema).output(NotificationTemplateSchema);
|
|
1302
|
+
var cancelContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/templates/{id}/cancel" }).input(IdInput2).output(NotificationTemplateSchema);
|
|
1303
|
+
var listDeliveriesContract = import_contract9.oc.route({ method: "GET", path: "/notifications/deliveries" }).input(ListDeliveriesInputSchema).output(z19.array(NotificationDeliverySchema));
|
|
1304
|
+
var markReadContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/deliveries/{deliveryId}/read" }).input(z19.object({ deliveryId: UuidSchema })).output(NotificationDeliverySchema);
|
|
1305
|
+
var markUnreadContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/deliveries/{deliveryId}/unread" }).input(z19.object({ deliveryId: UuidSchema })).output(NotificationDeliverySchema);
|
|
1306
|
+
var acknowledgeContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/deliveries/{deliveryId}/acknowledge" }).input(AcknowledgeDeliveryInputSchema).output(NotificationDeliverySchema);
|
|
1307
|
+
var respondContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/deliveries/{deliveryId}/respond" }).input(RespondToDeliveryInputSchema).output(NotificationDeliverySchema);
|
|
1308
|
+
var getResponseSummaryContract = import_contract9.oc.route({ method: "GET", path: "/notifications/templates/{id}/response-summary" }).input(IdInput2).output(ResponseSummarySchema);
|
|
1309
|
+
var listResponsesContract = import_contract9.oc.route({ method: "GET", path: "/notifications/templates/{id}/responses" }).input(IdInput2).output(z19.array(NotificationResponseItemSchema));
|
|
1310
|
+
var resolveBlockContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/blocks/{blockId}/resolve" }).input(z19.object({ blockId: UuidSchema })).output(PortalBlockSchema);
|
|
1311
|
+
var notificationsContract = {
|
|
1312
|
+
listTemplates: listTemplatesContract,
|
|
1313
|
+
getTemplate: getTemplateContract,
|
|
1314
|
+
create: createNotificationContract,
|
|
1315
|
+
submit: submitContract,
|
|
1316
|
+
approve: approveContract,
|
|
1317
|
+
reject: rejectContract,
|
|
1318
|
+
cancel: cancelContract,
|
|
1319
|
+
listDeliveries: listDeliveriesContract,
|
|
1320
|
+
markRead: markReadContract,
|
|
1321
|
+
markUnread: markUnreadContract,
|
|
1322
|
+
acknowledge: acknowledgeContract,
|
|
1323
|
+
respond: respondContract,
|
|
1324
|
+
getResponseSummary: getResponseSummaryContract,
|
|
1325
|
+
listResponses: listResponsesContract,
|
|
1326
|
+
resolveBlock: resolveBlockContract
|
|
1327
|
+
};
|
|
1328
|
+
var listActiveBlocksContract = import_contract9.oc.route({ method: "GET", path: "/blocks/active" }).input(z19.object({})).output(z19.array(PortalBlockSchema));
|
|
1329
|
+
var resolveBlockAltContract = import_contract9.oc.route({ method: "PATCH", path: "/blocks/{blockId}/resolve" }).input(z19.object({ blockId: UuidSchema })).output(PortalBlockSchema);
|
|
1330
|
+
var respondToBlockContract = import_contract9.oc.route({ method: "PATCH", path: "/blocks/{blockId}/respond" }).input(RespondToBlockInputSchema).output(RespondToBlockOutputSchema);
|
|
1331
|
+
var blocksContract = {
|
|
1332
|
+
listActive: listActiveBlocksContract,
|
|
1333
|
+
resolve: resolveBlockAltContract,
|
|
1334
|
+
respond: respondToBlockContract
|
|
1335
|
+
};
|
|
1336
|
+
|
|
843
1337
|
// src/roles/helpers.ts
|
|
844
1338
|
function hasRole(user, role) {
|
|
845
1339
|
return user.roles.some(
|
|
@@ -1093,8 +1587,13 @@ function isScopedToOwnVehicle(user) {
|
|
|
1093
1587
|
0 && (module.exports = {
|
|
1094
1588
|
AcademicTermSchema,
|
|
1095
1589
|
AcademicYearSchema,
|
|
1590
|
+
AcknowledgeDeliveryInputSchema,
|
|
1591
|
+
AcknowledgeDiaryEntryInputSchema,
|
|
1096
1592
|
AttendanceRecordInputSchema,
|
|
1097
1593
|
AttendanceStatusSchema,
|
|
1594
|
+
BankAccountTypeSchema,
|
|
1595
|
+
BlockResolutionMethodSchema,
|
|
1596
|
+
BranchBankAccountSchema,
|
|
1098
1597
|
BranchRefSchema,
|
|
1099
1598
|
BulkUploadStudentRowSchema,
|
|
1100
1599
|
BulkUploadStudentsInputSchema,
|
|
@@ -1102,8 +1601,12 @@ function isScopedToOwnVehicle(user) {
|
|
|
1102
1601
|
ChangePasswordInputSchema,
|
|
1103
1602
|
ClassAttendanceRowSchema,
|
|
1104
1603
|
ClassSummarySchema,
|
|
1604
|
+
CreateBankAccountInputSchema,
|
|
1105
1605
|
CreateDepartmentInputSchema,
|
|
1606
|
+
CreateDiaryCategoryInputSchema,
|
|
1607
|
+
CreateDiaryEntryInputSchema,
|
|
1106
1608
|
CreateGradeInputSchema,
|
|
1609
|
+
CreateNotificationInputSchema,
|
|
1107
1610
|
CreateStaffInputSchema,
|
|
1108
1611
|
CreateStaffOutputSchema,
|
|
1109
1612
|
CreateStudentInputSchema,
|
|
@@ -1112,6 +1615,15 @@ function isScopedToOwnVehicle(user) {
|
|
|
1112
1615
|
CreateYearInputSchema,
|
|
1113
1616
|
CuidSchema,
|
|
1114
1617
|
DepartmentSchema,
|
|
1618
|
+
DiaryAcknowledgementSchema,
|
|
1619
|
+
DiaryBlockIdInputSchema,
|
|
1620
|
+
DiaryBlockSchema,
|
|
1621
|
+
DiaryCategorySchema,
|
|
1622
|
+
DiaryEntryDetailSchema,
|
|
1623
|
+
DiaryEntryForGuardianSchema,
|
|
1624
|
+
DiaryEntrySchema,
|
|
1625
|
+
DiaryEntryStatusSchema,
|
|
1626
|
+
DiarySeveritySchema,
|
|
1115
1627
|
EmploymentTypeSchema,
|
|
1116
1628
|
GRADE_LEVELS,
|
|
1117
1629
|
GenderSchema,
|
|
@@ -1119,7 +1631,13 @@ function isScopedToOwnVehicle(user) {
|
|
|
1119
1631
|
GetByStudentInputSchema,
|
|
1120
1632
|
GradeLevelSchema,
|
|
1121
1633
|
GradeSchema,
|
|
1634
|
+
KenyanBankSchema,
|
|
1122
1635
|
LinkGuardianInputSchema,
|
|
1636
|
+
ListBankAccountsInputSchema,
|
|
1637
|
+
ListDeliveriesInputSchema,
|
|
1638
|
+
ListDiaryAcknowledgementsInputSchema,
|
|
1639
|
+
ListDiaryEntriesInputSchema,
|
|
1640
|
+
ListNotificationTemplatesInputSchema,
|
|
1123
1641
|
ListStaffInputSchema,
|
|
1124
1642
|
ListStudentsInputSchema,
|
|
1125
1643
|
ListTermsInputSchema,
|
|
@@ -1128,11 +1646,28 @@ function isScopedToOwnVehicle(user) {
|
|
|
1128
1646
|
LogoutInputSchema,
|
|
1129
1647
|
MarkAttendanceInputSchema,
|
|
1130
1648
|
MarkAttendanceOutputSchema,
|
|
1649
|
+
MyAcknowledgementSchema,
|
|
1650
|
+
NotificationAudienceItemSchema,
|
|
1651
|
+
NotificationAudienceTypeSchema,
|
|
1652
|
+
NotificationChannelSchema,
|
|
1653
|
+
NotificationDeliverySchema,
|
|
1654
|
+
NotificationResponseItemSchema,
|
|
1655
|
+
NotificationTemplateSchema,
|
|
1656
|
+
NotificationTemplateStatusSchema,
|
|
1657
|
+
NotificationUrgencySchema,
|
|
1131
1658
|
PaginationInputSchema,
|
|
1659
|
+
PortalBlockSchema,
|
|
1660
|
+
PortalBlockTypeSchema,
|
|
1132
1661
|
RefreshTokenInputSchema,
|
|
1133
1662
|
RefreshTokenOutputSchema,
|
|
1663
|
+
RejectNotificationInputSchema,
|
|
1134
1664
|
RequestPasswordResetInputSchema,
|
|
1135
1665
|
ResetPasswordInputSchema,
|
|
1666
|
+
RespondToBlockInputSchema,
|
|
1667
|
+
RespondToBlockOutputSchema,
|
|
1668
|
+
RespondToDeliveryInputSchema,
|
|
1669
|
+
RespondToDiaryEntryInputSchema,
|
|
1670
|
+
ResponseSummarySchema,
|
|
1136
1671
|
SessionUserOutputSchema,
|
|
1137
1672
|
SessionUserRoleSchema,
|
|
1138
1673
|
SessionUserSubRoleSchema,
|
|
@@ -1148,9 +1683,17 @@ function isScopedToOwnVehicle(user) {
|
|
|
1148
1683
|
SwitchBranchInputSchema,
|
|
1149
1684
|
TermSchema,
|
|
1150
1685
|
TimestampsSchema,
|
|
1686
|
+
UpdateBankAccountInputSchema,
|
|
1687
|
+
UpdateDiaryCategoryInputSchema,
|
|
1151
1688
|
UuidSchema,
|
|
1689
|
+
acknowledgeContract,
|
|
1690
|
+
acknowledgeDiaryEntryContract,
|
|
1691
|
+
approveContract,
|
|
1692
|
+
approveLiftContract,
|
|
1152
1693
|
attendanceContract,
|
|
1153
1694
|
authContract,
|
|
1695
|
+
bankingContract,
|
|
1696
|
+
blocksContract,
|
|
1154
1697
|
bulkUploadStudentsContract,
|
|
1155
1698
|
calendarContract,
|
|
1156
1699
|
calendarListTermsContract,
|
|
@@ -1191,18 +1734,29 @@ function isScopedToOwnVehicle(user) {
|
|
|
1191
1734
|
canViewStaffList,
|
|
1192
1735
|
canViewStudentList,
|
|
1193
1736
|
canViewTransport,
|
|
1737
|
+
cancelContract,
|
|
1194
1738
|
changePasswordContract,
|
|
1739
|
+
createBankAccountContract,
|
|
1740
|
+
createCategoryContract,
|
|
1195
1741
|
createDepartmentContract,
|
|
1742
|
+
createEntryContract,
|
|
1196
1743
|
createGradeContract,
|
|
1744
|
+
createNotificationContract,
|
|
1197
1745
|
createStaffContract,
|
|
1198
1746
|
createStudentContract,
|
|
1199
1747
|
createTermContract,
|
|
1200
1748
|
createYearContract,
|
|
1749
|
+
deactivateContract,
|
|
1750
|
+
diaryContract,
|
|
1201
1751
|
getByClassContract,
|
|
1752
|
+
getByIdContract,
|
|
1202
1753
|
getByStudentContract,
|
|
1754
|
+
getEntryContract,
|
|
1203
1755
|
getMeContract,
|
|
1756
|
+
getResponseSummaryContract,
|
|
1204
1757
|
getStaffByIdContract,
|
|
1205
1758
|
getStudentByIdContract,
|
|
1759
|
+
getTemplateContract,
|
|
1206
1760
|
gradesContract,
|
|
1207
1761
|
hrContract,
|
|
1208
1762
|
isBoardingMaster,
|
|
@@ -1236,24 +1790,48 @@ function isScopedToOwnVehicle(user) {
|
|
|
1236
1790
|
isSubjectTeacher,
|
|
1237
1791
|
isSystemAdmin,
|
|
1238
1792
|
linkGuardianContract,
|
|
1793
|
+
listAccountsContract,
|
|
1794
|
+
listAcknowledgementsContract,
|
|
1795
|
+
listActiveBlocksContract,
|
|
1796
|
+
listBanksContract,
|
|
1797
|
+
listCategoriesContract,
|
|
1239
1798
|
listClassesContract,
|
|
1799
|
+
listDeliveriesContract,
|
|
1240
1800
|
listDepartmentsContract,
|
|
1801
|
+
listEntriesContract,
|
|
1802
|
+
listForGuardianContract,
|
|
1241
1803
|
listGradesContract,
|
|
1804
|
+
listResponsesContract,
|
|
1242
1805
|
listStaffContract,
|
|
1243
1806
|
listStudentsContract,
|
|
1807
|
+
listTemplatesContract,
|
|
1244
1808
|
listTermsContract,
|
|
1245
1809
|
listYearsContract,
|
|
1246
1810
|
loginContract,
|
|
1247
1811
|
logoutContract,
|
|
1248
1812
|
markAttendanceContract,
|
|
1813
|
+
markReadContract,
|
|
1814
|
+
markUnreadContract,
|
|
1815
|
+
notificationsContract,
|
|
1249
1816
|
paginatedOutputSchema,
|
|
1250
1817
|
refreshTokenContract,
|
|
1818
|
+
rejectContract,
|
|
1819
|
+
requestLiftContract,
|
|
1251
1820
|
requestPasswordResetContract,
|
|
1252
1821
|
resetPasswordContract,
|
|
1822
|
+
resolveBlockAltContract,
|
|
1823
|
+
resolveBlockContract,
|
|
1824
|
+
respondContract,
|
|
1825
|
+
respondToBlockContract,
|
|
1826
|
+
respondToDiaryEntryContract,
|
|
1253
1827
|
setCurrentTermContract,
|
|
1254
1828
|
setCurrentYearContract,
|
|
1829
|
+
setDefaultContract,
|
|
1255
1830
|
studentsContract,
|
|
1831
|
+
submitContract,
|
|
1256
1832
|
switchBranchContract,
|
|
1833
|
+
updateBankAccountContract,
|
|
1834
|
+
updateCategoryContract,
|
|
1257
1835
|
updateStaffStatusContract
|
|
1258
1836
|
});
|
|
1259
1837
|
//# sourceMappingURL=index.cjs.map
|