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

@clickwire/api-client

v2.5.0

Published

Clickwire API client

Readme

@clickwire/api-client

TypeScript client for our Laravel V2 API. Node 18+, server-side only — uses fetch and reads CLICKWIRE_API_URL + CLICKWIRE_TOKEN from the environment at request time (same vars as the monorepo / Next apps). No setup ceremony beyond having those set.

Use it

import { apiClient } from "@clickwire/api-client/v2";

const { data } = await apiClient.posts.list({ per_page: 20 });
const product = await apiClient.products.get("some-slug");

Prefer @clickwire/api-client/v2 over the root export when you care which API version you’re on. Methods are grouped like the HTTP API (authors, posts, products, …). Types are prefixed V2* — use them for query params and response shapes.

Optional: apiClient.configure({ locale: "nl" }) sets the global locale query param for V2. Most of the times the default locale for the Website will be sufficient.

Global query params

Configure query params once instead of repeating them on every call:

import { createV2ApiClient } from "@clickwire/api-client/v2";

const clickwire = createV2ApiClient({
    // Semantic: this website doesn't carry these product types.
    catalog: { excludeProductTypes: ["sneakers"] },

    // Generic: default query params per endpoint, keyed by `<group>.<method>`.
    defaultQuery: {
        "products.list": { per_page: 8 },
        "posts.list": { sticky: true },
    },
});

// `exclude_product_types[]=sneakers&per_page=8` sent automatically:
await clickwire.products.list({ sort: "newest" });

catalog.excludeProductTypes sends exclude_product_types[] on every catalog-surface endpoint (products.list, products.related, productAttributes.list, productAttributes.get): excluded products disappear from hits, facets, and related results, and attribute products_count / has_products reflect the scoped catalog.

Precedence per query key: per-call > defaultQuery > catalog > locale. Arrays replace (never merge), so passing exclude_product_types: [] on a single call lifts the global exclusion for that request. Member endpoints never receive defaults (per-user credentials).

Local testing

Include the package from local disk in your test client:

 "dependencies": {
    "@clickwire/api-client": "file:path/to/vp/packages/api-client",
  },

Every time you make a change to the api-client package locally you should build the package and then run npm install again in your test client.

Develop & publish

From packages/api-client:

npm run typecheck
npm run build

Release

Make sure you are authenciated with NPM:

npm login

Then run:

npm run release -- <version>

Replace <version> with either major, minor or patch or set your own x.x.x.