Remove legacy TypeScript financial surface mapping, make Rust JSON single source of truth
- Delete standard-template.ts, surface.ts, materialize.ts (dead code) - Delete financial-taxonomy.test.ts (relied on removed code) - Add missing income statement surfaces to core.surface.json - Add cost_of_revenue mapping to core.income-bridge.json - Refactor standardize.ts to remove template dependency - Simplify financial-taxonomy.ts to use only DB snapshots - Add architecture documentation
This commit is contained in:
@@ -36,8 +36,7 @@ import {
|
||||
} from '@/lib/server/financials/bundles';
|
||||
import {
|
||||
buildDimensionBreakdown,
|
||||
buildLtmStandardizedRows,
|
||||
buildStandardizedRows
|
||||
buildLtmStandardizedRows
|
||||
} from '@/lib/server/financials/standardize';
|
||||
import { buildRatioRows } from '@/lib/server/financials/ratios';
|
||||
import { buildFinancialCategories, buildTrendSeries } from '@/lib/server/financials/trend-series';
|
||||
@@ -620,16 +619,7 @@ function buildQuarterlyStatementSurfaceRows(input: {
|
||||
selectedPeriodIds: input.selectedPeriodIds
|
||||
});
|
||||
|
||||
if (aggregatedRows.length > 0) {
|
||||
return aggregatedRows;
|
||||
}
|
||||
|
||||
return buildStandardizedRows({
|
||||
rows: input.faithfulRows,
|
||||
statement: input.statement,
|
||||
periods: input.sourcePeriods,
|
||||
facts: input.facts
|
||||
}) as SurfaceFinancialRow[];
|
||||
return aggregatedRows;
|
||||
}
|
||||
|
||||
function aggregatePersistedKpiRows(input: {
|
||||
@@ -1303,7 +1293,6 @@ export async function getCompanyFinancialTaxonomy(input: GetCompanyFinancialsInp
|
||||
|
||||
export const __financialTaxonomyInternals = {
|
||||
buildRows,
|
||||
buildStandardizedRows,
|
||||
buildDimensionBreakdown,
|
||||
buildNormalizationMetadata,
|
||||
aggregateSurfaceRows,
|
||||
|
||||
Reference in New Issue
Block a user