@prodi-labs/schemas
TypeScript icon, indicating that this package has built-in type declarations

1.0.56 • Public • Published

Prodi Schemas

A collection of Zod schemas for validating data structures used in the Prodi application.

Schema Categories

Quick Reference

Model Schemas

  • 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

API Schemas

  • 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)

Service Schemas

  • Episode LLM - Defines structures for LLM-generated episode content

See the dedicated documentation pages for detailed schema information.

Usage

Installation

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

Publishing

To publish a new version of this package:

  1. Make your changes to the schema files
  2. 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

Validation

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);
}

Readme

Keywords

none

Package Sidebar

Install

npm i @prodi-labs/schemas

Weekly Downloads

245

Version

1.0.56

License

ISC

Unpacked Size

93.4 kB

Total Files

38

Last publish

Collaborators

  • patcast