update info

This commit is contained in:
Phuoc Nguyen
2025-11-20 10:12:24 +07:00
parent 54cb7d0fdd
commit 0708ed7d6f
17 changed files with 2144 additions and 161 deletions

View File

@@ -0,0 +1,35 @@
/// User Info Repository Interface
///
/// Defines the contract for user information data operations.
library;
import 'package:worker/features/account/domain/entities/user_info.dart';
/// User Info Repository
///
/// Repository interface for user information operations.
/// Implementations should handle:
/// - Fetching user info from API
/// - Error handling and retries
/// - Optional local caching
abstract class UserInfoRepository {
/// Get current user information
///
/// Fetches the authenticated user's information from the API.
///
/// Returns [UserInfo] entity with user data.
///
/// Throws:
/// - [UnauthorizedException] if session expired
/// - [NetworkException] if network error occurs
/// - [ServerException] if server error occurs
Future<UserInfo> getUserInfo();
/// Refresh user information
///
/// Forces a refresh from the server, bypassing any cache.
/// Useful after profile updates or when fresh data is needed.
///
/// Returns [UserInfo] entity with fresh user data.
Future<UserInfo> refreshUserInfo();
}