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

@gamastudio/sendwave-provider

v1.0.3

Published

Librería para interactuar con Sendwave usando configuración dinámica.

Downloads

582

Readme

📖 Sendwaves Provider

A dynamic library for integrating and managing Sendwave instances for WhatsApp bot development.

🚀 Installation

npm install @gamastudio/sendwave-provider

🔧 Basic Usage

Creating a Provider Instance

import { createSendWaveProvider } from "@gamastudio/sendwave-provider";

const provider = createSendWaveProvider({
  name: "MyBot",
  apiKey: "your-api-key-here",
  port: 3000,
});

// Initialize the provider
await provider.initAll(provider.globalVendorArgs.port);

📤 Sending Messages

Text Messages

await provider.sendText({
  from: "573123456789",
  text: "Hello! Welcome to our service.",
});

Interactive Polls (New! 📊)

await provider.sendPoll({
  from: "573123456789",
  poll: {
    name: "¿Qué te parece el nuevo proveedor?",
    values: ["Excelente", "Bueno", "Mejorable"],
    selectableCount: 1 // Optional, default: 1
  }
});

Intelligent Buttons (Easier! 🔘)

The provider is now "intelligent" and accepts multiple formats for buttons.

// 1. Super Simple (Quick Replies)
await provider.sendButton({
  from: "573123456789",
  title: "Main Menu",
  buttons: ["🛒 Catalog", "🎁 Promotions", "📞 Support"]
});

// 2. Mixed Format (Text & Functional buttons)
await provider.sendButton({
  from: "573123456789",
  title: "Payment Options",
  body: "Select your preferred method",
  buttons: [
    { type: "reply", displayText: "Cash" },
    { type: "url", displayText: "Visit Web", url: "https://example.com" },
    { type: "copy", displayText: "Copy Coupon", copyText: "SAVE20" },
    { type: "pix", displayText: "Pay with Pix", keyType: "email", key: "[email protected]" }
  ]
});

Supported Button Types:

  • reply: Standard quick reply button.
  • url: Opens a website.
  • call: Triggers a phone call.
  • copy: Copies text or code to clipboard.
  • pix: Brazilian payment system integration.

Intelligent Lists (Simple & Advanced 📜)

// Simple List (Array of strings)
await provider.sendList({
  from: "573123456789",
  list: {
    title: "Select an option",
    button: "View Options",
    content: ["Option 1", "Option 2", "Option 3"],
  },
});

// Advanced List with sections
await provider.sendList({
  from: "573123456789",
  list: {
    title: "Product Categories",
    button: "Select Category",
    content: [
      {
        title: "Electronics",
        rows: [
          { title: "Smartphones", description: "Latest models" },
          { title: "Laptops", description: "Gaming and office" },
        ],
      },
    ],
  },
});

Media Messages

// Images, Videos, Documents, and Voice
await provider.sendImage({ from: "573123456789", url: "https://...", text: "Caption" });
await provider.sendVideo({ from: "573123456789", url: "https://...", text: "Caption" });
await provider.sendFile({ from: "573123456789", url: "https://...", fileName: "file.pdf" });
await provider.sendVoice({ from: "573123456789", url: "https://..." });

🔄 Queue Flow System (100% Automatic)

The Queue Flow system manages user sessions, handling timeouts and inactive users automatically.

const provider = createSendWaveProvider({
  name: "MyBot",
  apiKey: "your-key",
  queueFlow: {
    enabled: true,
    warningTimeout: 30 * 60 * 1000, // 30 mins
    endTimeout: 2 * 60 * 1000,      // 2 mins after warning
    warningMessage: "⏳ You seem inactive. Still there?",
  },
});

🎯 Event System

provider.on('ready', (isReady) => console.log('Connected:', isReady));
provider.on('message', (ctx) => console.log(`From ${ctx.from}: ${ctx.body}`));

🏗️ Architecture

  • Provider Layer: Main SendWaveProvider class.
  • Sender Layer: Intelligent message transformation.
  • Queue Flow: Automatic session management.

📜 License

ISC License © 2026 - Ameth Galarcio