@memizy/oqse
v0.1.1
Published
TypeScript SDK and Zod validators for the OQSE specification.
Readme
OQSE SDK
Official TypeScript SDK for the Open Quiz & Study Exchange ecosystem, published as @memizy/oqse.
This repository contains:
- Runtime validators built with Zod.
- Manually authored TypeScript types for developer ergonomics.
- Auto-generated JSON Schemas distributed with the package.
- The human-readable specification in SPECIFICATION.md.
Package
- Name: @memizy/oqse
- Purpose: validate, parse, and type OQSE, OQSE Manifest, and OQSEP progress data.
Architecture & Single Source of Truth
The specification markdown is for humans. SPECIFICATION.md is the normative documentation for concepts, rules, and semantics.
Zod schemas (*Validation.ts) are the absolute source of truth for code validation. Runtime validation behavior is defined in src/oqseValidation.ts, src/manifestValidation.ts, and src/progressValidation.ts.
TypeScript types (oqse.ts, manifest.ts, progress.ts) manually mirror the Zod schemas for better Developer Experience. These files are intentionally hand-written to provide clearer interfaces, JSDoc, and IntelliSense quality.
JSON schemas are strictly auto-generated using npm run generate:schemas and contributors MUST NOT edit them manually. If validation behavior changes, update the Zod schemas first, then regenerate.
Development
Install dependencies:
npm installBuild and regenerate schemas:
npm run buildGenerate only JSON schemas:
npm run generate:schemasRun tests:
npm testContributing Rule
Never edit files in schemas/ by hand. Always regenerate via npm run generate:schemas.
