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

@finbaze/platform-sdk

v0.1.3

Published

FinBaze platform SDK for the v2 GraphQL API.

Readme

@finbaze/platform-sdk

Stripe-style TypeScript SDK for the FinBaze v2 GraphQL API. Works in Node 18+ and modern browsers.

Install

npm install @finbaze/platform-sdk

Authenticate

Access token

import Finbaze from "@finbaze/platform-sdk";

const finbaze = new Finbaze({
  baseUrl: "https://api.platform.finbaze.com", // optional; this is the default
  accessToken: process.env.FINBAZE_ACCESS_TOKEN,
});

API credentials (client_credentials)

Create credentials in the FinBaze app:

  • Profile (Scale plan): Settings → API access — requires profileId
  • Bookkeeper: Settings → API credentials — omit profileId for a firm-scoped token (create clients), or pass an attached client profileId to act on that profile
// Profile credential
const finbaze = new Finbaze({
  clientId: process.env.FINBAZE_CLIENT_ID,
  clientSecret: process.env.FINBAZE_CLIENT_SECRET,
  profileId: process.env.FINBAZE_PROFILE_ID,
});

// Bookkeeper credential (firm-scoped — can create client profiles)
const firm = new Finbaze({
  clientId: process.env.FINBAZE_CLIENT_ID,
  clientSecret: process.env.FINBAZE_CLIENT_SECRET,
});

const profile = await firm.bookkeepers.clients.create(bookkeeperId, {
  legalName: "Acme BV",
  registrationCountry: "NL",
  registrationNumber: "12345678",
  currency: "EUR",
  language: "nl",
  timezone: "Europe/Amsterdam",
  units: "metric",
});

Resource examples

const invoices = await finbaze.profiles.salesInvoices.list(profileId, {
  limit: 50,
});

for (const invoice of invoices.data) {
  console.log(invoice.number);
}

if (invoices.has_more && invoices.next_cursor) {
  const next = await finbaze.profiles.salesInvoices.list(profileId, {
    limit: 50,
    starting_after: invoices.next_cursor,
  });
}

await invoices.autoPagingEach(async (invoice) => {
  console.log(invoice.id);
});

const created = await finbaze.profiles.salesInvoices.create(profileId, {
  /* CreateSalesInvoiceInput */
});

await finbaze.profiles.salesInvoices.update(created.id, { reference: "PO-1" });
await finbaze.profiles.salesInvoices.retrieve(created.id);
await finbaze.profiles.salesInvoices.close(created.id);

Process documents

Upload files into a profile’s process-document inbox (queued for AI processing):

import { readFile } from "node:fs/promises";

const [doc] = await finbaze.profiles.processDocuments.create(profileId, {
  filename: "invoice.pdf",
  mimeType: "application/pdf",
  data: await readFile("./invoice.pdf"),
});

// Or create a purchase invoice directly from a file:
await finbaze.profiles.processDocuments.createForPurchaseInvoice(profileId, {
  filename: "invoice.pdf",
  mimeType: "application/pdf",
  data: await readFile("./invoice.pdf"),
});

// Or match an unprocessed bank payment:
await finbaze.profiles.processDocuments.createForPayment(paymentId, {
  filename: "receipt.pdf",
  mimeType: "application/pdf",
  data: await readFile("./receipt.pdf"),
});

API credentials via SDK

const cred = await finbaze.profiles.apiCredentials.create(profileId, {
  name: "CI",
});
// cred.clientId / cred.clientSecret (secret shown once)

await finbaze.bookkeepers.apiCredentials.create(bookkeeperId, {
  name: "Firm integration",
});

Raw GraphQL

import { graphql } from "@finbaze/platform-sdk/graphql";

const MyQuery = graphql(`
  query MyQuery($id: ID!) {
    salesInvoice(id: $id) {
      id
      number
    }
  }
`);

const data = await finbaze.graphql.request(MyQuery, { id: "..." });
// or: finbaze.graphql.query / .mutate with a string or TypedDocumentNode

Pagination

List methods return:

{
  object: "list",
  data: T[],
  has_more: boolean,
  next_cursor: string | null,
}

Use starting_after / ending_before (mapped to GraphQL cursors) and autoPagingEach / autoPagingToArray.