Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: Omar López <[email protected]>
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>;
|