from pydantic import BaseModel, Field from typing import Literal FormatType = Literal[ "OnePager", "Cheatsheet", "MiniGuide", "Guide", "BeginnerGuide", "IntermediateGuide", "ExtendedGuide", ] class GuideCreateRequest(BaseModel): topic: str = Field(min_length=1, max_length=100) format: FormatType instructions: str = Field(default="", max_length=2000) class GuideReworkRequest(BaseModel): instructions: str = Field(min_length=1, max_length=2000) class GuideResponse(BaseModel): id: str topic: str format: str status: str progress: str | None = None error_msg: str | None = None created_at: str updated_at: str class BausteinCreateRequest(BaseModel): topic: str = Field(min_length=1, max_length=100) title: str = Field(min_length=1, max_length=200) instructions: str = Field(default="", max_length=2000) class BausteinReworkRequest(BaseModel): instructions: str = Field(min_length=1, max_length=2000) class BausteinResponse(BaseModel): id: str topic: str title: str description: str purpose: str example: str sort_order: int = 0 created_at: str updated_at: str class BausteinSortRequest(BaseModel): instructions: str = Field(default="", max_length=2000) class SuggestionResponse(BaseModel): id: str topic: str title: str description: str purpose: str example: str status: str created_at: str class TopicSuggestRequest(BaseModel): problem: str = Field(min_length=1, max_length=2000) class TopicSuggestion(BaseModel): title: str reason: str