@eeplatform/core 1.4.5 → 1.5.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/core
2
2
 
3
+ ## 1.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f360ea6: Curriculum mgmt - revision
8
+
9
+ ## 1.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 3eb24f7: Basic education - curriculum mgmt initial release
14
+
3
15
  ## 1.4.5
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -2690,17 +2690,20 @@ declare function useUtilController(): {
2690
2690
 
2691
2691
  type TPlantilla = {
2692
2692
  _id?: ObjectId;
2693
+ org: string;
2693
2694
  itemNumber: string;
2695
+ orgUnitCode?: string;
2694
2696
  positionTitle: string;
2695
2697
  positionCategory: string;
2696
2698
  salaryGrade: number;
2697
- step?: number;
2699
+ employmentType?: string;
2700
+ personnelType: string;
2698
2701
  region?: ObjectId | string;
2699
2702
  regionName?: string;
2700
2703
  division?: ObjectId | string;
2701
2704
  divisionName?: string;
2702
- incumbent?: string;
2703
2705
  employee?: string | ObjectId;
2706
+ employeeName?: string;
2704
2707
  annualSalary?: number;
2705
2708
  monthlySalary?: number;
2706
2709
  status?: string;
@@ -2737,6 +2740,200 @@ declare function usePlantillaController(): {
2737
2740
  bulkAddPlantillas: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2738
2741
  };
2739
2742
 
2743
+ type TOffice = {
2744
+ _id?: ObjectId;
2745
+ name: string;
2746
+ code: string;
2747
+ type: string;
2748
+ parent?: ObjectId | string;
2749
+ path: string;
2750
+ status: string;
2751
+ createdAt?: Date | string;
2752
+ updatedAt?: Date | string;
2753
+ deletedAt?: Date | string;
2754
+ };
2755
+ declare const schemaOffice: Joi.ObjectSchema<TOffice>;
2756
+ declare function MOffice(data: Partial<TOffice>): TOffice;
2757
+
2758
+ declare function useOfficeRepo(): {
2759
+ createIndexes: () => Promise<void>;
2760
+ add: (value: TOffice, session?: ClientSession, clearCache?: boolean) => Promise<ObjectId>;
2761
+ getAll: ({ search, page, limit, sort, type, parent, status, }?: {
2762
+ search?: string | undefined;
2763
+ page?: number | undefined;
2764
+ limit?: number | undefined;
2765
+ sort?: {} | undefined;
2766
+ type?: string | undefined;
2767
+ parent?: string | undefined;
2768
+ status?: string | undefined;
2769
+ }) => Promise<Record<string, any>>;
2770
+ getById: (_id: string | ObjectId) => Promise<TOffice | null>;
2771
+ updateById: (_id: ObjectId | string, value: Partial<Pick<TOffice, "status" | "name" | "code" | "type" | "parent" | "path" | "updatedAt">>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
2772
+ deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
2773
+ delCachedData: () => void;
2774
+ };
2775
+
2776
+ declare function useOfficeService(): {
2777
+ addBulk: (file: Express.Multer.File) => Promise<{
2778
+ total: number;
2779
+ successful: number;
2780
+ failed: number;
2781
+ errors: string[];
2782
+ }>;
2783
+ };
2784
+
2785
+ declare function useOfficeController(): {
2786
+ add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2787
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2788
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2789
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2790
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2791
+ bulkAddOffices: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2792
+ };
2793
+
2794
+ type TCurriculumSubject = {
2795
+ educationLevel: string;
2796
+ gradeLevel: string;
2797
+ subjectCode: string;
2798
+ subjectName: string;
2799
+ subjectType: string;
2800
+ sessionFrequency: number;
2801
+ sessionDuration: number;
2802
+ totalMinutesPerWeek: number;
2803
+ };
2804
+ type TCurriculum = {
2805
+ _id?: ObjectId;
2806
+ school: ObjectId | string;
2807
+ code: string;
2808
+ effectiveSchoolYear: string;
2809
+ maxTeachingHoursPerDay: number;
2810
+ subjects?: TCurriculumSubject[];
2811
+ curriculumMemoRef?: string;
2812
+ status?: string;
2813
+ createdAt?: Date | string;
2814
+ updatedAt?: Date | string;
2815
+ deletedAt?: Date | string;
2816
+ createdBy?: string;
2817
+ updatedBy?: string;
2818
+ deletedBy?: string;
2819
+ };
2820
+ declare const schemaCurriculum: Joi.ObjectSchema<any>;
2821
+ declare function MCurriculum(value: TCurriculum): {
2822
+ _id: ObjectId | undefined;
2823
+ school: string | ObjectId;
2824
+ code: string;
2825
+ effectiveSchoolYear: string;
2826
+ maxTeachingHoursPerDay: number;
2827
+ subjects: TCurriculumSubject[];
2828
+ curriculumMemoRef: string;
2829
+ status: string;
2830
+ createdAt: string | Date;
2831
+ updatedAt: string | Date;
2832
+ deletedAt: string | Date;
2833
+ createdBy: string;
2834
+ updatedBy: string;
2835
+ deletedBy: string;
2836
+ };
2837
+
2838
+ declare function useCurriculumRepo(): {
2839
+ createIndexes: () => Promise<void>;
2840
+ add: (value: TCurriculum, session?: ClientSession) => Promise<ObjectId>;
2841
+ getAll: ({ search, page, limit, sort, status, }?: {
2842
+ search?: string | undefined;
2843
+ page?: number | undefined;
2844
+ limit?: number | undefined;
2845
+ sort?: {} | undefined;
2846
+ status?: string | undefined;
2847
+ }) => Promise<Record<string, any>>;
2848
+ getById: (_id: string | ObjectId) => Promise<TCurriculum | null>;
2849
+ updateById: (_id: ObjectId | string, value: {
2850
+ code?: string;
2851
+ maxTeachingHoursPerDay?: number;
2852
+ curriculumMemoRef?: string;
2853
+ }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
2854
+ deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
2855
+ };
2856
+
2857
+ declare function useCurriculumController(): {
2858
+ add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2859
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2860
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2861
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2862
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2863
+ };
2864
+
2865
+ type TGradeLevel = {
2866
+ _id?: ObjectId;
2867
+ school?: ObjectId | string;
2868
+ educationLevel: string;
2869
+ gradeLevel: string;
2870
+ teachingStyle: string;
2871
+ defaultStartTime?: string;
2872
+ defaultEndTime?: string;
2873
+ status?: string;
2874
+ createdAt?: Date | string;
2875
+ updatedAt?: Date | string;
2876
+ deletedAt?: Date | string;
2877
+ createdBy?: string;
2878
+ updatedBy?: string;
2879
+ deletedBy?: string;
2880
+ };
2881
+ declare const schemaGradeLevel: Joi.ObjectSchema<any>;
2882
+ declare function MGradeLevel(value: TGradeLevel): {
2883
+ _id: ObjectId | undefined;
2884
+ school: string | ObjectId | undefined;
2885
+ educationLevel: string;
2886
+ gradeLevel: string;
2887
+ teachingStyle: string;
2888
+ defaultStartTime: string;
2889
+ defaultEndTime: string;
2890
+ status: string;
2891
+ createdAt: string | Date;
2892
+ updatedAt: string | Date;
2893
+ deletedAt: string | Date;
2894
+ createdBy: string;
2895
+ updatedBy: string;
2896
+ deletedBy: string;
2897
+ };
2898
+
2899
+ declare function useGradeLevelRepo(): {
2900
+ createIndexes: () => Promise<void>;
2901
+ add: (value: TGradeLevel, session?: ClientSession) => Promise<ObjectId>;
2902
+ getAll: ({ search, page, limit, sort, educationLevel, gradeLevel, teachingStyle, school, status, }?: {
2903
+ search?: string | undefined;
2904
+ page?: number | undefined;
2905
+ limit?: number | undefined;
2906
+ sort?: {} | undefined;
2907
+ educationLevel?: string | undefined;
2908
+ gradeLevel?: string | undefined;
2909
+ teachingStyle?: string | undefined;
2910
+ school?: string | undefined;
2911
+ status?: string | undefined;
2912
+ }) => Promise<Record<string, any>>;
2913
+ getById: (_id: string | ObjectId) => Promise<bson.Document>;
2914
+ updateById: (_id: ObjectId | string, value: {
2915
+ educationLevel?: string;
2916
+ gradeLevel?: string;
2917
+ teachingStyle?: string;
2918
+ maxTeachingHoursPerDay?: number;
2919
+ maxTeachingHoursPerWeek?: number;
2920
+ defaultStartTime?: string;
2921
+ defaultEndTime?: string;
2922
+ school?: ObjectId | string;
2923
+ }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
2924
+ deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
2925
+ getByEducationLevel: (educationLevel: string, school?: string) => Promise<mongodb.WithId<bson.Document>[] | TGradeLevel[]>;
2926
+ };
2927
+
2928
+ declare function useGradeLevelController(): {
2929
+ add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2930
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2931
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2932
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2933
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2934
+ getByEducationLevel: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2935
+ };
2936
+
2740
2937
  declare const MONGO_URI: string;
2741
2938
  declare const MONGO_DB: string;
2742
2939
  declare const PORT: number;
@@ -2773,4 +2970,4 @@ declare const PAYPAL_API_URL: string;
2773
2970
  declare const XENDIT_SECRET_KEY: string;
2774
2971
  declare const XENDIT_BASE_URL: string;
2775
2972
 
2776
- export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, CardPayment, CardPaymentSchema, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DirectDebit, DirectDebitSchema, EWalletPayment, EWalletPaymentSchema, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MAsset, MBuilding, MBuildingUnit, MDivision, MEntity, MFile, MMember, MONGO_DB, MONGO_URI, MOrder, MOrg, MPaymentMethod, MPlantilla, MPromoCode, MRegion, MRole, MSchool, MStockCard, MSubscription, MToken, MUser, MUserRole, MVerification, PAYPAL_API_URL, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT, REDIS_HOST, REDIS_PASSWORD, REDIS_PORT, REFRESH_TOKEN_EXPIRY, REFRESH_TOKEN_SECRET, SECRET_KEY, SPACES_ACCESS_KEY, SPACES_BUCKET, SPACES_ENDPOINT, SPACES_REGION, SPACES_SECRET_KEY, TAddress, TAsset, TBillingRecipient, TBuilding, TBuildingUnit, TCounter, TDivision, TEntity, TFile, TInvoice, TMember, TMiniRole, TOrder, TOrderMetadata, TOrg, TPayment, TPaymentMethod$1 as TPaymentMethod, TPaymentMethodType, TPlantilla, TPrice, TPriceType, TPromoCode, TPromoTier, TRegion, TRole, TSchool, TStockCard, TSubscription, TToken, TUser, TUserRole, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, addressSchema, isDev, schema, schemaAsset, schemaAssetUpdateOption, schemaBuilding, schemaBuildingUnit, schemaDivision, schemaPlantilla, schemaRegion, schemaSchool, schemaStockCard, schemaUpdateOptions, useAddressController, useAddressRepo, useAssetController, useAssetRepo, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingUnitController, useBuildingUnitRepo, useCounterModel, useCounterRepo, useDivisionController, useDivisionRepo, useDivisionService, useEntityController, useEntityRepo, useFileController, useFileRepo, useFileService, useGitHubService, useInvoiceController, useInvoiceModel, useInvoiceRepo, useInvoiceService, useMemberController, useMemberRepo, useOrderController, useOrderRepo, useOrgController, useOrgRepo, useOrgService, usePaymentController, usePaymentMethodController, usePaymentMethodRepo, usePaymentMethodService, usePaymentModel, usePaymentRepo, usePaypalService, usePlantillaController, usePlantillaRepo, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, useRegionController, useRegionRepo, useRegionService, useRoleController, useRoleRepo, useSchoolController, useSchoolRepo, useSchoolService, useStockCardController, useStockCardRepository, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useTokenRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService, useXenditService, validateCardPayment, validateDirectDebit, validateEWalletPayment };
2973
+ export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, CardPayment, CardPaymentSchema, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DirectDebit, DirectDebitSchema, EWalletPayment, EWalletPaymentSchema, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MAsset, MBuilding, MBuildingUnit, MCurriculum, MDivision, MEntity, MFile, MGradeLevel, MMember, MONGO_DB, MONGO_URI, MOffice, MOrder, MOrg, MPaymentMethod, MPlantilla, MPromoCode, MRegion, MRole, MSchool, MStockCard, MSubscription, MToken, MUser, MUserRole, MVerification, PAYPAL_API_URL, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT, REDIS_HOST, REDIS_PASSWORD, REDIS_PORT, REFRESH_TOKEN_EXPIRY, REFRESH_TOKEN_SECRET, SECRET_KEY, SPACES_ACCESS_KEY, SPACES_BUCKET, SPACES_ENDPOINT, SPACES_REGION, SPACES_SECRET_KEY, TAddress, TAsset, TBillingRecipient, TBuilding, TBuildingUnit, TCounter, TCurriculum, TCurriculumSubject, TDivision, TEntity, TFile, TGradeLevel, TInvoice, TMember, TMiniRole, TOffice, TOrder, TOrderMetadata, TOrg, TPayment, TPaymentMethod$1 as TPaymentMethod, TPaymentMethodType, TPlantilla, TPrice, TPriceType, TPromoCode, TPromoTier, TRegion, TRole, TSchool, TStockCard, TSubscription, TToken, TUser, TUserRole, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, addressSchema, isDev, schema, schemaAsset, schemaAssetUpdateOption, schemaBuilding, schemaBuildingUnit, schemaCurriculum, schemaDivision, schemaGradeLevel, schemaOffice, schemaPlantilla, schemaRegion, schemaSchool, schemaStockCard, schemaUpdateOptions, useAddressController, useAddressRepo, useAssetController, useAssetRepo, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingUnitController, useBuildingUnitRepo, useCounterModel, useCounterRepo, useCurriculumController, useCurriculumRepo, useDivisionController, useDivisionRepo, useDivisionService, useEntityController, useEntityRepo, useFileController, useFileRepo, useFileService, useGitHubService, useGradeLevelController, useGradeLevelRepo, useInvoiceController, useInvoiceModel, useInvoiceRepo, useInvoiceService, useMemberController, useMemberRepo, useOfficeController, useOfficeRepo, useOfficeService, useOrderController, useOrderRepo, useOrgController, useOrgRepo, useOrgService, usePaymentController, usePaymentMethodController, usePaymentMethodRepo, usePaymentMethodService, usePaymentModel, usePaymentRepo, usePaypalService, usePlantillaController, usePlantillaRepo, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, useRegionController, useRegionRepo, useRegionService, useRoleController, useRoleRepo, useSchoolController, useSchoolRepo, useSchoolService, useStockCardController, useStockCardRepository, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useTokenRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService, useXenditService, validateCardPayment, validateDirectDebit, validateEWalletPayment };