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

@emito/types

v0.1.0

Published

Shared types, channel definitions, and schemas for Emito — the base layer every @emito/* package builds on.

Readme

@emito/types

Shared TypeScript contracts and Zod schemas — the single source of truth for the Emito platform.

License Types Zod

What it is

@emito/types is the contract layer that every other Emito package builds on. It holds the shared type definitions — channels, delivery statuses, send parameters and results, provider plugins, templates, preferences, transport, and the canonical error model — alongside the Zod schemas that validate them at runtime. The engine, the HTTP server, the providers and the client SDKs all import from here so a Channel, a DeliveryStatus, or a SendResult means exactly the same thing on every side of the wire.

Keeping the contracts in one package means a change to a status value or an error code is made once and propagates by tsc to every consumer, rather than drifting between layers.

Install

Emito is developed as a pnpm workspace; the @emito/* packages are consumed from within the monorepo. Add the types package to a workspace package as a workspace dependency:

// package.json
"dependencies": {
  "@emito/types": "workspace:*"
}

Standalone npm publishing of the @emito/* scope is planned but not yet available — install from the workspace for now.

zod is a direct dependency and is installed automatically; the schema exports are backed by it.

Usage

Types are pure compile-time contracts; the schemas, error class, and status helpers are real runtime values.

import {
  EmitoConfigSchema,
  SendParamsSchema,
  EmitoError,
  classifyStatus,
  isTerminal,
} from "@emito/types";
import type { SendParams, DeliveryStatus } from "@emito/types";

// Validate untrusted input against a schema
const params: SendParams = SendParamsSchema.parse({
  event: "welcome",
  subscriberId: "sub_123",
  payload: { name: "Ada" },
});

// Classify a delivery status
const status: DeliveryStatus = "opened";
classifyStatus(status); // "engagement"
isTerminal("delivered"); // true

// Construct a typed, code-tagged error
throw new EmitoError({
  code: "DELIVERY_FAILED",
  message: "Provider rejected the message",
  isRetryable: true,
});

API surface

A single entry point (@emito/types) re-exports everything. Highlights:

| Export | Kind | Purpose | | --- | --- | --- | | Channel | type | Supported delivery channels (email, sms, push, inApp, webhook, slack, telegram, discord, whatsapp, webPush). | | DeliveryStatus, DeliveryStatusCategory | type | Lifecycle and engagement statuses for a delivery. | | classifyStatus, isTerminal | function | Classify a status as delivery/engagement and test for terminal states. | | SendParams, SendResult, ChannelResult | type | The shape of a send request and its per-channel outcome. | | EmitoConfig, ChannelConfig, RetryPolicy, RateLimitConfig | type | Platform and per-channel configuration contracts. | | EmitoEvents, EmitoCategories, EventDefinition, CategoryDefinition | type | Event and category catalog definitions. | | EventTemplate, RenderContext, and per-channel *Content | type | Template definitions and channel-specific rendered content. | | ProviderPlugin, ChannelDeliveryParams, DeliveryResult | type | The provider plugin interface and delivery I/O. | | Subscriber, PreferenceRecord, PreferenceResolutionResult | type | Subscriber identity and preference resolution contracts. | | NotificationEvent, EmitoTransport | type | Real-time transport contract for in-app/feed delivery. | | EmitoError, EmitoErrorOptions, EmitoErrorCode | class/type | The canonical error model with a frozen error-code enum. | | EMITO_ERROR_CODE, ERROR_STATUS_CODES, RETRYABLE_CODES, SUPPRESSABLE_ERROR_CODES | const | Error-code constants and their retry/suppress/HTTP-status mappings. | | Logger | type | Minimal logger interface used across the platform. | | *Schema (e.g. EmitoConfigSchema, SendParamsSchema, SubscriberSchema) | Zod schema | Runtime validators that mirror the corresponding types. |

Every type has a .d.ts; the package ships an ESM build and is consumed via the single . export.

Part of Emito

@emito/types is one package in the Emito monorepo — self-hosted, provider-agnostic notification infrastructure for Node.js and TypeScript.

License

MIT — part of the Emito project.