import { DataSource } from 'typeorm'; import { CaliobaseConfig } from '../config/config'; import { AbstractUserProfile } from './entities/abstract-user-profile.entity'; import { User } from './entities/user.entity'; import { OrganizationService } from './organization.service'; import { AbstractProfileService } from './profiles.service'; import { SocialProvider, SocialRequest, SocialValidation } from './social-provider/social-provider'; export type CreateUserRequest = { email: string; password: string; profile: Partial | null; }; export declare class AuthService { private config; private orgService; private profileService; private dataSource; providers: Map; private readonly socialLoginRepo; private readonly userRepo; private readonly userPasswordRepo; private readonly userOtpRepo; private readonly passwordResetTokenRepo; constructor(socialProviders: SocialProvider[], config: CaliobaseConfig, orgService: OrganizationService, profileService: AbstractProfileService, dataSource: DataSource); getSocialAuthUrl(request: SocialRequest): Promise<{ authUrl: string; nonce: string; }>; validateSocial(request: SocialValidation): Promise<{ user: User; validationResult: import("./social-provider/social-provider").ValidationResult>; }>; validatePassword({ email, password, }: { email: string; password: string; }): Promise>; validateOtp({ email, otp }: { email: string; otp: string; }): Promise>; createUserWithPassword({ password, profile: createProfile, ...createUser }: CreateUserRequest): Promise; createUserWithoutPassword({ profile: createProfile, ...createUser }: Omit): Promise<{ profile: AbstractUserProfile | undefined; id: string; email: string; emailVerified: boolean; }>; userExistsWithEmail(email: string): Promise; sendOtpByEmail(email: string): Promise; deleteUser(user: User): Promise; setUserPassword(id: string, { currentPassword, newPassword, }: { currentPassword: string; newPassword: string; }): Promise; createAndEmailPasswordResetLink(userEmail: string): Promise; setPasswordWithResetToken(resetToken: string, newPassword: string): Promise<{ success: boolean; }>; } export declare function normalizeEmail(email: string): string; export declare function normalizeEmailOf(obj: T): T;