Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com> Co-authored-by: Omar López <zomars@me.com>
10 lines
297 B
TypeScript
10 lines
297 B
TypeScript
import { z } from "zod";
|
|
|
|
export const createAttributeSchema = z.object({
|
|
name: z.string(),
|
|
type: z.enum(["TEXT", "NUMBER", "SINGLE_SELECT", "MULTI_SELECT"]),
|
|
options: z.array(z.object({ value: z.string() })),
|
|
});
|
|
|
|
export type ZCreateAttributeSchema = z.infer<typeof createAttributeSchema>;
|