@eeplatform/basic-edu 1.5.2 → 1.7.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/dist/index.d.ts CHANGED
@@ -847,6 +847,7 @@ declare function useLearnerRepo(): {
847
847
  getById: (_id: string | ObjectId, status?: string) => Promise<TLearner | null>;
848
848
  getByGradeLevel: (value: {
849
849
  school: string | ObjectId;
850
+ schoolYear?: string;
850
851
  gradeLevel: string;
851
852
  status?: string;
852
853
  limit?: number;
@@ -995,9 +996,15 @@ declare function useSectionController(): {
995
996
 
996
997
  type TSectionStudent = {
997
998
  _id?: ObjectId;
999
+ lrn: string;
1000
+ school: ObjectId | string;
1001
+ schoolName?: string;
998
1002
  section: ObjectId | string;
999
1003
  student: string;
1000
1004
  studentName: string;
1005
+ gradeLevel?: string;
1006
+ educationLevel?: string;
1007
+ schoolYear?: string;
1001
1008
  status?: string;
1002
1009
  assignedAt?: Date | string;
1003
1010
  updatedAt?: Date | string;
@@ -1009,7 +1016,322 @@ declare function modelSectionStudent(value: TSectionStudent): TSectionStudent;
1009
1016
  declare function useSectionStudentRepo(): {
1010
1017
  createIndexes: () => Promise<void>;
1011
1018
  delCachedData: () => void;
1012
- add: (value: TSectionStudent, session?: ClientSession) => Promise<bson.ObjectId>;
1019
+ add: (value: TSectionStudent, session?: ClientSession) => Promise<ObjectId>;
1020
+ getAll: ({ page, limit, search, school, status, gradeLevel, section, schoolYear, }?: {
1021
+ page?: number;
1022
+ limit?: number;
1023
+ search?: string;
1024
+ school?: string | ObjectId;
1025
+ status?: string;
1026
+ gradeLevel?: string;
1027
+ section?: string | ObjectId;
1028
+ schoolYear?: string;
1029
+ }) => Promise<{}>;
1030
+ };
1031
+
1032
+ declare function useSectionStudentController(): {
1033
+ add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1034
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1035
+ };
1036
+
1037
+ type TSectionSubject = {
1038
+ _id?: ObjectId;
1039
+ school: ObjectId | string;
1040
+ schoolName?: string;
1041
+ section: ObjectId | string;
1042
+ sectionName: string;
1043
+ gradeLevel: string;
1044
+ educationLevel: string;
1045
+ schoolYear: string;
1046
+ subjectCode: string;
1047
+ subjectName: string;
1048
+ teacher?: ObjectId | string;
1049
+ teacherName?: string;
1050
+ classroom?: string;
1051
+ classroomName?: string;
1052
+ daysOfWeek: string[];
1053
+ schedule?: string;
1054
+ sessionDuration?: number;
1055
+ sessionFrequency?: number;
1056
+ status?: string;
1057
+ createdAt?: string | Date;
1058
+ updatedAt?: string | Date;
1059
+ deletedAt?: string | Date;
1060
+ };
1061
+ declare const schemaSectionSubject: Joi.ObjectSchema<any>;
1062
+ declare const schemaSectionSubjectSetup: Joi.ObjectSchema<any>;
1063
+ declare function modelSectionSubject(value: TSectionSubject): TSectionSubject;
1064
+
1065
+ declare function useSectionSubjectRepo(): {
1066
+ createIndexes: () => Promise<void>;
1067
+ add: (value: TSectionSubject, session?: ClientSession) => Promise<ObjectId>;
1068
+ getAll: ({ search, page, limit, sort, status, school, section, teacher, schoolYear, gradeLevel, subjectCode, }?: {
1069
+ search?: string | undefined;
1070
+ page?: number | undefined;
1071
+ limit?: number | undefined;
1072
+ sort?: {} | undefined;
1073
+ status?: string | undefined;
1074
+ school?: string | undefined;
1075
+ section?: string | undefined;
1076
+ teacher?: string | undefined;
1077
+ schoolYear?: string | undefined;
1078
+ gradeLevel?: string | undefined;
1079
+ subjectCode?: string | undefined;
1080
+ }) => Promise<Record<string, any> | {
1081
+ items: any[];
1082
+ pages: number;
1083
+ pageRange: string;
1084
+ }>;
1085
+ getById: (_id: string | ObjectId) => Promise<TSectionSubject>;
1086
+ getBySection: (section: string | ObjectId) => Promise<TSectionSubject[]>;
1087
+ getByTeacher: (teacher: string | ObjectId) => Promise<TSectionSubject[]>;
1088
+ getBySchool: (school: string | ObjectId) => Promise<TSectionSubject[]>;
1089
+ updateFieldById: ({ _id, field, value }?: {
1090
+ _id: string | ObjectId;
1091
+ field: string;
1092
+ value: string;
1093
+ }, session?: ClientSession) => Promise<string>;
1094
+ setupById: (_id: string | ObjectId, value: Pick<TSectionSubject, "teacher" | "teacherName" | "schedule" | "daysOfWeek">, session?: ClientSession) => Promise<string>;
1095
+ deleteById: (_id: string | ObjectId) => Promise<string>;
1096
+ };
1097
+
1098
+ declare function useSectionSubjectService(): {
1099
+ add: (value: TSectionSubject) => Promise<string>;
1100
+ };
1101
+
1102
+ declare function useSectionSubjectController(): {
1103
+ add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1104
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1105
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1106
+ getBySection: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1107
+ getByTeacher: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1108
+ getBySchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1109
+ updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1110
+ setupById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1111
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1112
+ };
1113
+
1114
+ type TBuilding = {
1115
+ _id?: ObjectId;
1116
+ school: ObjectId;
1117
+ serial?: string;
1118
+ name: string;
1119
+ levels: number;
1120
+ createdAt?: Date | string;
1121
+ updatedAt?: Date | string;
1122
+ deletedAt?: Date | string;
1123
+ status?: string;
1124
+ };
1125
+ declare const schemaBuilding: Joi.ObjectSchema<any>;
1126
+ type TBuildingUnit = {
1127
+ _id?: ObjectId;
1128
+ school: ObjectId | string;
1129
+ name?: string;
1130
+ building: ObjectId | string;
1131
+ buildingName?: string;
1132
+ level: number;
1133
+ category: string;
1134
+ type: string;
1135
+ seating_capacity: number;
1136
+ standing_capacity: number;
1137
+ description?: string;
1138
+ unit_of_measurement: string;
1139
+ area: number;
1140
+ status: string;
1141
+ createdAt?: Date | string;
1142
+ updatedAt?: Date | string;
1143
+ deletedAt?: Date | string;
1144
+ };
1145
+ declare const schemaBuildingUnit: Joi.ObjectSchema<any>;
1146
+ declare const schemaUpdateOptions: Joi.ObjectSchema<any>;
1147
+ declare function MBuilding(value: TBuilding): {
1148
+ _id: ObjectId | undefined;
1149
+ school: ObjectId;
1150
+ serial: string;
1151
+ name: string;
1152
+ levels: number;
1153
+ status: string;
1154
+ createdAt: string | Date;
1155
+ updatedAt: string | Date;
1156
+ deletedAt: string | Date;
1157
+ };
1158
+ declare function MBuildingUnit(value: TBuildingUnit): {
1159
+ _id: ObjectId | undefined;
1160
+ school: ObjectId;
1161
+ name: string;
1162
+ building: ObjectId;
1163
+ buildingName: string;
1164
+ level: number;
1165
+ category: string;
1166
+ type: string;
1167
+ seating_capacity: number;
1168
+ standing_capacity: number;
1169
+ description: string;
1170
+ unit_of_measurement: string;
1171
+ area: number;
1172
+ status: string;
1173
+ createdAt: string | Date;
1174
+ updatedAt: string | Date;
1175
+ deletedAt: string | Date;
1176
+ };
1177
+
1178
+ declare function useBuildingRepo(): {
1179
+ createIndexes: () => Promise<void>;
1180
+ add: (value: TBuilding, session?: ClientSession) => Promise<ObjectId>;
1181
+ getAll: ({ search, page, limit, sort, school, status, }?: {
1182
+ search?: string | undefined;
1183
+ page?: number | undefined;
1184
+ limit?: number | undefined;
1185
+ sort?: {} | undefined;
1186
+ school?: string | undefined;
1187
+ status?: string | undefined;
1188
+ }) => Promise<Record<string, any> | {
1189
+ items: any[];
1190
+ pages: number;
1191
+ pageRange: string;
1192
+ }>;
1193
+ getById: (_id: string | ObjectId) => Promise<TBuilding | null>;
1194
+ updateById: (_id: ObjectId | string, value: {
1195
+ name: string;
1196
+ serial: string;
1197
+ levels: number;
1198
+ }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
1199
+ deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
1200
+ };
1201
+
1202
+ declare function useBuildingService(): {
1203
+ updateById: (id: string, data: {
1204
+ name: string;
1205
+ levels: number;
1206
+ serial: string;
1207
+ }) => Promise<mongodb.UpdateResult<bson.Document>>;
1208
+ deleteById: (id: string) => Promise<string>;
1209
+ };
1210
+
1211
+ declare function useBuildingController(): {
1212
+ createBuilding: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1213
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1214
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1215
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1216
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1217
+ };
1218
+
1219
+ declare function useBuildingUnitRepo(): {
1220
+ createIndexes: () => Promise<void>;
1221
+ add: (value: TBuildingUnit, session?: ClientSession) => Promise<ObjectId>;
1222
+ getAll: ({ search, page, limit, sort, school, building, status, }?: {
1223
+ search?: string | undefined;
1224
+ page?: number | undefined;
1225
+ limit?: number | undefined;
1226
+ sort?: {} | undefined;
1227
+ school?: string | undefined;
1228
+ building?: string | undefined;
1229
+ status?: string | undefined;
1230
+ }) => Promise<Record<string, any> | {
1231
+ items: any[];
1232
+ pages: number;
1233
+ pageRange: string;
1234
+ }>;
1235
+ getById: (_id: string | ObjectId) => Promise<TBuildingUnit>;
1236
+ getByBuildingLevel: (building: string | ObjectId, level: number) => Promise<TBuildingUnit | null>;
1237
+ updateById: (_id: string | ObjectId, value: {
1238
+ name?: string;
1239
+ building?: string;
1240
+ level?: number;
1241
+ category?: string;
1242
+ type?: string;
1243
+ seating_capacity?: number;
1244
+ standing_capacity?: number;
1245
+ area?: number;
1246
+ }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
1247
+ getByBuilding: (building: string | ObjectId) => Promise<TBuildingUnit | null>;
1248
+ deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
1249
+ updateByBuildingId: (building: string | ObjectId, value: Partial<Pick<TBuildingUnit, "buildingName">>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
1250
+ };
1251
+
1252
+ declare function useBuildingUnitService(): {
1253
+ add: (value: {
1254
+ building: TBuildingUnit;
1255
+ qty: number;
1256
+ }) => Promise<string>;
1257
+ };
1258
+
1259
+ declare function useBuildingUnitController(): {
1260
+ add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1261
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1262
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1263
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1264
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1265
+ };
1266
+
1267
+ type TPersonnel = {
1268
+ _id?: ObjectId;
1269
+ school: string | ObjectId;
1270
+ schoolName?: string;
1271
+ firstName: string;
1272
+ lastName: string;
1273
+ middleName?: string;
1274
+ suffix?: string;
1275
+ title?: string;
1276
+ classification: string;
1277
+ status?: string;
1278
+ createdAt?: string | Date;
1279
+ updatedAt?: string | Date;
1280
+ deletedAt?: string | Date;
1281
+ };
1282
+ declare const schemaPersonnel: Joi.ObjectSchema<any>;
1283
+ declare function MPersonnel(value: TPersonnel): {
1284
+ _id: ObjectId | undefined;
1285
+ school: string | ObjectId;
1286
+ schoolName: string;
1287
+ firstName: string;
1288
+ lastName: string;
1289
+ middleName: string;
1290
+ suffix: string;
1291
+ title: string;
1292
+ classification: string;
1293
+ status: string;
1294
+ createdAt: string | Date;
1295
+ updatedAt: string | Date;
1296
+ deletedAt: string | Date;
1297
+ };
1298
+
1299
+ declare function usePersonnelRepo(): {
1300
+ createIndexes: () => Promise<void>;
1301
+ add: (value: TPersonnel, session?: ClientSession) => Promise<string>;
1302
+ updateById: (_id: ObjectId | string, value: {
1303
+ firstName?: string;
1304
+ lastName?: string;
1305
+ middleName?: string;
1306
+ classification?: string;
1307
+ status?: string;
1308
+ }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
1309
+ getAll: ({ school, search, page, limit, sort, status, }?: {
1310
+ school?: string | undefined;
1311
+ search?: string | undefined;
1312
+ page?: number | undefined;
1313
+ limit?: number | undefined;
1314
+ sort?: {} | undefined;
1315
+ status?: string | undefined;
1316
+ }) => Promise<Record<string, any> | {
1317
+ items: any[];
1318
+ pages: number;
1319
+ pageRange: string;
1320
+ }>;
1321
+ getById: (_id: string | ObjectId) => Promise<TPersonnel | null>;
1322
+ deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
1323
+ getByClassification: (classification: string) => Promise<TPersonnel[]>;
1324
+ delCachedData: () => void;
1325
+ };
1326
+
1327
+ declare function usePersonnelController(): {
1328
+ add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1329
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1330
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1331
+ getAllBySchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1332
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1333
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1334
+ getByClassification: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1013
1335
  };
1014
1336
 
1015
- export { MAsset, MCurriculum, MCurriculumSubject, MGradeLevel, MLearner, MPlantilla, MStockCard, TAddress, TAddressInformation, TAsset, TBasicEduCount, TCurriculum, TCurriculumSubject, TDivision, TGradeLevel, TLearner, TLearnerInfo, TLearningModality, TParentGuardianInfo, TPersonContact, TPlantilla, TRegion, TReturningLearnerInfo, TSchool, TSection, TSectionPreset, TSectionStudent, TSeniorHighInformation, TStockCard, allowedSectionStudentStatuses, modelBasicEduCount, modelDivision, modelRegion, modelSchool, modelSection, modelSectionPreset, modelSectionStudent, schemaAsset, schemaAssetUpdateOption, schemaBasicEduCount, schemaCurriculum, schemaCurriculumSubject, schemaCurriculumSubjectAdd, schemaDivision, schemaDivisionUpdate, schemaEnrollment, schemaGenerateSections, schemaGradeLevel, schemaPlantilla, schemaRegion, schemaSchool, schemaSchoolUpdate, schemaSection, schemaSectionPreset, schemaSectionStudent, schemaStockCard, schemaUpdateStatus, useAssetController, useAssetRepo, useBasicEduCountRepo, useCurriculumController, useCurriculumRepo, useCurriculumSubjectController, useCurriculumSubjectRepo, useCurriculumSubjectService, useDivisionController, useDivisionRepo, useDivisionService, useEnrollmentController, useEnrollmentRepo, useEnrollmentService, useGradeLevelController, useGradeLevelRepo, useLearnerController, useLearnerRepo, usePlantillaController, usePlantillaRepo, usePlantillaService, useRegionController, useRegionRepo, useSchoolController, useSchoolRepo, useSchoolService, useSectionController, useSectionPresetController, useSectionPresetRepo, useSectionRepo, useSectionStudentRepo, useStockCardController, useStockCardRepository, useStockCardService };
1337
+ 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, useSectionStudentController, useSectionStudentRepo, useSectionSubjectController, useSectionSubjectRepo, useSectionSubjectService, useStockCardController, useStockCardRepository, useStockCardService };