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

streamtrack-tv

v1.4.0

Published

Typed sync payload and pairing contract between the StreamTrack TV Android app and its web dashboard.

Readme

streamtrack-tv

Typed sync payload and pairing contract between the StreamTrack TV Android app and its web dashboard. Zod schemas and TypeScript types, nothing else.

npm install streamtrack-tv
import { syncPayloadSchema, type SyncPayload } from 'streamtrack-tv'

export function parseSync(body: unknown): SyncPayload {
  return syncPayloadSchema.parse(body)
}

What it exports:

Sync

  • syncPayloadSchema, syncResponseSchema for POST /api/v1/sync. Rows are hourly buckets with absolute values, so sending the same hour again overwrites it.
  • usageBucketSchema, keyBucketSchema, screenBucketSchema for the rows inside a payload, and bucketKey() to build the key that identifies one bucket.

Pairing

  • pairStartRequestSchema, pairStartResponseSchema, pairPollRequestSchema, pairPollResponseSchema for pairing a TV with a dashboard account.

PIN reset

  • pinResetStartRequestSchema, pinResetStartResponseSchema for POST /api/v1/pin-reset/start, sent by a paired TV that shows Forgot PIN.
  • pinResetPollRequestSchema, pinResetPollResponseSchema for POST /api/v1/pin-reset/poll, answered with pending, expired or confirmed.

Security events

  • eventsRequestSchema, eventsResponseSchema for POST /api/v1/events, and securityEventSchema for one event.
  • SECURITY_EVENT_TYPES, the list of event types the TV can record at its lock screen. An event never carries anything typed.

Errors and constants

  • apiErrorSchema for every non-2xx response.
  • KEY_CLASSES, SCHEMA_VERSION and PAIR_CODE_ALPHABET, the characters of a pairing code.
  • LIMITS, the numeric limits the API enforces and the app respects: rows per payload, string lengths, the pairing code length and lifetime, the PIN length (pinMinLength, pinMaxLength), the PIN reset lifetime (pinResetTtlSeconds) and the event limits (maxEventsPerBatch, maxEventValue, maxStoredEvents, maxEventFutureMs).

Every schema has an inferred TypeScript type with the same name without Schema, for example SyncPayload or PinResetStartResponse.

Request schemas are strict: a field they don't list, such as a raw key code, fails validation. Response schemas ignore unknown fields, so a client can read answers from a newer server.

Remote keys are reported by class only (dpad, select, back, home, media, volume, other). A raw key code fails validation.

Part of StreamTrack TV. ESM only, Node 20 or newer. MIT