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