@brasil-interface/utils
Version:
88 lines • 3.35 kB
TypeScript
export declare class SE {
private static readonly MOD_ALG;
private static readonly VALID_LENGTH;
private static readonly BASE_NUMERALS_LENGTH;
private static readonly BASE_NUMERALS_START;
private static readonly BASE_NUMERALS_END;
private static readonly VERIFIER_DIGIT_WEIGHTS;
private static readonly MASK_REGEX;
private static readonly MASK_PATTERN;
private static readonly VALIDATION_RULES;
/**
* PT-BR: Verifica se uma inscrição estadual do Sergipe é válida.
*
* EN: Checks if an Sergipe state registration is valid.
*
* @param inscricaoE - PT-BR: A inscrição estadual. Com ou sem máscara. EN: The state registration. With or without mask.
* @returns PT-BR: `true` se a inscrição estadual for válida. EN: `true` if the state registration is valid.
*
* @example
* ```
* InscricaoEstadual.SE.isValid("111556610"); // false
* InscricaoEstadual.SE.isValid("585556610"); // true
* InscricaoEstadual.SE.isValid("58555661-0"); // true
* ```
*/
static isValid(inscricaoE: any): boolean;
/**
* PT-BR: Máscara uma inscrição estadual do Sergipe.
*
* EN: Masks an Sergipe state registration.
*
* @param inscricaoE - PT-BR: A inscrição estadual. Com ou sem máscara. EN: The state registration. With or without mask.
* @returns PT-BR: A inscrição estadual mascarada. EN: The masked state registration.
*
* @example
* ```
* InscricaoEstadual.SE.mask("585556610"); // "58555661-0"
* InscricaoEstadual.SE.mask("58555661-0"); // "58555661-0"
* ```
*/
static mask(inscricaoE: any): string;
/**
* PT-BR: Desmascara uma inscrição estadual do Sergipe.
*
* EN: Unmasks an Sergipe state registration.
*
* @param inscricaoE - PT-BR: A inscrição estadual. Com ou sem máscara. EN: The state registration. With or without mask.
* @returns PT-BR: A inscrição estadual desmascarada. EN: The unmasked state registration.
*
* @example
* ```
* InscricaoEstadual.SE.unmask("58555661-0"); // "585556610"
* InscricaoEstadual.SE.unmask("585556610"); // "585556610"
* ```
*/
static unmask(inscricaoE: any): string;
/**
* PT-BR: Gerar um número de inscrição estadual do Sergipe válido.
*
* EN: Generate a valid Sergipe state registration number.
*
* @returns PT-BR: O número de inscrição estadual gerado. EN: The generated state registration number.
*
* @example
* ```
* InscricaoEstadual.SE.generate(); // "585556610"
* ```
*/
static generate(): string;
/**
* PT-BR: Gera um número de inscrição estadual do Sergipe válido e aleatório com máscara.
*
* EN: Generates a random valid Sergipe state registration number with mask.
*
* @returns PT-BR: O número de inscrição estadual gerado com máscara. EN: The generated state registration number with mask.
*
* @example
* ```
* InscricaoEstadual.SE.generateMasked(); // "58555661-0"
* ```
*/
static generateMasked(): string;
private static clear;
private static shouldHaveValidVerifierDigits;
private static getBaseNumerals;
private static calculateVerifierDigit;
}
//# sourceMappingURL=SE.d.ts.map