bigbuffet-rw/packages/pl-api/lib/entities/group-relationship.ts
marcin mikołajczak 7b183e5c60 pl-api: Update docs
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-29 22:44:28 +01:00

17 lines
449 B
TypeScript

import * as v from 'valibot';
import { GroupRoles } from './group-member';
/**
* @category Schemas
*/
const groupRelationshipSchema = v.object({
id: v.string(),
member: v.fallback(v.boolean(), false),
role: v.fallback(v.enum(GroupRoles), GroupRoles.USER),
requested: v.fallback(v.boolean(), false),
});
type GroupRelationship = v.InferOutput<typeof groupRelationshipSchema>;
export { groupRelationshipSchema, type GroupRelationship };