"""Analysis response schemas.""" from decimal import Decimal from pydantic import BaseModel class AppSummary(BaseModel): in_amount: Decimal out_amount: Decimal class AnalysisSummaryResponse(BaseModel): total_out: Decimal total_in: Decimal net_loss: Decimal by_app: dict[str, AppSummary] counterparty_count: int class FlowNode(BaseModel): id: str label: str type: str | None = None # victim_app | counterparty class FlowEdge(BaseModel): source: str target: str amount: Decimal count: int = 1 class FlowGraphResponse(BaseModel): nodes: list[FlowNode] edges: list[FlowEdge]