from typing import Optional, TypedDict, Union from models import User from schemas.base import BaseSchema, CustomModelSnake class AuthLoginRequest(CustomModelSnake): auth_date: int first_name: str hash: str id: int photo_url: Optional[str] = None invite_code: Optional[str] = None class AuthLoginResponse(BaseSchema): access_token: str class UserDealEditor(TypedDict): deal_id: int sub: str class UserViewer(TypedDict): client_id: int sub: str UserUnion = Union[User, UserViewer, UserDealEditor]