bigbuffet-rw/packages/pl-api/lib/entities/group-member.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

24 lines
464 B
TypeScript

import * as v from 'valibot';
import { accountSchema } from './account';
enum GroupRoles {
OWNER = 'owner',
ADMIN = 'admin',
USER = 'user'
}
type GroupRole =`${GroupRoles}`;
/**
* @category Schemas
*/
const groupMemberSchema = v.object({
id: v.string(),
account: accountSchema,
role: v.enum(GroupRoles),
});
type GroupMember = v.InferOutput<typeof groupMemberSchema>;
export { groupMemberSchema, type GroupMember, GroupRoles, type GroupRole };