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 🙏

© 2026 – Pkg Stats / Ryan Hefner

integrax-sdk

v1.0.1

Published

Send SMS, RCS & OTP messages via API. Bulk SMS, OTP verification, phone number lookup — zero dependencies.

Readme

integrax-sdk

SDK oficial da Integrax para Node.js e TypeScript — SMS, RCS, OTP e consultas via API REST.

  • Zero dependências (usa fetch nativo)
  • TypeScript first — tipos completos pra todas as respostas
  • CJS + ESM

Instalação

npm install integrax-sdk

Quick start

import { Integrax } from "integrax-sdk";

const ix = new Integrax("seu-token-aqui");

// Enviar SMS
const res = await ix.sms.send(["5511999999999"], "Pedido #4821 confirmado ✓");

console.log(res.data[0].messageId); // "82816396"

Configuração

// Apenas token (usa defaults)
const ix = new Integrax("seu-token");

// Com opções
const ix = new Integrax({
  token: "seu-token",
  baseUrl: "https://sms.aresfun.com", // padrão
  timeout: 15000, // padrão: 30000ms
});

SMS

// Envio simples (usa shortcode padrão da conta)
const res = await ix.sms.send(
  ["5511999999999", "5521888888888"],
  "Sua mensagem aqui",
);

// Com shortcode customizado
const res = await ix.sms.send(
  ["5511999999999"],
  "Sua mensagem aqui",
  { from: "29094" },
);

// res.code === "SMS_SENT"
// res.data[0].status === "SENT_TO_OPERATOR"
// res.data[0].messageId === "82816396"

DLR (webhook)

Configure seu webhook para receber o status de entrega:

// Payload recebido no seu endpoint
interface DlrPayload {
  message_id: string;
  status: "DELIVRD" | "EXPIRED" | "REJECTD" | "UNDELIV";
  number: string;
}

OTP

Duas chamadas: enviar código e verificar.

// 1. Envio mínimo (usa todos os defaults: 6 dígitos numéricos, expira em 10min)
await ix.otp.send("5511999999999");

// 1b. Personalizado
await ix.otp.send("5511999999999", {
  message_default: "Use [code] pra confirmar sua conta", // padrão: "Seu código: [code]"
  from: "29094",        // se omitido, usa o padrão da conta
  qtd_digits: 5,        // padrão: 6
  with_text: true,      // alfanumérico (padrão: false = só números)
  expires_in: 5,        // minutos (padrão: 10)
});

// 2. Verificar código digitado pelo usuário
const verify = await ix.otp.verify("1MP5L", "5511999999999");

if (verify.status === "verified") {
  // código válido
}

RCS

BASIC (só texto)

await ix.rcs.send({
  to: ["5511999999999"],
  message: "Olá! Mensagem RCS básica.",
  from: "IntegraX",
  rcsType: "BASIC",
});

RICH (card com mídia e botões)

await ix.rcs.send({
  to: ["5511999999999"],
  message: "Confira nossa oferta!",
  from: "IntegraX",
  rcsMessage: {
    card: {
      title: "Black Friday",
      description: "Até 60% OFF em todos os produtos.",
      media: {
        file: { url: "https://exemplo.com/banner.png" },
        height: "MEDIUM",
      },
      suggestions: [
        {
          type: "OPEN_URL",
          text: "Ver ofertas",
          url: "https://exemplo.com/ofertas",
          postbackData: "click_ofertas",
        },
      ],
    },
  },
});

Créditos

const balance = await ix.credits.balance();
console.log(balance);

Consultas

Por CPF

const res = await ix.consult.cpf(["00000000001"], {
  showPhoneValid: true,
  showRestrictions: true,
});

Por telefone

const res = await ix.consult.phone(["551199999999"]);

Telefone premium (dados enriquecidos)

const res = await ix.consult.phonePremium(["551199999999"]);

Números internacionais

  • Para números de outros países, insira + na frente do número (ex: +34992000000).
  • Para envios internacionais, é necessário solicitar a ativação da rota através do suporte.
  • Alguns países permitem from personalizado. Se permitido, basta informar o from no payload.

Tratamento de erros

import { Integrax, IntegraxError } from "integrax-sdk";

try {
  await ix.sms.send(["551100000000"], "teste");
} catch (err) {
  if (err instanceof IntegraxError) {
    console.error(err.status); // HTTP status (ex: 401, 422)
    console.error(err.code); // código da API
    console.error(err.body); // corpo completo da resposta
  }
}

Timeout também lança IntegraxError com status: 0 e code: "TIMEOUT".

Build

npm run build     # gera dist/ (CJS + ESM + .d.ts)
npm run typecheck # verifica tipos sem emitir

Licença

MIT