Shared data schema for TOBL projects, version 3.12.24. This package provides TypeScript types and runtime validation for data structures used across TOBL applications. It is published on npm and follows semantic versioning. The schema is designed to ensure consistency between backend (tobl-functions-ts) and frontend (tobl-web) projects. It includes Zod schemas for runtime validation and TypeScript types for static checking. The package is actively maintained with regular releases tied to schema changes.
npm install tobl-data-schemaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import the schema and type, parse user data, and handle validation errors using Zod's safeParse.
Change import { default as DataSchema } from 'tobl-data-schema' to import { UserSchema } from 'tobl-data-schema' or equivalent named export.Use import type { User } from 'tobl-data-schema' instead of import { User } from 'tobl-data-schema'.Replace `UserValidator` with `validateUser` in import and usage.
Switch to ESM imports in your project, or use dynamic import() if you must use CommonJS.
Run `yarn add tobl-data-schema` or `npm install tobl-data-schema` to install the package.
Change `const { UserSchema } = require('tobl-data-schema')` to `import { UserSchema } from 'tobl-data-schema'`.Use `import type { User } from 'tobl-data-schema'` instead.