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

@storentia/sdk

v0.1.6

Published

Storentia API SDK for Node.js

Readme

Storentia Node.js SDK

Official SDK for Storentia API. Type-safe, GraphQL-powered, fully documented.

Install

npm install @storentia/sdk

Setup

import { Storentia } from '@storentia/sdk';

const storentia = new Storentia({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret'
});

Credentials from Storentia dashboard. Auto-authenticates on first request.

Usage

Products

// Get single product
const product = await storentia.products.get('product-id');

// List products
const { data, pageInfo } = await storentia.products.list({
  status: 'ACTIVE',
  pagination: { page: 1, limit: 20 }
});

// Create product
const newProduct = await storentia.products.create({
  title: 'T-Shirt',
  price: 29.99,
  sku: 'TSHIRT-001'
});

// Update product
await storentia.products.update('product-id', {
  price: 34.99
});

// Delete product
await storentia.products.delete('product-id');

Variants

// Generate variants from options
const variants = await storentia.products.generateVariants('product-id');

// Create variant
const variant = await storentia.products.createVariant({
  productId: 'product-id',
  title: 'Red / Large',
  sku: 'TSHIRT-001-RED-L'
});

// Update variant
await storentia.products.updateVariant('variant-id', { stock: 50 });

// Delete variant
await storentia.products.deleteVariant('variant-id');

Options & Values

// Add option (e.g., "Color")
const option = await storentia.products.addOption({
  productId: 'product-id',
  name: 'Color'
});

// Add option value (e.g., "Red")
const value = await storentia.products.addOptionValue({
  optionId: 'option-id',
  value: 'Red'
});

// Update/delete
await storentia.products.updateOption('option-id', { name: 'Colour' });
await storentia.products.deleteOptionValue('value-id');

Collections

// Add products to collection
await storentia.products.addToCollection('collection-id', ['product-1', 'product-2']);

// Remove from collection
await storentia.products.removeFromCollection('collection-id', ['product-1']);

Inventory

// List inventory across all products/variants
const { data, pageInfo } = await storentia.products.listInventory({
  pagination: { page: 1, limit: 50 }
});

Blog Posts

// Get/list/create/update/delete
const post = await storentia.blogs.get('post-id');
const { data, pageInfo } = await storentia.blogs.list({ pagination: { limit: 10 } });
const newPost = await storentia.blogs.create({ title: 'Hello', content: '...' });
await storentia.blogs.update('post-id', { title: 'Updated' });
await storentia.blogs.delete('post-id');

Pages

// Get/list/create/update/delete
const page = await storentia.pages.get('page-id');
const { data, pageInfo } = await storentia.pages.list();
const newPage = await storentia.pages.create({ pageTitle: 'About', content: '...' });
await storentia.pages.update('page-id', { pageTitle: 'Updated' });
await storentia.pages.delete('page-id');

Error Handling

import { ApiError } from '@storentia/sdk';

try {
  const product = await storentia.products.get('invalid-id');
} catch (err) {
  if (err instanceof ApiError) {
    console.error(`${err.statusCode}: ${err.message}`);
  }
}

Authentication

SDK uses OAuth2 client credentials. Get credentials from dashboard. Auto-refreshes tokens before expiry.

Override token:

storentia.setAccessToken('pre-obtained-token');

Config

const storentia = new Storentia({
  clientId: string,      // Required
  clientSecret: string,  // Required
  timeout: 30000         // Optional, milliseconds
});

IDE Help

Hover on any method/type for docs. Full JSDoc coverage.

Build & Test

npm run build
npm test

License

MIT