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

@nilovonjs/connect

v0.1.4

Published

TypeScript SDK for the Nilovon Connect API

Readme

@nilovonjs/connect

Official TypeScript SDK for the Nilovon Connect API.

  • Homepage: https://connect.nilovon.com
  • API host: https://api.connect.nilovon.com
  • Documentation: https://docs.connect.nilovon.com

Installation

npm install @nilovonjs/connect
# or
pnpm add @nilovonjs/connect
# or
yarn add @nilovonjs/connect
# or
bun add @nilovonjs/connect

Quick Start

import { NilovonConnect } from "@nilovonjs/connect";

const client = new NilovonConnect({ apiKey: "nk_..." });
// or simply:
// const client = new NilovonConnect("nk_...");

// Send an email
await client.emails.send({
  to: "[email protected]",
  from: "[email protected]",
  subject: "Welcome!",
  html: "<h1>Hello</h1><p>Welcome to our platform.</p>",
});

// Create a campaign
await client.campaigns.create({
  name: "Weekly Newsletter",
  subject: "This week's updates",
  fromEmail: "[email protected]",
});

// List contacts
const { items } = await client.contacts.list({ limit: 50 });

Configuration

| Option | Required | Default | Description | | --------- | -------- | ---------------------------------- | ------------------------- | | apiKey | Yes | — | API key from your dashboard | | baseUrl | No | https://api.connect.nilovon.com | Custom API base URL |

Resources

Emails

// Send a single email
await client.emails.send({
  to: "[email protected]",
  from: "[email protected]",
  subject: "Hello",
  html: "<p>Content here</p>",
  replyTo: "[email protected]",
  scheduledAt: "2025-01-01T10:00:00Z", // optional
});

// Get a message by ID
const message = await client.emails.get("msg_...");

// List messages
const { items } = await client.emails.list({ limit: 20, status: "sent" });

Contacts

await client.contacts.create({ email: "[email protected]", name: "Jane Doe", tags: ["vip"] });
await client.contacts.get("contact_id");
await client.contacts.list({ search: "jane", limit: 50 });
await client.contacts.update("contact_id", { name: "Jane Smith" });
await client.contacts.delete("contact_id");

Campaigns

await client.campaigns.create({ name: "Launch Announcement", subject: "We launched!", fromEmail: "[email protected]" });
await client.campaigns.update({ id: "camp_id", bodyHtml: "<h1>Hello</h1>" });
await client.campaigns.schedule("camp_id"); // send now
await client.campaigns.schedule("camp_id", "2025-06-01T09:00:00Z"); // schedule
await client.campaigns.pause("camp_id");
await client.campaigns.resume("camp_id");
await client.campaigns.duplicate("camp_id");
await client.campaigns.delete("camp_id");

Domains

await client.domains.create("mail.yourdomain.com");
await client.domains.list();
await client.domains.verify("domain_id");
await client.domains.delete("domain_id");

Templates

await client.templates.create({ name: "Welcome", channelType: "email", body: "<p>Hello {{name}}</p>" });
await client.templates.list({ channelType: "email" });
await client.templates.update("tmpl_id", { subject: "Updated subject" });
await client.templates.delete("tmpl_id");

Webhooks

await client.webhooks.create({ url: "https://yourdomain.com/webhook", events: ["message.sent"] });
await client.webhooks.list();
await client.webhooks.update("wh_id", { isActive: false });
await client.webhooks.delete("wh_id");

Webhook Verification

Verify incoming webhook signatures using HMAC-SHA256:

import { NilovonConnect } from "@nilovonjs/connect";

const isValid = await NilovonConnect.verifyWebhook(
  "your_webhook_secret",
  requestBody,
  request.headers["x-webhook-signature"],
);

if (!isValid) {
  return new Response("Invalid signature", { status: 401 });
}

Advanced: Raw Client

For advanced usage, access the underlying oRPC client directly:

const client = new NilovonConnect("nk_...");

// Use the raw oRPC client
const result = await client.raw.message.send({ ... });

Error Handling

import { ORPCError } from "@orpc/client";

try {
  await client.contacts.get("nonexistent");
} catch (error) {
  if (error instanceof ORPCError) {
    console.error(error.code, error.message);
  }
}

TypeScript

The SDK is fully typed. Import types as needed:

import type { SendEmailParams, ContactParams, CreateCampaignParams } from "@nilovonjs/connect";