feat(taxonomy): add rust sidecar compact surface pipeline
This commit is contained in:
46
lib/types.ts
46
lib/types.ts
@@ -462,6 +462,48 @@ export type DerivedFinancialRow = {
|
||||
|
||||
export type StandardizedFinancialRow = DerivedFinancialRow;
|
||||
export type StandardizedStatementRow = StandardizedFinancialRow;
|
||||
export type SurfaceFinancialRow = StandardizedFinancialRow & {
|
||||
statement?: Extract<FinancialStatementKind, 'income' | 'balance' | 'cash_flow'>;
|
||||
detailCount?: number;
|
||||
resolutionMethod?: 'direct' | 'surface_bridge' | 'formula_derived' | 'not_meaningful';
|
||||
confidence?: 'high' | 'medium' | 'low';
|
||||
warningCodes?: string[];
|
||||
};
|
||||
|
||||
export type DetailFinancialRow = {
|
||||
key: string;
|
||||
parentSurfaceKey: string;
|
||||
label: string;
|
||||
conceptKey: string;
|
||||
qname: string;
|
||||
namespaceUri: string;
|
||||
localName: string;
|
||||
unit: string | null;
|
||||
values: Record<string, number | null>;
|
||||
sourceFactIds: number[];
|
||||
isExtension: boolean;
|
||||
dimensionsSummary: string[];
|
||||
residualFlag: boolean;
|
||||
};
|
||||
|
||||
export type SurfaceDetailMap = Record<string, DetailFinancialRow[]>;
|
||||
|
||||
export type NormalizationSummary = {
|
||||
surfaceRowCount: number;
|
||||
detailRowCount: number;
|
||||
kpiRowCount: number;
|
||||
unmappedRowCount: number;
|
||||
materialUnmappedRowCount: number;
|
||||
warnings: string[];
|
||||
};
|
||||
|
||||
export type NormalizationMetadata = {
|
||||
regime: 'us-gaap' | 'ifrs-full' | 'unknown';
|
||||
fiscalPack: string | null;
|
||||
parserVersion: string;
|
||||
unmappedRowCount: number;
|
||||
materialUnmappedRowCount: number;
|
||||
};
|
||||
|
||||
export type RatioRow = DerivedFinancialRow & {
|
||||
denominatorKey: string | null;
|
||||
@@ -571,8 +613,9 @@ export type CompanyFinancialStatementsResponse = {
|
||||
periods: FinancialStatementPeriod[];
|
||||
statementRows: {
|
||||
faithful: TaxonomyStatementRow[];
|
||||
standardized: StandardizedFinancialRow[];
|
||||
standardized: SurfaceFinancialRow[];
|
||||
} | null;
|
||||
statementDetails: SurfaceDetailMap | null;
|
||||
ratioRows: RatioRow[] | null;
|
||||
kpiRows: StructuredKpiRow[] | null;
|
||||
trendSeries: TrendSeries[];
|
||||
@@ -608,6 +651,7 @@ export type CompanyFinancialStatementsResponse = {
|
||||
taxonomy: Filing['metrics'];
|
||||
validation: MetricValidationResult | null;
|
||||
};
|
||||
normalization: NormalizationMetadata;
|
||||
dimensionBreakdown: Record<string, DimensionBreakdownRow[]> | null;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user