init
This commit is contained in:
24
lib/validators/schemas.ts
Normal file
24
lib/validators/schemas.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const registerSchema = z.object({
|
||||
name: z.string().min(1).max(100),
|
||||
platform: z.string().optional(),
|
||||
model: z.string().optional(),
|
||||
});
|
||||
|
||||
export const heartbeatSchema = z.object({
|
||||
name: z.string().optional(),
|
||||
model: z.string().optional(),
|
||||
platform: z.string().optional(),
|
||||
});
|
||||
|
||||
export const taskSchema = z.object({
|
||||
summary: z.string().max(500),
|
||||
durationMs: z.number().positive(),
|
||||
model: z.string().optional(),
|
||||
toolsUsed: z.array(z.string()).optional(),
|
||||
});
|
||||
|
||||
export type RegisterInput = z.infer<typeof registerSchema>;
|
||||
export type HeartbeatInput = z.infer<typeof heartbeatSchema>;
|
||||
export type TaskInput = z.infer<typeof taskSchema>;
|
||||
Reference in New Issue
Block a user