@unedio/schema
v0.0.7
Published
The official schema and type definitions library for the Unedio platform.
Readme
@unedio/schema
The official schema and type definitions library for the Unedio platform.
Features
- Domain-Driven: Organized by entity (auth, jobs, seekers, workspaces).
- Zod Schemas: Pre-built validation schemas for all API operations.
- Supabase Support: Includes a comprehensive
Databasetype for use with the Supabase client. - ESM Ready: Fully compatible with
NodeNextand modern environments.
Installation
npm install @unedio/schemaUsage
import { JobResponse, CreateJobInput } from '@unedio/schema';Regenerating Supabase types
src/infra/database.types.ts is auto-generated from the live Supabase project. Run this whenever the database schema changes:
# 1. Login once (needs a Personal Access Token from supabase.com/dashboard/account/tokens)
npx supabase login
# 2. Generate and overwrite
npx supabase gen types typescript --project-id tstwokuxyrsdhjceeqlu > src/infra/database.types.ts
# 3. Rebuild the package
npm run buildThen sync to unedio-api during local development:
cp -r dist/. ../unedio-api/node_modules/@unedio/schema/dist/License
Commercial
