OCTO models and generated Zod schemas. The package provides CommonJS and ESM builds, with tree-shaking enabled for browser bundlers.
import { CapabilityId, bookingGiftsSchema } from '@ventrata/octo-types';
import { bookingGiftsSchema as miniSchema } from '@ventrata/octo-types/schemas-mini';Classic schemas support Zod's chaining methods. Mini schemas support parse()
and safeParse() and use the functional zod/mini API for smaller bundles.
Individual schemas are available through schemas/BookingGifts and
schemas-mini/BookingGifts subpaths.
Generation scripts are TypeScript (.mts) run directly by Node with --experimental-strip-types, no build step.
npm run generateregenerates models and both schema variants from the checked-insrc/openapi.yaml.npm run generate:updatedownloads the latest specification, then regenerates everything. Download failures stop the command.npm run buildcleansdistand builds both module formats. Generation utilities are excluded from the published output.npm run checkchecks package and tooling types, formatting, and lint.npm testchecks source transformations, downloads, recursion, and then builds the package to check its exports, TypeScript consumers, and browser bundle sizes.
Generation tooling lives in scripts/, with its TypeScript configuration in
tsconfig.scripts.json. Shared TypeScript AST helpers are in scripts/ast.mts;
schema transformations, dependency analysis and index generation live in
scripts/schema-generation/.