Files
calendar/packages/trpc/server/routers/viewer/attributes/edit.schema.ts
T
08e1b0a9c8 feat: attributes (#15964)
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
Co-authored-by: Omar López <zomars@me.com>
2024-08-15 14:49:05 -07:00

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>;