39 lines
1.9 KiB
TypeScript
39 lines
1.9 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,
|
|
search: (query: string, ticker: string | null, sources: string[], limit: number) => ['search', query, ticker ?? '', sources.join(','), limit] as const,
|
|
report: (accessionNumber: string) => ['report', accessionNumber] as const,
|
|
researchWorkspace: (ticker: string) => ['research', 'workspace', ticker] as const,
|
|
researchCopilotSession: (ticker: string) => ['research', 'copilot', 'session', ticker] as const,
|
|
researchLibrary: (
|
|
ticker: string,
|
|
q: string,
|
|
kind: string,
|
|
tag: string,
|
|
source: string,
|
|
linkedToMemo: string,
|
|
limit: number
|
|
) => ['research', 'library', ticker, q, kind, tag, source, linkedToMemo, limit] as const,
|
|
researchMemo: (ticker: string) => ['research', 'memo', ticker] as const,
|
|
researchPacket: (ticker: string) => ['research', 'packet', ticker] 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
|
|
};
|