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

nexar-sdk

v1.1.10

Published

Official Nexar SDK for WhatsApp messaging and Nexar services.

Readme

Nexar SDK

Official TypeScript SDK for Nexar services.

Currently supports:

  • WhatsApp messaging
  • Template messages
  • Interactive messages with buttons

Installation

npm install nexar-sdk

Quick Start

import { Nexar } from "nexar-sdk";

const nexar = Nexar.init({
  token: "your-auth-token",
  businessId: 123
});

await nexar.whatsapp.sendQuickText(
  "57300XXXXXXX",
  "Hello from Nexar 🚀"
);

Configuration

const nexar = Nexar.init({
  token: "your-auth-token",
  businessId: 123,
  // Optional:
  // baseUrl: "https://staging.nexar.com.co"
});

Options

| Option | Type | Required | Description | | ---------- | --------------- | -------- | ------------------------ | | token | string | Yes | API authentication token | | businessId | string | Yes | Your Nexar business ID | | baseUrl | string | No | Custom API URL |

Default API URL:

https://back.nexar.com.co

WhatsApp API

Send Text Message

await nexar.whatsapp.sendText({
  celular: "57300XXXXXXX",
  body: "Hello!"
});

Quick Text

await nexar.whatsapp.sendQuickText(
  "57300XXXXXXX",
  "Quick message"
);

Send Template

await nexar.whatsapp.sendTemplate({
  templateName: "welcome_template",
  templateLanguage: "en_US",
  contacts: [
    {
      telefono: "57300XXXXXXX",
      variables: {
        name: "John"
      }
    }
  ]
});

Send Interactive Message

await nexar.whatsapp.sendInteractive({
  celular: "57300XXXXXXX",
  body: "Choose an option",
  buttonText: "Options",
  buttons: [
    { id: "1", title: "Option 1" },
    { id: "2", title: "Option 2" }
  ]
});

Response Format

All methods return:

interface ApiResponse<T = unknown> {
  code: number;
  msg: string;
  data?: T;
  errorDetail?: unknown;
  pagination?: {
    page: number;
    pageSize: number;
    total: number;
  };
}

Runtime Support

  • Node.js 18+
  • Bun
  • Deno
  • Edge runtimes
  • Browsers (if CORS enabled)

IA WABA File API

The IA WABA module allows you to upload, update, expire, or delete indexed documents.

Endpoint:

POST /iawaba/api-receptor/{businessId}

Upload or Update File

If the file exists, it is fully replaced. If it does not exist, it is created.

The SDK automatically generates the checksum internally. You only provide the content.

await nexar.iawaba.uploadFile({
  folder: "auto", // "general" | "auto" | "prompt"
  name: "manual-producto.md",
  content: `# Product Manual

## Features
- High quality
- 2 year warranty`,
  vencido: 0,
  ven: Date.now() + 30 * 24 * 60 * 60 * 1000 // 30 days
});

Delete File (Soft Delete)

Marks the file as expired. It becomes inaccessible immediately.

await nexar.iawaba.deleteFile(
  "auto",
  "manual-producto.md"
);

Expiration Examples

// 7 days
Date.now() + 7 * 24 * 60 * 60 * 1000

// 1 month (approx)
Date.now() + 30 * 24 * 60 * 60 * 1000

// No expiration
ven: null

Automatic Cleanup System

  • Daily cron job runs automatically
  • Files past expiration are removed from storage
  • Vector database is re-indexed automatically
  • Deleted files become inaccessible immediately

Documentation

For complete API reference, advanced configuration, and platform-specific details, visit:

👉 https://nexar.com.co/api/docs/waba

This SDK covers the most common operations. The full REST API documentation includes:

  • Raw endpoint specifications
  • Authentication details
  • Advanced configuration
  • Webhook information
  • Error reference

License

MIT