@eeplatform/basic-edu 1.2.0 → 1.3.1

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @eeplatform/basic-edu
2
2
 
3
+ ## 1.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - cdc678a: Update dependencies
8
+
9
+ ## 1.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 89ab132: School Mgmt - revise addbulk()
14
+
3
15
  ## 1.2.0
4
16
 
5
17
  ### Minor Changes
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;
@@ -468,8 +469,10 @@ type TSchool = {
468
469
  principalName?: string;
469
470
  street?: string;
470
471
  barangay?: string;
471
- city?: string;
472
+ cityMunicipality?: string;
472
473
  province?: string;
474
+ provincePSGC?: number;
475
+ cityMunicipalityPSGC?: number;
473
476
  postalCode?: string;
474
477
  contactNumber?: string;
475
478
  email?: string;
@@ -480,11 +483,12 @@ type TSchool = {
480
483
  deletedAt?: string;
481
484
  };
482
485
  declare const schemaSchool: Joi.ObjectSchema<any>;
486
+ declare const schemaSchoolUpdate: Joi.ObjectSchema<any>;
483
487
  declare function modelSchool(value: TSchool): TSchool;
484
488
 
485
489
  declare function useSchoolRepo(): {
486
490
  createIndexes: () => Promise<void>;
487
- add: (value: TSchool, session?: ClientSession) => Promise<ObjectId>;
491
+ add: (value: TSchool, session?: ClientSession, clearCache?: boolean) => Promise<ObjectId>;
488
492
  getAll: ({ search, page, limit, sort, status, }?: {
489
493
  search?: string | undefined;
490
494
  page?: number | undefined;
@@ -504,23 +508,27 @@ declare function useSchoolRepo(): {
504
508
  field: string;
505
509
  value: string;
506
510
  }, session?: ClientSession) => Promise<string>;
511
+ updateById: (_id: string | ObjectId, options: Pick<TSchool, "name" | "region" | "regionName" | "division" | "divisionName" | "principal" | "principalName">, session?: ClientSession) => Promise<string>;
507
512
  deleteById: (_id: string | ObjectId) => Promise<string>;
508
513
  getByName: (name: string) => Promise<TSchool>;
514
+ delCachedData: () => void;
509
515
  };
510
516
 
511
517
  declare function useSchoolService(): {
512
518
  register: (value: TSchool) => Promise<string>;
513
519
  approve: (id: string) => Promise<string>;
514
520
  add: (value: TSchool) => Promise<string>;
515
- addBulk: (file: Express.Multer.File, region: string, division: string) => Promise<{
521
+ addBulk: (file: Express.Multer.File, payload: {
522
+ region: string;
523
+ regionName: string;
524
+ division: string;
525
+ divisionName: string;
526
+ }) => Promise<{
516
527
  message: string;
517
- details: {
518
- successful: number;
519
- failed: number;
520
- total: number;
521
- totalSizeMB: number;
522
- errors: string[];
523
- };
528
+ successful: number;
529
+ failed: number;
530
+ errors: string[];
531
+ skipped: number;
524
532
  }>;
525
533
  };
526
534
 
@@ -532,6 +540,9 @@ declare function useSchoolController(): {
532
540
  registerSchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
533
541
  approveSchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
534
542
  addBulk: (req: Request, res: Response, next: NextFunction) => Promise<void>;
543
+ updateFieldById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
544
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
545
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
535
546
  };
536
547
 
537
548
  type TAsset = {
@@ -716,4 +727,4 @@ declare function usePlantillaController(): {
716
727
  bulkAddPlantillas: (req: Request, res: Response, next: NextFunction) => Promise<void>;
717
728
  };
718
729
 
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 };
730
+ 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 };