chore(repo): initialize planarchy workspace
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const CreateRoleSchema = z.object({
|
||||
name: z.string().min(1).max(100),
|
||||
description: z.string().max(500).optional(),
|
||||
color: z.string().regex(/^#[0-9a-fA-F]{6}$/).optional(),
|
||||
});
|
||||
|
||||
export const UpdateRoleSchema = CreateRoleSchema.partial().extend({
|
||||
isActive: z.boolean().optional(),
|
||||
});
|
||||
|
||||
export const ResourceRoleSchema = z.object({
|
||||
roleId: z.string(),
|
||||
isPrimary: z.boolean().default(false),
|
||||
});
|
||||
|
||||
export type CreateRoleInput = z.infer<typeof CreateRoleSchema>;
|
||||
export type UpdateRoleInput = z.infer<typeof UpdateRoleSchema>;
|
||||
export type ResourceRoleInput = z.infer<typeof ResourceRoleSchema>;
|
||||
Reference in New Issue
Block a user