# @x12i/catalox-contracts

> Shared types and contracts for Catalox

Latest version **6.0.0** (published 2026-07-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @x12i/catalox-contracts
pnpm add @x12i/catalox-contracts
yarn add @x12i/catalox-contracts
bun add @x12i/catalox-contracts
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 6.0.0 |
| Published | 2026-07-11 |
| First published | 2026-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 236.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | x12i |

## Links

- npm: https://www.npmjs.com/package/@x12i/catalox-contracts
- npm.io page: https://npm.io/package/@x12i/catalox-contracts

## Recent versions

- 6.0.0 (latest) — 2026-07-11
- 5.10.1 — 2026-06-27
- 5.10.0 — 2026-06-27
- 5.9.12 — 2026-06-27
- 5.9.11 — 2026-06-27
- 5.9.10 — 2026-06-26
- 5.9.9 — 2026-06-26
- 5.9.8 — 2026-06-19
- 5.9.7 — 2026-06-14

## README

# `@x12i/catalox-contracts`

**Shared TypeScript contracts** for the Catalox platform: catalog types, items, bindings, descriptors, outcomes, client error shapes, and helper functions used by the engine, API, and client SDK.

Part of the [Catalox monorepo](../../README.md).

---

## Role

Single source of truth for **cross-package types** so engine, HTTP API, and client stay aligned without circular dependencies.

Exports include:

- **IDs** — `AppId`, `CatalogId`, `ItemId`, …
- **Catalog models** — `CatalogDescriptor`, `CatalogListResult`, `CatalogGetItemResult`, …
- **Outcomes** — `CatalogListOutcome`, `CataloxResult`, `CataloxClientError`
- **Items** — `UnifiedCatalogItem`, `NativeCatalogItemRecord`, scope types
- **Bindings & adapters** — binding records, Mongo/API adapter config
- **Helpers** — `compactCatalogFilter`, `toCataloxResultFromList`, `formatCataloxErrorMessage`, field path normalization

---

## Install

```bash
npm install @x12i/catalox-contracts
```

No runtime dependencies (types + small pure functions only).

---

## Usage

```ts
import type {
  CatalogDescriptor,
  CataloxResult,
  CataloxClientError,
} from "@x12i/catalox-contracts";

import {
  compactCatalogFilter,
  toCataloxResultFromGetItemWithOutcome,
  formatCataloxErrorMessage,
} from "@x12i/catalox-contracts";
```

Subpath exports: `@x12i/catalox-contracts/*.js` maps to built `dist/*.js` modules.

---

## Build & test

```bash
npm run build -w @x12i/catalox-contracts
npm test -w @x12i/catalox-contracts
```

---

## Documentation

- [Catalog format](../../docs/catalog-format.md)
- [Outcomes](../../docs/outcomes.md)
- [Authorization](../../docs/authorization.md)

---

## Related packages

| Package | Uses contracts for |
|---------|-------------------|
| `@x12i/catalox-engine` | Engine I/O types |
| `@x12i/catalox-api` | HTTP response shapes |
| `@x12i/catalox-client` | Client-side result mapping |
| `@x12i/catalox-authix-bridge` | Context mapping types |

---
_Source: https://npm.io/package/@x12i/catalox-contracts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
