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

@adveron/sdk

v0.4.0

Published

TypeScript client for the Adveron public API — generated from the OpenAPI spec

Readme

@adveron/sdk

TypeScript client for the Adveron public API — the tenant /v1 surface, generated from the API's own OpenAPI document. Runs in Node (18+) and the browser; the transport is fetch.

The client is generated, not hand-written. Every operation, every request shape, and every response type comes from the same registered operations the server dispatches, so the client cannot describe a surface the API does not serve.

Install

pnpm add @adveron/sdk

Authentication

Every call authenticates with a workspace API key as a bearer token. Configure the shared client once:

import { client } from "@adveron/sdk";

client.setConfig({
  baseUrl: "https://api.adveron.com",
  auth: () => process.env.ADVERON_API_KEY!,
});

Or build an isolated client (useful when one process serves several workspaces):

import { createClient, createConfig } from "@adveron/sdk";

const adveron = createClient(
  createConfig({ baseUrl: "https://api.adveron.com", auth: () => apiKey })
);

Every operation accepts a client option, so a per-request client needs no global state.

Responses

Operations return { data, error } — never a throw on an HTTP status. A successful body is { data, meta }, where meta always carries the request_id that also rides the X-Request-Id response header.

Failures carry the house envelope, { error: { code, message, request_id, details? } }. isAdveronError narrows it:

import { brandGet, isAdveronError } from "@adveron/sdk";

const { data, error } = await brandGet({ path: { id: brandId } });
if (isAdveronError(error)) {
  // error.error.code is one of the stable machine codes — e.g.
  // "resource_not_activated", "insufficient_credits", "rate_limited"
  console.error(error.error.code, error.error.request_id);
}

Quote request_id in a support request: it joins our logs, traces, and the credit ledger.

One example per group

Brands — search first; every other brand operation takes an id, not a name.

import { brandSearch, brandGet } from "@adveron/sdk";

const { data: found } = await brandSearch({ query: { q: "nike", limit: 5 } });
const { data: brand } = await brandGet({
  path: { id: found!.data.items[0].id },
});

Categories

import { categoryList } from "@adveron/sdk";

const { data } = await categoryList();
// data.data.items[0].subcategories — the launched children under each category

Audiences

import { audienceGet } from "@adveron/sdk";

const { data } = await audienceGet({ path: { id: "AUD123" } });

Balance & usage

import { balanceGet, usageSummary } from "@adveron/sdk";

const { data: balance } = await balanceGet();
const { data: usage } = await usageSummary({
  query: { group_by: "WORKSPACE" },
});

Metering headers

Successful responses carry X-Credits-Charged / X-Credits-Reason and the organization's purchased throughput as RateLimit-*. Reads answer Cache-Control: no-store. Send an Idempotency-Key header to make a call safe to retry — recommended on metered GETs, where an auto-retried read would otherwise double-charge.

Reference

The full operation reference, with request and response shapes for every /v1 endpoint, is the API's own interactive documentation at https://api.adveron.com/v1/docs — the same OpenAPI document this client is generated from.