bigbuffet-rw/app/soapbox/schemas/group-member.ts
2023-05-04 12:20:39 -05:00

19 lines
No EOL
375 B
TypeScript

import z from 'zod';
import { accountSchema } from './account';
enum GroupRoles {
OWNER = 'owner',
ADMIN = 'admin',
USER = 'user'
}
const groupMemberSchema = z.object({
id: z.string(),
account: accountSchema,
role: z.nativeEnum(GroupRoles),
});
type GroupMember = z.infer<typeof groupMemberSchema>;
export { groupMemberSchema, type GroupMember, GroupRoles };