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

@totalaudiopromo/tap-sdk

v0.1.0

Published

TypeScript SDK for the TAP REST API — contacts, campaigns, outcomes, keys, and webhooks for music PR automation.

Readme

@totalaudiopromo/tap-sdk

TypeScript SDK for the TAP REST API — contacts, campaigns, outcomes, keys, and webhooks for music PR automation.

Zero dependencies. Uses native fetch. Works in Node.js, Deno, Bun, and edge runtimes.

Install

npm install @totalaudiopromo/tap-sdk
# or
pnpm add @totalaudiopromo/tap-sdk

Quick start

import { TapClient } from '@totalaudiopromo/tap-sdk';

const tap = new TapClient({ apiKey: 'tap_ak_...' });

// List contacts
const { contacts, total } = await tap.contacts.list({ search: 'BBC', limit: 10 });

// Import contacts
const result = await tap.contacts.create([
  { name: 'Jo Whiley', email: '[email protected]', outlet: 'BBC Radio 2' },
  { name: 'Clara Amfo', email: '[email protected]', outlet: 'BBC Radio 1' },
]);
console.log(`Imported ${result.imported}, skipped ${result.skipped}`);

// Enrich contacts with AI
const enrichment = await tap.contacts.enrich(['contact-id-1', 'contact-id-2']);

// Validate emails
const validation = await tap.contacts.validate(['[email protected]']);

// List campaigns
const { campaigns } = await tap.campaigns.list({ status: 'active' });

// Create a campaign
const { campaign } = await tap.campaigns.create({
  name: 'Spring Release',
  artist_name: 'Artist',
  status: 'draft',
});

// Get campaign details with stats
const details = await tap.campaigns.get(campaign.id);

// Update a campaign
await tap.campaigns.update(campaign.id, { status: 'active' });

// Add contacts to a campaign
await tap.campaigns.addContacts(campaign.id, ['contact-id-1']);

// List campaign contacts
const { contacts: campaignContacts } = await tap.campaigns.listContacts(campaign.id);

// Log an outcome
await tap.outcomes.log({
  campaign_id: campaign.id,
  contact_id: 'contact-id-1',
  outcome_type: 'coverage',
  notes: 'BBC 6 Music playlist add',
});

// List outcomes
const { outcomes } = await tap.outcomes.list({ campaign_id: campaign.id });

// Webhooks
const { webhook } = await tap.webhooks.create({
  url: 'https://example.com/hook',
  events: ['outcome.logged', 'contact.imported'],
});
const { webhooks } = await tap.webhooks.list();
await tap.webhooks.delete(webhook.id);

Error handling

All methods throw TapApiError on non-2xx responses:

import { TapClient, TapApiError } from '@totalaudiopromo/tap-sdk';

try {
  await tap.contacts.get('nonexistent-id');
} catch (err) {
  if (err instanceof TapApiError) {
    console.error(err.status); // 404
    console.error(err.message); // "Contact not found"
    console.error(err.body); // { error: "Contact not found" }
  }
}

Configuration

const tap = new TapClient({
  apiKey: 'tap_ak_...', // Required
  baseUrl: 'http://localhost:3010', // Optional, defaults to https://totalaudiopromo.com
  fetch: customFetch, // Optional, for testing or custom runtimes
});

API coverage

| Resource | Methods | | ----------- | ---------------------------------------------------------------- | | contacts | list, get, create, update, erase, enrich, validate | | campaigns | list, get, create, update, listContacts, addContacts | | outcomes | list, log | | keys | list, create, revoke | | webhooks | list, create, delete |

Licence

MIT