UNPKG

@pelag/nts

Version:

Creation and support of the multilingual project Next.js

52 lines 1.31 kB
interface AuthCredentials { login: string; password: string; } export declare class AuthManager { private readonly apiBaseUrl; constructor(apiBaseUrl?: string); /** * Prompts user for login credentials with validation * @returns Promise with user credentials */ getUserCredentials(): Promise<AuthCredentials>; /** * Authenticates user with provided credentials * @param login - User email * @param password - User password * @returns Promise with authentication token */ login(login: string, password: string): Promise<string>; /** * Validates credentials using Zod schema * @private */ private validateCredentials; /** * Prompts user for login with validation * @private */ private promptForLogin; /** * Prompts user for password with validation * @private */ private promptForPassword; /** * Validates a single field using Zod schema * @private */ private validateField; /** * Handles authentication errors with specific error messages * @private */ private handleAuthError; /** * Handles prompt errors * @private */ private handlePromptError; } export {}; //# sourceMappingURL=auth.manager.d.ts.map