import { z } from 'zod';
export var GlobalRoleNames;
(function (GlobalRoleNames) {
    GlobalRoleNames["SUPER_ADMIN"] = "super_admin";
    GlobalRoleNames["SUPER_USER"] = "super_user";
    GlobalRoleNames["EXTERNAL"] = "external";
    GlobalRoleNames["STRATEGIC_FREE"] = "strategic_free";
    GlobalRoleNames["STRATEGIC_PAID"] = "strategic_paid";
    GlobalRoleNames["BANNED"] = "banned";
})(GlobalRoleNames || (GlobalRoleNames = {}));
export var GlobalAdminRoleNames;
(function (GlobalAdminRoleNames) {
    GlobalAdminRoleNames["SUPER_ADMIN"] = "super_admin";
    GlobalAdminRoleNames["SUPER_USER"] = "super_user";
    GlobalAdminRoleNames["EXTERNAL"] = "external";
})(GlobalAdminRoleNames || (GlobalAdminRoleNames = {}));
export var ProfileRoleNames;
(function (ProfileRoleNames) {
    ProfileRoleNames["OWNER"] = "owner";
    ProfileRoleNames["ADMIN"] = "admin";
    ProfileRoleNames["EDITOR_SB"] = "editor_sb";
    ProfileRoleNames["EDITOR_CRM"] = "editor_crm";
    ProfileRoleNames["EDITOR_ANALYTICS"] = "editor_analytics";
})(ProfileRoleNames || (ProfileRoleNames = {}));
export const RoleNames = { ...GlobalRoleNames, ...ProfileRoleNames };
export var UserRoleType;
(function (UserRoleType) {
    UserRoleType["USER"] = "user";
    UserRoleType["TALENT"] = "talent";
    UserRoleType["ADMIN"] = "admin";
    UserRoleType["MODERATOR"] = "moderator";
    UserRoleType["EXTERNAL"] = "external";
    UserRoleType["SELFSIGN"] = "selfsign";
})(UserRoleType || (UserRoleType = {}));
export var LegacyRoleId;
(function (LegacyRoleId) {
    LegacyRoleId[LegacyRoleId["USER"] = 1] = "USER";
    LegacyRoleId[LegacyRoleId["TALENT"] = 2] = "TALENT";
    LegacyRoleId[LegacyRoleId["ADMIN"] = 3] = "ADMIN";
    LegacyRoleId[LegacyRoleId["MODERATOR"] = 4] = "MODERATOR";
    LegacyRoleId[LegacyRoleId["EXTERNAL"] = 5] = "EXTERNAL";
    LegacyRoleId[LegacyRoleId["SELFSIGN"] = 6] = "SELFSIGN";
})(LegacyRoleId || (LegacyRoleId = {}));
// user role and user role mappings
export const ZUserRole = z.object({
    createdAt: z.string().datetime(),
    isGlobalRole: z.boolean(),
    roleDescription: z.string(),
    roleName: z.nativeEnum(RoleNames)
});
export const ZUserRoleMapping = z.object({
    createdAt: z.string().datetime(),
    profileId: z.string().uuid().optional(),
    roleName: ZUserRole.shape.roleName,
    userId: z.string().uuid(),
    userRoleMappingId: z.string().uuid()
});
// roles stored in cookie/session
export const ZInnerRoleObj = z.object({
    createdAt: ZUserRoleMapping.shape.createdAt
});
export const ZProfileRoleRecord = z.record(z.record(z.nativeEnum(ProfileRoleNames), ZInnerRoleObj));
