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

@x12i/catalox-api

v6.0.0

Published

HTTP route layer for Catalox

Readme

@x12i/catalox-api

HTTP route layer for Catalox: Fastify registration, Authix verification hook, request context resolution, and outcome → HTTP status mapping.

Part of the Catalox monorepo. Used by catalox-service.


Role

Thin HTTP wrapper over @x12i/catalox-engine. The engine remains authoritative for bindings, scope, and catalog outcomes.

| Export | Purpose | |--------|---------| | registerCataloxRoutes(app, catalox, config) | Mount all routes on existing Fastify app | | createCataloxApiApp(catalox, config?) | Create configured Fastify instance | | loadCataloxApiConfig() | Read CATALOX_* and Authix env | | buildRequestContext | Build CataloxContext with normalized actor | | resolveRequestContext | Alias of buildRequestContext | | parseCatalogListQuery | Map HTTP query string → CatalogQueryOptions | | listOutcomeToHttp, getItemOutcomeToHttp | Map engine outcomes to HTTP status |


Routes (/v1)

| Method | Path | Purpose | |--------|------|---------| | GET | /health | Health check (unauthenticated) | | GET | /v1/apps/:appId/catalogs | List app catalogs | | GET | /v1/apps/:appId/bootstrap | App catalog bootstrap (descriptors) | | GET | /v1/catalogs | List all catalogs (operator) | | GET | /v1/catalogs/:catalogId/items | List items (?status=active, sort=field:desc, includeDeleted=1) | | GET | /v1/catalogs/:catalogId/items/:itemId | Get item | | GET | /v1/catalogs/:catalogId/items/by-field | Lookup by indexed field | | PUT/PATCH/DELETE | /v1/catalogs/:catalogId/items/:itemId | Item mutations (DELETE ?permanent=1 for hard delete) | | POST | /v1/catalogs/:catalogId/items/:itemId/restore | Restore soft-deleted item | | GET/PUT | …/native-record | Native envelope read/replace | | GET | /v1/catalogs/:catalogId/search | Text / AI search | | POST | /v1/apps/:appId/catalogs/:catalogId/bind | Bind catalog | | GET | /v1/catalogs/:catalogId/export | Export catalog items |

Exact handlers: src/routes/*.ts


Auth modes

| CATALOX_AUTH_MODE | Behavior | |---------------------|----------| | open | Trust network; context from headers/config (internal 5.9.x only) | | authix | Require Authorization: Bearer ax1…; verify via Authix |

6.0.0 API docs


Usage (embed in your server)

import Fastify from "fastify";
import { createCataloxFromEnv } from "@x12i/catalox-engine/firebase";
import { registerCataloxRoutes, loadCataloxApiConfig } from "@x12i/catalox-api";

const { catalox } = createCataloxFromEnv();
const app = Fastify();
await registerCataloxRoutes(app, catalox, loadCataloxApiConfig());
await app.listen({ port: 3200 });

Configuration

See catalox-service README and environment.md.

Key vars: CATALOX_AUTH_MODE, CATALOX_PRIVATE_MODE, CATALOX_DEFAULT_SUPER_ADMIN, AUTHIX_*


Build

npm run build -w @x12i/catalox-api
npm test -w @x12i/catalox-api

Related packages

| Package | Role | |---------|------| | @x12i/catalox-engine | Catalog runtime | | @x12i/catalox-authix-bridge | Token → context (used by route handlers) | | @x12i/catalox-openapi | OpenAPI spec for these routes | | @x12i/catalox-client | HTTP consumer SDK |