summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Hoang <tyler@tylerhoang.xyz>2026-06-14 02:27:21 -0700
committerTyler Hoang <tyler@tylerhoang.xyz>2026-06-14 02:27:21 -0700
commit67b7ea74b7c8f45483f7e93a207bc7521ba93a24 (patch)
tree03fb428db56115cd528f536146033319c10aae5b
parent983efae815130f77ebdded15c4584e062e1f5eab (diff)
feat: add FilingsResponse schema
-rw-r--r--backend/app/schemas.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/backend/app/schemas.py b/backend/app/schemas.py
index b1d934a..aafe45d 100644
--- a/backend/app/schemas.py
+++ b/backend/app/schemas.py
@@ -234,5 +234,42 @@ class InsidersResponse(BaseModel):
transactions: list[InsiderTransaction] = Field(default_factory=list)
+class FilingItem(BaseModel):
+ date: str
+ form: str
+ title: str
+ url: str | None = None
+
+
+class FilingKpis(BaseModel):
+ total: int
+ count_10k: int
+ count_10q: int
+ count_8k: int
+ distinct_forms: int
+
+
+class FormMixRow(BaseModel):
+ form: str
+ count: int
+ pct: float
+
+
+class CadencePoint(BaseModel):
+ month: str # "YYYY-MM"
+ count_10k: int
+ count_10q: int
+ count_8k: int
+ count_other: int
+
+
+class FilingsResponse(BaseModel):
+ kpis: FilingKpis
+ cadence: list[CadencePoint] = Field(default_factory=list)
+ form_mix: list[FormMixRow] = Field(default_factory=list)
+ readout: str
+ filings: list[FilingItem] = Field(default_factory=list)
+
+
class ErrorResponse(BaseModel):
detail: str