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

@msgcore/sdk

v1.1.0

Published

Official TypeScript SDK for MsgCore universal messaging gateway

Readme

@msgcore/sdk

TypeScript SDK for MsgCore - Universal messaging gateway API.

Auto-generated from backend contracts - Do not edit manually

Installation

npm install @msgcore/sdk

Quick Start

import { MsgCore } from '@msgcore/sdk';

const msc = new MsgCore({
  apiUrl: 'https://api.msgcore.dev',
  apiKey: 'msc_live_your_api_key_here',
  defaultProject: 'my-project', // optional: sets default project for all operations
});

// Send a message
const result = await msc.messages.send({
  targets: [{ platformId: 'platform-id', type: 'user', id: '123' }],
  content: { text: 'Hello from MsgCore!' },
});

Features

  • Full type safety - TypeScript types auto-generated from backend
  • Perfect sync - Always matches backend API contracts
  • Zero duplication - Single source of truth from contracts
  • Error handling - Built-in error types and authentication handling
  • Rate limiting - Automatic rate limit detection

API Reference

Analysis / Entities

List all extracted entities for a project with pagination and sorting

// Usage example
await msc.analysisEntities.list();

Get a specific extracted entity by ID

// Usage example
await msc.analysisEntities.get('id');

Analysis / Models

List available LLM models from OpenRouter for analysis

// Get all supported models
await msc.analysisModels.list();

Analysis / Profiles

Create a new analysis profile (versioned pipeline)

// Create an analysis profile
await msc.analysisProfiles.create(data);

List all analysis profiles for a project

// List all profiles
await msc.analysisProfiles.list();

Analysis / Runs

Execute an analysis run with a profile

// Run analysis on specific chats
await msc.analysisRuns.create(data);

Get analysis run statistics for a project

// Get run statistics
await msc.analysisRuns.stats();

Analysis / Schemas

Create a new entity schema for custom extraction

// Create a sentiment analysis schema
await msc.analysisSchemas.create(data);

List all entity schemas for a project

// List all entity schemas
await msc.analysisSchemas.list();

ApiKeys

Generate a new API key

// Create messaging API key
await msc.apikeys.create(data);

List all API keys for project

// List all API keys
await msc.apikeys.list();

Auth

Create a new user account (first user becomes admin)

// Create first admin user
await msc.auth.signup(data);

Login with email and password

// Login with email and password
await msc.auth.login(data);

Chats

List all chats for a project with filtering and pagination

// Usage example
await msc.chats.list(data);

Get details of a specific chat

// Usage example
await msc.chats.get('chatId');

Identities

Create a new identity with platform aliases

// Create identity with Discord and Telegram aliases
await msc.identities.create(data);

List all identities for a project

// List all identities
await msc.identities.list();

Members

List all members of a project

// List all project members
await msc.members.list();

Add a member to a project

// Add a member with admin role
await msc.members.add(data);

Messages

List messages for a project (sent and received)

// Get all messages (sent + received)
await msc.messages.list(data);

Get message statistics for a project

// Get message statistics
await msc.messages.stats();

Platform Logs

List platform processing logs for a project

// List recent platform logs
await msc.platformLogs.list();

List logs for a specific platform configuration

// List logs for specific platform
await msc.platformLogs.get('platformId');

Platforms

Configure a new platform integration

// Add Discord bot
await msc.platforms.create(data);

List configured platforms for project

// List all platforms
await msc.platforms.list();

Projects

Create a new project

// Create a simple project
await msc.projects.create(data);

List all projects

// List all projects
await msc.projects.list();

Webhooks

Create a new webhook for event notifications

// Create webhook for all message events
await msc.webhooks.create(data);

List all webhooks for a project

// List all webhooks
await msc.webhooks.list();

Authentication

API Key (Recommended)

const msc = new MsgCore({
  apiUrl: 'https://api.msgcore.dev',
  apiKey: 'msc_live_your_api_key_here',
  defaultProject: 'my-project', // optional
});

JWT Token

const msc = new MsgCore({
  apiUrl: 'https://api.msgcore.dev',
  jwtToken: 'your-jwt-token',
  defaultProject: 'my-project', // optional
});

Error Handling

import { MsgCoreError, AuthenticationError, RateLimitError } from '@msgcore/sdk';

try {
  await msc.messages.send({ ... });
} catch (error) {
  if (error instanceof AuthenticationError) {
    console.error('Invalid credentials');
  } else if (error instanceof RateLimitError) {
    console.error('Rate limit exceeded');
  } else if (error instanceof MsgCoreError) {
    console.error(`API error: ${error.message}`);
  }
}

Links

License

MIT