"""Pydantic schemas for auth endpoints.""" from pydantic import BaseModel, EmailStr, Field class RegisterRequest(BaseModel): email: EmailStr password: str = Field(min_length=8) display_name: str = Field(min_length=1, max_length=100) # Optional: lets a partner register straight from an invite link instead # of first creating a throwaway solo workspace. When present, `register` # joins the inviting workspace directly (claiming a placeholder member # if one exists) instead of creating a new one. invite_token: str | None = None class LoginRequest(BaseModel): email: EmailStr password: str class TokenResponse(BaseModel): access_token: str token_type: str = "bearer" expires_in: int # seconds until expiry class UserMeResponse(BaseModel): id: str email: str display_name: str workspace_id: str | None