bigbuffet-rw/app/soapbox/schemas/group-relationship.ts
2023-03-10 12:42:49 -06:00

12 lines
No EOL
326 B
TypeScript

import z from 'zod';
const groupRelationshipSchema = z.object({
id: z.string(),
member: z.boolean().catch(false),
requested: z.boolean().catch(false),
role: z.string().nullish().catch(null),
});
type GroupRelationship = z.infer<typeof groupRelationshipSchema>;
export { groupRelationshipSchema, GroupRelationship };