npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

tinyerp-ts

v1.0.5

Published

SDK para a API do Tiny ERP em TypeScript

Downloads

17

Readme

TinyERP SDK

SDK em TypeScript para a API do Tiny ERP.

Descrição

Este pacote fornece uma integração fácil com a API do Tiny ERP, transformando a documentação Swagger oficial em um SDK TypeScript totalmente tipado. Ideal para aplicações Node.js e TypeScript que precisam integrar com o Tiny ERP.

Aviso de Isenção

Este projeto não possui nenhuma afiliação oficial com a organização Tiny ERP. Trata-se de um projeto independente criado para facilitar a integração com a API pública do Tiny ERP.

Instalação

npm install tinyerp-ts
# ou
yarn add tinyerp-ts
# ou
pnpm add tinyerp-ts

Configuração

Antes de usar o SDK, você precisa configurar com seu token de acesso:

import { OpenAPI } from "tinyerp-ts";

// Configure a API com seu token
OpenAPI.TOKEN = "seu-token-aqui";

// Opcionalmente, você pode alterar a URL base se necessário
// OpenAPI.BASE = 'https://api.customizada.com.br';

Exemplo de Uso

import { OpenAPI, listarProdutosAction } from "tinyerp-ts";

// Configure o token
OpenAPI.TOKEN = "seu-token-aqui";

// Exemplo: Listar produtos
async function listarProdutos() {
  try {
    const response = await listarProdutosAction({
      // Parâmetros da requisição aqui
    });

    console.log("Produtos:", response.items);
  } catch (error) {
    console.error("Erro ao buscar produtos:", error);
  }
}

listarProdutos();

Interceptadores

O SDK possui suporte para interceptadores que permitem modificar requisições e respostas:

// Interceptador de requisição
OpenAPI.interceptors.request.use((config) => {
  // Modificar a configuração da requisição
  console.log("Requisição enviada para:", config.url);
  return config;
});

// Interceptador de resposta
OpenAPI.interceptors.response.use((response) => {
  // Processar a resposta
  console.log("Resposta recebida com status:", response.status);
  return response;
});

Regenerando o SDK

Este SDK é gerado automaticamente a partir da documentação Swagger do Tiny ERP. Para regenerar manualmente:

npm run generate

Atualizações Automáticas

Este pacote é atualizado automaticamente toda semana através de uma GitHub Action que:

  1. Verifica semanalmente se houve mudanças na API do Tiny ERP
  2. Se houver alterações, gera uma nova versão do SDK
  3. Incrementa automaticamente a versão do pacote
  4. Cria uma tag e release no GitHub
  5. Publica a nova versão no NPM

Isso garante que você sempre tenha acesso às funcionalidades mais recentes da API do Tiny ERP sem intervenção manual.

Documentação

Para mais informações sobre como usar este SDK, consulte:

Licença

Este projeto está licenciado sob a licença MIT - veja o arquivo LICENSE para mais detalhes.

Autor

Mantido por @lucaslosi

Contribuindo

Contribuições são bem-vindas! Sinta-se à vontade para abrir uma issue ou enviar um pull request.