@brite-future-schools-contracts/contracts 2.0.28 → 2.0.30
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-LIPNVYGK.js +374 -0
- package/dist/chunk-LIPNVYGK.js.map +1 -0
- package/dist/chunk-W3NAS6DL.js +1 -0
- package/dist/{chunk-CL7UHAQE.js → chunk-WGPI4GGP.js} +362 -10
- package/dist/chunk-WGPI4GGP.js.map +1 -0
- package/dist/contracts/index.cjs +494 -0
- package/dist/contracts/index.cjs.map +1 -1
- package/dist/contracts/index.d.cts +2084 -1
- package/dist/contracts/index.d.ts +2084 -1
- package/dist/contracts/index.js +84 -2
- package/dist/index.cjs +613 -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 +404 -9
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +545 -1
- package/dist/schemas/index.d.ts +545 -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,317 @@ 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
|
+
deliveryChannels: z8.array(NotificationChannelSchema).optional(),
|
|
876
|
+
scheduledAt: z8.string().datetime().optional(),
|
|
877
|
+
recurrence: z8.record(z8.string(), z8.unknown()).optional(),
|
|
878
|
+
audience: z8.array(NotificationAudienceItemSchema)
|
|
879
|
+
});
|
|
880
|
+
var ListNotificationTemplatesInputSchema = z8.object({
|
|
881
|
+
status: z8.string().optional(),
|
|
882
|
+
branchId: UuidSchema.optional()
|
|
883
|
+
});
|
|
884
|
+
var NotificationTemplateSchema = z8.object({
|
|
885
|
+
id: UuidSchema,
|
|
886
|
+
branchId: UuidSchema.nullable(),
|
|
887
|
+
title: z8.string(),
|
|
888
|
+
body: z8.string(),
|
|
889
|
+
urgency: NotificationUrgencySchema,
|
|
890
|
+
isBlocking: z8.boolean(),
|
|
891
|
+
deadlineHours: z8.number().nullable(),
|
|
892
|
+
redirectPath: z8.string().nullable(),
|
|
893
|
+
redirectParams: z8.record(z8.string(), z8.string()).nullable(),
|
|
894
|
+
requiresResponse: z8.boolean(),
|
|
895
|
+
responseOptions: z8.array(z8.string()).nullable(),
|
|
896
|
+
deliveryChannels: z8.array(NotificationChannelSchema),
|
|
897
|
+
scheduledAt: z8.string().nullable(),
|
|
898
|
+
recurrence: z8.record(z8.string(), z8.unknown()).nullable(),
|
|
899
|
+
lastFiredAt: z8.string().nullable(),
|
|
900
|
+
nextFireAt: z8.string().nullable(),
|
|
901
|
+
status: NotificationTemplateStatusSchema,
|
|
902
|
+
createdBy: UuidSchema,
|
|
903
|
+
approvedBy: UuidSchema.nullable(),
|
|
904
|
+
approvedAt: z8.string().nullable(),
|
|
905
|
+
sentAt: z8.string().nullable(),
|
|
906
|
+
createdAt: z8.string(),
|
|
907
|
+
updatedAt: z8.string()
|
|
908
|
+
});
|
|
909
|
+
var RejectNotificationInputSchema = z8.object({
|
|
910
|
+
id: UuidSchema,
|
|
911
|
+
reason: z8.string().optional()
|
|
912
|
+
});
|
|
913
|
+
var ListDeliveriesInputSchema = z8.object({
|
|
914
|
+
isRead: z8.boolean().optional(),
|
|
915
|
+
isBlocking: z8.boolean().optional()
|
|
916
|
+
});
|
|
917
|
+
var NotificationDeliverySchema = z8.object({
|
|
918
|
+
id: UuidSchema,
|
|
919
|
+
notificationId: UuidSchema,
|
|
920
|
+
userId: UuidSchema,
|
|
921
|
+
channel: NotificationChannelSchema,
|
|
922
|
+
deliveredAt: z8.string().nullable(),
|
|
923
|
+
readAt: z8.string().nullable(),
|
|
924
|
+
isRead: z8.boolean(),
|
|
925
|
+
markedUnreadAt: z8.string().nullable(),
|
|
926
|
+
acknowledgedAt: z8.string().nullable(),
|
|
927
|
+
response: z8.string().nullable(),
|
|
928
|
+
isBlocking: z8.boolean(),
|
|
929
|
+
isResolved: z8.boolean(),
|
|
930
|
+
resolvedAt: z8.string().nullable(),
|
|
931
|
+
returnPath: z8.string().nullable(),
|
|
932
|
+
createdAt: z8.string()
|
|
933
|
+
});
|
|
934
|
+
var AcknowledgeDeliveryInputSchema = z8.object({
|
|
935
|
+
deliveryId: UuidSchema,
|
|
936
|
+
response: z8.string().optional()
|
|
937
|
+
});
|
|
938
|
+
var RespondToDeliveryInputSchema = z8.object({
|
|
939
|
+
deliveryId: UuidSchema,
|
|
940
|
+
response: z8.string().min(1)
|
|
941
|
+
});
|
|
942
|
+
var ResponseSummarySchema = z8.record(z8.string(), z8.number());
|
|
943
|
+
var NotificationResponseItemSchema = z8.object({
|
|
944
|
+
deliveryId: UuidSchema,
|
|
945
|
+
userId: UuidSchema,
|
|
946
|
+
userName: z8.string(),
|
|
947
|
+
userEmail: z8.string(),
|
|
948
|
+
response: z8.string().nullable(),
|
|
949
|
+
acknowledgedAt: z8.string().nullable(),
|
|
950
|
+
isResolved: z8.boolean()
|
|
951
|
+
});
|
|
952
|
+
var PortalBlockSchema = z8.object({
|
|
953
|
+
id: UuidSchema,
|
|
954
|
+
userId: UuidSchema,
|
|
955
|
+
blockType: PortalBlockTypeSchema,
|
|
956
|
+
sourceId: UuidSchema,
|
|
957
|
+
redirectPath: z8.string(),
|
|
958
|
+
redirectParams: z8.record(z8.string(), z8.string()).nullable(),
|
|
959
|
+
returnPath: z8.string().nullable(),
|
|
960
|
+
severity: NotificationUrgencySchema,
|
|
961
|
+
isActive: z8.boolean(),
|
|
962
|
+
activatedAt: z8.string(),
|
|
963
|
+
resolvedAt: z8.string().nullable(),
|
|
964
|
+
resolvedBy: UuidSchema.nullable(),
|
|
965
|
+
resolvedVia: z8.string().nullable(),
|
|
966
|
+
requiresResponse: z8.boolean(),
|
|
967
|
+
responseOptions: z8.array(z8.string()).nullable(),
|
|
968
|
+
createdAt: z8.string()
|
|
969
|
+
});
|
|
970
|
+
var RespondToBlockInputSchema = z8.object({
|
|
971
|
+
blockId: UuidSchema,
|
|
972
|
+
response: z8.string().min(1)
|
|
973
|
+
});
|
|
974
|
+
var RespondToBlockOutputSchema = z8.unknown();
|
|
975
|
+
|
|
976
|
+
// src/schemas/diary.ts
|
|
977
|
+
var z9 = __toESM(require("zod"), 1);
|
|
978
|
+
var DiarySeveritySchema = z9.enum(["info", "moderate", "serious", "critical"]);
|
|
979
|
+
var DiaryEntryStatusSchema = z9.enum(["active", "resolved", "lifted"]);
|
|
980
|
+
var BlockResolutionMethodSchema = z9.enum(["guardian_acknowledge", "staff_lift"]);
|
|
981
|
+
var DiaryCategorySchema = z9.object({
|
|
982
|
+
id: UuidSchema,
|
|
983
|
+
branchId: UuidSchema,
|
|
984
|
+
name: z9.string(),
|
|
985
|
+
description: z9.string().nullable(),
|
|
986
|
+
isActive: z9.boolean(),
|
|
987
|
+
createdBy: UuidSchema.nullable(),
|
|
988
|
+
createdAt: z9.string()
|
|
989
|
+
});
|
|
990
|
+
var CreateDiaryCategoryInputSchema = z9.object({
|
|
991
|
+
name: z9.string().min(1).max(100),
|
|
992
|
+
description: z9.string().optional()
|
|
993
|
+
});
|
|
994
|
+
var UpdateDiaryCategoryInputSchema = z9.object({
|
|
995
|
+
id: UuidSchema,
|
|
996
|
+
name: z9.string().min(1).max(100).optional(),
|
|
997
|
+
description: z9.string().optional(),
|
|
998
|
+
isActive: z9.boolean().optional()
|
|
999
|
+
});
|
|
1000
|
+
var ListDiaryEntriesInputSchema = z9.object({
|
|
1001
|
+
classId: UuidSchema.optional(),
|
|
1002
|
+
studentId: UuidSchema.optional(),
|
|
1003
|
+
postedBy: UuidSchema.optional()
|
|
1004
|
+
});
|
|
1005
|
+
var DiaryEntrySchema = z9.object({
|
|
1006
|
+
id: UuidSchema,
|
|
1007
|
+
branchId: UuidSchema,
|
|
1008
|
+
classId: UuidSchema,
|
|
1009
|
+
studentId: UuidSchema.nullable(),
|
|
1010
|
+
postedBy: UuidSchema,
|
|
1011
|
+
categoryId: UuidSchema,
|
|
1012
|
+
title: z9.string(),
|
|
1013
|
+
body: z9.string(),
|
|
1014
|
+
severity: DiarySeveritySchema,
|
|
1015
|
+
requiresResponse: z9.boolean(),
|
|
1016
|
+
responseDeadlineDays: z9.number(),
|
|
1017
|
+
isBlockingPortal: z9.boolean(),
|
|
1018
|
+
isBlockingReportCard: z9.boolean(),
|
|
1019
|
+
status: DiaryEntryStatusSchema,
|
|
1020
|
+
resolvedAt: z9.string().nullable(),
|
|
1021
|
+
resolvedBy: UuidSchema.nullable(),
|
|
1022
|
+
liftApprovedBy: UuidSchema.nullable(),
|
|
1023
|
+
liftApprovedAt: z9.string().nullable(),
|
|
1024
|
+
createdAt: z9.string(),
|
|
1025
|
+
updatedAt: z9.string()
|
|
1026
|
+
});
|
|
1027
|
+
var CreateDiaryEntryInputSchema = z9.object({
|
|
1028
|
+
classId: UuidSchema,
|
|
1029
|
+
studentId: UuidSchema.optional(),
|
|
1030
|
+
categoryId: UuidSchema,
|
|
1031
|
+
title: z9.string().min(1).max(200),
|
|
1032
|
+
body: z9.string().min(1),
|
|
1033
|
+
severity: DiarySeveritySchema,
|
|
1034
|
+
requiresResponse: z9.boolean().optional(),
|
|
1035
|
+
responseDeadlineDays: z9.number().int().positive().optional(),
|
|
1036
|
+
isBlockingPortal: z9.boolean().optional(),
|
|
1037
|
+
isBlockingReportCard: z9.boolean().optional()
|
|
1038
|
+
});
|
|
1039
|
+
var DiaryAcknowledgementSchema = z9.object({
|
|
1040
|
+
id: UuidSchema,
|
|
1041
|
+
entryId: UuidSchema,
|
|
1042
|
+
guardianId: UuidSchema,
|
|
1043
|
+
studentId: UuidSchema,
|
|
1044
|
+
acknowledgedAt: z9.string().nullable(),
|
|
1045
|
+
response: z9.string().nullable(),
|
|
1046
|
+
isAcknowledged: z9.boolean(),
|
|
1047
|
+
createdAt: z9.string()
|
|
1048
|
+
});
|
|
1049
|
+
var DiaryBlockSchema = z9.object({
|
|
1050
|
+
id: UuidSchema,
|
|
1051
|
+
entryId: UuidSchema,
|
|
1052
|
+
guardianId: UuidSchema,
|
|
1053
|
+
studentId: UuidSchema,
|
|
1054
|
+
blockedAt: z9.string(),
|
|
1055
|
+
resolvedAt: z9.string().nullable(),
|
|
1056
|
+
resolvedBy: UuidSchema.nullable(),
|
|
1057
|
+
resolvedVia: BlockResolutionMethodSchema.nullable(),
|
|
1058
|
+
liftApprovedBy: UuidSchema.nullable(),
|
|
1059
|
+
liftApprovedAt: z9.string().nullable(),
|
|
1060
|
+
isActive: z9.boolean(),
|
|
1061
|
+
createdAt: z9.string()
|
|
1062
|
+
});
|
|
1063
|
+
var MyAcknowledgementSchema = z9.object({
|
|
1064
|
+
isAcknowledged: z9.boolean(),
|
|
1065
|
+
response: z9.string().nullable()
|
|
1066
|
+
});
|
|
1067
|
+
var DiaryEntryDetailSchema = DiaryEntrySchema.extend({
|
|
1068
|
+
acknowledgements: z9.array(DiaryAcknowledgementSchema),
|
|
1069
|
+
blocks: z9.array(DiaryBlockSchema),
|
|
1070
|
+
myAcknowledgement: MyAcknowledgementSchema.nullable()
|
|
1071
|
+
});
|
|
1072
|
+
var DiaryEntryForGuardianSchema = DiaryEntrySchema.extend({
|
|
1073
|
+
myAcknowledgement: MyAcknowledgementSchema.nullable()
|
|
1074
|
+
});
|
|
1075
|
+
var AcknowledgeDiaryEntryInputSchema = z9.object({
|
|
1076
|
+
entryId: UuidSchema,
|
|
1077
|
+
studentId: UuidSchema
|
|
1078
|
+
});
|
|
1079
|
+
var RespondToDiaryEntryInputSchema = z9.object({
|
|
1080
|
+
entryId: UuidSchema,
|
|
1081
|
+
studentId: UuidSchema,
|
|
1082
|
+
response: z9.string().min(1)
|
|
1083
|
+
});
|
|
1084
|
+
var DiaryBlockIdInputSchema = z9.object({
|
|
1085
|
+
blockId: UuidSchema
|
|
1086
|
+
});
|
|
1087
|
+
var ListDiaryAcknowledgementsInputSchema = z9.object({
|
|
1088
|
+
entryId: UuidSchema
|
|
1089
|
+
});
|
|
1090
|
+
|
|
1091
|
+
// src/schemas/grades.ts
|
|
1092
|
+
var z10 = __toESM(require("zod"), 1);
|
|
700
1093
|
var GRADE_LEVELS = [
|
|
701
1094
|
"PP1",
|
|
702
1095
|
"PP2",
|
|
@@ -710,23 +1103,23 @@ var GRADE_LEVELS = [
|
|
|
710
1103
|
"G8",
|
|
711
1104
|
"G9"
|
|
712
1105
|
];
|
|
713
|
-
var GradeSchema =
|
|
714
|
-
id:
|
|
715
|
-
branchId:
|
|
716
|
-
name:
|
|
1106
|
+
var GradeSchema = z10.object({
|
|
1107
|
+
id: z10.string().uuid(),
|
|
1108
|
+
branchId: z10.string().uuid(),
|
|
1109
|
+
name: z10.string(),
|
|
717
1110
|
level: GradeLevelSchema,
|
|
718
|
-
description:
|
|
1111
|
+
description: z10.string().nullable()
|
|
719
1112
|
});
|
|
720
|
-
var CreateGradeInputSchema =
|
|
721
|
-
name:
|
|
1113
|
+
var CreateGradeInputSchema = z10.object({
|
|
1114
|
+
name: z10.string().min(1).max(50),
|
|
722
1115
|
level: GradeLevelSchema,
|
|
723
|
-
description:
|
|
1116
|
+
description: z10.string().max(300).optional()
|
|
724
1117
|
});
|
|
725
1118
|
|
|
726
1119
|
// src/contracts/auth.ts
|
|
727
1120
|
var import_contract = require("@orpc/contract");
|
|
728
|
-
var
|
|
729
|
-
var EmptyOutputSchema =
|
|
1121
|
+
var z11 = __toESM(require("zod"), 1);
|
|
1122
|
+
var EmptyOutputSchema = z11.object({}).meta({ description: "Empty success response" });
|
|
730
1123
|
var loginContract = import_contract.oc.route({ method: "POST", path: "/auth/login" }).input(LoginInputSchema).output(LoginOutputSchema);
|
|
731
1124
|
var refreshTokenContract = import_contract.oc.route({ method: "POST", path: "/auth/refresh" }).input(RefreshTokenInputSchema).output(RefreshTokenOutputSchema);
|
|
732
1125
|
var logoutContract = import_contract.oc.route({ method: "POST", path: "/auth/logout" }).input(LogoutInputSchema).output(EmptyOutputSchema);
|
|
@@ -748,20 +1141,20 @@ var authContract = {
|
|
|
748
1141
|
|
|
749
1142
|
// src/contracts/hr.ts
|
|
750
1143
|
var import_contract2 = require("@orpc/contract");
|
|
751
|
-
var
|
|
752
|
-
var EmptyOutput =
|
|
1144
|
+
var z12 = __toESM(require("zod"), 1);
|
|
1145
|
+
var EmptyOutput = z12.object({});
|
|
753
1146
|
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:
|
|
1147
|
+
var listStaffContract = import_contract2.oc.route({ method: "GET", path: "/hr/staff" }).input(ListStaffInputSchema).output(z12.object({
|
|
1148
|
+
items: z12.array(StaffListItemSchema),
|
|
1149
|
+
total: z12.number(),
|
|
757
1150
|
nextCursor: UuidSchema.nullable()
|
|
758
1151
|
}));
|
|
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(
|
|
1152
|
+
var getStaffByIdContract = import_contract2.oc.route({ method: "GET", path: "/hr/staff/{id}" }).input(z12.object({ id: UuidSchema })).output(StaffProfileSchema);
|
|
1153
|
+
var updateStaffStatusContract = import_contract2.oc.route({ method: "PATCH", path: "/hr/staff/{id}/status" }).input(z12.object({
|
|
761
1154
|
id: UuidSchema,
|
|
762
|
-
status:
|
|
1155
|
+
status: z12.enum(["active", "inactive", "suspended"])
|
|
763
1156
|
})).output(EmptyOutput);
|
|
764
|
-
var listDepartmentsContract = import_contract2.oc.route({ method: "GET", path: "/hr/departments" }).input(
|
|
1157
|
+
var listDepartmentsContract = import_contract2.oc.route({ method: "GET", path: "/hr/departments" }).input(z12.object({ branchId: UuidSchema.optional() })).output(z12.array(DepartmentSchema));
|
|
765
1158
|
var createDepartmentContract = import_contract2.oc.route({ method: "POST", path: "/hr/departments" }).input(CreateDepartmentInputSchema).output(DepartmentSchema);
|
|
766
1159
|
var hrContract = {
|
|
767
1160
|
createStaff: createStaffContract,
|
|
@@ -774,21 +1167,21 @@ var hrContract = {
|
|
|
774
1167
|
|
|
775
1168
|
// src/contracts/students.ts
|
|
776
1169
|
var import_contract3 = require("@orpc/contract");
|
|
777
|
-
var
|
|
778
|
-
var EmptyOutput2 =
|
|
1170
|
+
var z13 = __toESM(require("zod"), 1);
|
|
1171
|
+
var EmptyOutput2 = z13.object({});
|
|
779
1172
|
var createStudentContract = import_contract3.oc.route({ method: "POST", path: "/students" }).input(CreateStudentInputSchema).output(CreateStudentOutputSchema);
|
|
780
1173
|
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:
|
|
1174
|
+
var listStudentsContract = import_contract3.oc.route({ method: "GET", path: "/students" }).input(ListStudentsInputSchema).output(z13.object({
|
|
1175
|
+
items: z13.array(StudentListItemSchema),
|
|
1176
|
+
total: z13.number(),
|
|
784
1177
|
nextCursor: UuidSchema.nullable()
|
|
785
1178
|
}));
|
|
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(
|
|
1179
|
+
var getStudentByIdContract = import_contract3.oc.route({ method: "GET", path: "/students/{id}" }).input(z13.object({ id: UuidSchema })).output(StudentProfileSchema);
|
|
1180
|
+
var linkGuardianContract = import_contract3.oc.route({ method: "POST", path: "/students/guardians" }).input(LinkGuardianInputSchema).output(z13.object({ guardianId: UuidSchema }));
|
|
1181
|
+
var listClassesContract = import_contract3.oc.route({ method: "GET", path: "/students/classes" }).input(z13.object({
|
|
789
1182
|
termId: UuidSchema.optional(),
|
|
790
|
-
gradeLevel:
|
|
791
|
-
})).output(
|
|
1183
|
+
gradeLevel: z13.string().optional()
|
|
1184
|
+
})).output(z13.array(ClassSummarySchema));
|
|
792
1185
|
var studentsContract = {
|
|
793
1186
|
create: createStudentContract,
|
|
794
1187
|
bulkUpload: bulkUploadStudentsContract,
|
|
@@ -800,11 +1193,11 @@ var studentsContract = {
|
|
|
800
1193
|
|
|
801
1194
|
// src/contracts/attendance.ts
|
|
802
1195
|
var import_contract4 = require("@orpc/contract");
|
|
803
|
-
var
|
|
1196
|
+
var z14 = __toESM(require("zod"), 1);
|
|
804
1197
|
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(
|
|
1198
|
+
var getByClassContract = import_contract4.oc.route({ method: "GET", path: "/attendance/class" }).input(GetByClassInputSchema).output(z14.array(ClassAttendanceRowSchema));
|
|
1199
|
+
var getByStudentContract = import_contract4.oc.route({ method: "GET", path: "/attendance/student" }).input(GetByStudentInputSchema).output(z14.array(StudentAttendanceRowSchema));
|
|
1200
|
+
var listTermsContract = import_contract4.oc.route({ method: "GET", path: "/terms" }).input(z14.object({})).output(z14.array(TermSchema));
|
|
808
1201
|
var attendanceContract = {
|
|
809
1202
|
mark: markAttendanceContract,
|
|
810
1203
|
getByClass: getByClassContract,
|
|
@@ -814,11 +1207,11 @@ var attendanceContract = {
|
|
|
814
1207
|
|
|
815
1208
|
// src/contracts/calendar.ts
|
|
816
1209
|
var import_contract5 = require("@orpc/contract");
|
|
817
|
-
var
|
|
818
|
-
var listYearsContract = import_contract5.oc.route({ method: "GET", path: "/calendar/years" }).input(
|
|
1210
|
+
var z15 = __toESM(require("zod"), 1);
|
|
1211
|
+
var listYearsContract = import_contract5.oc.route({ method: "GET", path: "/calendar/years" }).input(z15.object({})).output(z15.array(AcademicYearSchema));
|
|
819
1212
|
var createYearContract = import_contract5.oc.route({ method: "POST", path: "/calendar/years" }).input(CreateYearInputSchema).output(AcademicYearSchema);
|
|
820
1213
|
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(
|
|
1214
|
+
var calendarListTermsContract = import_contract5.oc.route({ method: "GET", path: "/calendar/terms" }).input(ListTermsInputSchema).output(z15.array(AcademicTermSchema));
|
|
822
1215
|
var createTermContract = import_contract5.oc.route({ method: "POST", path: "/calendar/terms" }).input(CreateTermInputSchema).output(AcademicTermSchema);
|
|
823
1216
|
var setCurrentTermContract = import_contract5.oc.route({ method: "POST", path: "/calendar/terms/current" }).input(SetCurrentTermInputSchema).output(AcademicTermSchema);
|
|
824
1217
|
var calendarContract = {
|
|
@@ -832,14 +1225,111 @@ var calendarContract = {
|
|
|
832
1225
|
|
|
833
1226
|
// src/contracts/grades.ts
|
|
834
1227
|
var import_contract6 = require("@orpc/contract");
|
|
835
|
-
var
|
|
836
|
-
var listGradesContract = import_contract6.oc.route({ method: "GET", path: "/grades" }).input(
|
|
1228
|
+
var z16 = __toESM(require("zod"), 1);
|
|
1229
|
+
var listGradesContract = import_contract6.oc.route({ method: "GET", path: "/grades" }).input(z16.object({})).output(z16.array(GradeSchema));
|
|
837
1230
|
var createGradeContract = import_contract6.oc.route({ method: "POST", path: "/grades" }).input(CreateGradeInputSchema).output(GradeSchema);
|
|
838
1231
|
var gradesContract = {
|
|
839
1232
|
list: listGradesContract,
|
|
840
1233
|
create: createGradeContract
|
|
841
1234
|
};
|
|
842
1235
|
|
|
1236
|
+
// src/contracts/diary.ts
|
|
1237
|
+
var import_contract7 = require("@orpc/contract");
|
|
1238
|
+
var z17 = __toESM(require("zod"), 1);
|
|
1239
|
+
var IdInput = z17.object({ id: UuidSchema });
|
|
1240
|
+
var listCategoriesContract = import_contract7.oc.route({ method: "GET", path: "/diary/categories" }).input(z17.object({})).output(z17.array(DiaryCategorySchema));
|
|
1241
|
+
var createCategoryContract = import_contract7.oc.route({ method: "POST", path: "/diary/categories" }).input(CreateDiaryCategoryInputSchema).output(DiaryCategorySchema);
|
|
1242
|
+
var updateCategoryContract = import_contract7.oc.route({ method: "PATCH", path: "/diary/categories/{id}" }).input(UpdateDiaryCategoryInputSchema).output(DiaryCategorySchema);
|
|
1243
|
+
var listEntriesContract = import_contract7.oc.route({ method: "GET", path: "/diary/entries" }).input(ListDiaryEntriesInputSchema).output(z17.array(DiaryEntrySchema));
|
|
1244
|
+
var listForGuardianContract = import_contract7.oc.route({ method: "GET", path: "/diary/entries/guardian" }).input(z17.object({})).output(z17.array(DiaryEntryForGuardianSchema));
|
|
1245
|
+
var getEntryContract = import_contract7.oc.route({ method: "GET", path: "/diary/entries/{id}" }).input(IdInput).output(DiaryEntryDetailSchema);
|
|
1246
|
+
var createEntryContract = import_contract7.oc.route({ method: "POST", path: "/diary/entries" }).input(CreateDiaryEntryInputSchema).output(DiaryEntrySchema);
|
|
1247
|
+
var acknowledgeDiaryEntryContract = import_contract7.oc.route({ method: "PATCH", path: "/diary/entries/{entryId}/acknowledge" }).input(AcknowledgeDiaryEntryInputSchema).output(DiaryAcknowledgementSchema);
|
|
1248
|
+
var respondToDiaryEntryContract = import_contract7.oc.route({ method: "PATCH", path: "/diary/entries/{entryId}/respond" }).input(RespondToDiaryEntryInputSchema).output(DiaryAcknowledgementSchema);
|
|
1249
|
+
var requestLiftContract = import_contract7.oc.route({ method: "PATCH", path: "/diary/blocks/{blockId}/request-lift" }).input(DiaryBlockIdInputSchema).output(DiaryBlockSchema);
|
|
1250
|
+
var approveLiftContract = import_contract7.oc.route({ method: "PATCH", path: "/diary/blocks/{blockId}/approve-lift" }).input(DiaryBlockIdInputSchema).output(DiaryBlockSchema);
|
|
1251
|
+
var listAcknowledgementsContract = import_contract7.oc.route({ method: "GET", path: "/diary/entries/{entryId}/acknowledgements" }).input(ListDiaryAcknowledgementsInputSchema).output(z17.array(DiaryAcknowledgementSchema));
|
|
1252
|
+
var diaryContract = {
|
|
1253
|
+
listCategories: listCategoriesContract,
|
|
1254
|
+
createCategory: createCategoryContract,
|
|
1255
|
+
updateCategory: updateCategoryContract,
|
|
1256
|
+
listEntries: listEntriesContract,
|
|
1257
|
+
listForGuardian: listForGuardianContract,
|
|
1258
|
+
getEntry: getEntryContract,
|
|
1259
|
+
createEntry: createEntryContract,
|
|
1260
|
+
acknowledge: acknowledgeDiaryEntryContract,
|
|
1261
|
+
respond: respondToDiaryEntryContract,
|
|
1262
|
+
requestLift: requestLiftContract,
|
|
1263
|
+
approveLift: approveLiftContract,
|
|
1264
|
+
listAcknowledgements: listAcknowledgementsContract
|
|
1265
|
+
};
|
|
1266
|
+
|
|
1267
|
+
// src/contracts/banking.ts
|
|
1268
|
+
var import_contract8 = require("@orpc/contract");
|
|
1269
|
+
var z18 = __toESM(require("zod"), 1);
|
|
1270
|
+
var listAccountsContract = import_contract8.oc.route({ method: "GET", path: "/banking/accounts" }).input(ListBankAccountsInputSchema).output(z18.array(BranchBankAccountSchema));
|
|
1271
|
+
var getByIdContract = import_contract8.oc.route({ method: "GET", path: "/banking/accounts/{id}" }).input(z18.object({ id: UuidSchema })).output(BranchBankAccountSchema);
|
|
1272
|
+
var createBankAccountContract = import_contract8.oc.route({ method: "POST", path: "/banking/accounts" }).input(CreateBankAccountInputSchema).output(BranchBankAccountSchema);
|
|
1273
|
+
var updateBankAccountContract = import_contract8.oc.route({ method: "PATCH", path: "/banking/accounts/{id}" }).input(UpdateBankAccountInputSchema).output(BranchBankAccountSchema);
|
|
1274
|
+
var setDefaultContract = import_contract8.oc.route({ method: "PATCH", path: "/banking/accounts/{id}/default" }).input(z18.object({ id: UuidSchema })).output(BranchBankAccountSchema);
|
|
1275
|
+
var deactivateContract = import_contract8.oc.route({ method: "PATCH", path: "/banking/accounts/{id}/deactivate" }).input(z18.object({ id: UuidSchema })).output(BranchBankAccountSchema);
|
|
1276
|
+
var listBanksContract = import_contract8.oc.route({ method: "GET", path: "/banking/banks" }).input(z18.object({})).output(z18.array(KenyanBankSchema));
|
|
1277
|
+
var bankingContract = {
|
|
1278
|
+
listAccounts: listAccountsContract,
|
|
1279
|
+
getById: getByIdContract,
|
|
1280
|
+
create: createBankAccountContract,
|
|
1281
|
+
update: updateBankAccountContract,
|
|
1282
|
+
setDefault: setDefaultContract,
|
|
1283
|
+
deactivate: deactivateContract,
|
|
1284
|
+
listBanks: listBanksContract
|
|
1285
|
+
};
|
|
1286
|
+
|
|
1287
|
+
// src/contracts/notifications.ts
|
|
1288
|
+
var import_contract9 = require("@orpc/contract");
|
|
1289
|
+
var z19 = __toESM(require("zod"), 1);
|
|
1290
|
+
var EmptyOutput3 = z19.object({});
|
|
1291
|
+
var IdInput2 = z19.object({ id: UuidSchema });
|
|
1292
|
+
var listTemplatesContract = import_contract9.oc.route({ method: "GET", path: "/notifications/templates" }).input(ListNotificationTemplatesInputSchema).output(z19.array(NotificationTemplateSchema));
|
|
1293
|
+
var getTemplateContract = import_contract9.oc.route({ method: "GET", path: "/notifications/templates/{id}" }).input(IdInput2).output(NotificationTemplateSchema);
|
|
1294
|
+
var createNotificationContract = import_contract9.oc.route({ method: "POST", path: "/notifications/templates" }).input(CreateNotificationInputSchema).output(NotificationTemplateSchema);
|
|
1295
|
+
var submitContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/templates/{id}/submit" }).input(IdInput2).output(NotificationTemplateSchema);
|
|
1296
|
+
var approveContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/templates/{id}/approve" }).input(IdInput2).output(NotificationTemplateSchema);
|
|
1297
|
+
var rejectContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/templates/{id}/reject" }).input(RejectNotificationInputSchema).output(NotificationTemplateSchema);
|
|
1298
|
+
var cancelContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/templates/{id}/cancel" }).input(IdInput2).output(NotificationTemplateSchema);
|
|
1299
|
+
var listDeliveriesContract = import_contract9.oc.route({ method: "GET", path: "/notifications/deliveries" }).input(ListDeliveriesInputSchema).output(z19.array(NotificationDeliverySchema));
|
|
1300
|
+
var markReadContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/deliveries/{deliveryId}/read" }).input(z19.object({ deliveryId: UuidSchema })).output(NotificationDeliverySchema);
|
|
1301
|
+
var markUnreadContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/deliveries/{deliveryId}/unread" }).input(z19.object({ deliveryId: UuidSchema })).output(NotificationDeliverySchema);
|
|
1302
|
+
var acknowledgeContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/deliveries/{deliveryId}/acknowledge" }).input(AcknowledgeDeliveryInputSchema).output(NotificationDeliverySchema);
|
|
1303
|
+
var respondContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/deliveries/{deliveryId}/respond" }).input(RespondToDeliveryInputSchema).output(NotificationDeliverySchema);
|
|
1304
|
+
var getResponseSummaryContract = import_contract9.oc.route({ method: "GET", path: "/notifications/templates/{id}/response-summary" }).input(IdInput2).output(ResponseSummarySchema);
|
|
1305
|
+
var listResponsesContract = import_contract9.oc.route({ method: "GET", path: "/notifications/templates/{id}/responses" }).input(IdInput2).output(z19.array(NotificationResponseItemSchema));
|
|
1306
|
+
var resolveBlockContract = import_contract9.oc.route({ method: "PATCH", path: "/notifications/blocks/{blockId}/resolve" }).input(z19.object({ blockId: UuidSchema })).output(PortalBlockSchema);
|
|
1307
|
+
var notificationsContract = {
|
|
1308
|
+
listTemplates: listTemplatesContract,
|
|
1309
|
+
getTemplate: getTemplateContract,
|
|
1310
|
+
create: createNotificationContract,
|
|
1311
|
+
submit: submitContract,
|
|
1312
|
+
approve: approveContract,
|
|
1313
|
+
reject: rejectContract,
|
|
1314
|
+
cancel: cancelContract,
|
|
1315
|
+
listDeliveries: listDeliveriesContract,
|
|
1316
|
+
markRead: markReadContract,
|
|
1317
|
+
markUnread: markUnreadContract,
|
|
1318
|
+
acknowledge: acknowledgeContract,
|
|
1319
|
+
respond: respondContract,
|
|
1320
|
+
getResponseSummary: getResponseSummaryContract,
|
|
1321
|
+
listResponses: listResponsesContract,
|
|
1322
|
+
resolveBlock: resolveBlockContract
|
|
1323
|
+
};
|
|
1324
|
+
var listActiveBlocksContract = import_contract9.oc.route({ method: "GET", path: "/blocks/active" }).input(z19.object({})).output(z19.array(PortalBlockSchema));
|
|
1325
|
+
var resolveBlockAltContract = import_contract9.oc.route({ method: "PATCH", path: "/blocks/{blockId}/resolve" }).input(z19.object({ blockId: UuidSchema })).output(PortalBlockSchema);
|
|
1326
|
+
var respondToBlockContract = import_contract9.oc.route({ method: "PATCH", path: "/blocks/{blockId}/respond" }).input(RespondToBlockInputSchema).output(RespondToBlockOutputSchema);
|
|
1327
|
+
var blocksContract = {
|
|
1328
|
+
listActive: listActiveBlocksContract,
|
|
1329
|
+
resolve: resolveBlockAltContract,
|
|
1330
|
+
respond: respondToBlockContract
|
|
1331
|
+
};
|
|
1332
|
+
|
|
843
1333
|
// src/roles/helpers.ts
|
|
844
1334
|
function hasRole(user, role) {
|
|
845
1335
|
return user.roles.some(
|
|
@@ -1093,8 +1583,13 @@ function isScopedToOwnVehicle(user) {
|
|
|
1093
1583
|
0 && (module.exports = {
|
|
1094
1584
|
AcademicTermSchema,
|
|
1095
1585
|
AcademicYearSchema,
|
|
1586
|
+
AcknowledgeDeliveryInputSchema,
|
|
1587
|
+
AcknowledgeDiaryEntryInputSchema,
|
|
1096
1588
|
AttendanceRecordInputSchema,
|
|
1097
1589
|
AttendanceStatusSchema,
|
|
1590
|
+
BankAccountTypeSchema,
|
|
1591
|
+
BlockResolutionMethodSchema,
|
|
1592
|
+
BranchBankAccountSchema,
|
|
1098
1593
|
BranchRefSchema,
|
|
1099
1594
|
BulkUploadStudentRowSchema,
|
|
1100
1595
|
BulkUploadStudentsInputSchema,
|
|
@@ -1102,8 +1597,12 @@ function isScopedToOwnVehicle(user) {
|
|
|
1102
1597
|
ChangePasswordInputSchema,
|
|
1103
1598
|
ClassAttendanceRowSchema,
|
|
1104
1599
|
ClassSummarySchema,
|
|
1600
|
+
CreateBankAccountInputSchema,
|
|
1105
1601
|
CreateDepartmentInputSchema,
|
|
1602
|
+
CreateDiaryCategoryInputSchema,
|
|
1603
|
+
CreateDiaryEntryInputSchema,
|
|
1106
1604
|
CreateGradeInputSchema,
|
|
1605
|
+
CreateNotificationInputSchema,
|
|
1107
1606
|
CreateStaffInputSchema,
|
|
1108
1607
|
CreateStaffOutputSchema,
|
|
1109
1608
|
CreateStudentInputSchema,
|
|
@@ -1112,6 +1611,15 @@ function isScopedToOwnVehicle(user) {
|
|
|
1112
1611
|
CreateYearInputSchema,
|
|
1113
1612
|
CuidSchema,
|
|
1114
1613
|
DepartmentSchema,
|
|
1614
|
+
DiaryAcknowledgementSchema,
|
|
1615
|
+
DiaryBlockIdInputSchema,
|
|
1616
|
+
DiaryBlockSchema,
|
|
1617
|
+
DiaryCategorySchema,
|
|
1618
|
+
DiaryEntryDetailSchema,
|
|
1619
|
+
DiaryEntryForGuardianSchema,
|
|
1620
|
+
DiaryEntrySchema,
|
|
1621
|
+
DiaryEntryStatusSchema,
|
|
1622
|
+
DiarySeveritySchema,
|
|
1115
1623
|
EmploymentTypeSchema,
|
|
1116
1624
|
GRADE_LEVELS,
|
|
1117
1625
|
GenderSchema,
|
|
@@ -1119,7 +1627,13 @@ function isScopedToOwnVehicle(user) {
|
|
|
1119
1627
|
GetByStudentInputSchema,
|
|
1120
1628
|
GradeLevelSchema,
|
|
1121
1629
|
GradeSchema,
|
|
1630
|
+
KenyanBankSchema,
|
|
1122
1631
|
LinkGuardianInputSchema,
|
|
1632
|
+
ListBankAccountsInputSchema,
|
|
1633
|
+
ListDeliveriesInputSchema,
|
|
1634
|
+
ListDiaryAcknowledgementsInputSchema,
|
|
1635
|
+
ListDiaryEntriesInputSchema,
|
|
1636
|
+
ListNotificationTemplatesInputSchema,
|
|
1123
1637
|
ListStaffInputSchema,
|
|
1124
1638
|
ListStudentsInputSchema,
|
|
1125
1639
|
ListTermsInputSchema,
|
|
@@ -1128,11 +1642,28 @@ function isScopedToOwnVehicle(user) {
|
|
|
1128
1642
|
LogoutInputSchema,
|
|
1129
1643
|
MarkAttendanceInputSchema,
|
|
1130
1644
|
MarkAttendanceOutputSchema,
|
|
1645
|
+
MyAcknowledgementSchema,
|
|
1646
|
+
NotificationAudienceItemSchema,
|
|
1647
|
+
NotificationAudienceTypeSchema,
|
|
1648
|
+
NotificationChannelSchema,
|
|
1649
|
+
NotificationDeliverySchema,
|
|
1650
|
+
NotificationResponseItemSchema,
|
|
1651
|
+
NotificationTemplateSchema,
|
|
1652
|
+
NotificationTemplateStatusSchema,
|
|
1653
|
+
NotificationUrgencySchema,
|
|
1131
1654
|
PaginationInputSchema,
|
|
1655
|
+
PortalBlockSchema,
|
|
1656
|
+
PortalBlockTypeSchema,
|
|
1132
1657
|
RefreshTokenInputSchema,
|
|
1133
1658
|
RefreshTokenOutputSchema,
|
|
1659
|
+
RejectNotificationInputSchema,
|
|
1134
1660
|
RequestPasswordResetInputSchema,
|
|
1135
1661
|
ResetPasswordInputSchema,
|
|
1662
|
+
RespondToBlockInputSchema,
|
|
1663
|
+
RespondToBlockOutputSchema,
|
|
1664
|
+
RespondToDeliveryInputSchema,
|
|
1665
|
+
RespondToDiaryEntryInputSchema,
|
|
1666
|
+
ResponseSummarySchema,
|
|
1136
1667
|
SessionUserOutputSchema,
|
|
1137
1668
|
SessionUserRoleSchema,
|
|
1138
1669
|
SessionUserSubRoleSchema,
|
|
@@ -1148,9 +1679,17 @@ function isScopedToOwnVehicle(user) {
|
|
|
1148
1679
|
SwitchBranchInputSchema,
|
|
1149
1680
|
TermSchema,
|
|
1150
1681
|
TimestampsSchema,
|
|
1682
|
+
UpdateBankAccountInputSchema,
|
|
1683
|
+
UpdateDiaryCategoryInputSchema,
|
|
1151
1684
|
UuidSchema,
|
|
1685
|
+
acknowledgeContract,
|
|
1686
|
+
acknowledgeDiaryEntryContract,
|
|
1687
|
+
approveContract,
|
|
1688
|
+
approveLiftContract,
|
|
1152
1689
|
attendanceContract,
|
|
1153
1690
|
authContract,
|
|
1691
|
+
bankingContract,
|
|
1692
|
+
blocksContract,
|
|
1154
1693
|
bulkUploadStudentsContract,
|
|
1155
1694
|
calendarContract,
|
|
1156
1695
|
calendarListTermsContract,
|
|
@@ -1191,18 +1730,29 @@ function isScopedToOwnVehicle(user) {
|
|
|
1191
1730
|
canViewStaffList,
|
|
1192
1731
|
canViewStudentList,
|
|
1193
1732
|
canViewTransport,
|
|
1733
|
+
cancelContract,
|
|
1194
1734
|
changePasswordContract,
|
|
1735
|
+
createBankAccountContract,
|
|
1736
|
+
createCategoryContract,
|
|
1195
1737
|
createDepartmentContract,
|
|
1738
|
+
createEntryContract,
|
|
1196
1739
|
createGradeContract,
|
|
1740
|
+
createNotificationContract,
|
|
1197
1741
|
createStaffContract,
|
|
1198
1742
|
createStudentContract,
|
|
1199
1743
|
createTermContract,
|
|
1200
1744
|
createYearContract,
|
|
1745
|
+
deactivateContract,
|
|
1746
|
+
diaryContract,
|
|
1201
1747
|
getByClassContract,
|
|
1748
|
+
getByIdContract,
|
|
1202
1749
|
getByStudentContract,
|
|
1750
|
+
getEntryContract,
|
|
1203
1751
|
getMeContract,
|
|
1752
|
+
getResponseSummaryContract,
|
|
1204
1753
|
getStaffByIdContract,
|
|
1205
1754
|
getStudentByIdContract,
|
|
1755
|
+
getTemplateContract,
|
|
1206
1756
|
gradesContract,
|
|
1207
1757
|
hrContract,
|
|
1208
1758
|
isBoardingMaster,
|
|
@@ -1236,24 +1786,48 @@ function isScopedToOwnVehicle(user) {
|
|
|
1236
1786
|
isSubjectTeacher,
|
|
1237
1787
|
isSystemAdmin,
|
|
1238
1788
|
linkGuardianContract,
|
|
1789
|
+
listAccountsContract,
|
|
1790
|
+
listAcknowledgementsContract,
|
|
1791
|
+
listActiveBlocksContract,
|
|
1792
|
+
listBanksContract,
|
|
1793
|
+
listCategoriesContract,
|
|
1239
1794
|
listClassesContract,
|
|
1795
|
+
listDeliveriesContract,
|
|
1240
1796
|
listDepartmentsContract,
|
|
1797
|
+
listEntriesContract,
|
|
1798
|
+
listForGuardianContract,
|
|
1241
1799
|
listGradesContract,
|
|
1800
|
+
listResponsesContract,
|
|
1242
1801
|
listStaffContract,
|
|
1243
1802
|
listStudentsContract,
|
|
1803
|
+
listTemplatesContract,
|
|
1244
1804
|
listTermsContract,
|
|
1245
1805
|
listYearsContract,
|
|
1246
1806
|
loginContract,
|
|
1247
1807
|
logoutContract,
|
|
1248
1808
|
markAttendanceContract,
|
|
1809
|
+
markReadContract,
|
|
1810
|
+
markUnreadContract,
|
|
1811
|
+
notificationsContract,
|
|
1249
1812
|
paginatedOutputSchema,
|
|
1250
1813
|
refreshTokenContract,
|
|
1814
|
+
rejectContract,
|
|
1815
|
+
requestLiftContract,
|
|
1251
1816
|
requestPasswordResetContract,
|
|
1252
1817
|
resetPasswordContract,
|
|
1818
|
+
resolveBlockAltContract,
|
|
1819
|
+
resolveBlockContract,
|
|
1820
|
+
respondContract,
|
|
1821
|
+
respondToBlockContract,
|
|
1822
|
+
respondToDiaryEntryContract,
|
|
1253
1823
|
setCurrentTermContract,
|
|
1254
1824
|
setCurrentYearContract,
|
|
1825
|
+
setDefaultContract,
|
|
1255
1826
|
studentsContract,
|
|
1827
|
+
submitContract,
|
|
1256
1828
|
switchBranchContract,
|
|
1829
|
+
updateBankAccountContract,
|
|
1830
|
+
updateCategoryContract,
|
|
1257
1831
|
updateStaffStatusContract
|
|
1258
1832
|
});
|
|
1259
1833
|
//# sourceMappingURL=index.cjs.map
|