@goweekdays/core 2.3.0 → 2.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,11 @@
1
1
  # @goweekdays/core
2
2
 
3
+ ## 2.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c39a016: Fix role, member, and user management
8
+
3
9
  ## 2.3.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -50,8 +50,6 @@ declare function useAuthService(): {
50
50
  declare function useAuthController(): {
51
51
  login: (req: Request, res: Response, next: NextFunction) => Promise<void>;
52
52
  logout: (req: Request, res: Response, next: NextFunction) => Promise<void>;
53
- resetPassword: (req: Request, res: Response, next: NextFunction) => Promise<void>;
54
- signUp: (req: Request, res: Response, next: NextFunction) => Promise<void>;
55
53
  };
56
54
 
57
55
  type TBuilding = {
@@ -603,8 +601,12 @@ declare function useUserRepo(): {
603
601
  };
604
602
 
605
603
  declare function useUserService(): {
606
- createUser: (value: TUser) => Promise<ObjectId>;
607
- resetPassword: (id: string, newPassword: string, passwordConfirmation: string) => Promise<string>;
604
+ createUser: (value: TUser) => Promise<bson.ObjectId>;
605
+ resetPassword: (value: {
606
+ id: string;
607
+ newPassword: string;
608
+ confirmPassword: string;
609
+ }) => Promise<string>;
608
610
  updateName: (_id: string, firstName?: string, lastName?: string) => Promise<string>;
609
611
  updateBirthday: (_id: string, month: string, day: number, year: number) => Promise<string>;
610
612
  updateUserFieldById: ({ _id, field, value }?: {
@@ -622,13 +624,13 @@ declare function useUserService(): {
622
624
  firstName?: string | undefined;
623
625
  lastName?: string | undefined;
624
626
  password?: string | undefined;
625
- }) => Promise<string | ObjectId>;
627
+ }) => Promise<string | bson.ObjectId>;
626
628
  createUserBySignUp: ({ id, firstName, lastName, password, }?: {
627
629
  id?: string | undefined;
628
630
  firstName?: string | undefined;
629
631
  lastName?: string | undefined;
630
632
  password?: string | undefined;
631
- }) => Promise<ObjectId>;
633
+ }) => Promise<bson.ObjectId>;
632
634
  createDefaultUser: () => Promise<string>;
633
635
  };
634
636
 
@@ -640,6 +642,7 @@ declare function useUserController(): {
640
642
  updateUserFieldById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
641
643
  updateUserProfile: (req: Request, res: Response, next: NextFunction) => Promise<void>;
642
644
  addViaInvite: (req: Request, res: Response, next: NextFunction) => Promise<void>;
645
+ resetPassword: (req: Request, res: Response, next: NextFunction) => Promise<void>;
643
646
  };
644
647
 
645
648
  declare function useGitHubService(): {
@@ -685,7 +688,7 @@ declare function modelVerification(value: TVerification): TVerification;
685
688
  declare function useVerificationRepo(): {
686
689
  createIndexes: () => Promise<void>;
687
690
  add: (value: TVerification, session?: ClientSession) => Promise<ObjectId>;
688
- getVerifications: ({ search, page, limit, sort, status, type, email, app, }?: {
691
+ getVerifications: ({ search, page, limit, sort, status, type, email, app, org, }?: {
689
692
  search?: string | undefined;
690
693
  page?: number | undefined;
691
694
  limit?: number | undefined;
@@ -694,6 +697,7 @@ declare function useVerificationRepo(): {
694
697
  type?: string | string[] | undefined;
695
698
  email?: string | undefined;
696
699
  app?: string | undefined;
700
+ org?: string | ObjectId | undefined;
697
701
  }) => Promise<{
698
702
  items: any[];
699
703
  pages: number;
@@ -738,6 +742,7 @@ declare function useVerificationService(): {
738
742
  org?: string;
739
743
  }) => Promise<bson.ObjectId>;
740
744
  cancelInviteMember: (id: string) => Promise<string>;
745
+ forgetPassword: (email: string) => Promise<string>;
741
746
  };
742
747
 
743
748
  declare function useVerificationController(): {
@@ -749,6 +754,7 @@ declare function useVerificationController(): {
749
754
  inviteMember: (req: Request, res: Response, next: NextFunction) => Promise<void>;
750
755
  signUp: (req: Request, res: Response, next: NextFunction) => Promise<void>;
751
756
  cancelInviteMember: (req: Request, res: Response, next: NextFunction) => Promise<void>;
757
+ forgetPassword: (req: Request, res: Response, next: NextFunction) => Promise<void>;
752
758
  };
753
759
 
754
760
  type TApp = {