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

@syncbooks/addon-sdk

v1.6.0

Published

Official SDK for building SyncBooks add-ons. Provides API client, React hooks, UI components, and postMessage bridge.

Readme

@syncbooks/addon-sdk

Build add-ons for SyncBooks. This SDK provides everything you need: API client, React hooks, UI components, and the postMessage bridge for communicating with the SyncBooks host.

Installation

npm install @syncbooks/addon-sdk

Quick Start

import { SyncBooksProvider, useSyncBooks, customers, ui } from '@syncbooks/addon-sdk';

export default function App() {
  return (
    <SyncBooksProvider>
      <MyAddon />
    </SyncBooksProvider>
  );
}

function MyAddon() {
  const { ready, organizationId, resource } = useSyncBooks();
  const [customerList, setCustomerList] = useState([]);

  useEffect(() => {
    if (ready) {
      customers.list({ limit: 10 }).then(res => setCustomerList(res.data));
    }
  }, [ready]);

  if (!ready) return <div>Loading...</div>;

  return (
    <div>
      <h1>Customers for org: {organizationId}</h1>
      <ul>
        {customerList.map(c => <li key={c._id}>{c.name}</li>)}
      </ul>
      <button onClick={() => ui.notify('Hello from addon!', 'success')}>
        Show Toast
      </button>
    </div>
  );
}

API Reference

Provider & Hook

| Export | Description | |--------|-------------| | <SyncBooksProvider> | Wrap your addon root. Initializes bridge + context. | | useSyncBooks() | Returns { ready, organizationId, userId, userRole, appId, scopes, token, resource } |

Navigation & UI

import { navigation, ui } from '@syncbooks/addon-sdk';

navigation.open('/invoices/123');       // Navigate SyncBooks to a page
ui.notify('Saved!', 'success');         // Show a toast in SyncBooks
ui.close();                             // Close the addon panel
ui.resize(500);                         // Resize the iframe

API Client (all resources)

Every resource follows the same pattern:

import { customers } from '@syncbooks/addon-sdk';

// List with pagination + filters
const { data, total, totalPages } = await customers.list({ page: 1, limit: 20, search: 'John' });

// Get single
const { data: customer } = await customers.get('customer_id');

// Create
const { data: newCustomer } = await customers.create({ name: 'Acme Corp', email: '[email protected]' });

// Update
const { data: updated } = await customers.update('customer_id', { phone: '+233...' });

// Delete
await customers.delete('customer_id');

Available Resources

Core: customers, invoices, products, payments, expenses, vendors, bills, estimates, creditNotes, purchaseOrders, accounts, journalEntries, generalLedger, bankTransactions, budgets, assets, inventory

HR/Payroll: employees, payroll

Projects: projects (also has .list() with projects.get(id) returning tasks/time via /projects/:id/tasks)

CRM: crm.leads, crm.opportunities, crm.contacts

Modules: helpdesk.tickets, subscriptions, fleet, ecommerce, reports

Utilities: me(), search(), config, notifications, notes, webhooks, events

UI Components

import { Button, Card, CardContent, Input, Table, Badge, Spinner } from '@syncbooks/addon-sdk/components';

All components are styled to match SyncBooks' design system.

Scopes

Your addon can only access data for scopes granted during installation. Common scopes:

customers.read    customers.write    customers.delete
invoices.read     invoices.write     invoices.delete
products.read     products.write     products.delete
payments.read     payments.write
expenses.read     expenses.write
employees.read    payroll.read
accounts.read     reports.read

Configuration

import { configureClient } from '@syncbooks/addon-sdk';

// For local development
configureClient({
  baseUrl: 'http://localhost:5000/api/addon/v1',
  token: 'your-test-token', // optional override
});