Files
Neon-Desk/lib/query/keys.ts
francy51 db01f207a5 Expand financials surfaces with ratios, KPIs, and cadence support
- Add bundled financial modeling pipeline (ratios, KPI dimensions/notes, trend series, standardization)
- Introduce company financial bundles storage (Drizzle migration + repo wiring)
- Refactor financials page/API/query flow to use surfaceKind + cadence and new response shapes
2026-03-07 15:16:35 -05:00

25 lines
1.2 KiB
TypeScript

export const queryKeys = {
companyAnalysis: (ticker: string) => ['analysis', ticker] as const,
companyFinancialStatements: (
ticker: string,
surfaceKind: string,
cadence: string,
includeDimensions: boolean,
includeFacts: boolean,
factsCursor: string | null,
factsLimit: number,
cursor: string | null,
limit: number
) => ['financials-v3', ticker, surfaceKind, cadence, includeDimensions ? 'dims' : 'no-dims', includeFacts ? 'facts' : 'rows', factsCursor ?? '', factsLimit, cursor ?? '', limit] as const,
filings: (ticker: string | null, limit: number) => ['filings', ticker ?? '', limit] as const,
report: (accessionNumber: string) => ['report', accessionNumber] as const,
watchlist: () => ['watchlist'] as const,
researchJournal: (ticker: string) => ['research', 'journal', ticker] as const,
holdings: () => ['portfolio', 'holdings'] as const,
portfolioSummary: () => ['portfolio', 'summary'] as const,
latestPortfolioInsight: () => ['portfolio', 'insights', 'latest'] as const,
task: (taskId: string) => ['tasks', 'detail', taskId] as const,
taskTimeline: (taskId: string) => ['tasks', 'timeline', taskId] as const,
recentTasks: (limit: number) => ['tasks', 'recent', limit] as const
};