add either pattern

This commit is contained in:
Peter Maquiran
2024-07-09 12:36:46 +01:00
parent 06417ead0f
commit a26fbbddba
45 changed files with 985 additions and 701 deletions
+19
View File
@@ -0,0 +1,19 @@
import { z } from "zod";
const userSchema = z.object({
Id: z.number(),
EmailAddress: z.string().optional(),
Name: z.string(),
IsRequired: z.boolean(),
UserType: z.string(),
IsPR: z.boolean(),
Entity: z.string(),
Acknowledgment: z.boolean(),
RoleDescription: z.string().nullable(),
RoleId: z.number(),
});
const usersSchema = z.array(userSchema);
export type UserListItem = z.infer<typeof userSchema>
export type UserList = z.infer<typeof usersSchema>