@eeplatform/basic-edu 1.2.0 → 1.3.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 +6 -0
- package/dist/index.d.ts +20 -11
- package/dist/index.js +324 -3394
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +351 -3422
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -420,12 +420,13 @@ declare function modelDivision(value: TDivision): TDivision;
|
|
|
420
420
|
declare function useDivisionRepo(): {
|
|
421
421
|
createIndexes: () => Promise<void>;
|
|
422
422
|
add: (value: TDivision, session?: ClientSession) => Promise<ObjectId>;
|
|
423
|
-
getAll: ({ search, page, limit, sort, status, }?: {
|
|
423
|
+
getAll: ({ search, page, limit, sort, status, region, }?: {
|
|
424
424
|
search?: string | undefined;
|
|
425
425
|
page?: number | undefined;
|
|
426
426
|
limit?: number | undefined;
|
|
427
427
|
sort?: {} | undefined;
|
|
428
428
|
status?: string | undefined;
|
|
429
|
+
region?: string | undefined;
|
|
429
430
|
}) => Promise<Record<string, any> | {
|
|
430
431
|
items: any[];
|
|
431
432
|
pages: number;
|
|
@@ -480,11 +481,12 @@ type TSchool = {
|
|
|
480
481
|
deletedAt?: string;
|
|
481
482
|
};
|
|
482
483
|
declare const schemaSchool: Joi.ObjectSchema<any>;
|
|
484
|
+
declare const schemaSchoolUpdate: Joi.ObjectSchema<any>;
|
|
483
485
|
declare function modelSchool(value: TSchool): TSchool;
|
|
484
486
|
|
|
485
487
|
declare function useSchoolRepo(): {
|
|
486
488
|
createIndexes: () => Promise<void>;
|
|
487
|
-
add: (value: TSchool, session?: ClientSession) => Promise<ObjectId>;
|
|
489
|
+
add: (value: TSchool, session?: ClientSession, clearCache?: boolean) => Promise<ObjectId>;
|
|
488
490
|
getAll: ({ search, page, limit, sort, status, }?: {
|
|
489
491
|
search?: string | undefined;
|
|
490
492
|
page?: number | undefined;
|
|
@@ -504,23 +506,27 @@ declare function useSchoolRepo(): {
|
|
|
504
506
|
field: string;
|
|
505
507
|
value: string;
|
|
506
508
|
}, session?: ClientSession) => Promise<string>;
|
|
509
|
+
updateById: (_id: string | ObjectId, options: Pick<TSchool, "name" | "region" | "regionName" | "division" | "divisionName" | "principal" | "principalName">, session?: ClientSession) => Promise<string>;
|
|
507
510
|
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
508
511
|
getByName: (name: string) => Promise<TSchool>;
|
|
512
|
+
delCachedData: () => void;
|
|
509
513
|
};
|
|
510
514
|
|
|
511
515
|
declare function useSchoolService(): {
|
|
512
516
|
register: (value: TSchool) => Promise<string>;
|
|
513
517
|
approve: (id: string) => Promise<string>;
|
|
514
518
|
add: (value: TSchool) => Promise<string>;
|
|
515
|
-
addBulk: (file: Express.Multer.File,
|
|
519
|
+
addBulk: (file: Express.Multer.File, payload: {
|
|
520
|
+
region: string;
|
|
521
|
+
regionName: string;
|
|
522
|
+
division: string;
|
|
523
|
+
divisionName: string;
|
|
524
|
+
}) => Promise<{
|
|
516
525
|
message: string;
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
totalSizeMB: number;
|
|
522
|
-
errors: string[];
|
|
523
|
-
};
|
|
526
|
+
successful: number;
|
|
527
|
+
failed: number;
|
|
528
|
+
errors: string[];
|
|
529
|
+
skipped: number;
|
|
524
530
|
}>;
|
|
525
531
|
};
|
|
526
532
|
|
|
@@ -532,6 +538,9 @@ declare function useSchoolController(): {
|
|
|
532
538
|
registerSchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
533
539
|
approveSchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
534
540
|
addBulk: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
541
|
+
updateFieldById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
542
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
543
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
535
544
|
};
|
|
536
545
|
|
|
537
546
|
type TAsset = {
|
|
@@ -716,4 +725,4 @@ declare function usePlantillaController(): {
|
|
|
716
725
|
bulkAddPlantillas: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
717
726
|
};
|
|
718
727
|
|
|
719
|
-
export { AddressInformation, BasicEducEnrForm, DisabilityType, EnrAddress, EnrCert, EnrLearnerInfo, EnrLearningModality, EnrParentGuardianInfo, EnrReturningLearnerInfo, EnrSeniorHighInformation, MAsset, MCurriculum, MEnrollment, MGradeLevel, MPlantilla, MStockCard, PersonContact, TAsset, TCurriculum, TCurriculumSubject, TDivision, TGradeLevel, TPlantilla, TRegion, TSchool, TStockCard, modelDivision, modelRegion, modelSchool, schemaAsset, schemaAssetUpdateOption, schemaCurriculum, schemaDivision, schemaDivisionUpdate, schemaEnrollment, schemaGradeLevel, schemaPlantilla, schemaRegion, schemaSchool, schemaStockCard, useAssetController, useAssetRepo, useCurriculumController, useCurriculumRepo, useDivisionController, useDivisionRepo, useDivisionService, useEnrollmentController, useEnrollmentRepo, useEnrollmentService, useGradeLevelController, useGradeLevelRepo, usePlantillaController, usePlantillaRepo, usePlantillaService, useRegionController, useRegionRepo, useSchoolController, useSchoolRepo, useSchoolService, useStockCardController, useStockCardRepository, useStockCardService };
|
|
728
|
+
export { AddressInformation, BasicEducEnrForm, DisabilityType, EnrAddress, EnrCert, EnrLearnerInfo, EnrLearningModality, EnrParentGuardianInfo, EnrReturningLearnerInfo, EnrSeniorHighInformation, MAsset, MCurriculum, MEnrollment, MGradeLevel, MPlantilla, MStockCard, PersonContact, TAsset, TCurriculum, TCurriculumSubject, TDivision, TGradeLevel, TPlantilla, TRegion, TSchool, TStockCard, modelDivision, modelRegion, modelSchool, schemaAsset, schemaAssetUpdateOption, schemaCurriculum, schemaDivision, schemaDivisionUpdate, schemaEnrollment, schemaGradeLevel, schemaPlantilla, schemaRegion, schemaSchool, schemaSchoolUpdate, schemaStockCard, useAssetController, useAssetRepo, useCurriculumController, useCurriculumRepo, useDivisionController, useDivisionRepo, useDivisionService, useEnrollmentController, useEnrollmentRepo, useEnrollmentService, useGradeLevelController, useGradeLevelRepo, usePlantillaController, usePlantillaRepo, usePlantillaService, useRegionController, useRegionRepo, useSchoolController, useSchoolRepo, useSchoolService, useStockCardController, useStockCardRepository, useStockCardService };
|