UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

20 lines 727 B
import Joi from 'joi'; const { ValidationError } = Joi; import { SYSTEM_USER_AUDIT } from './core.js'; export default class Group { constructor({ id, name, description, mappingsSSO, rootRole, createdBy, createdAt, scimId, }) { if (!id) { throw new ValidationError('Id is required', [], undefined); } Joi.assert(name, Joi.string(), 'Name'); this.id = id; this.name = name; this.rootRole = rootRole; this.description = description || ''; this.mappingsSSO = mappingsSSO || []; this.createdBy = createdBy || SYSTEM_USER_AUDIT.username; this.createdAt = createdAt; this.scimId = scimId; } } //# sourceMappingURL=group.js.map