@goweekdays/core 2.0.0 → 2.1.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
  # @goweekdays/core
2
2
 
3
+ ## 2.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 4b83806: Fix error handle
8
+
9
+ ## 2.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 6cb41ce: App & Permission management initial release
14
+
3
15
  ## 2.0.0
4
16
 
5
17
  ### Major Changes
package/dist/index.d.ts CHANGED
@@ -802,6 +802,7 @@ type TApp = {
802
802
  deletedAt?: string | Date;
803
803
  };
804
804
  declare const schemaApp: Joi.ObjectSchema<any>;
805
+ declare const schemaAppUpdate: Joi.ObjectSchema<any>;
805
806
  declare function modelApp(value: TApp): TApp;
806
807
 
807
808
  declare function useAppRepo(): {
@@ -818,8 +819,7 @@ declare function useAppRepo(): {
818
819
  getById: (_id: string | ObjectId) => Promise<TApp | null>;
819
820
  updateById: (_id: ObjectId | string, value: {
820
821
  name: string;
821
- serial: string;
822
- levels: number;
822
+ description: string;
823
823
  }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
824
824
  deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
825
825
  };
@@ -830,6 +830,7 @@ declare function useAppService(): {
830
830
 
831
831
  declare function useAppController(): {
832
832
  add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
833
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
833
834
  getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
834
835
  getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
835
836
  deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
@@ -842,29 +843,31 @@ type TPermission = {
842
843
  group: string;
843
844
  description: string;
844
845
  deprecated: boolean;
846
+ status?: string;
845
847
  createdAt?: string | Date;
846
848
  updatedAt?: string | Date;
847
849
  deletedAt?: string | Date;
848
850
  };
849
851
  declare const schemaPermission: Joi.ObjectSchema<any>;
852
+ declare const schemaPermissionUpdate: Joi.ObjectSchema<any>;
850
853
  declare function modelPermission(value: TPermission): TPermission;
851
854
 
852
855
  declare function usePermissionRepo(): {
853
856
  createIndexes: () => Promise<void>;
854
857
  add: (value: TPermission, session?: ClientSession) => Promise<ObjectId>;
855
- getAll: ({ search, page, limit, sort, school, status, }?: {
858
+ getAll: ({ search, page, limit, sort, app, status, }?: {
856
859
  search?: string | undefined;
857
860
  page?: number | undefined;
858
861
  limit?: number | undefined;
859
862
  sort?: {} | undefined;
860
- school?: string | undefined;
863
+ app?: string | undefined;
861
864
  status?: string | undefined;
862
865
  }) => Promise<Record<string, any>>;
863
866
  getById: (_id: string | ObjectId) => Promise<TPermission | null>;
864
867
  updateById: (_id: ObjectId | string, value: {
865
- name: string;
866
- serial: string;
867
- levels: number;
868
+ key?: string;
869
+ group?: string;
870
+ description?: string;
868
871
  }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
869
872
  deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
870
873
  countByGroup: (group: string) => Promise<number>;
@@ -879,6 +882,7 @@ declare function usePermissionController(): {
879
882
  getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
880
883
  getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
881
884
  deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
885
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
882
886
  };
883
887
 
884
888
  type TPermissionGroup = {
@@ -886,23 +890,25 @@ type TPermissionGroup = {
886
890
  app: string;
887
891
  key: string;
888
892
  label: string;
889
- order: number;
893
+ order?: number;
894
+ status?: string;
890
895
  createdAt?: string | Date;
891
896
  updatedAt?: string | Date;
892
897
  deletedAt?: string | Date;
893
898
  };
894
899
  declare const schemaPermissionGroup: Joi.ObjectSchema<any>;
900
+ declare const schemaPermissionGroupUpdate: Joi.ObjectSchema<any>;
895
901
  declare function modelPermissionGroup(value: TPermissionGroup): TPermissionGroup;
896
902
 
897
903
  declare function usePermissionGroupRepo(): {
898
904
  createIndexes: () => Promise<void>;
899
905
  add: (value: TPermissionGroup, session?: ClientSession) => Promise<ObjectId>;
900
- getAll: ({ search, page, limit, sort, school, status, }?: {
906
+ getAll: ({ search, page, limit, sort, app, status, }?: {
901
907
  search?: string | undefined;
902
908
  page?: number | undefined;
903
909
  limit?: number | undefined;
904
910
  sort?: {} | undefined;
905
- school?: string | undefined;
911
+ app?: string | undefined;
906
912
  status?: string | undefined;
907
913
  }) => Promise<Record<string, any>>;
908
914
  getById: (_id: string | ObjectId) => Promise<TPermissionGroup | null>;
@@ -923,6 +929,7 @@ declare function usePermissionGroupController(): {
923
929
  getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
924
930
  getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
925
931
  deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
932
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
926
933
  };
927
934
 
928
935
  declare const MONGO_URI: string;
@@ -962,4 +969,4 @@ declare const XENDIT_SECRET_KEY: string;
962
969
  declare const XENDIT_BASE_URL: string;
963
970
  declare const DOMAIN: string;
964
971
 
965
- export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DOMAIN, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MBuilding, MBuildingUnit, MFile, MMember, MONGO_DB, MONGO_URI, MOrg, MRole, MUser, MUserRole, MVerification, OrgTypes, 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, TApp, TBuilding, TBuildingUnit, TCounter, TFile, TMember, TMiniRole, TOrg, TPSGC, TPermission, TPermissionGroup, TRole, TUser, TUserRole, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, addressSchema, isDev, modelApp, modelPSGC, modelPermission, modelPermissionGroup, schemaApp, schemaBuilding, schemaBuildingUnit, schemaOrg, schemaPSGC, schemaPermission, schemaPermissionGroup, schemaUpdateOptions, transactionSchema, useAddressController, useAddressRepo, useAppController, useAppRepo, useAppService, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useCounterModel, useCounterRepo, useFileController, useFileRepo, useFileService, useGitHubService, useMemberController, useMemberRepo, useOrgController, useOrgRepo, useOrgService, usePSGCController, usePSGCRepo, usePermissionController, usePermissionGroupController, usePermissionGroupRepo, usePermissionGroupService, usePermissionRepo, usePermissionService, useRoleController, useRoleRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService };
972
+ export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DOMAIN, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MBuilding, MBuildingUnit, MFile, MMember, MONGO_DB, MONGO_URI, MOrg, MRole, MUser, MUserRole, MVerification, OrgTypes, 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, TApp, TBuilding, TBuildingUnit, TCounter, TFile, TMember, TMiniRole, TOrg, TPSGC, TPermission, TPermissionGroup, TRole, TUser, TUserRole, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, addressSchema, isDev, modelApp, modelPSGC, modelPermission, modelPermissionGroup, schemaApp, schemaAppUpdate, schemaBuilding, schemaBuildingUnit, schemaOrg, schemaPSGC, schemaPermission, schemaPermissionGroup, schemaPermissionGroupUpdate, schemaPermissionUpdate, schemaUpdateOptions, transactionSchema, useAddressController, useAddressRepo, useAppController, useAppRepo, useAppService, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useCounterModel, useCounterRepo, useFileController, useFileRepo, useFileService, useGitHubService, useMemberController, useMemberRepo, useOrgController, useOrgRepo, useOrgService, usePSGCController, usePSGCRepo, usePermissionController, usePermissionGroupController, usePermissionGroupRepo, usePermissionGroupService, usePermissionRepo, usePermissionService, useRoleController, useRoleRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService };