//#region src/is-valid-caepf/is-valid-caepf.d.ts /** * Validates a CAEPF (Cadastro de Atividade Econômica da Pessoa Física) number. * * The CAEPF replaced the CEI for individuals who hire employees, such as rural producers and * notary officials. It has 14 digits printed as "000.000.000/000-00": the 9 digit CPF base of * the holder, a 3 digit sequence for the holder's several registrations and 2 check digits. * Both check digits are the CNPJ's modulus 11 in the formulation of the cited reference: the * weights cycle from 9 down to 2 from the right and the check digit is the remainder itself, * with a remainder of 10 read as 0 — the same digit the CNPJ's 2-to-9 weights with * `11 - remainder` produce. The pair is then shifted by 12, wrapping around 100, so a CAEPF * whose plain modulus 11 digits would be 72 is printed with 84. * * A base whose 12 digits are all the same is rejected before the check digits are computed, the * way `isValidCei` and `isValidCno` reject a repeated CEI/CNO number, so the otherwise * well-formed `"00000000000012"` is invalid. * * The Receita Federal does not publish the check digit rule of the CAEPF, the shift of 12 and * the repeated-base rejection included, so the calculation follows the reference implementations * cited below. * * @param {string|number} value - The CAEPF value to be validated. * @returns {boolean} True if the CAEPF is valid, false otherwise. * * @example * ```typescript * isValidCaepf("293.118.610/001-84"); // true * isValidCaepf("41142260000101"); // true * isValidCaepf(29311861000184); // true * isValidCaepf("29311861000185"); // false (invalid check digits) * isValidCaepf("00000000000000"); // false (repeated base digits) * isValidCaepf("00000000000012"); // false (repeated base digits) * ``` * * @see Official: https://www.gov.br/receitafederal/pt-br/assuntos/orientacao-tributaria/cadastros/caepf * The registry's own page at the Receita Federal, which describes the cadastro but publishes * neither the 14 digit layout nor the check digit rule. * @see Based on: http://ghiorzi.org/DVnew.htm * Description of the CAEPF layout and of the * shift of 12 applied to the check digit pair. * @see Based on: https://github.com/VitorLuizC/brazilian-values/blob/master/src/validators/isCAEPF.ts * Reference implementation agreeing on the weights and on the shift. * @see Based on: https://github.com/Casilhero/brazilian-validators/blob/main/src/Validators/Caepf.php * Third reference implementation. */ export declare const isValidCaepf: (value: string | number) => boolean; //#endregion