OrderQ Schemas - v1.2.13

OrderQ Schemas

A comprehensive TypeScript schema library for restaurant order management systems, built with Zod for runtime validation and TypeScript for type safety.

  • Type Safety: Full TypeScript support with inferred types
  • Runtime Validation: Zod schemas for robust data validation
  • Comprehensive Coverage: Schemas for orders, billing, payments, menus, and more
  • Documentation: Auto-generated documentation with examples
npm install @everestial/orderq-schemas
import { CreateOrderSchema, OrderSchema } from '@everestial/orderq-schemas';

// Validate order data
const orderData = {
orderType: "delivery",
pickupType: "asap",
tipAmount: 5.00,
items: [
{ menuItemId: "item1", quantity: 2, price: 12.99 }
]
};

const validatedOrder = CreateOrderSchema.parse(orderData);
  • BaseOrderSchema - Common order properties
  • CreateOrderSchema - For creating new orders
  • OrderSchema - Complete order with computed fields
  • OrderBillingSchema - Customer billing information
  • Stripe integration schemas
  • Payment processing schemas
  • Menu item schemas
  • Modifier schemas
  • Category schemas
  • Restaurant information
  • Operating hours
  • Location data

Generate and view the documentation:

# Generate documentation
npm run docs:generate

# Serve documentation locally
npm run docs:serve

The documentation will be available at http://localhost:8080

# Install dependencies
npm install

# Build the package
npm run build

# Generate documentation
npm run docs:build
  1. Fork the repository
  2. Create a feature branch
  3. Add comprehensive JSDoc comments to your schemas
  4. Submit a pull request

MIT