from typing import Optional, Protocol, Any, Dict

class UserStorageAdapter(Protocol):
    def get_user_by_username(self, username: str) -> Optional[dict]: ...
    def get_user_by_email(self, email: str) -> Optional[dict]: ...
    def create_user(self, user_data: dict) -> dict: ...
    def update_user(self, user_id: Any, updates: dict) -> dict: ...
    def delete_user(self, user_id: Any) -> bool: ...
