diff --git a/README.md b/README.md index 354c69d..c89c85c 100644 --- a/README.md +++ b/README.md @@ -34,12 +34,12 @@ https://www.npmjs.com/package/apigratis-sdk-nodejs | Up | Services available | Description | Free | Beta | Stable | | --- | ------------------ | ------------------------------------- | ---- | ---- | ------ | | ✅ | WhatsAppService | API do WhatsApp Gratuita. | ✅ | ✅ | ⌛ | -| ⌛ | Receita Data CNPJ | API Dados CNPJ Receita. | ⌛ | ⌛ | ⌛ | -| ⌛ | Receita Data CPF | API Dados de CPF Serasa. | ⌛ | ⌛ | ⌛ | -| ⌛ | CorreiosService | API Busca encomendas Correios Brazil. | ⌛ | ⌛ | ⌛ | -| ⌛ | CEPLocation | API CEP Geolocation + IBGE Brazil. | ⌛ | ⌛ | ⌛ | +| ✅ | Receita Data CNPJ | API Dados CNPJ Receita. | ✅ | ✅ | ⌛ | +| ✅ | Receita Data CPF | API Dados de CPF Serasa. | ✅ | ✅ | ⌛ | +| ✅ | CorreiosService | API Busca encomendas Correios Brazil. | ✅ | ✅ | ⌛ | +| ✅ | CEPLocation | API CEP Geolocation + IBGE Brazil. | ✅ | ✅ | ⌛ | | ✅ | VehiclesService | API Placa Dados. | ✅ | ✅ | ⌛ | -| ⌛ | FipeService | API Placa FIPE. | ⌛ | ⌛ | ⌛ | +| ✅ | FipeService | API Placa FIPE. | ✅ | ✅ | ⌛ | ## WhatsApp Service @@ -107,3 +107,5 @@ vehiclesApi }) .then(resp => console.log(JSON.stringify(resp, undefined, ' '))); ``` + +...Em breve mais exemplos \ No newline at end of file diff --git a/package.json b/package.json index 788467d..6428aab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "apigratis-sdk-nodejs", - "version": "0.1.1", + "version": "0.1.4", "description": "A ideia desse SDK é otimizar o tempo de código dos usuários auxiliando na integração com a plataforma", "homepage": "https://apigratis.com.br", "author": "APIGratis (https://apigratis.com.br)", @@ -20,7 +20,7 @@ "correios" ], "scripts": { - "build": "tsc -p .", + "build": "yarn tsc", "start": "tsc && link-module-alias && node dist/index.js", "dev": "tsc && link-module-alias && concurrently \"tsc --watch\" \"nodemon dist/index.js\"", "test": "jest", diff --git a/src/Cep/index.ts b/src/Cep/index.ts new file mode 100644 index 0000000..c774704 --- /dev/null +++ b/src/Cep/index.ts @@ -0,0 +1,4 @@ +import { createApiInstance, Credentials } from '../GeneralAPI'; + +export const createCepApi = (credentials: Credentials) => + createApiInstance('cep', credentials); diff --git a/src/GeneralAPI/index.ts b/src/GeneralAPI/index.ts index 5eaf522..aec8e22 100644 --- a/src/GeneralAPI/index.ts +++ b/src/GeneralAPI/index.ts @@ -12,7 +12,8 @@ export type Action = | 'vehicles' | 'correios' | 'dados/cpf' - | 'dados/cnpj'; + | 'dados/cnpj' + | 'cep'; export const createApiInstance = (action: Action, credentials: Credentials) => { const axiosInstance = axios.create({ diff --git a/src/index.ts b/src/index.ts index ec02c8e..082040e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,3 +3,4 @@ export * from './Correios'; export * from './Vehicle'; export * from './Whatsapp'; export * from './Cpf'; +export * from './Cep';