type RUTResult = { status: string; message: string; payload: boolean; }; declare function addDash(rut: string): string; declare function removeExtraChars(rut: string): string; declare function createResult(status: string, message: string, payload: boolean): RUTResult; declare class RUT { /** * Validates a Chilean RUT (Rol Único Tributario) number. * @param rut - The RUT number to validate. * @returns true if the RUT is valid, false otherwise. */ static validate(rut: string): boolean; /** * Validates a given RUT (Rol Único Tributario) and returns a result object. * @param rut - The RUT to be validated. * @returns The result of the validation, including the status and message. */ static validateWithResponse(rut: string): RUTResult; /** * Calculates the verification digit for a given RUT (Rol Único Tributario) without the digit. * @param rutWithoutDigit - The RUT without the verification digit. * @param toUpperCase - Optional. Specifies whether the returned digit should be in uppercase. Default is false. * @returns The verification digit for the given RUT. */ static getDigit(rutWithoutDigit: string, toUpperCase?: boolean): string; /** * Checks if the given RUT (Rol Único Tributario) has a valid check digit. * * @param rut - The RUT to check. * @returns A boolean indicating whether the check digit is valid or not. */ static checkDigit(rut: string): boolean; /** * Formats a Chilean RUT (Rol Único Tributario) number. * * @param rut - The RUT number to format. * @param withComma - Whether to include a comma separator for thousands. * @param toUpperCase - Whether to convert the RUT to uppercase. * @returns The formatted RUT number. */ static format(rut: string, withComma?: boolean, toUpperCase?: boolean): string; /** * Removes formatting characters from a Chilean RUT (Rol Único Tributario) string. * @param rut - The RUT string to deformat. * @param noDash - Optional. If true, the resulting RUT will not contain dashes. Default is false. * @param toUpperCase - Optional. If true, the resulting RUT will be converted to uppercase. If false, it will be converted to lowercase. Default is false. * @returns The deformatted RUT string. */ static deformat(rut: string, noDash?: boolean, toUpperCase?: boolean): string; /** * Checks if the given RUT has too few characters. * * @param rut - The RUT to check. * @returns True if the RUT has too few characters, false otherwise. */ static hasTooFewChars(rut: string): boolean; /** * Checks if the given RUT has too many characters. * * @param rut - The RUT to check. * @returns True if the RUT has more than 9 characters, false otherwise. */ static hasTooManyChars(rut: string): boolean; /** * Checks if a given RUT (Rol Único Tributario) has invalid characters. * @param rut - The RUT to be checked. * @returns A boolean indicating whether the RUT has invalid characters or not. */ static hasInvalidChars(rut: string): boolean; /** * Checks if a given RUT (Rol Único Tributario) has an invalid dash. * @param rut - The RUT to check. * @returns A boolean indicating whether the RUT has an invalid dash. */ static hasInvalidDash(rut: string): boolean; /** * Checks if a given RUT (Rol Único Tributario) has spaces. * @param rut - The RUT to check. * @returns A boolean indicating whether the RUT has spaces or not. */ static hasSpaces(rut: string): boolean; } export { type RUTResult, addDash, createResult, RUT as default, removeExtraChars };