Files
calendar/packages/trpc/server/routers/viewer/attributes/bulkAssignAttributes.schema.ts
T
sean-brydonandGitHub c7b1fbdf67 feat: mass assign attributes (#16995)
* UI popover on user table

* fix multi select state

* mass assignment

* add i18n
2024-10-09 12:02:48 +02:00

15 lines
418 B
TypeScript

import { z } from "zod";
const attributeSchema = z.object({
id: z.string(),
options: z.array(z.object({ label: z.string().optional(), value: z.string() })).optional(),
value: z.string().optional(),
});
export const bulkAssignAttributesSchema = z.object({
userIds: z.number().array(),
attributes: attributeSchema.array(),
});
export type ZBulkAssignAttributes = z.infer<typeof bulkAssignAttributesSchema>;