Files
ncd-fe/src/schemas/group-relationship.ts
marcin mikołajczak 5f8c9427bf Remove some group-related stuff
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-06-18 23:59:15 +02:00

15 lines
427 B
TypeScript

import z from 'zod';
import { GroupRoles } from './group-member';
const groupRelationshipSchema = z.object({
id: z.string(),
member: z.boolean().catch(false),
role: z.nativeEnum(GroupRoles).catch(GroupRoles.USER),
requested: z.boolean().catch(false),
owner: z.boolean().catch(false),
});
type GroupRelationship = z.infer<typeof groupRelationshipSchema>;
export { groupRelationshipSchema, type GroupRelationship };