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

@b1-road/types

v0.1.0-alpha.3

Published

Shared types and constants for every @b1-road SDK — entities, permission algebra, hosted API URLs.

Readme

@b1-road/types

Shared types and constants for every Road SDK — the single source of truth for the Road wire contract. Entities, the permission algebra, input shapes, hosted API URLs, and the API contract version live here; @b1-road/react, @b1-road/nestjs, and every other binding re-export from this package and never redefine.

Alpha. Road is pre-1.0. This package is published under the alpha dist-tag and its surface may change between minor versions until the API graduates its contract from alpha to v1.

Install

npm install @b1-road/types

Ships dual ESM/CJS builds with type declarations. Zero runtime dependencies.

What's inside

| Export | What it is | | --- | --- | | ROAD_API_CONTRACT | The API contract version ("alpha"). SDKs build their base path as `${host}/api/${ROAD_API_CONTRACT}`. | | ROAD_API_URLS | Hosted Road API base URLs (production, sandbox). | | Entities | The resource shapes returned on the wire (business units, members, roles, permissions, …). | | Inputs | The request-body shapes the API accepts. | | Permissions | The action:subject permission algebra and its constants. | | Webhooks | Webhook event types, per-event payloads, and the delivery envelope (RoadWebhookEvent, RoadWebhookPayloads, ROAD_WEBHOOK_EVENT_TYPES). | | @b1-road/types/iam | IAM control-plane types (scopes, assignments, authorization, sessions). |

import { ROAD_API_CONTRACT, ROAD_API_URLS } from "@b1-road/types";

const baseUrl = `${ROAD_API_URLS.production}/api/${ROAD_API_CONTRACT}`;
// → https://api.road.app/api/alpha

A contract package — the API is a consumer too

Every wire type, permission constant, and hosted URL has exactly one definition. SDKs import them; they never re-declare. The Road API depends on this package as well — not as "an SDK the API consumes," but as the contract both sides agree on: the API (the producer) declares the wire shapes here and conforms its DTOs to them, while the SDKs (the consumers) read the same shapes. The dependency direction API → @b1-road/types is correct and intended. If a binding or the API needs a shape this package doesn't yet expose, it contributes the shape back here in the same change — so the API, React, Nest, and Laravel definitions can never drift. This is the load-bearing principle of the ecosystem.

Versioning

@b1-road/types carries its own semantic version, independent of the Road API's release cadence. It tracks the API on the contract axis: while ROAD_API_CONTRACT is "alpha", this package stays pre-stable 0.x. The bump to 1.0.0 happens when the API cuts its first stable contract (v1).

License

MIT