bigbuffet-rw/app/soapbox/schemas/group-member.ts

19 lines
370 B
TypeScript
Raw Normal View History

2023-03-13 12:08:02 -07:00
import z from 'zod';
import { accountSchema } from './account';
2023-03-20 05:53:38 -07:00
enum GroupRoles {
OWNER = 'owner',
2023-03-13 12:08:02 -07:00
ADMIN = 'admin',
USER = 'user'
}
const groupMemberSchema = z.object({
id: z.string(),
account: accountSchema,
2023-03-20 05:53:38 -07:00
role: z.nativeEnum(GroupRoles),
2023-03-13 12:08:02 -07:00
});
type GroupMember = z.infer<typeof groupMemberSchema>;
2023-03-20 05:53:38 -07:00
export { groupMemberSchema, GroupMember, GroupRoles };