/** * Risk score = sum of triggered red-flag weights, capped at 100. * * Bands: * 0–20 low * 21–50 medium * 51+ high * * Each rule is transparent: the report exposes every triggered flag with * its weight and evidence. No black-box ML — auditors can re-derive the score. */ import type { AresSubjectLike, AresVrLike, SanctionsMatch } from './clients.js'; import type { RedFlag, RiskLevel } from './types.js'; export interface ScoreInputs { ico: string; subject: AresSubjectLike | null; /** True when the ARES subject lookup threw (outage) rather than returning a * genuine 404. A null subject from an outage must NOT raise NOT_FOUND_IN_ARES. */ aresUnavailable?: boolean; vr: AresVrLike | null; vatPayer: boolean; bankAccountsCount: number; companySanction?: SanctionsMatch; statutorySanctions: Array<{ name: string; match: SanctionsMatch; }>; insolvency?: { has_active: boolean; started_on?: string; } | null; /** True if same address shared by 50+ companies (caller computes). */ isVirtualAddress?: boolean; /** Most recent statutory zápis (ISO date), used for "recent change" rule. */ mostRecentStatutoryChange?: string; /** Statutory persons with active personal insolvency in ISIR. */ statutoryPersonalInsolvencies?: Array<{ name: string; spisova_znacka: string; }>; /** Statutory persons with permanent residence at a municipal office address. */ statutoryGovtAddresses?: Array<{ name: string; signal: string; matched_token?: string; }>; /** Statutory persons matched to a (possibly insolvent) prior company by surname. */ statutoryPriorBankruptcies?: Array<{ name: string; ico: string; company_name?: string; spisova_znacka?: string; }>; /** ADIS unreliable-VAT-payer status. Set when ADIS lookup succeeded. */ adisStatus?: { reliability: 'ANO' | 'NE' | 'NENALEZEN'; unreliable_since?: string; subject_type?: string; } | null; } export declare function evaluateFlags(input: ScoreInputs): RedFlag[]; export declare function scoreFromFlags(flags: RedFlag[]): { value: number; level: RiskLevel; }; //# sourceMappingURL=score.d.ts.map