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

@umbraculum/pim-contracts

v0.2.0

Published

Canonical PIM module contract types: products, variants, attribute sets, attributes, categories, media asset refs, and contract-version handshake. Phase A surface per RFC-0004 and docs/design/canonical-pim-module-surface.md (post-implementation).

Readme

@umbraculum/pim-contracts

Canonical pim module contract package: product / variant / attribute / category / media-ref wire types, write request schemas, and contract-version handshake per RFC-0004.

[!NOTE] Part of Umbraculum — an open-source toolset for building workspace-shaped operational applications. Sixth canonical module (RFC-0001 Decision B + RFC-0004); first allocation under the post-automation "open-door" precedent — RFC-0001 §4.2 YAGNI explicitly stretched (rationale: platform-owner-driven implementation, not speculative reservation; see RFC-0004 §3.1). Package landed under the @umbraculum/* scope from the start, so no rename history applies.

Install

npm install @umbraculum/pim-contracts@^0.0.1

Public alpha — see third-party-module.md.

What this is

MIT-licensed contract types for the canonical pim module (docs/design/canonical-pim-module-surface.md, authored alongside Phase B+C delivery).

Six exported surfaces:

  • CONTRACT_VERSION + classifyContractVersionSkew — version-handshake primitives shared with all @umbraculum/*-contracts packages. Same major → refuse / minor → warn / patch → silent policy as @umbraculum/automation-contracts. Phase A version: 0.1.0-alpha.1.
  • ProductSchema / ProductRefSchema / ProductStatusSchema — master product wire shape (id, workspaceId, sku, name, status, optional primaryAttributeSetId) + by-id reference shape + list/get response envelopes + create/update request schemas.
  • VariantSchema / VariantRefSchema — per-product variant wire shape with attributeValues discriminated-union map keyed by attribute code + create/update request schemas.
  • AttributeSchema / AttributeTypeSchema / AttributeValueSchema — attribute definition (8-value type union: string|number|boolean|date|select|multiselect|media_ref|reference) + value-side discriminated union + create/update request schemas.
  • AttributeSetSchema / CategorySchema / CategoryTreeNodeSchema — attribute-set grouping + category multi-rooted tree (nullable parentId) + create/update request schemas.
  • MediaAssetRefSchema / MediaAssetRoleSchema — opaque reference into @umbraculum/media (primary|gallery|swatch|document) + create/update request schemas. PIM owns the reference, not the pipeline; this is the canonical-vs-canonical boundary.
  • PimDeleteResponseSchema — shared { ok: true } mutation delete envelope.

Scope

  • Contains: Zod schemas, inferred TypeScript types, CONTRACT_VERSION, list/get response envelopes, create/update request schemas, delete response envelope, version-handshake helpers.
  • Does not contain: Prisma models (those live in services/api/prisma/schema.prisma under @@schema("pim")), route handlers (those live in services/api/src/modules/pim/), media-asset binary pipeline (owned by @umbraculum/media), or vendor-specific channel-feed contracts (future commerce/PIM-feed work).

Phase coupling

| Phase | What lives here | |---|---| | A — Contracts (today) | Zod schemas + CONTRACT_VERSION constant. This package. | | B — Read path (today) | Consumed by services/api/src/modules/pim/ (Prisma services, GET /pim/* routes). | | C — Web admin (today) | Consumed by apps/web/app/[locale]/(pim)/ Tamagui admin pages (response-side re-parse for defense in depth per RFC-0003). | | D — Cross-module integration (today, Option B) | Phase D integration test (services/api/src/tests/pimBreweryIntegration.test.ts) exercises PIM + brewery module composition without a brewery-side schema link; "Option A" (real Recipe.pimProductId FK) is queued as tech debt — see docs/design/canonical-pim-module-surface.md §"Open work". | | E — Write paths (today) | Create/update request schemas plus shared delete envelope for the API mutation routes. AI proposal tools and full web edit/delete UX remain follow-on work. | | F — Channel feeds (partial today) | Vendor-neutral product-catalog CSV is shipped through the rendering pipeline; vendor-specific storefront / marketplace projections remain deferred. |

Build / test / lint (local)

From repo root (run Node/npm inside the project container, not on the host — see the root README.md for service/container setup; the local-only DEVELOPMENT-LOCAL.md is per-developer and gitignored):

  • Build: npm run build -w @umbraculum/pim-contracts
  • Test: npm run test -w @umbraculum/pim-contracts
  • Typecheck: npm run typecheck -w @umbraculum/pim-contracts
  • Dist refresh (in-container, committed to CI): bash scripts/build-packages-in-docker.sh

Cross-references