update info
This commit is contained in:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user