Initial commit (unpacked platform)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { z } from "zod";
|
||||
import { MEAL_TYPES } from "@app/shared-types";
|
||||
|
||||
/**
|
||||
* "Vad ska vi äta?" (spec §18) + "Jag är sugen på" (spec §19).
|
||||
* Alla parametrar är valfria – motorn använder hushållets kontext som standard.
|
||||
*/
|
||||
export const whatToEatQuerySchema = z.object({
|
||||
mealType: z.enum(MEAL_TYPES).default("dinner"),
|
||||
persons: z.coerce.number().int().min(1).max(20).optional(),
|
||||
maxMinutes: z.coerce.number().int().min(5).max(600).optional(),
|
||||
maxCostMinorPerPortion: z.coerce.number().int().min(0).max(100_000).optional(),
|
||||
/** Fritext eller röst-transkription: "krämigt", "asiatiskt", "under 500 kcal" … */
|
||||
craving: z.string().max(300).optional(),
|
||||
includeLeftovers: z.coerce.boolean().default(true),
|
||||
limit: z.coerce.number().int().min(1).max(20).default(5),
|
||||
});
|
||||
export type WhatToEatQuery = z.infer<typeof whatToEatQuerySchema>;
|
||||
Reference in New Issue
Block a user