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

wecom-smartsheet-orm

v0.1.0

Published

A orm like wrapper for WeCom SmartSheet

Downloads

9

Readme

WeCom Smartsheet ORM

A lightweight, TypeScript-based ORM for WeChat Work (WeCom) Smartsheets, providing an intuitive interface for querying data with built-in metadata caching.

Installation

npm install wecom-smartsheet-orm

Quick Start

import { WeComSheetOrm } from "wecom-smartsheet-orm";

const orm = new WeComSheetOrm({
    corpId: process.env.CORPID!,
    agentId: process.env.AGENTID!,
    secret: process.env.WX_SECRET!,
    docId: process.env.DOCID!,
});

async function run() {
    // 1. Get available table titles
    const tables = await orm.getTables();
    const tableName = tables[0];

    if (tableName) {
        // 2. Get field names for a specific table
        const fields = await orm.getFields(tableName);

        // 3. Query records with sorting and limits
        const records = await orm.query(tableName, {
            fieldNames: fields,
            sortBy: { field_title: "name", desc: true },
            limit: 5
        });
        
        console.log(records);
    }
}

API Reference

WeComSheetOrm

constructor(credentials: WeComOrmCredentials)

Initializes the database instance.

  • corpId: WeCom Corporation ID.
  • agentId: WeCom Application Agent ID.
  • secret: Application Secret.
  • docId: The unique ID of the Smartsheet document.

query(tableName: string, params: QueryParams): Promise<any[]>

Fetches and maps records from the specified table.

QueryParams: | Property | Type | Description | | :--- | :--- | :--- | | fieldNames | string[] | Optional. Specific fields to retrieve. | | sortBy | { field_title: string, desc: boolean } | Optional. Sorting configuration. | | limit | number | Optional. Maximum number of records to return. |

Internal Behavior

  • Metadata Caching: The library caches sheet_id and field_id mappings automatically to reduce API overhead during repetitive queries.
  • Data Mapping: Records are automatically transformed from the WeCom internal format into standard JavaScript objects using the field titles as keys.