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

@heroku/types

v3.0.0-beta.0

Published

Generates TypeScript types and a runtime route registry from the Heroku API hyperschema

Maintainers

srishtigautamsrishtigautamaklimaiteaklimaitejsullivandigsjsullivandigsjulianduque-sfdcjulianduque-sfdccwallsfcwallsfijanakijanakjeffrey.estradajeffrey.estradadlira-sfdlira-sfntonollierntonollierdaebumleedaebumleemttrmttrelearyelearysalesforce-releasessalesforce-releasesanujpandey001anujpandey001kbaird-sfkbaird-sfcbaxtersfcbaxtersfryoneyamaryoneyamaadirasanamadirasanamnrisaronrisarocmarcojoscmarcojosmgates-salesforcemgates-salesforceademusoyoademusoyoelzoonaelzoonadhagberg-sfdhagberg-sfbencdentonbencdentonmarcelsfdcmarcelsfdcccaseyccaseysuppadasuppadadiana.doherty.sfdcdiana.doherty.sfdchritchhritchrsoerensenrsoerensenjasoncummings-herokujasoncummings-herokubrock-salesforcebrock-salesforcetkoh-sfdctkoh-sfdcgnettergnettercoreypurcell_salesforcecoreypurcell_salesforceswapnilghoseswapnilghosestessema-sfcstessema-sfcbrittany.jonesbrittany.jonesrstiltonsfrstiltonsfnilamuthunilamuthusghaffarsghaffarcdwort-sfdccdwort-sfdcaaronromeosfdcaaronromeosfdckpremkumarkpremkumarrchandarchandaxx-sfdc-npmxx-sfdc-npmcv88cv88ekozilforceekozilforceumarsfdcumarsfdcndavidson-sfndavidson-sfmingzhi-liu1258mingzhi-liu1258angelcampbellangelcampbellmandeepsfmandeepsfyann_ckyann_cksudarshanhiraysudarshanhirayalex_herokualex_herokusbosio_sfsbosio_sfsarahoh2468sarahoh2468tlowrimoretlowrimoreptemporiniptemporinitcareysmith-sfdctcareysmith-sfdcrobinson.mrobinson.mdkabanov1dkabanov1rdagg-herordagg-herok80bowmank80bowmansheax0rsheax0rdpark.herokudpark.herokudaniel.brightdaniel.brightjdowningjdowningabhinavkoulabhinavkoulviniljainviniljaineblackeblackk.plentyk.plentyapadalaapadalalsorstokkelsorstokkercrossrcrosskdreyerorenkdreyerorendhammer25dhammer25dougmcinnes-sfdcdougmcinnes-sfdcchap-herokuchap-herokumichellejhlimmichellejhlimmbuschherokumbuschherokubeckychenbeckychensmrutisamantasmrutisamantaapoorvasrivapoorvasrivhsophie-sfhsophie-sfp.shreyap.shreyasai_harshitha_neelasai_harshitha_neelanlanattanlanattadreichenbergdreichenbergmarsmarsheroku-front-endheroku-front-endrichatiwaririchatiwariwchrisjohnsonwchrisjohnsonthe7okathe7okasimonebonettisfitasimonebonettisfitalucaszhoulucaszhoupsalimpsalimtaylor.jonestaylor.jonesangelayoungangelayoungktsforcektsforcekerry-bennettkerry-bennettgkomminenigkomminenisripad.kulkarnisripad.kulkarnismukusmukudgallegossfdcdgallegossfdcrishabh.wasonrishabh.wasonsarassassinsarassassinarajaarajav.anandv.anandlmckenzielmckenziejordaneekeyjordaneekeydaigo-herokudaigo-herokumimenmimenjwadsworthsfjwadsworthsfpfuentepfuentebleongbleongpaguilarpaguilarzli-sfzli-sfsruthichsruthichjesse.brown-sfjesse.brown-sftij005tij005tholschuh-salesforcetholschuh-salesforcemohammadfazil.shaikmohammadfazil.shaikflavortown_towerflavortown_towerpaulyflemingpaulyflemingricardoherokuricardoherokudasofieidasofieikumardinesh2kumardinesh2sherry.yaosherry.yaotholmes-sfdctholmes-sfdcpalakjeetkaur12palakjeetkaur12sfjonnpmsfjonnpmvjohnevjohnejinjutha.hancockjinjutha.hancockmgauger_herokumgauger_herokutdhayanandatdhayanandakharlowsfkharlowsfjhili!16jhili!16slizcoslizcoyasuhiro-herokuyasuhiro-herokuanna-crossanna-crosscromwellryan-sfcromwellryan-sfhyunwookleehyunwookleetm-sftm-sfnkoziuknkoziukherokucodyherokucodydodom-sfdcdodom-sfdccsinghaus-sfdccsinghaus-sfdcjw-sfdcjw-sfdcjlopezdanjlopezdangsinghsfdcgsinghsfdcnrenkenrenkesalesforcegenesalesforcegenebsonntag-salesforcebsonntag-salesforcechetankd10chetankd10heroku-johnnyheroku-johnnyemilyhuang-herokuemilyhuang-herokumichael.malavemichael.malaveerika.wallaceerika.wallacevalluri056valluri056hk-ankitkumarhk-ankitkumarkaruna123karuna123mjoherson-sfmjoherson-sfskediyal-sfskediyal-sf

