@punks/backend-entity-manager 0.0.328 → 0.0.330

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.
@@ -30,6 +30,11 @@ export interface IAuthOrganization {
30
30
  name: string;
31
31
  tenant: IAuthTenant;
32
32
  }
33
+ export interface IAuthDirectory {
34
+ id: string;
35
+ uid: string;
36
+ name: string;
37
+ }
33
38
  export interface IAuthApiKey {
34
39
  id: string;
35
40
  key: string;
@@ -49,6 +54,7 @@ export interface IAuthUser {
49
54
  disabled: boolean;
50
55
  profile: IAuthUserProfile;
51
56
  organization?: IAuthOrganization;
57
+ directory?: IAuthDirectory;
52
58
  }
53
59
  export interface IAuthUserContext {
54
60
  organizationUid?: string;
@@ -8,6 +8,7 @@ export type UserCreationInput<TUserRegistrationInfo, TUserContext extends IAuthU
8
8
  password: string;
9
9
  registrationInfo: TUserRegistrationInfo;
10
10
  context?: TUserContext;
11
+ verified?: boolean;
11
12
  };
12
13
  export type UserCreationResult = {
13
14
  success: boolean;
package/dist/esm/index.js CHANGED
@@ -22865,7 +22865,7 @@ let UserCreationHandler = class UserCreationHandler {
22865
22865
  await this.services.getUsersService().update(user.id, {
22866
22866
  passwordHash,
22867
22867
  passwordUpdateTimestamp: new Date(),
22868
- verified: true,
22868
+ verified: input.verified ?? true,
22869
22869
  });
22870
22870
  this.logger.debug(`User already exists but not verified. Updating password and marking as verified: ${input.email} - ${input.userName}`, { user });
22871
22871
  return {
@@ -22878,7 +22878,7 @@ let UserCreationHandler = class UserCreationHandler {
22878
22878
  await this.services.getUsersService().update(newUser.id, {
22879
22879
  passwordHash,
22880
22880
  passwordUpdateTimestamp: new Date(),
22881
- verified: true,
22881
+ verified: input.verified ?? true,
22882
22882
  });
22883
22883
  this.logger.debug(`New user created: ${input.email} - ${input.userName}`, {
22884
22884
  user: newUser,