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

@lumbu/client

v0.3.1

Published

TypeScript SDK for the [Lumbu](https://lumbu.pt) salon management API.

Readme

@lumbu/client

TypeScript SDK for the Lumbu salon management API.

Install

npm install @lumbu/client

Quick Start

import { createLumbuClient } from "@lumbu/client";

const client = createLumbuClient({
  baseUrl: "https://api.lumbu.pt",
  token: "lmb_your_api_key",
});

// Check available slots
const slots = await client.booking.getSlots({
  service_id: "svc-1",
  from: "2026-04-15",
  days: 7,
});

// Book an appointment
const result = await client.booking.book({
  service_id: "svc-1",
  staff_id: "staff-1",
  start_at: "2026-04-15T10:00:00Z",
  customer_name: "Maria Silva",
  customer_email: "[email protected]",
});

Core Features

Every client instance includes these endpoints -- no configuration needed:

| Endpoint | Description | |---|---| | client.booking | Slot availability, create/cancel/reschedule bookings | | client.appointments | List and filter appointments | | client.services | Service catalog | | client.serviceCategories | Service categories with nested services | | client.staff | Staff member listing | | client.staffHours | Working hours per staff/day | | client.staffAvailability | Availability blocks for date ranges | | client.staffTimeOff | Time-off entries | | client.teamMembers | Team membership | | client.checkout | Stripe checkout session creation | | client.orders | Order lookup | | client.customer | Customer appointment history | | client.locations | Location listing | | client.tenant | Tenant metadata, branding, locale | | client.auth | Sign-in, sign-up, magic link, token refresh | | client.onboarding | Setup validation helpers |

Plugins

Optional features are enabled per tenant via the plugins config:

const client = createLumbuClient({
  baseUrl: "https://api.lumbu.pt",
  token: "lmb_your_api_key",
  plugins: ["gift-cards", "products"],
});

// These are now available:
await client.giftCards.validate({ code: "GIFT-ABC" });
await client.products.list({ active: true });

// This would be a TypeScript error:
// client.waitlist  <-- property does not exist

Available Plugins

| Plugin | Endpoints | Description | |---|---|---| | gift-cards | client.giftCards | Validate and apply gift cards | | referral | client.referral | Validate referral codes | | waitlist | client.waitlist | Waitlist management | | products | client.products, client.productCategories | Product catalog and categories | | feedback | client.appointmentFeedback | Post-appointment ratings | | webhooks | client.webhooks | Webhook subscription management |

Auto-Discover Plugins

If you don't know which plugins the tenant has enabled, use the async factory:

import { createLumbuClientAsync } from "@lumbu/client";

const client = await createLumbuClientAsync({
  baseUrl: "https://api.lumbu.pt",
  token: "lmb_your_api_key",
});

// Plugin properties may be undefined -- narrow before use
if (client.giftCards) {
  await client.giftCards.validate({ code: "GIFT-ABC" });
}

This fetches the tenant's enabled_plugins from the API and builds the client accordingly.

Onboarding

Verify a tenant is properly set up for salon operations:

const status = await client.onboarding.checkSetup();

if (!status.ready) {
  for (const [name, check] of Object.entries(status.checks)) {
    if (!check.ok) {
      console.log(`${name}: ${check.message}`);
    }
  }
}

The checkSetup() method validates 10 aspects of tenant configuration:

| Check | Passes when | |---|---| | services | At least 1 active, bookable service | | staff | At least 1 active staff member | | staffHours | Staff working hours configured | | staffServiceMapping | Staff linked to services | | locations | At least 1 active location | | businessHours | Business hours set (not all closed) | | payments | Stripe connected | | branding | Logo and brand colors set | | locale | Language configuration present | | notificationTemplates | Booking email templates ready |

Pagination

List endpoints return paginated responses. Use listAll() to iterate through all pages:

for await (const page of client.appointments.listAll({ status: "confirmed" })) {
  for (const appointment of page.data) {
    console.log(appointment.id, appointment.start_at);
  }
}

Error Handling

import { LumbuApiError } from "@lumbu/client";

try {
  await client.booking.book(params);
} catch (err) {
  if (err instanceof LumbuApiError) {
    if (err.isConflict) console.log("Slot already taken");
    if (err.isUnauthorized) console.log("Invalid API key");
    if (err.isRateLimited) console.log("Too many requests");
  }
}

Custom Fetch

Pass a custom fetch implementation for edge runtimes or testing:

const client = createLumbuClient({
  baseUrl: "https://api.lumbu.pt",
  token: "lmb_key",
  fetch: myCustomFetch,
});

Multilingual Support

Lumbu supports PT, EN, and ES. The tenant's locale configuration is available via:

const tenant = await client.tenant.get();
console.log(tenant.locale.default);    // "pt"
console.log(tenant.locale.supported);  // ["pt", "en", "es"]

Quickstart Guides