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

@gscdump/contracts

v6.0.0

Published

Shared gscdump.com API, webhook, realtime, and lifecycle contracts.

Downloads

15,461

Readme

@gscdump/contracts

Shared protocol contracts for gscdump.com integrations.

Use @gscdump/contracts/v1 for operation definitions, request and response schemas, and protocol constants. The registry describes 67 HTTP operations and the realtime protocol. For HTTP calls, install @gscdump/sdk.

npm install @gscdump/contracts

The root also exports shared types and legacy route metadata. Use the v1 guide for new integrations. The producer inventory records remaining legacy mismatches.

Operation contracts

Each operation has one descriptor with its method, path, schemas, credentials, scopes, ownership rules, consistency, and retry behavior. Descriptors distinguish queries from mutations independently of HTTP method. Every public operation has schemas and a unique method/path pair.

Response object schemas are additive for consumers: parsers accept unknown object keys while validating known fields. Producer contract tests remain strict against the documented current schema, and enum values remain closed. Every user_key query declares primary read consistency with no caller override.

Framework adapters use @gscdump/contracts/v1/http:

  • listHttpOperations(protocol) produces the canonical surface/operation entries used by SDK indexes and producer parity checks.
  • resolveHttpOperation(entries, request) matches an exact method, surface, and surface-relative path; it decodes and parses path parameters through the descriptor, rejects unsafe segments, and returns the canonical path.

Your application owns authorization. A browser proxy must pass only its allowed operations to the resolver.

Consumers that only need operation metadata and paths can avoid the schema runtime:

import { createGscdumpV1Paths } from '@gscdump/contracts/v1/paths'

const paths = createGscdumpV1Paths({ apiRoot: '/api/_gscdump' })
const url = paths.path('analytics.rows.query', { siteId: 's_01' })

The subpath has no Zod dependency. It encodes each path parameter as one URL segment. Callers own query string construction and validation.

Generated contract files:

Focused guides:

Realtime contracts cover credential-inferred streams, tickets, frame bounds, replay, cumulative ACKs, and resync. A semantic event owns one cursor and a changes[] list, so one terminal transition can invalidate analytics and lifecycle state atomically. Configurable grants and public resource revisions are not part of v1; internal RPC/storage revisioning remains a host implementation concern.