Run playwright UI tests

This commit is contained in:
2026-03-06 14:40:43 -05:00
parent 610fce8db3
commit 8e62c66677
37 changed files with 4430 additions and 643 deletions

View File

@@ -98,6 +98,12 @@ export type TaskStage =
| 'completed'
| 'failed'
| 'sync.fetch_filings'
| 'sync.discover_assets'
| 'sync.extract_taxonomy'
| 'sync.normalize_taxonomy'
| 'sync.derive_metrics'
| 'sync.validate_pdf_metrics'
| 'sync.persist_taxonomy'
| 'sync.fetch_metrics'
| 'sync.persist_filings'
| 'sync.hydrate_statements'
@@ -169,7 +175,6 @@ export type CompanyFinancialPoint = {
debt: number | null;
};
export type FinancialStatementMode = 'standardized' | 'filing_faithful';
export type FinancialStatementKind = 'income' | 'balance' | 'cash_flow' | 'equity' | 'comprehensive_income';
export type FinancialHistoryWindow = '10y' | 'all';
@@ -178,11 +183,79 @@ export type FinancialStatementPeriod = {
filingId: number;
accessionNumber: string;
filingDate: string;
periodStart: string | null;
periodEnd: string | null;
filingType: Extract<Filing['filing_type'], '10-K' | '10-Q'>;
periodLabel: string;
};
export type TaxonomyDimensionMember = {
axis: string;
member: string;
};
export type TaxonomyStatementRow = {
key: string;
label: string;
conceptKey: string;
qname: string;
namespaceUri: string;
localName: string;
isExtension: boolean;
statement: FinancialStatementKind;
roleUri: string | null;
order: number;
depth: number;
parentKey: string | null;
values: Record<string, number | null>;
units: Record<string, string | null>;
hasDimensions: boolean;
sourceFactIds: number[];
};
export type TaxonomyFactRow = {
id: number;
snapshotId: number;
filingId: number;
filingDate: string;
statement: FinancialStatementKind | null;
roleUri: string | null;
conceptKey: string;
qname: string;
namespaceUri: string;
localName: string;
value: number;
contextId: string;
unit: string | null;
decimals: string | null;
periodStart: string | null;
periodEnd: string | null;
periodInstant: string | null;
dimensions: TaxonomyDimensionMember[];
isDimensionless: boolean;
sourceFile: string | null;
};
export type MetricValidationCheck = {
metricKey: keyof NonNullable<Filing['metrics']>;
taxonomyValue: number | null;
llmValue: number | null;
absoluteDiff: number | null;
relativeDiff: number | null;
status: 'not_run' | 'matched' | 'mismatch' | 'error';
evidencePages: number[];
pdfUrl: string | null;
provider: string | null;
model: string | null;
error: string | null;
};
export type MetricValidationResult = {
status: 'not_run' | 'matched' | 'mismatch' | 'error';
checks: MetricValidationCheck[];
validatedAt: string | null;
};
export type StandardizedStatementRow = {
key: string;
label: string;
@@ -220,16 +293,20 @@ export type CompanyFinancialStatementsResponse = {
companyName: string;
cik: string | null;
};
mode: FinancialStatementMode;
statement: FinancialStatementKind;
window: FinancialHistoryWindow;
periods: FinancialStatementPeriod[];
rows: StandardizedStatementRow[] | FilingFaithfulStatementRow[];
rows: TaxonomyStatementRow[];
nextCursor: string | null;
facts: {
rows: TaxonomyFactRow[];
nextCursor: string | null;
} | null;
coverage: {
filings: number;
rows: number;
dimensions: number;
facts: number;
};
dataSourceStatus: {
enabled: boolean;
@@ -239,6 +316,10 @@ export type CompanyFinancialStatementsResponse = {
pendingFilings: number;
queuedSync: boolean;
};
metrics: {
taxonomy: Filing['metrics'];
validation: MetricValidationResult | null;
};
dimensionBreakdown: Record<string, DimensionBreakdownRow[]> | null;
};