Keywords

Readme

@heroku/types

This package provides TypeScript types and a runtime route registry, generated from the Heroku API Hyperschema. Generated files are organized by API variant. For example, the 3.sdk variant outputs to dist/3.sdk/types.d.ts and dist/3.sdk/routes.js.

NOTE: This package currently provides two variants: 3.sdk (Heroku Platform API, fully generated from the hyperschema) and data (Heroku's data services control plane / Shogun, where types are generated from spec-captured payloads against a hand-curated resource grouping).

Installation

npm install @heroku/types

Types are available under the variant subpath:

import type { Account, Addon } from '@heroku/types/3.sdk'

A runtime route registry is also available, providing method, path, and request-body metadata for each API endpoint:

import { app, dyno } from '@heroku/types/3.sdk/routes'

console.log(app.create) // { method: 'POST', path: '/apps', hasRequestBody: true }
console.log(dyno.list)  // { method: 'GET', path: '/apps/{appId}/dynos' }

Generating Type Definitions

The package includes a CLI that fetches the live Heroku API hyperschema and generates type definitions and a route registry. Before writing files to the file system, the type output is verified against the TypeScript type checker to ensure we're only writing valid definitions.

Run the CLI

npm run generate

This fetches the schema from https://api.heroku.com/schema and writes the generated files into dist/<variant>/ (e.g. dist/3.sdk/). It also updates package.json exports automatically. The CLI is executed directly from TypeScript via tsx — no separate build step is required.

CLI Options

Usage: heroku-types [options]

Options:
  --variant <variant>   Schema variant (default: 3.sdk)
  --base-url <url>      Schema endpoint (default: https://api.heroku.com/schema)
  --help                Show this help message

For example, to generate types for a different schema variant:

npm run generate -- --variant 3.webhooks

The data variant (Shogun)

The data variant covers Heroku's data services control plane (Shogun). Unlike 3.sdk, Shogun does not publish a hyperschema, so the resource grouping in src/data/routes.ts is curated by hand. The body of dist/data/types.d.ts — every *Opts and *Result interface, plus the HerokuClient method signatures — is generated from request/response payloads captured during Shogun's spec suite. The runtime route registry at dist/data/routes.{js,d.ts} is compiled from src/data/routes.ts by the same pipeline. Given the Shogun spec artifact, dist/ is fully reproducible from source.

Pipeline

  1. Capture payloads in Shogun. From a Shogun checkout, with the spec DB running:

    bundle exec rspec spec/shogun/endpoints
    bundle exec rake api_schemas:build

    This writes tmp/api_schemas.json (schemas keyed by "VERB /path").

  2. Generate types in this repo. Point the generator at the artifact:

    SHOGUN_SCHEMA_PATH=/path/to/shogun/tmp/api_schemas.json npm run generate:data

    This reads src/data/routes.ts for the curated resource grouping, emits dist/data/types.d.ts, and emits dist/data/routes.{js,d.ts} from the same source. Methods with no schema coverage are typed as Promise<unknown> and annotated with a // TODO: no spec coverage comment.

What the generator preserves

The grouping in src/data/routes.ts is the source of truth. The generator never invents new resources or moves methods between resources — it only fills in Opts/Result types from the schema artifact. To add or rename a resource, edit src/data/routes.ts and re-run the generator. Do not edit dist/data/routes.{js,d.ts} directly — those files are regenerated on every npm run generate:data invocation.

Running Tests

npm test

This runs the test suite via Vitest.

To run tests in watch mode during development:

npm run test:watch

Contributing

See CONTRIBUTING.md. Security issues should be reported per SECURITY.

License

MIT — see LICENSE.