/** * ============================================================================ * @amaster.ai/auth-client - Type Definitions * ============================================================================ * * 🤖 AI NAVIGATION - Read these files based on your task: * * 1. Need LOGIN/REGISTER/LOGOUT? → Read: ./auth.d.ts * 2. Need PERMISSION checks? → Read: ./permissions.d.ts * 3. Need USER profile management? → Read: ./user.d.ts * 4. Need OAUTH binding? → Read: ./oauth.d.ts * 5. Need SESSION management? → Read: ./sessions.d.ts * * ============================================================================ */ import { HttpClient, ClientResult } from '@amaster.ai/http-client'; import { w as User, U as UpdateMeParams, C as ChangePasswordParams, v as SuccessResponse } from './types-DqwQ2EzH.js'; /** * User Management Module * * @module user * @category User * * Handles user profile and account management: * - Get current user info * - Update profile * - Change password */ interface UserModuleDeps { http: HttpClient; storage: { getItem: (key: string) => string | null; setItem: (key: string, value: string) => void; }; onUserUpdate: (user: User) => void; onAuthFailure?: (result: ClientResult) => void; } declare function createUserModule(deps: UserModuleDeps): { /** * Get current logged-in user information * * @category User * @example * ```typescript * const result = await user.getMe(); * if (result.data) { * console.log("User:", result.data.displayName); * } * ``` */ getMe(): Promise>; /** * Update current user's profile * * @category User * @example * ```typescript * await user.updateMe({ * displayName: "New Name", * avatarUrl: "https://example.com/avatar.jpg", * }); * ``` */ updateMe(params: UpdateMeParams): Promise>; /** * Change current user's password * * @category User * @example * ```typescript * await user.changePassword({ * oldPassword: "OldPass@123", * newPassword: "NewPass@456", * }); * ``` */ changePassword(params: ChangePasswordParams): Promise>; }; type UserModule = ReturnType; export { type UserModule, type UserModuleDeps, createUserModule };