A collection of Zod schemas for validating data structures used in the Prodi application.
- Model Schemas - Core data models for voices and episodes
- API Schemas - Request/response schemas for API endpoints
- Service Schemas - Schemas for internal services
- Voice Schema - Validates voice properties like language, name, service, etc.
-
Episode Schema - Defines podcast episodes with dialogues, sections, and metadata
-
dialogueSchema
- Validates dialogue properties (text, delay, voice, etc.) -
sectionSchema
- Validates episode sections containing dialogues -
episodeMetadataSchema
- Validates episode metadata (title, timestamps, audio files) -
episodeSchema
- Complete episode structure with metadata and sections
-
-
Project Schema - Defines project data structure with name, hosts, and agent information
-
projectRequestSchema
- Validates project creation/update request data -
projectSchema
- Complete project structure with ID and required fields -
projectsListSchema
- Validates a list of projects
-
- Create Episode - Validates requests to create new episodes
- Save Episode - Validates requests to save episode data
- Delete Episode - Validates requests to delete episodes
- Projects API - Consolidated schemas for project-related endpoints (create, get, update, delete)
- Episode LLM - Defines structures for LLM-generated episode content
See the dedicated documentation pages for detailed schema information.
To use these schemas in your project, install the package from npm:
npm install @prodi-labs/schemas
You can also install a specific version:
npm install @prodi-labs/schemas@1.0.9
To update to the latest compatible version:
npm update @prodi-labs/schemas
To publish a new version of this package:
- Make your changes to the schema files
- Run one of the following commands depending on the type of update:
# For bug fixes and patches (1.0.x)
npm run publish:patch
# For new features (1.x.0)
npm run publish:minor
# For breaking changes (x.0.0)
npm run publish:major
These commands will automatically:
- Increment the version number
- Build the package
- Publish to npm
All schemas are built with Zod for runtime type validation.
To use these schemas in your code:
import { EpisodeRequestSchema } from "@prodi-labs/schemas/api/createEpisode.schema";
const result = EpisodeRequestSchema.safeParse(data);
if (result.success) {
const validData = result.data;
} else {
console.error(result.error);
}