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

@commenda-integrations/api

v4.0.1

Published

Official TypeScript SDK for the Commenda Integrations V4 API: read and write unified accounting, payments, e-commerce, and CRM data across every supported platform.

Downloads

116

Readme

@commenda-integrations/api

Official TypeScript SDK for the Commenda Integrations V4 API. Read and write unified accounting, payments, e-commerce, and CRM data across every supported platform through a single API.

Installation

npm install @commenda-integrations/api

Quick start

import { CommendaIntegrations } from "@commenda-integrations/api";

const commenda = new CommendaIntegrations({ apiKey: process.env.COMMENDA_API_KEY! });

// Read a data model (company-scoped): list, filter, expand relations
const {
  data: invoices,
  total_count,
  next,
} = await commenda.dataModels.invoices.list(companyId, {
  "status[eq]": "PAID",
  "posted_date[gte]": "2024-01-01",
  limit: 50,
  expand: "line_items",
});

// Get one record
const { data: invoice } = await commenda.dataModels.invoices.get(companyId, invoiceId);

// Create / update (proxied to the connected platform)
await commenda.dataModels.invoices.create(companyId, {
  data: {
    /* fields */
  },
});

// Trigger a sync
await commenda.core.syncs.initSync(companyId, { fullSync: true });

Authentication

Requests are authenticated with your API key, sent in the api_key header. Pass it once when constructing the client:

const commenda = new CommendaIntegrations({ apiKey: "your-api-key" });

Environments

The client targets production (https://api.integrations.commenda.io) by default; just pass your apiKey. Pass baseUrl to override the host if you need to.

Filtering, sorting & pagination

List endpoints accept per-field filters using operator keys, plus limit and cursor pagination:

await commenda.dataModels.invoices.list(companyId, {
  "status[eq]": "PAID", // exact match
  "currency_id[in]": "USD,EUR", // one of
  "total_amount[gte]": "100", // range (numeric / date fields)
  "sort[posted_date]": "desc",
  limit: 100,
});

Iterate every page with the pagination helpers:

import { paginate } from "@commenda-integrations/api";

for await (const invoice of paginate(next => commenda.dataModels.invoices.list(companyId, { limit: 100, next }))) {
  // ...
}

Responses & errors

Methods return the response payload directly — the { data, request_id } envelope is unwrapped for you (list methods return { data, total_count, next, prev }). Non-2xx responses throw a CommendaApiError:

import { CommendaApiError } from "@commenda-integrations/api";

try {
  await commenda.dataModels.invoices.get(companyId, invoiceId);
} catch (err) {
  if (err instanceof CommendaApiError) {
    console.error(err.statusCode, err.message, err.errorCode, err.requestId);
  }
}

Resources

Data models live under commenda.dataModels.*; platform & management resources under commenda.core.*. TypeScript autocomplete surfaces every resource and method.

Data modelscommenda.dataModels.<model>, each supporting list(companyId, query?), get(companyId, id, query?), and (where writable) create / update. TypeScript autocomplete lists every model; the full set:

accounts, balances, balanceSheets, bankAccounts, bankTransactions,
billCreditNotes, billPayments, bills, cashFlowStatements, cashRefunds,
cashSales, companies, companyInfo, contacts, currencies, disputes, documents,
estimates, expenses, goodsReceiptNotes, incomeStatements, inventory,
invoiceCreditNotes, invoicePayments, invoices, items, journalEntries, leads,
lineItem, notes, opportunities, orders, owners, payouts, pipelines, projects,
purchaseOrders, salesOrders, subscriptions, tasks, taxRates, trackingCategories,
transactions

Core (platform & management)commenda.core.<resource>:

  • companies — connection management, distinct from dataModels.companies (CRM records): list, get, update, updateSyncConfig, resetSyncConfig, resetSingleModelConfig, disconnect, archive
  • inviteLinkscreate, list, getByInviteLinkUuid, updateByInviteLinkUuid, delete
  • syncsinitSync, list · syncActions, jobs
  • integrations, passthrough, webhookConfigs, webhookCredentials, webhookLogs, members, organization, disconnectRequests, stats, apiLogs

Versioning & breaking changes

Semantic versioning. The major version tracks the Commenda Integrations API major (4.x → V4): breaking API-surface changes ship in a new major; additive changes are minor/patch.