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

@ingram-cloud/sdk

v1.2.0

Published

Typed wire contract + management-plane client for the Ingram Cloud API: Zod schemas to validate request/response bodies, TypeScript types for the JSON you read back, SSE/webhook event types, and a typed REST client.

Readme

@ingram-cloud/sdk

The Ingram Cloud /v1 API wire contract in TypeScript — Zod request/response schemas + SSE/webhook event types + JSON response types — plus a typed management-plane client built on it. The schemas are hand-authored and are the source of truth for the wire: the API imports the same schemas to validate requests and to emit its OpenAPI document, and the IC* response types are inferred from them.

import { schemas } from "@ingram-cloud/sdk";

// Runtime-validate a request/response body against the contract.
const agent = schemas.AgentIn.parse(input);
import type { ICSmith, ICRun, ICAgent } from "@ingram-cloud/sdk/responses";

// Type a /v1 JSON response — no zod is pulled in.
function render(smith: ICSmith) {
	/* … */
}
import { IngramCloud } from "@ingram-cloud/sdk/client";

// Typed CRUD over the management plane (smiths, agents, tenant config, …).
const ic = new IngramCloud({ token: process.env.INGRAM_CLOUD_TOKEN! });
const smith = await ic.smiths.create({ external_id: "user-42" });

Exports

  • . — the schemas Zod map plus the SSE/webhook event types (EVENT_TYPES, webhookEvent, streamFrame, …).
  • ./schemas — just the Zod schemas map.
  • ./zod — the same schemas as individual named exports, one module per resource.
  • ./responses — the IC* TypeScript types for the JSON response bodies. Zod-free; import type these to stay dependency-light.
  • ./clientIngramCloud, the typed management-plane REST client. Method inputs are z.input-inferred from the same schemas the API validates with, so the client can't drift from the contract. Zod-free at runtime (type-only imports; transport is the global fetch). Auth is a pluggable token seam: a static bearer or a per-request minting function; smith-scoped calls made with a tenant token pass { smith } (the IC-Smith-Id header). Non-2xx throws ICError { status, code, requestId }.

The OpenAPI document is served by the API itself (/openapi.json), emitted from these schemas — it is no longer shipped as a file in this package.

The client is the management plane only. The data plane stays on industry standards: chat rides the OpenAI-compatible surface — use @ingram-cloud/ai-sdk and the standard @ai-sdk/* types for that. The native run stream is exposed raw (smiths.runs.stream returns the SSE Response unconsumed).

Ships compiled ESM (dist/) alongside the TypeScript source (ts/). Node and bundlers load dist/ — no transpile config needed. Types resolve straight to the source, and Bun (the bun export condition) runs the source directly.

Coverage

Every resource's request bodies and non-streaming JSON responses are typed as precise Zod (one module per resource under ./zod), and the IC* types are inferred from them. The streaming/union endpoints (/runs stream, /chat/completions, /responses — a stream or JSON from one handler), deployment webhook acks, and the OAuth redirect are not expressible as a single response schema, so they're not in the typed surface; the {v:1} webhook/feed envelope and the SSE run-stream frames are the hand-authored ./events half.

The OpenAI-compatible stream chunks themselves are standard — use the @ai-sdk/* types rather than redefining them here.