Run playwright UI tests
This commit is contained in:
13
lib/api.ts
13
lib/api.ts
@@ -8,7 +8,6 @@ import type {
|
||||
Holding,
|
||||
FinancialHistoryWindow,
|
||||
FinancialStatementKind,
|
||||
FinancialStatementMode,
|
||||
PortfolioInsight,
|
||||
PortfolioSummary,
|
||||
Task,
|
||||
@@ -199,24 +198,32 @@ export async function getCompanyAnalysis(ticker: string) {
|
||||
|
||||
export async function getCompanyFinancialStatements(input: {
|
||||
ticker: string;
|
||||
mode: FinancialStatementMode;
|
||||
statement: FinancialStatementKind;
|
||||
window: FinancialHistoryWindow;
|
||||
includeDimensions?: boolean;
|
||||
includeFacts?: boolean;
|
||||
factsCursor?: string | null;
|
||||
factsLimit?: number;
|
||||
cursor?: string | null;
|
||||
limit?: number;
|
||||
}) {
|
||||
const query = {
|
||||
ticker: input.ticker.trim().toUpperCase(),
|
||||
mode: input.mode,
|
||||
statement: input.statement,
|
||||
window: input.window,
|
||||
includeDimensions: input.includeDimensions ? 'true' : 'false',
|
||||
includeFacts: input.includeFacts ? 'true' : 'false',
|
||||
...(typeof input.cursor === 'string' && input.cursor.trim().length > 0
|
||||
? { cursor: input.cursor.trim() }
|
||||
: {}),
|
||||
...(typeof input.limit === 'number' && Number.isFinite(input.limit)
|
||||
? { limit: input.limit }
|
||||
: {}),
|
||||
...(typeof input.factsCursor === 'string' && input.factsCursor.trim().length > 0
|
||||
? { factsCursor: input.factsCursor.trim() }
|
||||
: {}),
|
||||
...(typeof input.factsLimit === 'number' && Number.isFinite(input.factsLimit)
|
||||
? { factsLimit: input.factsLimit }
|
||||
: {})
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user