
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@zensoft-br/zenclient
Advanced tools
Este projeto visa desenvolver um software cliente inovador, projetado para integrar-se perfeitamente com o sistema de gestão Zen ERP. Nosso objetivo é oferecer uma solução que não apenas melhore a eficiência operacional, mas também enriqueça a experiência dos desenvolvedores através de funcionalidades intuitivas e personalizadas. Ideal para desenvolvedores que desejam explorar novas possibilidades e criar soluções impactantes no ecossistema Zen ERP.
npm install @zensoft-br/zenclient
Pode ser necessário configurar o arquivo jsconfig.json para que o intellisense do VSCode funcione corretamente.
{
"compilerOptions": {
"module": "NodeNext"
}
}
Os componentes devem ser importados individualmente, possibilitando a realização de tree-shaking no projeto.
import { connect } from "@zensoft-br/zenclient";
import { PersonService } from "@zensoft-br/zenclient/api/catalog/person/PersonService";
const z = await connect("tenant", "user", "password", {
locale: "pt-BR",
timeZone: "America/Sao_Paulo",
});
const personService = new PersonService(z);
const person = await personService.personReadById(1001);
Também é possível importar o bundle completo em uma variável e utilizar esta variável para acessar os componentes.
import * as Z from "@zensoft-br/zenclient";
const z = await Z.connect("tenant", "user", "password", {
locale: "pt-BR",
timeZone: "America/Sao_Paulo",
});
const personService = new Z.api.catalog.person.PersonService(z);
const person = await personService.personReadById(1001);
Atenção Independentemente do formato utilizado, procure manter um padrão de uso no projeto para facilitar manutenções no código.
import { connect } from "@zensoft-br/zenclient";
const z = await connect("tenant", "user", "password", {
locale: "pt-BR",
timeZone: "America/Sao_Paulo",
});
import { createFromToken } from "@zensoft-br/zenclient";
const z = createFromToken("tenant", "token");
fetch (z.web)Coleção de métodos otimizados para interação direta com endpoints via solicitações fetch.
const blob = await z.web.fetchBlob("/catalog/category");
const json = await z.web.fetchJson("/catalog/category");
const text = await z.web.fetchText("/catalog/category");
const response = await z.web.fetch("/catalog/category");
Este método lança um erro se o status for >= 300
const response = await z.web.fetchOk("/catalog/category");
Este método lança um erro se o status for >= 300
const response = await z.web.fetch("/catalog/category");
await z.web.handleResponse(response);
Coleção de objetos que representam a estrutura da API e podem ser utilizados para acessar a API de forma mais simplificada e orientada a objetos.
As classes de serviços devem ser instanciadas com uma instância do cliente como argumento do construtor.
import { CatalogService } from "@zensoft-br/zenclient/api/catalog/CatalogService";
const catalogService = new CatalogService(z);
import { CatalogService } from "@zensoft-br/zenclient/api/catalog/CatalogService";
import { Category } from "@zensoft-br/zenclient/api/catalog/Category";
const catalogService = new CatalogService(z);
let category = new Category();
category.code = "TOOLS";
category.description = "Tools";
category = await catalogService.categoryCreate(category);
import { SaleService } from "@zensoft-br/zenclient/api/sale/SaleService";
const saleService = SaleService(z);
let sale;
sale = await saleService.saleOpPrepare(1001);
sale = await saleService.saleOpApprove(1001);
Conjunto avançado de funções especializadas na tradução de textos e na formatação de datas, horas e números de acordo com a nacionalidade e localização do operador.
const i18n = await z.i18n; // primeira chamada retorna uma promise, próximas chamadas retornam um objeto
i18n.getResource("@@:/@word/yes"); // retorna "Sim" para "pt-BR", "Yes" para "en-US"
i18n.format("@@:/catalog/category/error/notFound", "ACESSORIOS"); // retorna "Categoria ACESSORIOS não encontrada" para "pt-BR"
i18n.formatDate("2024-01-31"); // retorna "31/01/2024" para "pt-BR"
i18n.formatDate(new Date("2024-01-31")); // retorna "31/01/2024" para "pt-BR"
i18n.formatNumber(1000.12345, { digits: 2 }); // retorna "1.000,12" para "pt-BR"
i18n.formatNumber(1000.12345, { minDigits: 2, maxDigits: 4 }); // retorna "1.000,1234" para "pt-BR"
FAQs
Javascript client for Zen Erp
We found that @zensoft-br/zenclient demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.