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

@reponseai/sdk

v0.2.1

Published

Official TypeScript SDK for Reponse Headless Commerce API

Readme

@reponseai/sdk

Official TypeScript SDK for the Reponse Headless Commerce API.

Install

npm install @reponseai/sdk
# or
pnpm add @reponseai/sdk
# or
yarn add @reponseai/sdk

Quick Start

import { Reponse } from '@reponseai/sdk';

const reponse = new Reponse({
  apiKey: 'your-api-key',
  baseUrl: 'https://your-store.reponse.ai',
});

Catalog

// List all products
const { data } = await reponse.catalog.listProducts();

// Search products
const { data } = await reponse.catalog.listProducts({
  query: { query: 't-shirt', limit: 10 }
});

// Get by slug
const { data } = await reponse.catalog.listProducts({
  query: { slug: 't-shirt-logo' }
});

// Get single product with variants
const { data: product } = await reponse.catalog.getProduct({
  path: { id: 'product-uuid' }
});

// List collections
const { data } = await reponse.catalog.listCollections();

Cart & Checkout

// Create a cart
const { data: cart } = await reponse.cart.create({
  body: {
    items: [{ product_id: 'uuid', variant_id: 'uuid', quantity: 1 }],
    currency: 'EUR'
  }
});

// Get cart (includes automatic discount calculation)
const { data: cart } = await reponse.cart.get({
  path: { id: cart.id }
});

// Add items
await reponse.cart.addItem({
  path: { id: cart.id },
  body: { items: [{ product_id: 'uuid', variant_id: 'uuid', quantity: 2 }] }
});

// Update quantity
await reponse.cart.updateItem({
  path: { id: cart.id, lineId: 'line-uuid' },
  body: { quantity: 3 }
});

// Remove item
await reponse.cart.removeItem({
  path: { id: cart.id, lineId: 'line-uuid' }
});

// Checkout via Stripe
const { data: checkout } = await reponse.cart.createCheckout({
  body: {
    cart_id: cart.id,
    success_url: 'https://mystore.com/success',
    cancel_url: 'https://mystore.com/cart'
  }
});

Orders

// List orders
const { data } = await reponse.orders.list();
const { data } = await reponse.orders.list({ query: { status: 'paid', limit: 20 } });

// Fulfill with tracking
await reponse.orders.fulfill({
  path: { orderId: 'order-uuid' },
  body: { tracking_number: '1Z999...', tracking_company: 'UPS' }
});

// Refund (full or partial)
await reponse.orders.refund({
  path: { orderId: 'order-uuid' },
  body: { amount: 15.00, reason: 'damaged_item' }
});

// Cancel order
await reponse.orders.cancel({
  path: { orderId: 'order-uuid' },
  body: { reason: 'customer_changed_mind' }
});

// Resend confirmation / invoice
await reponse.orders.resendConfirmation({ path: { orderId: 'order-uuid' } });
await reponse.orders.resendInvoice({ path: { orderId: 'order-uuid' } });

Inventory

// Get inventory levels
const { data } = await reponse.inventory.get({ query: { variant_id: 'uuid' } });

// Update stock
await reponse.inventory.update({
  body: { variant_id: 'uuid', quantity: 50, mode: 'set', reason: 'restock' }
});

Discounts

// List discount codes
const { data } = await reponse.discounts.list({ query: { active: true } });

// Validate a code
const { data } = await reponse.discounts.validate({
  body: { code: 'SUMMER20', cart_total: 100 }
});

// Create a code
await reponse.discounts.create({
  body: { code: 'VIP10', type: 'percentage', value: 10 }
});

Loyalty & Referrals

// Get points balance
const { data } = await reponse.loyalty.getBalance({ query: { contact_id: 'uuid' } });

// Redeem points
await reponse.loyalty.redeem({
  body: { contact_id: 'uuid', points: 500, order_id: 'order-uuid' }
});

// Referral info
const { data } = await reponse.loyalty.getReferralInfo({ query: { contact_id: 'uuid' } });

Gift Cards

// List gift cards
const { data } = await reponse.giftCards.list();

// Create a gift card
const { data: card } = await reponse.giftCards.create({
  body: { initial_value: 50, currency: 'EUR' }
});

// Redeem
await reponse.giftCards.redeem({
  body: { code: 'GC-ABCD-1234', amount: 25, order_id: 'order-uuid' }
});

Tickets

// List support tickets
const { data } = await reponse.tickets.list({ query: { status: 'open' } });

// Create a ticket
await reponse.tickets.create({
  body: { customer_email: '[email protected]', subject: 'Missing item', message: '...' }
});

// Reply to a ticket
await reponse.tickets.reply({
  path: { id: 'ticket-uuid' },
  body: { message: 'We are looking into this.' }
});

Subscriptions

// Delay next shipment
await reponse.subscriptions.update({
  path: { subscriptionId: 'sub-uuid' },
  body: { action: 'delay', target_date: '2026-07-15' }
});

// Ship now
await reponse.subscriptions.update({
  path: { subscriptionId: 'sub-uuid' },
  body: { action: 'ship_now' }
});

Approvals

// Execute a pending approval
await reponse.approvals.execute({ path: { approvalId: 'uuid' } });

// Reject with reason
await reponse.approvals.reject({
  path: { approvalId: 'uuid' },
  body: { reason: 'Price too high' }
});

Features

  • 🛒 Full Cart CRUD — Create, read, add items, update quantities, remove items
  • 🏷️ Product Variants — Options, SKUs, compare-at pricing, inventory
  • 🔍 SEO-ready — Slug-based routing, SEO title/description
  • 💰 Multi-discount Engine — Automatic discounts, codes, BXGY, free shipping
  • 📦 Order Management — Fulfill, refund, cancel, shipping updates, invoices
  • 📊 Inventory — Real-time stock levels, set/adjust quantities
  • 🎟️ Loyalty & Gift Cards — Points, redemption, referrals, gift cards
  • 🎫 Support Tickets — Create, reply, track support requests
  • 🔄 Subscriptions — Delay or trigger shipments
  • Approvals — Execute or reject pending approval workflows
  • 🤖 AI-native — Built-in conversational support widget

TypeScript

The SDK is fully typed. All request/response types are exported:

import type { Product, ProductVariant, Cart } from '@reponseai/sdk';

Links

License

MIT