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

onlinescoutmanager

v1.0.1

Published

Modern TypeScript client for the Online Scout Manager (OSM) API

Readme

onlinescoutmanager

Modern TypeScript client for the Online Scout Manager (OSM) API.

  • TypeScript-first — full type definitions for all API responses
  • Zero dependencies — uses native fetch (Node 18+)
  • Instance-based — no global state, supports multiple clients
  • ESM + CJS — works everywhere

Install

npm install onlinescoutmanager

Quick Start

import { OSMClient } from "onlinescoutmanager";

const osm = new OSMClient({
  apiId: "your-api-id", // Obtain from OSM Support
  token: "your-api-token",
});

// Authorize with your OSM credentials
await osm.authorize("[email protected]", "your-password");

// Now use any resource
const members = await osm.members.list("sectionId", "termId");

API Reference

new OSMClient(options)

| Option | Type | Required | Description | | --------- | -------- | -------- | ------------------------------------ | | apiId | string | ✅ | Your OSM API ID | | token | string | ✅ | Your OSM API token | | baseUrl | string | — | Override the API base URL (advanced) |

osm.authorize(email, password)

Authenticates with OSM. Must be called before any other API method.

await osm.authorize("[email protected]", "password");
console.log(osm.isAuthorized); // true

Members

// List all members in a section/term
const members = await osm.members.list(sectionId, termId);

// Get individual member details
const member = await osm.members.get(sectionId, scoutId);

// Get member transfers
const transfers = await osm.members.getTransfers(sectionId);

// Get patrols with members
const patrols = await osm.members.getPatrols(sectionId, termId);

// Get census details
const census = await osm.members.getCensus(sectionId, termId);

// Get flexi-records (pass true for archived)
const records = await osm.members.getFlexiRecords(sectionId);

// Get deletable members
const deletable = await osm.members.getDeletable(sectionId);

Attendance

// Get attendance records
const attendance = await osm.attendance.get(sectionId, termId, "cubs");

// Get badge requirements for a meeting date
const badges = await osm.attendance.getBadgeRequirements(sectionId, "cubs", "2026-01-14");

// Update attendance
await osm.attendance.update({
  sectionId: "100",
  termId: "200",
  scoutIds: [3008213],
  selectedDate: "2026-01-14",
  present: "Yes",
  section: "cubs",
});

Programme

// Get programme summary for a term
const summary = await osm.programme.getSummary(sectionId, termId);

// Get detailed programme for a meeting
const details = await osm.programme.getDetails(sectionId, eveningId);

// Get parent rota members
const rota = await osm.programme.getParentRotaMembers(sectionId, eveningId);

// Get programme attachments
const attachments = await osm.programme.getAttachments(sectionId, eveningId);

// Update a meeting
await osm.programme.updateMeeting(sectionId, eveningId, { title: "New Title" });

Sections & Terms

const sections = await osm.sections.list();
const terms = await osm.sections.getTerms();

Badges

const cloud = await osm.badges.getTagCloud(sectionId, termId, "cubs");

Dashboard

const dashboard = await osm.dashboard.getNextThings(sectionId, termId, "cubs");

Custom Data

// Get custom data for a member
const data = await osm.customData.get(sectionId, memberId);

// Update custom data
await osm.customData.update(sectionId, memberId, groupId, {
  firstname: "Updated",
});

Email

// Get email contacts
const contacts = await osm.email.getContacts(sectionId);

// Send an email template
await osm.email.sendTemplate(sectionId, "Subject", emailsObj, editsObj);

Error Handling

import { OSMError, OSMAuthError } from "onlinescoutmanager";

try {
  await osm.members.list("1", "2");
} catch (err) {
  if (err instanceof OSMAuthError) {
    // Not authorized — call osm.authorize() first
  }
  if (err instanceof OSMError) {
    console.error(err.status); // HTTP status code
    console.error(err.body); // Raw response body
  }
}

Requirements

  • Node.js 18+

License

ISC © Daniel J. Pomfret