master/adapter/http/fastapi/schemas.py
2026-04-02 13:41:41 +03:00

33 lines
579 B
Python

from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field
class HealthResponse(BaseModel):
status: str
app: str
env: str
class CreateSandboxRequest(BaseModel):
model_config = ConfigDict(extra='forbid', str_strip_whitespace=True)
chat_id: str = Field(min_length=1)
class SandboxSessionResponse(BaseModel):
session_id: str
chat_id: str
container_id: str
status: str
expires_at: datetime
class UserResponse(BaseModel):
id: str
email: str
name: str
class ErrorResponse(BaseModel):
detail: str