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

@tickbird/sdk

v0.2.0

Published

Official TypeScript SDK for Tickbird — a typed REST client and webhook helpers (signature verification + typed events).

Downloads

148

Readme

@tickbird/sdk

Official TypeScript SDK for Tickbird — a typed REST client and webhook helpers. Runs on Node 18+, Cloudflare Workers, Deno, Bun, and browsers.

npm install @tickbird/sdk

REST client

import { createClient } from "@tickbird/sdk";

const tb = createClient({ token: process.env.TICKBIRD_TOKEN! }); // a tpat_… PAT

const { data, error } = await tb.timer.state({ path: { orgId } });
// e.g. tb.projects.list(...), tb.accounts.create(...), tb.timeEntries.log(...)
if (error) {
  // typed { status, body } — errors are returned, not thrown
} else {
  // typed response
}

createClient accepts an optional baseUrl (defaults to the production host) and configures the shared underlying client; the most recent call wins per process. The raw @hey-api/client-fetch client is exposed as tb.client for interceptors and custom requests.

Webhooks

Import from the dedicated, client-free entry point — @tickbird/sdk/webhooks pulls in no HTTP code:

import { constructEvent } from "@tickbird/sdk/webhooks";

// Pass the RAW request body — re-serialized JSON breaks the signature.
const event = await constructEvent({
  body: rawBody,
  headers: request.headers, // a Headers instance or a plain record
  secret: process.env.TICKBIRD_WEBHOOK_SECRET!, // whsec_…
});

switch (event.type) {
  case "timer.committed":
    event.data.totalSeconds; // number — narrowed by event.type
    break;
  case "project.archived":
    event.data.archived; // boolean
    break;
}

constructEvent verifies the Tickbird-Signature (HMAC-SHA256, v1=<hex>) and rejects replays outside a 300s tolerance (configurable via toleranceSeconds), throwing WebhookSignatureVerificationError on any failure. For lower-level use, verifyWebhookSignature(...) returns a boolean.

Keeping the client in sync

The client is generated from the live OpenAPI description. Regenerate after API changes:

# against a running local API
pnpm --filter @tickbird/sdk codegen
# or a deployed host
TICKBIRD_OPENAPI_URL=https://tickbird.app/api/v1/openapi.json pnpm --filter @tickbird/sdk codegen