import { AuthRequiredType, AuthToken, User } from '../../../types'; import { type AwilixContainer } from 'awilix'; import { AuthCradle } from '../../../container'; export declare class AuthService { private container; private readonly logger; constructor(container: AwilixContainer); register(provider: string, credentials: Partial, password: string): Promise<{ user?: User; token: AuthToken | string | AuthRequiredType; url?: URL; }>; login(provider: string, credentials: Record): Promise<{ user?: User; token: AuthToken | string | AuthRequiredType; url?: URL; }>; passwordlessLogin(code: string): Promise<{ user: User; token: AuthToken | string | AuthRequiredType; }>; oauthCallback(provider: string, code: string, state: string): Promise<{ user?: User; token: AuthToken | string | AuthRequiredType; }>; logout(token: string): Promise; refreshToken(refreshToken: string): Promise; /** * Verify an email using a verification code * @param userId The user ID * @param code The verification code * @returns The user and token */ verifyEmail(userId: string, code: string): Promise<{ user: User; token: AuthToken | string; }>; /** * Send a verification email to a user * @param email The email address to send the verification to * @param redirectUrl Optional custom verification URL base * @returns The verification token if available */ sendVerificationEmail(email: string, redirectUrl?: string): Promise; /** * Send a password reset email to a user * @param email The email address to send the reset email to * @param redirectUrl Optional custom reset URL base * @returns The reset token if available */ sendPasswordResetEmail(email: string, redirectUrl?: string): Promise; /** * Verify a password reset token * @param userId The user ID * @param token The reset token * @returns Whether the token is valid */ verifyPasswordResetToken(userId: string, token: string): Promise; /** * Reset a user's password * @param userId The user ID * @param newPassword The new password * @param token Optional reset token for token-based password reset * @returns Whether the password was reset successfully */ resetPassword(userId: string, newPassword: string, token?: string): Promise; /** * Change a user's password by verifying the old password first * @param userId The user ID * @param oldPassword The current password * @param newPassword The new password * @returns Whether the password was changed successfully */ changePassword(userId: string, oldPassword: string, newPassword: string): Promise; verifySms(userId: string, code: string): Promise<{ user: User; token: string | AuthToken; }>; verifyMfa(userId: string, code: string): Promise; enableMfa(userId: string, code?: string): Promise<{ secret?: string; uri?: string; } | { recoveryCodes: string[]; }>; disableMfa(userId: string, code: string): Promise; validateToken(token: string, provider: string): Promise<{ user: User; token?: string | AuthToken; }>; validateSessionToken(token: string): Promise; setLabels(userId: string, labels: string[]): Promise; setPermissions(userId: string, permissions: string[]): Promise; setTeams(userId: string, teams: string[]): Promise; removeLabels(userId: string, labels: string[]): Promise; removePermissions(userId: string, permissions: string[]): Promise; removeTeams(userId: string, teams: string[]): Promise; addLabels(userId: string, labels: string[]): Promise; addPermissions(userId: string, permissions: string[]): Promise; addTeams(userId: string, teams: string[]): Promise; setRole(userId: string, role: string): Promise; getProviderConfig(provider: string): Promise> | Promise<{ clientID: any; clientSecret: any; callbackURL: string; scopes: any; redirect_url: string; }>; } //# sourceMappingURL=auth.service.d.ts.map