feat: implement complex selection flow
This commit is contained in:
@@ -113,6 +113,24 @@ export const updateComplexSchema = z
|
||||
},
|
||||
)
|
||||
|
||||
export const complexUserRoleSchema = z.enum(['ADMIN', 'EMPLOYEE'])
|
||||
|
||||
export type ComplexUserRole = z.infer<typeof complexUserRoleSchema>
|
||||
|
||||
export const selectComplexSchema = z.object({
|
||||
complexId: z.string().uuid(),
|
||||
})
|
||||
|
||||
export type SelectComplexInput = z.infer<typeof selectComplexSchema>
|
||||
|
||||
export const complexWithRoleSchema = complexSchema.merge(
|
||||
z.object({
|
||||
role: complexUserRoleSchema,
|
||||
})
|
||||
)
|
||||
|
||||
export type ComplexWithRole = z.infer<typeof complexWithRoleSchema>
|
||||
|
||||
export type Complex = z.infer<typeof complexSchema>
|
||||
export type CreateComplexInput = z.infer<typeof createComplexSchema>
|
||||
export type UpdateComplexInput = z.infer<typeof updateComplexSchema>
|
||||
|
||||
Reference in New Issue
Block a user