import { TypesUtils } from '@utils-fns/utils'; type MinMaxParamsEmail = { min?: number; max?: number; }; type ParamsValidatorEmail = { minMaxUserNameEmail?: MinMaxParamsEmail; minMaxEmailDomain?: MinMaxParamsEmail; emailDomainName?: RegExp; }; type EmailValidator = { email?: string; paramsEmailValidator?: ParamsValidatorEmail; }; type CustomPatternPhone = { coutryCode: RegExp; areaStateCode: RegExp; phoneNumber: RegExp; }; type ParamsPhoneValidator = { onlyMobilePhoneBR?: boolean; canReceiveInternationalNumbers?: boolean; customPatternPhone?: CustomPatternPhone; publicUtilityNumberBR?: boolean; numberWithoutCodeAreas?: boolean; }; type PhoneValidator = { phone?: string; paramsPhoneValidator?: ParamsPhoneValidator; }; type TypeCard = 'credit' | 'debit' | 'credit-debit'; type BrandCard = TypesUtils['BrandCardType']; type ParamsPaymentCardValidator = { validationTypeCard?: TypeCard; specificBrandCard?: BrandCard; customPatternPaymentCard?: RegExp; }; type PaymentCardValidator$1 = { cardNumber?: string; paramsPaymentCardValidator?: ParamsPaymentCardValidator; }; declare const paymentSlipSegmentIdentification: { readonly '1': "municipal"; readonly '2': "sanitation"; readonly '3': "gas_energy"; readonly '4': "telecom"; readonly '5': "government_agencies"; readonly '6': "others"; readonly '7': "transit"; readonly '9': "only_banks"; }; declare const paymentSlipSegmentType: { readonly municipal: "Taxas Municipais"; readonly sanitation: "Taxas de Saneamento"; readonly gas_energy: "Taxas de Energia Elétrica e Gás"; readonly telecom: "Taxas de Telecomunicações"; readonly government_agencies: "Taxas de Órgãos Governamentais"; readonly transit: "Taxas de Trânsito"; readonly only_banks: "Uso Exclusivo dos Bancos"; readonly payment_bank_slip: "Pagamento de Boletos Bancários"; readonly others: "Outros"; }; declare const barCodeOrTypeableLine: { readonly barcode: { readonly type: "Cód. Barras"; readonly key: "barcode"; }; readonly typeable_line: { readonly type: "Linha Digitável"; readonly key: "typeable_line"; }; }; type ParamsPaymentSlipValidator = { validByBank?: TypesUtils['BankNames'] | TypesUtils['BankCode']; validSegmentType?: (typeof paymentSlipSegmentType)[keyof typeof paymentSlipSegmentType]; validByPrice?: string | number; validByDate?: string | Date; validByTypeOfPaymentSlip?: 'Boleto Bancário' | 'Boleto de Arrecadação'; validByIfIsBarCodeOrTypeableLine?: (typeof barCodeOrTypeableLine)[keyof typeof barCodeOrTypeableLine]['type']; }; type PaymentSlipValidator$1 = { digits?: string; paramsPaymentSlipValidator?: ParamsPaymentSlipValidator; }; type ParamsStateRegistrationValidator = { digits?: string; uf: TypesUtils['StateAbbreviations']; }; type ConstructorInterface$2 = Pick; type IsValid$1 = ParamsPaymentCardValidator; declare class PaymentCardValidator { private cardNumber; constructor({ cardNumber }: ConstructorInterface$2); getData(): { cardNumber: string | null; bankDigits: string | null; bankName: ("American Express" | "Diners Club" | "Discover" | "Elo" | "Hiper" | "Hipercard" | "JCB" | "Maestro" | "Mastercard" | "Mir" | "UnionPay" | "Visa" | "Visa Electron") | null; isValid: boolean; }; private findBrandsCards; isValid(paramsPaymentCardValidator?: IsValid$1): boolean; static init(deps: ConstructorInterface$2): PaymentCardValidator; } type ConstructorInterface$1 = Pick; type IsValid = ParamsPaymentSlipValidator; type ReturnGetDataPaymentSlip = { digits: string | undefined; bankName: string | null; bankCode: string | null; price: string | null; expirationDate: string | null; typeOfPaymentSlip: string | null; barCodeOrTypeableLine: string | null; segmentPaymentSplip: string | null; isValid: boolean; }; /** * @class PaymentSlipValidator @summary Motivation: - Testing and capture data payment slip with types bank slip and tax collection.. Details: - It is possible to validate and capture data payment slips (banking) and collection slips, in typeable line formats and barcode numbering. - Among the validations are: validation by the issuing bank of the bill; segment type, payment amount; due date. - Among the data captured are: payment slip digits; issuing bank code; issuing bank name; payment slip price; expiration date; segment to which the payment slip is inserted; if the payment slip is type barcode or typeable lines. Limitations: - In accordance with FEBRABAN (Brazilian Federation of Banks) regulations: "Layout" Standard for Collection/Receipt Using Bar Codes, version 06, for collection-type slips, due dates do not follow a pattern. The issuing bank is responsible for inserting this data in the blocks of free or unavailable fields, and, if inserted, it must be have the format YYYYMMDD. As a result, validation of the due date for payment slips does not have a standard, so it is not recommended that the validation of a payment slip is verified only by the due date. @see https://cmsarquivos.febraban.org.br/Arquivos/documentos/PDF/Layout%20-%20C%C3%B3digo%20de%20Barras%20ATUALIZADO.pdf. */ declare class PaymentSlipValidator { private digits; private typesOfPaymentSlip; private regexLengthDigitsValidator; constructor({ digits }: ConstructorInterface$1); private checkIsBankSlipOrTaxCollection; private capturePaymentSlipData; getData(): ReturnGetDataPaymentSlip; /** * * @param paramsPaymentSlipValidator * @argument validByBank: Bank code or bank name can be passed for validation * @argument validSegmentType: Used to check which segment the payment slip is inserted in * @argument validByPrice: Used to check the value of the payment slip * @argument validByDate: Used to check the date of the payment slip * @argument validByTypeOfPaymentSlip: Used to check if the payment slip is of the Banking or Collection type * @argument validByIfIsBarCodeOrTypeableLine: Used to check if the payment slip is a barcode type or typeable lines * @returns boolean */ isValid(paramsPaymentSlipValidator?: IsValid): boolean; /** * * @param deps * @returns instance of PaymentSlipValidator */ static init(deps: ConstructorInterface$1): PaymentSlipValidator; } type CepValidatorType = string | undefined; interface CepInterface { cep: string | null; uf: string | null; bairro: string | null; complemento: string | null; cidade: string | null; logradouro: string | null; estado: string | null; enderecoPostal: string | null; isValid: boolean; error?: string; } type ConstructorInterface = CepValidatorType; declare class CepValidator { private cep; private regexCep; private _URL_SEARCH_DATA_CEP; constructor(cep: ConstructorInterface); private formatUrlSearchDataCep; isValid(): boolean; getData(signal?: AbortSignal | null): Promise; static init(deps: ConstructorInterface): CepValidator; } type TypesValidators = { EmailValidator: EmailValidator; MinMaxParamsEmail: MinMaxParamsEmail; ParamsValidatorEmail: ParamsValidatorEmail; PhoneValidator: PhoneValidator; ParamsPhoneValidator: ParamsPhoneValidator; CustomPatternPhone: CustomPatternPhone; BrandCard: BrandCard; ParamsPaymentCardValidator: ParamsPaymentCardValidator; PaymentCardValidator: PaymentCardValidator$1; TypeCard: TypeCard; PaymentSlipSegmentIdentification: typeof paymentSlipSegmentIdentification; PaymentSlipSegmentType: typeof paymentSlipSegmentType; PaymentSlipValidator: PaymentSlipValidator$1; ParamsPaymentSlipValidator: ParamsPaymentSlipValidator; ParamsStateRegistrationValidator: ParamsStateRegistrationValidator; }; declare const validators: { cpf: (cpf?: string | undefined) => boolean; cnpj: (cnpj?: string | undefined) => boolean; email: ({ email, paramsEmailValidator, }: EmailValidator) => boolean; nis: (nis?: string | undefined) => boolean; phone: ({ phone, paramsPhoneValidator, }: PhoneValidator) => boolean; paymentCard: typeof PaymentCardValidator.init; paymentSlip: typeof PaymentSlipValidator.init; stateRegistration: ({ digits, uf, }: ParamsStateRegistrationValidator) => boolean; voterRegistration: (digits?: string | undefined) => boolean; cnh: (cnh?: string | undefined) => boolean; renavam: (renavam?: string | undefined) => boolean; cep: typeof CepValidator.init; }; export { TypesValidators, validators };