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

@muhammedaksam/waha-node

v2026.4.3

Published

Node.js TypeScript SDK for WAHA (WhatsApp HTTP API) - auto-generated from OpenAPI spec

Readme

@muhammedaksam/waha-node

npm version License: MIT TypeScript Node.js

TypeScript SDK for WAHA (WhatsApp HTTP API) - auto-generated from OpenAPI spec with full type safety and axios-based client.

Installation

npm install @muhammedaksam/waha-node
# or
pnpm add @muhammedaksam/waha-node
# or
yarn add @muhammedaksam/waha-node

Usage

Complete Client (Recommended)

The WahaClient aggregates all controllers for convenience:

import { WahaClient } from '@muhammedaksam/waha-node'

// Initialize with baseURL and optional API key
const client = new WahaClient('http://localhost:3000', 'your-api-key')

// Access controllers via properties
// Sessions
const { data: sessions } = await client.sessions.sessionsControllerList()

// Chatting
const { data: message } = await client.chatting.chattingControllerSendText('default', {
  chatId: '[email protected]',
  text: 'Hello from waha-node!',
  session: 'default',
})

// Auth
const { data: qr } = await client.auth.authControllerGetQr('default', {
  format: 'raw',
})

Modular Clients (Tree-shakable)

If you only need specific functionality, you can import individual controllers:

import { Chatting, HttpClient } from '@muhammedaksam/waha-node'

const http = new HttpClient({
  baseUrl: 'http://localhost:3000',
  securityWorker: () => ({ headers: { 'X-Api-Key': 'your-api-key' } }),
})

const chatting = new Chatting(http)

await chatting.chattingControllerSendText(...)

API Methods

All endpoints are available through the client properties:

client.sessions.* // SessionsController
client.chatting.* // ChattingController
client.contacts.* // ContactsController
client.groups.*   // GroupsController
client.auth.*     // AuthController
// ...etc

Types

All 200+ types are auto-generated from the WAHA OpenAPI specification:

import {
  SessionInfo,
  MessageTextRequest,
  WAMessage,
  QRCodeValue,
  // ... and many more
} from '@muhammedaksam/waha-node'

How It Works

This package is automatically kept in sync with WAHA:

  1. Daily - GitHub Action spins up latest devlikeapro/waha container
  2. Fetches OpenAPI spec from /-json endpoint
  3. Compares SHA256 hash with committed openapi.json
  4. If changed - Generates new types + client, bumps version, commits, and pushes tag
  5. Publishes to npm via OIDC trusted publishing

The openapi.json is committed so you can see exactly what changed between versions.

Development

Prerequisites

  • Node.js >= 18
  • pnpm
  • Running WAHA instance (for type generation)

Generate Types Locally

# Start WAHA (credentials will be auto-generated in logs)
docker run -d -p 3000:3000 --name waha devlikeapro/waha:latest

# Get the generated password from logs
docker logs waha 2>&1 | grep WHATSAPP_SWAGGER_PASSWORD

# Set credentials and generate
export SWAGGER_USER=admin
export SWAGGER_PASSWORD=<password-from-logs>
pnpm run generate

# Build
pnpm run build

Scripts

| Script | Description | | ------------------- | ---------------------------------------------- | | pnpm run generate | Fetch OpenAPI spec and generate types + client | | pnpm run build | Build ESM/CJS bundles | | pnpm run clean | Remove dist folder |

License

MIT