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

@signa-so/sdk

v0.2.2

Published

Official TypeScript SDK for the Signa trademark intelligence API

Readme

@signa-so/sdk

Official TypeScript SDK for the Signa trademark intelligence API.

Installation

npm install @signa-so/sdk

Quick Start

import Signa from '@signa-so/sdk';

const signa = new Signa({ api_key: 'sig_live_xxx' });

// Retrieve a trademark
const tm = await signa.trademarks.retrieve('tm_abc123');

// Search trademarks
const results = await signa.search.query({ query: 'nike', office: 'USPTO' });

// List with auto-pagination
const page = await signa.trademarks.list({ limit: 50 });
for (const tm of page.data) {
  console.log(tm.mark_text);
}

Configuration

const signa = new Signa({
  api_key: 'sig_live_xxx',       // Required (or set SIGNA_API_KEY env var)
  base_url: 'https://api.signa.so',  // Default
  timeout: 30_000,                    // 30s default
  max_retries: 2,                     // Automatic retry with backoff
  debug: false,                       // Log request/response details
  fetch: customFetch,                 // Custom fetch implementation
});

Resources

All resources follow the same pattern: .retrieve(id), .list(params), plus resource-specific methods.

signa.trademarks

await signa.trademarks.retrieve('tm_xxx');
await signa.trademarks.retrieve('tm_xxx', { expand: ['owners', 'attorneys'] });
await signa.trademarks.list({ office: 'USPTO', status: 'registered', limit: 50 });
await signa.trademarks.history('tm_xxx');

signa.owners

await signa.owners.retrieve('own_xxx');
await signa.owners.list({ query: 'Nike', country: 'US' });
await signa.owners.trademarks('own_xxx');

signa.attorneys

await signa.attorneys.retrieve('att_xxx');
await signa.attorneys.list({ query: 'Smith' });
await signa.attorneys.trademarks('att_xxx');

signa.firms

await signa.firms.retrieve('firm_xxx');
await signa.firms.list({ query: 'Baker McKenzie' });
await signa.firms.attorneys('firm_xxx');
await signa.firms.trademarks('firm_xxx');

signa.proceedings

await signa.proceedings.retrieve('prc_xxx');
await signa.proceedings.list({ trademark_id: 'tm_xxx' });

signa.search

await signa.search.query({
  query: 'nike',
  office: 'USPTO',
  status: 'registered',
  nice_class: [25, 35],
  from: 0,
  size: 20,
});

await signa.search.suggest({ query: 'nik', size: 5 });

signa.references

await signa.references.classifications();   // Nice classes
await signa.references.offices();           // Trademark offices
await signa.references.jurisdictions();     // Jurisdictions
await signa.references.statuses();          // Status codes
await signa.references.eventTypes();        // Event types

Error Handling

All API errors throw typed exceptions for instanceof checks:

try {
  await signa.trademarks.retrieve('tm_invalid');
} catch (err) {
  if (err instanceof Signa.NotFoundError) {
    console.log('Not found:', err.message);
  } else if (err instanceof Signa.RateLimitError) {
    console.log('Rate limited, retry after:', err.retryAfter);
  } else if (err instanceof Signa.AuthenticationError) {
    console.log('Bad API key');
  }
}

Error hierarchy:

| Class | HTTP Status | Description | |-------|-------------|-------------| | SignaError | — | Base class (network errors, timeouts) | | SignaAPIError | Any | Base for all API errors | | BadRequestError | 400 | Invalid parameters | | AuthenticationError | 401 | Missing or invalid API key | | PermissionError | 403 | Insufficient scope | | NotFoundError | 404 | Resource not found | | RateLimitError | 429 | Rate limit exceeded | | InternalServerError | 500 | Server error | | ConnectionError | — | Network connectivity failure | | TimeoutError | — | Request timeout |

Pagination

List endpoints return a SignaList with cursor-based pagination:

const page = await signa.trademarks.list({ limit: 100 });

console.log(page.data);        // Trademark[]
console.log(page.has_more);    // boolean
console.log(page.next_cursor); // string | null

Type Generation

The SDK auto-generates types from the API's OpenAPI spec:

bun run generate:types    # Regenerate from API OpenAPI spec
bun run check:types-sync  # Verify types are up-to-date (CI check)

Scripts

bun run build       # Compile TypeScript
bun run test        # Run tests (uses msw for API mocking)
bun run dev         # Watch mode
bun run typecheck   # Type check

Requirements

  • Node.js >= 18 (uses native fetch)
  • MIT License