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

14 lines
415 B
TypeScript
Raw Normal View History

2023-03-10 10:42:49 -08:00
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),
blocked_by: z.boolean().catch(false),
notifying: z.boolean().nullable().catch(null),
2023-03-10 10:42:49 -08:00
});
type GroupRelationship = z.infer<typeof groupRelationshipSchema>;
export { groupRelationshipSchema, GroupRelationship };