import { Measurement } from '../interfaces/RCPCHMeasurementObject'; export type ProvenanceStatus = 'match' | 'legacy' | 'unknown' | 'mismatch'; export interface ProvenanceCheckResult { status: ProvenanceStatus; expectedReference: string; receivedReference?: string; } /** * Compares one Measurement's provenance against the reference the chart was * asked to display. Pure and side-effect free: never throws, never mutates * its arguments. * * - 'legacy': no provenance present. Data calculated before provenance * existed. Renders normally with no warning of its own - it cannot be * distinguished from safe legacy data, sites will likely carry a * permanent mixture of legacy and provenance-bearing measurements, and a * chart viewer cannot act on a permanent warning about it. Still reported * to the caller (see filterMeasurementsByProvenance.ts) and included in * the technical details of a warning banner shown for another reason. * - 'unknown': provenance present but not a recognised canonical value. * Renders with a warning - reserved for a confirmed mismatch, not * suppression, because an unrecognised value could itself be a new * canonical reference this build doesn't know about yet. * - 'mismatch': provenance present, recognised, and does not match the * chart's reference. The one state that can be distinguished with * certainty from legacy data - this measurement should be suppressed. * - 'match': provenance present and matches. Renders normally. */ export declare function checkMeasurementProvenance(measurement: Pick, chartReference: string): ProvenanceCheckResult;