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

@postwave/sdk

v0.1.0

Published

Official TypeScript SDK for the Postwave email platform — campaigns, subscribers, sequences, voice, sandbox, budgets, approvals. Designed for software agents and developer-driven workflows.

Readme

@postwave/sdk

First-party TypeScript SDK for the Postwave API. MIT licensed as Layer 2 of the Postwave open-core architecture.

  • Strict types end-to-end (no any).
  • Dual ESM + CJS build.
  • Works in Node 18+, modern browsers, and edge runtimes.
  • Exponential-backoff retries on 429 / 5xx (with Retry-After honoring).
  • Constant-time HMAC-SHA256 webhook signature verification.
  • Hand-written — no codegen toolchain — kept in lockstep with packages/openapi.

Install

pnpm add @postwave/sdk
# or: npm i / yarn add

Quickstart

import { PostwaveClient } from "@postwave/sdk";

const pw = new PostwaveClient({
  apiKey: process.env.POSTWAVE_API_KEY!,
  tenantId: "acme", // omit in prod when JWT carries tenant claim
});

// Generate a 3-email welcome series
const seq = await pw.sequences.generate({
  template_id: "tpl_welcome_3",
  name: "Welcome series",
  variables: { product_name: "Acme", founder_name: "Alex" },
});

console.log(seq.emails[0].subject);

Method index

| Resource | Methods | |-------------------------|---------| | pw.migrations | start, callback, discover, dryRun, commit, get, verification, rollback, rollbackStatus, listSources | | pw.subscribers | list, get, create, update, delete, search, suppress | | pw.sequences | list, get, generate, regenerate | | pw.templates | list, get, create | | pw.voiceProfile | get, build, listSources, addSource, ingestSource, removeSource | | pw.forms | list, get, create, update, delete, listSubmissions, exportSubmissionsCSV | | pw.inboxReality | getCampaignReport, predict, diagnose, render | | pw.reputation | get | | pw.authChecks | list | | pw.sending | provision, getState, getWarmup | | pw.automations | trigger, listExecutions, pause, resume | | pw.webhooks | list, create, update, delete, verifySignature |

Error handling

Every method throws a typed subclass of PostwaveError:

import { PostwaveClient, NotFoundError, RateLimitError } from "@postwave/sdk";

try {
  await pw.subscribers.get("does-not-exist");
} catch (e) {
  if (e instanceof NotFoundError) console.warn(`gone: ${e.code}`);
  else if (e instanceof RateLimitError) console.warn(`retry in ${e.retryAfterSeconds}s`);
  else throw e;
}

Every error carries status, code, message, and (when the gateway sets it) a requestId you can include in support tickets.

Webhook signature verification

import { verifySignature } from "@postwave/sdk";

// Express, with body-parser raw middleware so req.body is a Buffer:
app.post("/postwave-webhook", async (req, res) => {
  const ok = await verifySignature(
    req.body,
    req.headers["x-postwave-signature"] as string,
    process.env.POSTWAVE_WEBHOOK_SECRET!,
  );
  if (!ok) return res.status(401).end();
  const evt = JSON.parse(req.body.toString());
  // ... handle evt
  res.status(200).end();
});

The verifier uses Web Crypto and works unchanged on Cloudflare Workers, Vercel Edge, Deno, Bun, and Node 18+.

Contributing

Open a PR against packages/sdk-ts/. Run:

pnpm -F @postwave/sdk test
pnpm -F @postwave/sdk typecheck
pnpm -F @postwave/sdk build

The OpenAPI spec at packages/openapi/openapi.yaml is the source of truth; keep src/types.ts in sync with any spec change in the same PR.