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

baselinker-js

v1.1.0

Published

Fully typed, zero-dependency and lightweight client for Baselinker

Downloads

15

Readme

baselinker-js

Installation

Install the package using your preferred package manager:

bun add baselinker-js

# or

pnpm add baselinker-js

# or

yarn add baselinker-js

# or

npm install baselinker-js

Usage

Define a baselinker client, and provide your BaseLinker API key:

// src/lib/baselinker.ts
import { createBaselinkerClient } from "baselinker-js";

const bl = createBaselinkerClient({
  apiKey: "YOUR_API_KEY",
});

export { bl };

Now you can use the client to interact with the BaseLinker API:

try {
  const query = await bl.products.getInventories();

  if (query.status === "ERROR") {
    throw new Error(query.error_message);
  }

  query.inventories.forEach((inventory) => {
    console.log(inventory);
  });
} catch (error) {
  console.error(error);
}

Documentation & API Reference

Entire structure and types of the client methods are based on the BaseLinker API documentation.

Note: The client is updated up to 2025-04-23 version of the API.

You can also find the official BaseLinker API changelog to check for any changes.

The following functions have been added that aren't in the BaseLinker API for more explicit code:

| Function | Description | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | updateInventoryPriceGroup | Works exactly the same as addInventoryPriceGroup but is more explicit in naming and expects a price_group_id parameter. | | updateInventoryWarehouse | Works exactly the same as addInventoryWarehouse but is more explicit in naming and expects a warehouse_id parameter. | | updateInventory | Works exactly the same as addInventory but is more explicit in naming and expects an inventory_id parameter. | | updateInventoryCategory | Works exactly the same as addInventoryCategory but is more explicit in naming and expects a category_id parameter. | | updateInventoryManufacturer | Works exactly the same as addInventoryManufacturer but is more explicit in naming and expects a manufacturer_id parameter. | | updateInventoryProduct | Works exactly the same as addInventoryProduct but is more explicit in naming and expects a product_id parameter. |