summaryrefslogtreecommitdiff
path: root/frontend/lib/api.ts
diff options
context:
space:
mode:
authorTyler Hoang <tyler@tylerhoang.xyz>2026-06-14 02:38:06 -0700
committerTyler Hoang <tyler@tylerhoang.xyz>2026-06-14 02:38:06 -0700
commit13ce7b912227ea20671465d83bd6ab5eeb4fbe2b (patch)
treee8ad001ff97dd948a53313e4e427465081c67363 /frontend/lib/api.ts
parentf8d61a20759f3833484674173ccb9264d474b6c2 (diff)
feat: add FilingsResponse types and api.filings() client
Diffstat (limited to 'frontend/lib/api.ts')
-rw-r--r--frontend/lib/api.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/frontend/lib/api.ts b/frontend/lib/api.ts
index 84df997..13c73bf 100644
--- a/frontend/lib/api.ts
+++ b/frontend/lib/api.ts
@@ -1,4 +1,4 @@
-import type { FinancialsResponse, HistoryPoint, InsidersResponse, MarketIndex, RatiosResponse, SearchResult, TickerOverview, ValuationResponse, WatchlistResponse } from "@/types/api";
+import type { FilingsResponse, FinancialsResponse, HistoryPoint, InsidersResponse, MarketIndex, RatiosResponse, SearchResult, TickerOverview, ValuationResponse, WatchlistResponse } from "@/types/api";
const API_BASE = (process.env.NEXT_PUBLIC_API_BASE_URL || "").trim().replace(/\/$/, "");
@@ -69,4 +69,9 @@ export const api = {
`/api/tickers/${encodeURIComponent(symbol)}/insiders`
);
},
+ filings(symbol: string) {
+ return request<FilingsResponse>(
+ `/api/tickers/${encodeURIComponent(symbol)}/filings`
+ );
+ },
};