Add category and tags granularity to company sync flows
This commit is contained in:
15
lib/api.ts
15
lib/api.ts
@@ -110,7 +110,13 @@ export async function listWatchlist() {
|
||||
return await unwrapData<{ items: WatchlistItem[] }>(result, 'Unable to fetch watchlist');
|
||||
}
|
||||
|
||||
export async function upsertWatchlistItem(input: { ticker: string; companyName: string; sector?: string }) {
|
||||
export async function upsertWatchlistItem(input: {
|
||||
ticker: string;
|
||||
companyName: string;
|
||||
sector?: string;
|
||||
category?: string;
|
||||
tags?: string[];
|
||||
}) {
|
||||
const result = await client.api.watchlist.post(input);
|
||||
return await unwrapData<{ item: WatchlistItem }>(result, 'Unable to save watchlist item');
|
||||
}
|
||||
@@ -231,7 +237,12 @@ export async function getCompanyAiReport(accessionNumber: string) {
|
||||
return await unwrapData<{ report: CompanyAiReportDetail }>(result, 'Unable to fetch AI summary');
|
||||
}
|
||||
|
||||
export async function queueFilingSync(input: { ticker: string; limit?: number }) {
|
||||
export async function queueFilingSync(input: {
|
||||
ticker: string;
|
||||
limit?: number;
|
||||
category?: string;
|
||||
tags?: string[];
|
||||
}) {
|
||||
const result = await client.api.filings.sync.post(input);
|
||||
return await unwrapData<{ task: Task }>(result, 'Unable to queue filing sync');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user