/** Outcome of a structural + checksum check on a candidate code. */ export type FiscalCodeReason = 'empty' | 'incomplete' | 'badFormat' | 'badChecksum' | 'valid'; /** * True when the code uses omocodia: omocodia letters replace digits. * - With a matching control character, any combination counts: the Agenzia * can assign all 128, so a valid code with letters out of order is still * a real omocodic code. * - With a wrong control character the letters must run leftwards from the * last digit, the order the Agenzia starts from; a stray letter elsewhere * is read as a typo. One letter in the last digit (S for 5) cannot be told * apart from a first substitution, so it counts. * Anything but 16 characters is false. */ export declare function isOmocodicCodiceFiscale(raw: string): boolean; /** * Compute the expected 16th control character from the first 15 * informative characters. The input MUST already be 15 uppercase * `[A-Z0-9]` characters (callers guard with `hasValidStructure`). */ export declare function computeControlChar(first15: string): string; /** * Classify a candidate code. Like the server, lowercase letters are accepted * and nothing is stripped. * * - `empty` — no characters. * - `incomplete` — fewer than 16 characters. * - `badFormat` — more than 16 characters, or 16 that fail the * position-class pattern. * - `badChecksum` — 16 well-formed characters (omocodic or not) but the * control char is wrong. * - `valid` — structurally sound and the control char matches. */ export declare function classifyCodiceFiscale(raw: string): FiscalCodeReason; /** Convenience boolean: structurally sound AND control character matches. */ export declare function isValidCodiceFiscale(raw: string): boolean; //# sourceMappingURL=is-valid-codice-fiscale.d.ts.map