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

@catandbox/schrodinger-contracts

v0.1.34

Published

TypeScript contracts and API client for [Schrodinger](https://github.com/yetone/schrodinger) — an AI-powered headless helpdesk built on Cloudflare Workers.

Readme

@catandbox/schrodinger-contracts

TypeScript contracts and API client for Schrodinger — an AI-powered headless helpdesk built on Cloudflare Workers.

This package contains:

  • Generated TypeScript types from the OpenAPI spec
  • SchrodingerApiClient — low-level generated HTTP client
  • SupportApiClient — high-level fetch-based client for the customer-facing portal API
  • All shared interfaces used by the web adapter and any custom integrations

Installation

npm install @catandbox/schrodinger-contracts

Usage

SupportApiClient

The primary client for interacting with the Schrodinger support portal API from a browser or edge runtime. No framework dependencies — works anywhere fetch is available.

import { SupportApiClient } from "@catandbox/schrodinger-contracts";

const client = new SupportApiClient({
  basePath: "/support/api",       // path prefix where the proxy is mounted
  // baseUrl: "https://...",      // explicit base URL (optional)
  // headers: { "X-My-Header": "value" }, // static headers
  // getHeaders: async () => ({ ... }),   // dynamic headers (e.g. auth tokens)
});

// List tickets
const { items } = await client.listTickets({ status: "Active" });

// Get a single ticket with its messages
const { ticket, messages, events } = await client.getTicket(ticketId);

// Create a new ticket
const ticket = await client.createTicket({
  title: "Something isn't working",
  body: "Here are the details...",
  categoryId: "cat_123",       // optional
});

// Reply to a ticket
const message = await client.createReply(ticketId, { body: "Thank you!" });

// Close / reopen
await client.closeTicket(ticketId);
await client.reopenTicket(ticketId);

// Rate a ticket or a message
await client.rateTicket(ticketId, { stars: 5, comment: "Great support!" });
await client.rateMessage(messageId, { stars: 4 });

File uploads

// 1. Initialise uploads
const { uploads } = await client.initUploads({
  ticketId,
  files: [{ filename: "screenshot.png", mime: "image/png", sizeBytes: 12345, sha256: "..." }],
});

// 2. PUT each file to its pre-signed URL
await client.putUpload(uploads[0].putUrl, file, (loaded, total) => {
  console.log(`${Math.round((loaded / total) * 100)}%`);
});

// 3. Confirm completion
await client.completeUploads({
  ticketId,
  uploads: [{ uploadId: uploads[0].uploadId, sizeBytes: file.size, sha256: "..." }],
  messageId,  // optional — attach to an existing message
});

SupportApiError

import { SupportApiClient, SupportApiError } from "@catandbox/schrodinger-contracts";

try {
  await client.createTicket({ title: "...", body: "..." });
} catch (err) {
  if (err instanceof SupportApiError) {
    console.error(err.status, err.code, err.message, err.requestId);
  }
}

Types

All types are exported from the package root:

| Type | Description | |---|---| | SupportClientOptions | Constructor options for SupportApiClient | | ClientHeadersProvider | Async function returning dynamic request headers | | ListTicketsParams | Parameters for listTickets() | | SupportCategory | A support category | | TicketDetailData | Return type of getTicket() — ticket + messages + events | | UploadInputFile | File descriptor for initUploads() | | UploadInitResult | Return type of initUploads() | | UploadCompleteInput | Input for completeUploads() | | Ticket, Message, Alias | Core domain types (generated from OpenAPI) | | TicketStatus | "Active" \| "InProgress" \| "AwaitingResponse" \| "Closed" \| "Archived" |

OpenAPI spec

The raw OpenAPI specification is included in the package at openapi/schrodinger.openapi.yaml and can be used to generate clients in other languages.

License

MIT