"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isGroupDeletable = exports.DefaultGroupName = exports.validGroupAction = exports.GroupAction = exports.GroupMemberStatus = exports.DataTreeGroup = exports.GroupSource = exports.GroupType = void 0;
/**
 * This enum is used in DB. DO NOT CHANGE the existing values. It is also
 * indirectly referenced in the authorization.polar file, so references there
 * need to be updated if this changes.
 */
var GroupType;
(function (GroupType) {
    GroupType[GroupType["ALL_USERS"] = 0] = "ALL_USERS";
    /**
     * @deprecated proj:rbac The Admin group type is no longer meant to be used. It's being replaced with the 'Admin' role assignment.
     * TODO(@jack) Remove this group type once rbac v2 is enabled for all orgs.
     */
    GroupType[GroupType["ADMIN"] = 1] = "ADMIN";
    GroupType[GroupType["CUSTOM"] = 2] = "CUSTOM";
    GroupType[GroupType["SUPER_USER"] = 3] = "SUPER_USER";
})(GroupType || (exports.GroupType = GroupType = {}));
var GroupSource;
(function (GroupSource) {
    GroupSource["SUPERBLOCKS"] = "SUPERBLOCKS";
    GroupSource["SCIM"] = "SCIM";
})(GroupSource || (exports.GroupSource = GroupSource = {}));
class DataTreeGroup {
    id;
    name;
    size;
    constructor(groupBrief) {
        this.id = groupBrief.id;
        this.name = groupBrief.name;
        this.size = groupBrief.size;
    }
}
exports.DataTreeGroup = DataTreeGroup;
var GroupMemberStatus;
(function (GroupMemberStatus) {
    GroupMemberStatus["UNREGISTERED"] = "unregistered";
    GroupMemberStatus["JOINED"] = "joined";
    GroupMemberStatus["DEACTIVATED"] = "deactivated";
})(GroupMemberStatus || (exports.GroupMemberStatus = GroupMemberStatus = {}));
var GroupAction;
(function (GroupAction) {
    GroupAction["ADD_MEMBER"] = "add_member";
    GroupAction["REMOVE_MEMBER"] = "remove_member";
})(GroupAction || (exports.GroupAction = GroupAction = {}));
const validGroupAction = (groupAction) => {
    return groupAction === GroupAction.ADD_MEMBER || groupAction === GroupAction.REMOVE_MEMBER;
};
exports.validGroupAction = validGroupAction;
var DefaultGroupName;
(function (DefaultGroupName) {
    DefaultGroupName["ALL_USERS"] = "All Users";
    /**
     * @deprecated proj:rbac The Admin group type is no longer meant to be used. It's being replaced with the 'Admin' role assignment.
     * TODO(@jack) Remove this group type once rbac v2 is enabled for all orgs.
     */
    DefaultGroupName["ADMIN"] = "Admins";
    DefaultGroupName["SUPER_USER"] = "Super Users";
})(DefaultGroupName || (exports.DefaultGroupName = DefaultGroupName = {}));
const isGroupDeletable = (type) => {
    return type !== GroupType.ADMIN && type !== GroupType.ALL_USERS;
};
exports.isGroupDeletable = isGroupDeletable;
//# sourceMappingURL=index.js.map