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

@sf-explorer/salesforce-object-ssot-reference

v1.0.0

Published

Single Source of Truth (SSOT) Salesforce object reference from Data Model Object (DMO) APIs

Downloads

5

Readme

Salesforce Object SSOT Reference

npm version license

Single Source of Truth (SSOT) Salesforce object reference from Data Model Object (DMO) APIs.

This package provides programmatic access to Salesforce object schemas obtained directly from the DMO APIs, representing the authoritative data model structure.

🎯 What Makes This Different?

While @sf-explorer/salesforce-object-reference contains data scraped from Salesforce documentation, this package contains data obtained directly from Salesforce DMO (Data Model Object) APIs, making it the Single Source of Truth for Salesforce data models.

📦 Installation

npm install @sf-explorer/salesforce-object-ssot-reference

🚀 Quick Start

Basic Usage

import {
  loadIndex,
  getObject,
  searchObjects,
  getAllObjectNames,
  getObjectDescription,
  searchObjectsByDescription
} from '@sf-explorer/salesforce-object-ssot-reference';

// Load index to see what's available
const index = await loadIndex();
console.log(`${index.totalObjects} SSOT objects available`);

// Get a specific object (full details with all fields)
const account = await getObject('Account');
if (account) {
  console.log(account.name);
  console.log(account.description);
  console.log(Object.keys(account.properties).length + ' fields');
}

// Get just the description and field count (much faster!)
const accountDesc = await getObjectDescription('Account');
if (accountDesc) {
  console.log(accountDesc.label);        // "Account"
  console.log(accountDesc.description);  // Object description
  console.log(accountDesc.fieldCount);   // Number of fields
}

// Search for objects by name
const results = await searchObjects(/account/i);
console.log(`Found ${results.length} objects`);

// Search by description content
const invoiceObjects = await searchObjectsByDescription('invoice');
invoiceObjects.forEach(obj => {
  console.log(`${obj.name} - ${obj.fieldCount} fields`);
});

// Get all object names
const allNames = await getAllObjectNames();
console.log('Available objects:', allNames);

📂 Data Structure

src/doc/
├── index.json        # Master index
└── objects/          # Individual object files
    ├── A/
    │   ├── Account.json
    │   ├── Applicant.json
    │   └── ...
    ├── B/
    └── ...

📚 API Reference

Core Functions

loadIndex(useCache?: boolean): Promise<DocumentIndex | null>

Load the master index containing all SSOT objects from DMO APIs.

getObject(objectName: string, useCache?: boolean): Promise<SalesforceObject | null>

Get detailed information about a specific Salesforce SSOT object.

searchObjects(pattern: string | RegExp, useCache?: boolean): Promise<Array<{name, description, fieldCount}>>

Search for SSOT objects by name pattern.

getAllObjectNames(useCache?: boolean): Promise<string[]>

Get list of all available SSOT object names.

Lightweight Descriptions API

loadAllDescriptions(useCache?: boolean): Promise<Record<string, DescriptionInfo> | null>

Load descriptions and field counts for all SSOT objects at once.

getObjectDescription(objectName: string, useCache?: boolean): Promise<DescriptionInfo | null>

Get description and field count for a specific SSOT object.

searchObjectsByDescription(pattern: string | RegExp, useCache?: boolean): Promise<DescriptionSearchResult[]>

Search for SSOT objects by description content.

loadAllObjects(useCache?: boolean): Promise<SalesforceObjectCollection>

Load all SSOT objects with full details.

clearCache(): void

Clear all cached data.

🌐 Browser Support

Works in all modern browsers when bundled with Vite, Webpack, Rollup, or other modern bundlers.

// Works perfectly in the browser after bundling!
import { getObjectDescription } from '@sf-explorer/salesforce-object-ssot-reference';

const desc = await getObjectDescription('Account');

🔄 Generating Fresh Data

To fetch fresh SSOT data from DMO APIs:

npm run fetch:dmo

🤝 Related Packages

📄 License

MIT License - see LICENSE

📖 Links


Note: This package contains data from Salesforce DMO APIs. It is not officially affiliated with or endorsed by Salesforce.