nicolium: groups migrations

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-02-22 20:08:16 +01:00
parent be44696640
commit fbbcbdce3f
34 changed files with 446 additions and 499 deletions

View File

@ -5,6 +5,7 @@ import { accountSchema } from './account';
enum GroupRoles {
OWNER = 'owner',
ADMIN = 'admin',
MODERATOR = 'moderator',
USER = 'user',
}

View File

@ -8,7 +8,7 @@ import { GroupRoles } from './group-member';
const groupRelationshipSchema = v.object({
id: v.string(),
member: v.fallback(v.boolean(), false),
role: v.fallback(v.enum(GroupRoles), GroupRoles.USER),
role: v.fallback(v.optional(v.enum(GroupRoles)), undefined),
requested: v.fallback(v.boolean(), false),
});