A comprehensive TypeScript schema library for restaurant order management systems, built with Zod for runtime validation and TypeScript for type safety.
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 propertiesCreateOrderSchema - For creating new ordersOrderSchema - Complete order with computed fieldsOrderBillingSchema - Customer billing informationGenerate 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
MIT