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

@spuentesp_pkgs/woocommerce-sdk

v0.1.4

Published

Complete TypeScript SDK for WooCommerce REST API v3

Readme

@stockflow/woocommerce-sdk

Complete TypeScript SDK for the WooCommerce REST API v3.

Features

  • 🎯 Complete API Coverage - All WooCommerce REST API v3 endpoints
  • 📘 Full TypeScript Support - 120+ type definitions
  • 🔐 OAuth 1.0a Authentication - Built-in consumer key/secret auth
  • 🪝 Webhook Support - Type-safe webhook payloads
  • 🔄 Bulk Operations - Support for bulk create/update/delete
  • Modern Architecture - Modular, tree-shakeable design
  • 🧪 Fully Tested - 60+ tests with comprehensive coverage
  • 🚀 Zero Config - Works out of the box with sensible defaults

Installation

bun add @stockflow/woocommerce-sdk

Quick Start

import { WooCommerceClient } from '@stockflow/woocommerce-sdk'

const woocommerce = new WooCommerceClient({
  url: 'https://your-store.com',
  consumerKey: 'ck_your_consumer_key',
  consumerSecret: 'cs_your_consumer_secret',
  version: 'wc/v3',
})

// Fetch products
const products = await woocommerce.products.list({ per_page: 50 })

// Get orders
const orders = await woocommerce.orders.list({ status: 'processing' })

// Create customer
const customer = await woocommerce.customers.create({
  email: '[email protected]',
  first_name: 'John',
  last_name: 'Doe',
})

API Coverage

Products & Catalog

  • ✅ Products (CRUD + batch operations)
  • ✅ Product Variations
  • ✅ Product Categories
  • ✅ Product Tags

Orders & Sales

  • ✅ Orders (CRUD + batch operations)
  • ✅ Order Notes
  • ✅ Order Refunds

Customers

  • ✅ Customers (CRUD + batch operations)
  • ✅ Customer Downloads

Marketing

  • ✅ Coupons (CRUD + batch operations)

Webhooks

  • ✅ Webhooks (CRUD + batch operations)
  • ✅ Webhook Deliveries

Error Handling

import {
  WooCommerceError,
  WooCommerceNotFoundError,
  WooCommerceValidationError,
} from '@stockflow/woocommerce-sdk'

try {
  const product = await woocommerce.products.get(999)
} catch (error) {
  if (error instanceof WooCommerceNotFoundError) {
    console.log('Product not found')
  } else if (error instanceof WooCommerceValidationError) {
    console.log('Validation errors:', error.errors)
  }
}

Advanced Features

Auto-Pagination

// Automatically fetches all pages
const allProducts = await woocommerce.products.getAll('publish')

Batch Operations

const result = await woocommerce.products.batch({
  create: [
    { name: 'Product 1', type: 'simple', regular_price: '19.99' },
    { name: 'Product 2', type: 'simple', regular_price: '29.99' },
  ],
  update: [{ id: 123, regular_price: '25.00' }],
  delete: [456],
})

Retry with Backoff

import { retryWithBackoff } from '@stockflow/woocommerce-sdk'

const products = await retryWithBackoff(
  () => woocommerce.products.list({ per_page: 100 }),
  3, // max retries
  2000 // base delay in ms
)

Documentation

Package Stats

  • Lines of Code: 6,935
  • TypeScript Files: 30
  • Types/Interfaces: 120+
  • API Methods: 90+
  • Test Coverage: 60+ tests
  • Dependencies: 2 (oauth-1.0a, crypto-js)

License

MIT