Files
ncd-fe/packages/pl-api/lib/entities/group-relationship.ts
nicole mikołajczyk fbbcbdce3f nicolium: groups migrations
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-02-22 20:08:16 +01:00

21 lines
489 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.optional(v.enum(GroupRoles)), undefined),
requested: v.fallback(v.boolean(), false),
});
/**
* @category Entity types
*/
type GroupRelationship = v.InferOutput<typeof groupRelationshipSchema>;
export { groupRelationshipSchema, type GroupRelationship };