Hey everyone! I have been trying to override the UserRoles enum and add a new role here. I am also using Medusa Extender. I have the migration all working, and I have created the index.d.ts file in the user module to tell the core about the change, it looks like this:
import { UserRoles } from '@medusajs/medusa';
declare module '@medusajs/medusa/dist/models/user' {
declare enum UserRoles {
ADMIN = "admin",
MEMBER = "member",
DEVELOPER = "developer",
CONTENT_CREATOR = "content_creator"
}
}
However, for some reason I am still not able to create a new user with role: content_creator because I get the following error:
Error: role must be a valid enum value
I tried adding a user.validator.ts file to override the role field in the AdminCreateUserRequest class, but it didn't really get me anywhere. Anyone have experience modifying enums with Medusa Extender?