UNPKG

@matheustrres/brasilapi

Version:

Lightweight, easy-to-use & free of dependencies wrapper for BrasilAPI

21 lines (20 loc) 642 B
import { Source } from './source'; import { type CNPJ } from '../typings'; import { type Result } from '../typings/result'; interface ICNPJ { get(cnpj: string): Promise<Result<CNPJ>>; } /** * Represents the source from BrasilAPI CNPJ's endpoint responses */ export declare class BrasilAPICNPJ extends Source implements ICNPJ { protected readonly URL = "https://brasilapi.com.br/api/cnpj/v1"; /** * Gets information from a CNPJ in the Minha Receita API * * @param {String} cnpj - The CNPJ of a legal person * @returns {Promise<Result<CNPJ>>} */ get(cnpj: string): Promise<Result<CNPJ>>; } export {};