UNPKG

@mikestraczek/cms-auth

Version:

Authentication and user management for the CMS template

28 lines (26 loc) 653 B
type User = { id: string; name: string; email: string; role: Role; createdAt: Date; updatedAt: Date; emailVerified?: Date | null; }; declare enum Roles { SUPERADMIN = "SUPERADMIN", ADMIN = "ADMIN", USER = "USER" } type Role = keyof typeof Roles; type UserWithoutPassword = Omit<User, "password">; type CreateUserInput = { name: string; email: string; password: string; role?: Role; }; type UpdateUserInput = Partial<CreateUserInput> & { id: string; }; export { type CreateUserInput as C, type Role as R, type User as U, Roles as a, type UserWithoutPassword as b, type UpdateUserInput as c };