@eeplatform/basic-edu 1.5.1 → 1.6.0
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/CHANGELOG.md +12 -0
- package/dist/index.d.ts +430 -21
- package/dist/index.js +5933 -2402
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5499 -1942
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -4,25 +4,14 @@ import { ObjectId, ClientSession } from 'mongodb';
|
|
|
4
4
|
import * as bson from 'bson';
|
|
5
5
|
import { Request, Response, NextFunction } from 'express';
|
|
6
6
|
|
|
7
|
-
type TCurriculumSubject = {
|
|
8
|
-
educationLevel: string;
|
|
9
|
-
gradeLevel: string;
|
|
10
|
-
subjectCode: string;
|
|
11
|
-
subjectName: string;
|
|
12
|
-
subjectType: string;
|
|
13
|
-
sessionFrequency: number;
|
|
14
|
-
sessionDuration: number;
|
|
15
|
-
totalMinutesPerWeek: number;
|
|
16
|
-
};
|
|
17
7
|
type TCurriculum = {
|
|
18
8
|
_id?: ObjectId;
|
|
19
|
-
|
|
20
|
-
code: string;
|
|
9
|
+
name: string;
|
|
21
10
|
effectiveSchoolYear: string;
|
|
22
11
|
maxTeachingHoursPerDay: number;
|
|
23
|
-
subjects?: TCurriculumSubject[];
|
|
24
12
|
curriculumMemoRef?: string;
|
|
25
|
-
status?:
|
|
13
|
+
status?: "active" | "pilot" | "inactive" | "deprecated";
|
|
14
|
+
whitelist?: (ObjectId | string)[];
|
|
26
15
|
createdAt?: Date | string;
|
|
27
16
|
updatedAt?: Date | string;
|
|
28
17
|
deletedAt?: Date | string;
|
|
@@ -33,13 +22,12 @@ type TCurriculum = {
|
|
|
33
22
|
declare const schemaCurriculum: Joi.ObjectSchema<any>;
|
|
34
23
|
declare function MCurriculum(value: TCurriculum): {
|
|
35
24
|
_id: ObjectId | undefined;
|
|
36
|
-
|
|
37
|
-
code: string;
|
|
25
|
+
name: string;
|
|
38
26
|
effectiveSchoolYear: string;
|
|
39
27
|
maxTeachingHoursPerDay: number;
|
|
40
|
-
subjects: TCurriculumSubject[];
|
|
41
28
|
curriculumMemoRef: string;
|
|
42
|
-
status:
|
|
29
|
+
status: "active" | "pilot" | "inactive" | "deprecated";
|
|
30
|
+
whitelist: (string | ObjectId)[];
|
|
43
31
|
createdAt: string | Date;
|
|
44
32
|
updatedAt: string | Date;
|
|
45
33
|
deletedAt: string | Date;
|
|
@@ -64,11 +52,18 @@ declare function useCurriculumRepo(): {
|
|
|
64
52
|
}>;
|
|
65
53
|
getById: (_id: string | ObjectId) => Promise<TCurriculum | null>;
|
|
66
54
|
updateById: (_id: ObjectId | string, value: {
|
|
67
|
-
|
|
55
|
+
name?: string;
|
|
56
|
+
effectiveSchoolYear?: string;
|
|
68
57
|
maxTeachingHoursPerDay?: number;
|
|
69
58
|
curriculumMemoRef?: string;
|
|
59
|
+
status?: "active" | "pilot" | "inactive" | "deprecated";
|
|
60
|
+
whitelist?: (ObjectId | string)[];
|
|
70
61
|
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
71
62
|
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
63
|
+
canSchoolAccessCurriculum: (curriculumId: string | ObjectId, schoolId: string | ObjectId) => Promise<boolean>;
|
|
64
|
+
getAvailableForSchool: (schoolId: string | ObjectId) => Promise<TCurriculum[]>;
|
|
65
|
+
addSchoolToPilotWhitelist: (curriculumId: string | ObjectId, schoolId: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
66
|
+
removeSchoolFromPilotWhitelist: (curriculumId: string | ObjectId, schoolId: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
72
67
|
};
|
|
73
68
|
|
|
74
69
|
declare function useCurriculumController(): {
|
|
@@ -77,6 +72,119 @@ declare function useCurriculumController(): {
|
|
|
77
72
|
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
78
73
|
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
79
74
|
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
75
|
+
checkSchoolAccess: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
76
|
+
getAvailableForSchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
77
|
+
addToPilotWhitelist: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
78
|
+
removeFromPilotWhitelist: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
type TCurriculumSubject = {
|
|
82
|
+
_id?: ObjectId;
|
|
83
|
+
curriculum: ObjectId | string;
|
|
84
|
+
curriculumName: string;
|
|
85
|
+
effectiveSchoolYear?: number[];
|
|
86
|
+
educationLevel: string;
|
|
87
|
+
gradeLevel: string;
|
|
88
|
+
subjectCode: string;
|
|
89
|
+
subjectName: string;
|
|
90
|
+
subjectType: string;
|
|
91
|
+
sessionFrequency: number;
|
|
92
|
+
sessionDuration: number;
|
|
93
|
+
totalMinutesPerWeek: number;
|
|
94
|
+
status?: string;
|
|
95
|
+
createdAt?: Date | string;
|
|
96
|
+
updatedAt?: Date | string;
|
|
97
|
+
deletedAt?: Date | string;
|
|
98
|
+
createdBy?: string;
|
|
99
|
+
updatedBy?: string;
|
|
100
|
+
deletedBy?: string;
|
|
101
|
+
};
|
|
102
|
+
declare const schemaCurriculumSubject: Joi.ObjectSchema<any>;
|
|
103
|
+
declare const schemaCurriculumSubjectAdd: Joi.ObjectSchema<any>;
|
|
104
|
+
declare function MCurriculumSubject(value: TCurriculumSubject): {
|
|
105
|
+
_id: ObjectId | undefined;
|
|
106
|
+
curriculum: ObjectId;
|
|
107
|
+
curriculumName: string;
|
|
108
|
+
effectiveSchoolYear: number[];
|
|
109
|
+
educationLevel: string;
|
|
110
|
+
gradeLevel: string;
|
|
111
|
+
subjectCode: string;
|
|
112
|
+
subjectName: string;
|
|
113
|
+
subjectType: string;
|
|
114
|
+
sessionFrequency: number;
|
|
115
|
+
sessionDuration: number;
|
|
116
|
+
totalMinutesPerWeek: number;
|
|
117
|
+
status: string;
|
|
118
|
+
createdAt: string | Date;
|
|
119
|
+
updatedAt: string | Date;
|
|
120
|
+
deletedAt: string | Date;
|
|
121
|
+
createdBy: string;
|
|
122
|
+
updatedBy: string;
|
|
123
|
+
deletedBy: string;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
declare function useCurriculumSubjectRepo(): {
|
|
127
|
+
createIndexes: () => Promise<void>;
|
|
128
|
+
add: (value: TCurriculumSubject, session?: ClientSession) => Promise<ObjectId>;
|
|
129
|
+
getAll: ({ search, page, limit, sort, status, curriculum, educationLevel, gradeLevel, schoolYear, }?: {
|
|
130
|
+
search?: string;
|
|
131
|
+
page?: number;
|
|
132
|
+
limit?: number;
|
|
133
|
+
sort?: Record<string, number>;
|
|
134
|
+
status?: string;
|
|
135
|
+
curriculum?: string;
|
|
136
|
+
educationLevel?: string;
|
|
137
|
+
gradeLevel?: string;
|
|
138
|
+
schoolYear?: number;
|
|
139
|
+
}) => Promise<Record<string, any> | {
|
|
140
|
+
items: any[];
|
|
141
|
+
pages: number;
|
|
142
|
+
pageRange: string;
|
|
143
|
+
}>;
|
|
144
|
+
getById: (_id: string | ObjectId) => Promise<bson.Document | TCurriculumSubject>;
|
|
145
|
+
getByCurriculum: (curriculumId: string | ObjectId) => Promise<TCurriculumSubject[] | mongodb.WithId<bson.Document>[]>;
|
|
146
|
+
updateById: (_id: ObjectId | string, value: Partial<TCurriculumSubject>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
147
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
148
|
+
deleteByCurriculum: (curriculumId: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
declare function useCurriculumSubjectController(): {
|
|
152
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
153
|
+
addMany: (value: {
|
|
154
|
+
curriculum: string;
|
|
155
|
+
curriculumName: string;
|
|
156
|
+
effectiveSchoolYear?: number[];
|
|
157
|
+
educationLevel: string;
|
|
158
|
+
gradeLevel: string[];
|
|
159
|
+
subjectCode: string;
|
|
160
|
+
subjectName: string;
|
|
161
|
+
subjectType: string;
|
|
162
|
+
sessionFrequency: number;
|
|
163
|
+
sessionDuration: number;
|
|
164
|
+
totalMinutesPerWeek: number;
|
|
165
|
+
}) => Promise<string>;
|
|
166
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
167
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
168
|
+
getByCurriculum: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
169
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
170
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
171
|
+
deleteByCurriculum: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
declare function useCurriculumSubjectService(): {
|
|
175
|
+
addMany: (value: {
|
|
176
|
+
curriculum: string;
|
|
177
|
+
curriculumName: string;
|
|
178
|
+
effectiveSchoolYear?: number[];
|
|
179
|
+
educationLevel: string;
|
|
180
|
+
gradeLevel: string[];
|
|
181
|
+
subjectCode: string;
|
|
182
|
+
subjectName: string;
|
|
183
|
+
subjectType: string;
|
|
184
|
+
sessionFrequency: number;
|
|
185
|
+
sessionDuration: number;
|
|
186
|
+
totalMinutesPerWeek: number;
|
|
187
|
+
}) => Promise<string>;
|
|
80
188
|
};
|
|
81
189
|
|
|
82
190
|
type TLearner = {
|
|
@@ -321,7 +429,7 @@ declare function useGradeLevelRepo(): {
|
|
|
321
429
|
school?: ObjectId | string;
|
|
322
430
|
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
323
431
|
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
324
|
-
getByEducationLevel: (educationLevel: string, school?: string) => Promise<
|
|
432
|
+
getByEducationLevel: (educationLevel: string, school?: string) => Promise<mongodb.WithId<bson.Document>[] | TGradeLevel[]>;
|
|
325
433
|
getByGradeLevel: (value: {
|
|
326
434
|
school: string | ObjectId;
|
|
327
435
|
gradeLevel: string;
|
|
@@ -739,6 +847,7 @@ declare function useLearnerRepo(): {
|
|
|
739
847
|
getById: (_id: string | ObjectId, status?: string) => Promise<TLearner | null>;
|
|
740
848
|
getByGradeLevel: (value: {
|
|
741
849
|
school: string | ObjectId;
|
|
850
|
+
schoolYear?: string;
|
|
742
851
|
gradeLevel: string;
|
|
743
852
|
status?: string;
|
|
744
853
|
limit?: number;
|
|
@@ -904,4 +1013,304 @@ declare function useSectionStudentRepo(): {
|
|
|
904
1013
|
add: (value: TSectionStudent, session?: ClientSession) => Promise<bson.ObjectId>;
|
|
905
1014
|
};
|
|
906
1015
|
|
|
907
|
-
|
|
1016
|
+
type TSectionSubject = {
|
|
1017
|
+
_id?: ObjectId;
|
|
1018
|
+
school: ObjectId | string;
|
|
1019
|
+
schoolName?: string;
|
|
1020
|
+
section: ObjectId | string;
|
|
1021
|
+
sectionName: string;
|
|
1022
|
+
gradeLevel: string;
|
|
1023
|
+
educationLevel: string;
|
|
1024
|
+
schoolYear: string;
|
|
1025
|
+
subjectCode: string;
|
|
1026
|
+
subjectName: string;
|
|
1027
|
+
teacher?: ObjectId | string;
|
|
1028
|
+
teacherName?: string;
|
|
1029
|
+
classroom?: string;
|
|
1030
|
+
classroomName?: string;
|
|
1031
|
+
daysOfWeek: string[];
|
|
1032
|
+
schedule?: string;
|
|
1033
|
+
sessionDuration?: number;
|
|
1034
|
+
sessionFrequency?: number;
|
|
1035
|
+
status?: string;
|
|
1036
|
+
createdAt?: string | Date;
|
|
1037
|
+
updatedAt?: string | Date;
|
|
1038
|
+
deletedAt?: string | Date;
|
|
1039
|
+
};
|
|
1040
|
+
declare const schemaSectionSubject: Joi.ObjectSchema<any>;
|
|
1041
|
+
declare const schemaSectionSubjectSetup: Joi.ObjectSchema<any>;
|
|
1042
|
+
declare function modelSectionSubject(value: TSectionSubject): TSectionSubject;
|
|
1043
|
+
|
|
1044
|
+
declare function useSectionSubjectRepo(): {
|
|
1045
|
+
createIndexes: () => Promise<void>;
|
|
1046
|
+
add: (value: TSectionSubject, session?: ClientSession) => Promise<ObjectId>;
|
|
1047
|
+
getAll: ({ search, page, limit, sort, status, school, section, teacher, schoolYear, gradeLevel, subjectCode, }?: {
|
|
1048
|
+
search?: string | undefined;
|
|
1049
|
+
page?: number | undefined;
|
|
1050
|
+
limit?: number | undefined;
|
|
1051
|
+
sort?: {} | undefined;
|
|
1052
|
+
status?: string | undefined;
|
|
1053
|
+
school?: string | undefined;
|
|
1054
|
+
section?: string | undefined;
|
|
1055
|
+
teacher?: string | undefined;
|
|
1056
|
+
schoolYear?: string | undefined;
|
|
1057
|
+
gradeLevel?: string | undefined;
|
|
1058
|
+
subjectCode?: string | undefined;
|
|
1059
|
+
}) => Promise<Record<string, any> | {
|
|
1060
|
+
items: any[];
|
|
1061
|
+
pages: number;
|
|
1062
|
+
pageRange: string;
|
|
1063
|
+
}>;
|
|
1064
|
+
getById: (_id: string | ObjectId) => Promise<TSectionSubject>;
|
|
1065
|
+
getBySection: (section: string | ObjectId) => Promise<TSectionSubject[]>;
|
|
1066
|
+
getByTeacher: (teacher: string | ObjectId) => Promise<TSectionSubject[]>;
|
|
1067
|
+
getBySchool: (school: string | ObjectId) => Promise<TSectionSubject[]>;
|
|
1068
|
+
updateFieldById: ({ _id, field, value }?: {
|
|
1069
|
+
_id: string | ObjectId;
|
|
1070
|
+
field: string;
|
|
1071
|
+
value: string;
|
|
1072
|
+
}, session?: ClientSession) => Promise<string>;
|
|
1073
|
+
setupById: (_id: string | ObjectId, value: Pick<TSectionSubject, "teacher" | "teacherName" | "schedule" | "daysOfWeek">, session?: ClientSession) => Promise<string>;
|
|
1074
|
+
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
1075
|
+
};
|
|
1076
|
+
|
|
1077
|
+
declare function useSectionSubjectService(): {
|
|
1078
|
+
add: (value: TSectionSubject) => Promise<string>;
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
declare function useSectionSubjectController(): {
|
|
1082
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1083
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1084
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1085
|
+
getBySection: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1086
|
+
getByTeacher: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1087
|
+
getBySchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1088
|
+
updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1089
|
+
setupById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1090
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1091
|
+
};
|
|
1092
|
+
|
|
1093
|
+
type TBuilding = {
|
|
1094
|
+
_id?: ObjectId;
|
|
1095
|
+
school: ObjectId;
|
|
1096
|
+
serial?: string;
|
|
1097
|
+
name: string;
|
|
1098
|
+
levels: number;
|
|
1099
|
+
createdAt?: Date | string;
|
|
1100
|
+
updatedAt?: Date | string;
|
|
1101
|
+
deletedAt?: Date | string;
|
|
1102
|
+
status?: string;
|
|
1103
|
+
};
|
|
1104
|
+
declare const schemaBuilding: Joi.ObjectSchema<any>;
|
|
1105
|
+
type TBuildingUnit = {
|
|
1106
|
+
_id?: ObjectId;
|
|
1107
|
+
school: ObjectId | string;
|
|
1108
|
+
name?: string;
|
|
1109
|
+
building: ObjectId | string;
|
|
1110
|
+
buildingName?: string;
|
|
1111
|
+
level: number;
|
|
1112
|
+
category: string;
|
|
1113
|
+
type: string;
|
|
1114
|
+
seating_capacity: number;
|
|
1115
|
+
standing_capacity: number;
|
|
1116
|
+
description?: string;
|
|
1117
|
+
unit_of_measurement: string;
|
|
1118
|
+
area: number;
|
|
1119
|
+
status: string;
|
|
1120
|
+
createdAt?: Date | string;
|
|
1121
|
+
updatedAt?: Date | string;
|
|
1122
|
+
deletedAt?: Date | string;
|
|
1123
|
+
};
|
|
1124
|
+
declare const schemaBuildingUnit: Joi.ObjectSchema<any>;
|
|
1125
|
+
declare const schemaUpdateOptions: Joi.ObjectSchema<any>;
|
|
1126
|
+
declare function MBuilding(value: TBuilding): {
|
|
1127
|
+
_id: ObjectId | undefined;
|
|
1128
|
+
school: ObjectId;
|
|
1129
|
+
serial: string;
|
|
1130
|
+
name: string;
|
|
1131
|
+
levels: number;
|
|
1132
|
+
status: string;
|
|
1133
|
+
createdAt: string | Date;
|
|
1134
|
+
updatedAt: string | Date;
|
|
1135
|
+
deletedAt: string | Date;
|
|
1136
|
+
};
|
|
1137
|
+
declare function MBuildingUnit(value: TBuildingUnit): {
|
|
1138
|
+
_id: ObjectId | undefined;
|
|
1139
|
+
school: ObjectId;
|
|
1140
|
+
name: string;
|
|
1141
|
+
building: ObjectId;
|
|
1142
|
+
buildingName: string;
|
|
1143
|
+
level: number;
|
|
1144
|
+
category: string;
|
|
1145
|
+
type: string;
|
|
1146
|
+
seating_capacity: number;
|
|
1147
|
+
standing_capacity: number;
|
|
1148
|
+
description: string;
|
|
1149
|
+
unit_of_measurement: string;
|
|
1150
|
+
area: number;
|
|
1151
|
+
status: string;
|
|
1152
|
+
createdAt: string | Date;
|
|
1153
|
+
updatedAt: string | Date;
|
|
1154
|
+
deletedAt: string | Date;
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1157
|
+
declare function useBuildingRepo(): {
|
|
1158
|
+
createIndexes: () => Promise<void>;
|
|
1159
|
+
add: (value: TBuilding, session?: ClientSession) => Promise<ObjectId>;
|
|
1160
|
+
getAll: ({ search, page, limit, sort, school, status, }?: {
|
|
1161
|
+
search?: string | undefined;
|
|
1162
|
+
page?: number | undefined;
|
|
1163
|
+
limit?: number | undefined;
|
|
1164
|
+
sort?: {} | undefined;
|
|
1165
|
+
school?: string | undefined;
|
|
1166
|
+
status?: string | undefined;
|
|
1167
|
+
}) => Promise<Record<string, any> | {
|
|
1168
|
+
items: any[];
|
|
1169
|
+
pages: number;
|
|
1170
|
+
pageRange: string;
|
|
1171
|
+
}>;
|
|
1172
|
+
getById: (_id: string | ObjectId) => Promise<TBuilding | null>;
|
|
1173
|
+
updateById: (_id: ObjectId | string, value: {
|
|
1174
|
+
name: string;
|
|
1175
|
+
serial: string;
|
|
1176
|
+
levels: number;
|
|
1177
|
+
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1178
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1179
|
+
};
|
|
1180
|
+
|
|
1181
|
+
declare function useBuildingService(): {
|
|
1182
|
+
updateById: (id: string, data: {
|
|
1183
|
+
name: string;
|
|
1184
|
+
levels: number;
|
|
1185
|
+
serial: string;
|
|
1186
|
+
}) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1187
|
+
deleteById: (id: string) => Promise<string>;
|
|
1188
|
+
};
|
|
1189
|
+
|
|
1190
|
+
declare function useBuildingController(): {
|
|
1191
|
+
createBuilding: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1192
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1193
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1194
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1195
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1196
|
+
};
|
|
1197
|
+
|
|
1198
|
+
declare function useBuildingUnitRepo(): {
|
|
1199
|
+
createIndexes: () => Promise<void>;
|
|
1200
|
+
add: (value: TBuildingUnit, session?: ClientSession) => Promise<ObjectId>;
|
|
1201
|
+
getAll: ({ search, page, limit, sort, school, building, status, }?: {
|
|
1202
|
+
search?: string | undefined;
|
|
1203
|
+
page?: number | undefined;
|
|
1204
|
+
limit?: number | undefined;
|
|
1205
|
+
sort?: {} | undefined;
|
|
1206
|
+
school?: string | undefined;
|
|
1207
|
+
building?: string | undefined;
|
|
1208
|
+
status?: string | undefined;
|
|
1209
|
+
}) => Promise<Record<string, any> | {
|
|
1210
|
+
items: any[];
|
|
1211
|
+
pages: number;
|
|
1212
|
+
pageRange: string;
|
|
1213
|
+
}>;
|
|
1214
|
+
getById: (_id: string | ObjectId) => Promise<TBuildingUnit>;
|
|
1215
|
+
getByBuildingLevel: (building: string | ObjectId, level: number) => Promise<TBuildingUnit | null>;
|
|
1216
|
+
updateById: (_id: string | ObjectId, value: {
|
|
1217
|
+
name?: string;
|
|
1218
|
+
building?: string;
|
|
1219
|
+
level?: number;
|
|
1220
|
+
category?: string;
|
|
1221
|
+
type?: string;
|
|
1222
|
+
seating_capacity?: number;
|
|
1223
|
+
standing_capacity?: number;
|
|
1224
|
+
area?: number;
|
|
1225
|
+
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1226
|
+
getByBuilding: (building: string | ObjectId) => Promise<TBuildingUnit | null>;
|
|
1227
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
1228
|
+
updateByBuildingId: (building: string | ObjectId, value: Partial<Pick<TBuildingUnit, "buildingName">>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1229
|
+
};
|
|
1230
|
+
|
|
1231
|
+
declare function useBuildingUnitService(): {
|
|
1232
|
+
add: (value: {
|
|
1233
|
+
building: TBuildingUnit;
|
|
1234
|
+
qty: number;
|
|
1235
|
+
}) => Promise<string>;
|
|
1236
|
+
};
|
|
1237
|
+
|
|
1238
|
+
declare function useBuildingUnitController(): {
|
|
1239
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1240
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1241
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1242
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1243
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1244
|
+
};
|
|
1245
|
+
|
|
1246
|
+
type TPersonnel = {
|
|
1247
|
+
_id?: ObjectId;
|
|
1248
|
+
school: string | ObjectId;
|
|
1249
|
+
schoolName?: string;
|
|
1250
|
+
firstName: string;
|
|
1251
|
+
lastName: string;
|
|
1252
|
+
middleName?: string;
|
|
1253
|
+
suffix?: string;
|
|
1254
|
+
title?: string;
|
|
1255
|
+
classification: string;
|
|
1256
|
+
status?: string;
|
|
1257
|
+
createdAt?: string | Date;
|
|
1258
|
+
updatedAt?: string | Date;
|
|
1259
|
+
deletedAt?: string | Date;
|
|
1260
|
+
};
|
|
1261
|
+
declare const schemaPersonnel: Joi.ObjectSchema<any>;
|
|
1262
|
+
declare function MPersonnel(value: TPersonnel): {
|
|
1263
|
+
_id: ObjectId | undefined;
|
|
1264
|
+
school: string | ObjectId;
|
|
1265
|
+
schoolName: string;
|
|
1266
|
+
firstName: string;
|
|
1267
|
+
lastName: string;
|
|
1268
|
+
middleName: string;
|
|
1269
|
+
suffix: string;
|
|
1270
|
+
title: string;
|
|
1271
|
+
classification: string;
|
|
1272
|
+
status: string;
|
|
1273
|
+
createdAt: string | Date;
|
|
1274
|
+
updatedAt: string | Date;
|
|
1275
|
+
deletedAt: string | Date;
|
|
1276
|
+
};
|
|
1277
|
+
|
|
1278
|
+
declare function usePersonnelRepo(): {
|
|
1279
|
+
createIndexes: () => Promise<void>;
|
|
1280
|
+
add: (value: TPersonnel, session?: ClientSession) => Promise<string>;
|
|
1281
|
+
updateById: (_id: ObjectId | string, value: {
|
|
1282
|
+
firstName?: string;
|
|
1283
|
+
lastName?: string;
|
|
1284
|
+
middleName?: string;
|
|
1285
|
+
classification?: string;
|
|
1286
|
+
status?: string;
|
|
1287
|
+
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1288
|
+
getAll: ({ school, search, page, limit, sort, status, }?: {
|
|
1289
|
+
school?: string | undefined;
|
|
1290
|
+
search?: string | undefined;
|
|
1291
|
+
page?: number | undefined;
|
|
1292
|
+
limit?: number | undefined;
|
|
1293
|
+
sort?: {} | undefined;
|
|
1294
|
+
status?: string | undefined;
|
|
1295
|
+
}) => Promise<Record<string, any> | {
|
|
1296
|
+
items: any[];
|
|
1297
|
+
pages: number;
|
|
1298
|
+
pageRange: string;
|
|
1299
|
+
}>;
|
|
1300
|
+
getById: (_id: string | ObjectId) => Promise<TPersonnel | null>;
|
|
1301
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
1302
|
+
getByClassification: (classification: string) => Promise<TPersonnel[]>;
|
|
1303
|
+
delCachedData: () => void;
|
|
1304
|
+
};
|
|
1305
|
+
|
|
1306
|
+
declare function usePersonnelController(): {
|
|
1307
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1308
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1309
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1310
|
+
getAllBySchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1311
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1312
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1313
|
+
getByClassification: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1314
|
+
};
|
|
1315
|
+
|
|
1316
|
+
export { MAsset, MBuilding, MBuildingUnit, MCurriculum, MCurriculumSubject, MGradeLevel, MLearner, MPersonnel, MPlantilla, MStockCard, TAddress, TAddressInformation, TAsset, TBasicEduCount, TBuilding, TBuildingUnit, TCurriculum, TCurriculumSubject, TDivision, TGradeLevel, TLearner, TLearnerInfo, TLearningModality, TParentGuardianInfo, TPersonContact, TPersonnel, TPlantilla, TRegion, TReturningLearnerInfo, TSchool, TSection, TSectionPreset, TSectionStudent, TSectionSubject, TSeniorHighInformation, TStockCard, allowedSectionStudentStatuses, modelBasicEduCount, modelDivision, modelRegion, modelSchool, modelSection, modelSectionPreset, modelSectionStudent, modelSectionSubject, schemaAsset, schemaAssetUpdateOption, schemaBasicEduCount, schemaBuilding, schemaBuildingUnit, schemaCurriculum, schemaCurriculumSubject, schemaCurriculumSubjectAdd, schemaDivision, schemaDivisionUpdate, schemaEnrollment, schemaGenerateSections, schemaGradeLevel, schemaPersonnel, schemaPlantilla, schemaRegion, schemaSchool, schemaSchoolUpdate, schemaSection, schemaSectionPreset, schemaSectionStudent, schemaSectionSubject, schemaSectionSubjectSetup, schemaStockCard, schemaUpdateOptions, schemaUpdateStatus, useAssetController, useAssetRepo, useBasicEduCountRepo, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useCurriculumController, useCurriculumRepo, useCurriculumSubjectController, useCurriculumSubjectRepo, useCurriculumSubjectService, useDivisionController, useDivisionRepo, useDivisionService, useEnrollmentController, useEnrollmentRepo, useEnrollmentService, useGradeLevelController, useGradeLevelRepo, useLearnerController, useLearnerRepo, usePersonnelController, usePersonnelRepo, usePlantillaController, usePlantillaRepo, usePlantillaService, useRegionController, useRegionRepo, useSchoolController, useSchoolRepo, useSchoolService, useSectionController, useSectionPresetController, useSectionPresetRepo, useSectionRepo, useSectionStudentRepo, useSectionSubjectController, useSectionSubjectRepo, useSectionSubjectService, useStockCardController, useStockCardRepository, useStockCardService };
|