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

ccam-sdk

v0.1.1

Published

Typed SDK for the Salesforce Commerce Cloud Account Manager REST API

Downloads

374

Readme

ccam-sdk

Typed TypeScript SDK for the Salesforce Commerce Cloud Account Manager REST API.

The AM API is largely undocumented. ccam-sdk is a first-class, documented TypeScript library covering every AM resource: users, organizations, API clients, roles, realms, permissions, service types, org configurations, and instances. It powers the @j-256/ccam CLI but is also designed for direct use in your own tooling.

  • TSDoc on every method
  • Typed sort enums (no stringly-typed sort params)
  • Structured error taxonomy (CcamError, CcamAuthError, CcamNotFoundError)
  • Spring Data REST pagination, normalized
  • Token caching with optional disk persistence callbacks

Installation

npm install ccam-sdk

Requires Node.js 22 or later.

Usage

import { CcamClient } from 'ccam-sdk';

const client = new CcamClient({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
  host: 'https://account.demandware.com' // optional, this is the default
});

// List users with pagination
const result = await client.users.list({ page: 0, size: 25 });
console.log(result.content);
console.log(`Page ${result.page.number + 1} of ${result.page.totalPages}`);

// Get user by login with expanded organizations
const user = await client.users.getByLogin('[email protected]', {
  expand: 'organizations'
});

// List roles with sorting
const roles = await client.roles.list({
  page: 0,
  size: 50,
  sort: { field: 'name', direction: 'asc' }
});

Authentication

OAuth2 with four grant types: client_credentials, password, authorization_code (with PKCE), and refresh_token. Two contexts: client-only (system) or client + user (user-scoped). Token caching is built in; supply persistence callbacks if you want refresh tokens to survive process restarts.

Credentials can come from explicit constructor options or environment variables (CCAM_CLIENT_ID, CCAM_CLIENT_SECRET, CCAM_USER, CCAM_USER_PASSWORD, CCAM_HOST).

Resources

| SDK property | Resource | |--------------|----------| | client.users | Users | | client.organizations | Organizations | | client.apiClients | API Clients | | client.roles | Roles | | client.realms | Realms | | client.permissions | Permissions | | client.serviceTypes | Service Types |

Most resources support paginated list, get(id), and resource-specific finders (findByOrg, findByRole, findByOrgAndRole, etc.). Users and API clients support full CRUD; organizations support update.

CLI

If you want a command-line tool instead of (or in addition to) the SDK, install @j-256/ccam:

npm install -g @j-256/ccam
ccam user list --org abc123 --format csv > users.csv

License

MIT