@eeplatform/basic-edu 1.1.2 → 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 +12 -0
- package/dist/index.d.ts +66 -49
- package/dist/index.js +874 -3927
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +825 -3878
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -358,22 +358,25 @@ declare function useGradeLevelController(): {
|
|
|
358
358
|
type TRegion = {
|
|
359
359
|
_id?: ObjectId;
|
|
360
360
|
name?: string;
|
|
361
|
-
|
|
361
|
+
director?: ObjectId;
|
|
362
|
+
directorName?: string;
|
|
363
|
+
status: string;
|
|
362
364
|
createdAt?: string;
|
|
363
365
|
updatedAt?: string;
|
|
364
366
|
deletedAt?: string;
|
|
365
367
|
};
|
|
366
368
|
declare const schemaRegion: Joi.ObjectSchema<any>;
|
|
367
|
-
declare function
|
|
369
|
+
declare function modelRegion(value: TRegion): TRegion;
|
|
368
370
|
|
|
369
371
|
declare function useRegionRepo(): {
|
|
370
372
|
createIndexes: () => Promise<void>;
|
|
371
373
|
add: (value: TRegion, session?: ClientSession) => Promise<ObjectId>;
|
|
372
|
-
getAll: ({ search, page, limit, sort }?: {
|
|
374
|
+
getAll: ({ search, page, limit, sort, status, }?: {
|
|
373
375
|
search?: string | undefined;
|
|
374
376
|
page?: number | undefined;
|
|
375
377
|
limit?: number | undefined;
|
|
376
378
|
sort?: {} | undefined;
|
|
379
|
+
status?: string | undefined;
|
|
377
380
|
}) => Promise<Record<string, any> | {
|
|
378
381
|
items: any[];
|
|
379
382
|
pages: number;
|
|
@@ -401,27 +404,28 @@ declare function useRegionController(): {
|
|
|
401
404
|
type TDivision = {
|
|
402
405
|
_id?: ObjectId;
|
|
403
406
|
name?: string;
|
|
404
|
-
region?:
|
|
407
|
+
region?: ObjectId;
|
|
405
408
|
regionName?: string;
|
|
406
|
-
superintendent?:
|
|
409
|
+
superintendent?: ObjectId;
|
|
407
410
|
superintendentName?: string;
|
|
411
|
+
status: string;
|
|
408
412
|
createdAt?: string;
|
|
409
413
|
updatedAt?: string;
|
|
410
414
|
deletedAt?: string;
|
|
411
415
|
};
|
|
412
416
|
declare const schemaDivision: Joi.ObjectSchema<any>;
|
|
413
|
-
declare
|
|
417
|
+
declare const schemaDivisionUpdate: Joi.ObjectSchema<any>;
|
|
418
|
+
declare function modelDivision(value: TDivision): TDivision;
|
|
414
419
|
|
|
415
420
|
declare function useDivisionRepo(): {
|
|
416
|
-
|
|
417
|
-
createTextIndex: () => Promise<void>;
|
|
418
|
-
createUniqueIndex: () => Promise<void>;
|
|
421
|
+
createIndexes: () => Promise<void>;
|
|
419
422
|
add: (value: TDivision, session?: ClientSession) => Promise<ObjectId>;
|
|
420
|
-
getAll: ({ search, page, limit, sort, region, }?: {
|
|
423
|
+
getAll: ({ search, page, limit, sort, status, region, }?: {
|
|
421
424
|
search?: string | undefined;
|
|
422
425
|
page?: number | undefined;
|
|
423
426
|
limit?: number | undefined;
|
|
424
427
|
sort?: {} | undefined;
|
|
428
|
+
status?: string | undefined;
|
|
425
429
|
region?: string | undefined;
|
|
426
430
|
}) => Promise<Record<string, any> | {
|
|
427
431
|
items: any[];
|
|
@@ -434,6 +438,7 @@ declare function useDivisionRepo(): {
|
|
|
434
438
|
field: string;
|
|
435
439
|
value: string;
|
|
436
440
|
}, session?: ClientSession) => Promise<string>;
|
|
441
|
+
updateById: (_id: string | ObjectId, options: Pick<TDivision, "name" | "region" | "regionName" | "superintendent" | "superintendentName">, session?: ClientSession) => Promise<string>;
|
|
437
442
|
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
438
443
|
getByName: (name: string) => Promise<TDivision>;
|
|
439
444
|
};
|
|
@@ -443,76 +448,85 @@ declare function useDivisionService(): {
|
|
|
443
448
|
};
|
|
444
449
|
|
|
445
450
|
declare function useDivisionController(): {
|
|
446
|
-
|
|
451
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
447
452
|
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
448
453
|
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
449
454
|
getByName: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
450
455
|
updateField: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
451
|
-
|
|
456
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
457
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
452
458
|
};
|
|
453
459
|
|
|
454
460
|
type TSchool = {
|
|
455
461
|
_id?: ObjectId;
|
|
456
462
|
id: string;
|
|
457
|
-
name
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
463
|
+
name?: string;
|
|
464
|
+
region?: ObjectId | string;
|
|
465
|
+
regionName?: string;
|
|
466
|
+
division?: ObjectId | string;
|
|
467
|
+
divisionName?: string;
|
|
468
|
+
principal?: ObjectId;
|
|
469
|
+
principalName?: string;
|
|
470
|
+
street?: string;
|
|
471
|
+
barangay?: string;
|
|
461
472
|
city?: string;
|
|
462
473
|
province?: string;
|
|
463
|
-
district?: string;
|
|
464
474
|
postalCode?: string;
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
principalEmail?: string;
|
|
468
|
-
principalNumber?: string;
|
|
469
|
-
region: string | ObjectId;
|
|
470
|
-
regionName?: string;
|
|
471
|
-
division: string | ObjectId;
|
|
472
|
-
divisionName?: string;
|
|
475
|
+
contactNumber?: string;
|
|
476
|
+
email?: string;
|
|
473
477
|
status?: string;
|
|
478
|
+
createdBy?: string;
|
|
474
479
|
createdAt?: string;
|
|
475
480
|
updatedAt?: string;
|
|
476
|
-
|
|
481
|
+
deletedAt?: string;
|
|
477
482
|
};
|
|
478
483
|
declare const schemaSchool: Joi.ObjectSchema<any>;
|
|
479
|
-
declare
|
|
484
|
+
declare const schemaSchoolUpdate: Joi.ObjectSchema<any>;
|
|
485
|
+
declare function modelSchool(value: TSchool): TSchool;
|
|
480
486
|
|
|
481
487
|
declare function useSchoolRepo(): {
|
|
482
|
-
|
|
483
|
-
add: (value: TSchool, session?: ClientSession) => Promise<ObjectId>;
|
|
484
|
-
getAll: ({ page, limit, sort, status,
|
|
488
|
+
createIndexes: () => Promise<void>;
|
|
489
|
+
add: (value: TSchool, session?: ClientSession, clearCache?: boolean) => Promise<ObjectId>;
|
|
490
|
+
getAll: ({ search, page, limit, sort, status, }?: {
|
|
491
|
+
search?: string | undefined;
|
|
485
492
|
page?: number | undefined;
|
|
486
493
|
limit?: number | undefined;
|
|
487
|
-
sort?:
|
|
494
|
+
sort?: {} | undefined;
|
|
488
495
|
status?: string | undefined;
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
496
|
+
}) => Promise<Record<string, any> | {
|
|
497
|
+
items: any[];
|
|
498
|
+
pages: number;
|
|
499
|
+
pageRange: string;
|
|
500
|
+
}>;
|
|
501
|
+
getById: (_id: string | ObjectId, status?: string) => Promise<TSchool>;
|
|
502
|
+
getPendingByCreatedBy: (createdBy: string | ObjectId) => Promise<TSchool>;
|
|
503
|
+
updateStatusById: (_id: string | ObjectId, status: string, session?: ClientSession) => Promise<string>;
|
|
494
504
|
updateFieldById: ({ _id, field, value }?: {
|
|
495
505
|
_id: string | ObjectId;
|
|
496
506
|
field: string;
|
|
497
|
-
value: string
|
|
498
|
-
}, session?: ClientSession) => Promise<
|
|
499
|
-
|
|
500
|
-
|
|
507
|
+
value: string;
|
|
508
|
+
}, session?: ClientSession) => Promise<string>;
|
|
509
|
+
updateById: (_id: string | ObjectId, options: Pick<TSchool, "name" | "region" | "regionName" | "division" | "divisionName" | "principal" | "principalName">, session?: ClientSession) => Promise<string>;
|
|
510
|
+
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
511
|
+
getByName: (name: string) => Promise<TSchool>;
|
|
512
|
+
delCachedData: () => void;
|
|
501
513
|
};
|
|
502
514
|
|
|
503
515
|
declare function useSchoolService(): {
|
|
504
516
|
register: (value: TSchool) => Promise<string>;
|
|
505
517
|
approve: (id: string) => Promise<string>;
|
|
506
518
|
add: (value: TSchool) => Promise<string>;
|
|
507
|
-
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<{
|
|
508
525
|
message: string;
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
totalSizeMB: number;
|
|
514
|
-
errors: string[];
|
|
515
|
-
};
|
|
526
|
+
successful: number;
|
|
527
|
+
failed: number;
|
|
528
|
+
errors: string[];
|
|
529
|
+
skipped: number;
|
|
516
530
|
}>;
|
|
517
531
|
};
|
|
518
532
|
|
|
@@ -524,6 +538,9 @@ declare function useSchoolController(): {
|
|
|
524
538
|
registerSchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
525
539
|
approveSchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
526
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>;
|
|
527
544
|
};
|
|
528
545
|
|
|
529
546
|
type TAsset = {
|
|
@@ -708,4 +725,4 @@ declare function usePlantillaController(): {
|
|
|
708
725
|
bulkAddPlantillas: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
709
726
|
};
|
|
710
727
|
|
|
711
|
-
export { AddressInformation, BasicEducEnrForm, DisabilityType, EnrAddress, EnrCert, EnrLearnerInfo, EnrLearningModality, EnrParentGuardianInfo, EnrReturningLearnerInfo, EnrSeniorHighInformation, MAsset, MCurriculum,
|
|
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 };
|