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>
|
||||
|
||||
@@ -26,12 +26,22 @@ export type {
|
||||
OnboardingVerifyOtpInput,
|
||||
OnboardingVerifyOtpResponse,
|
||||
} from './onboarding'
|
||||
export { complexSchema, createComplexSchema, updateComplexSchema } from './complex'
|
||||
export {
|
||||
complexSchema,
|
||||
complexUserRoleSchema,
|
||||
complexWithRoleSchema,
|
||||
createComplexSchema,
|
||||
selectComplexSchema,
|
||||
updateComplexSchema,
|
||||
} from './complex'
|
||||
export type {
|
||||
Complex,
|
||||
ComplexUserRole,
|
||||
ComplexWithRole,
|
||||
CreateComplexInput,
|
||||
CreateComplexPayload,
|
||||
CreateComplexResponse,
|
||||
SelectComplexInput,
|
||||
UpdateComplexInput,
|
||||
UpdateComplexPayload,
|
||||
UpdateComplexResponse,
|
||||
|
||||
Reference in New Issue
Block a user