unleash-server
Version:
Unleash is an enterprise ready feature toggles service. It provides different strategies for handling feature toggles.
24 lines • 777 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const permissions_1 = require("./permissions");
class ApiUser {
constructor({ username, permissions = [permissions_1.CLIENT], projects, project, environment, type, secret, }) {
this.isAPI = true;
if (!username) {
throw new TypeError('username is required');
}
this.username = username;
this.permissions = permissions;
this.environment = environment;
this.type = type;
this.secret = secret;
if (projects && projects.length > 0) {
this.projects = projects;
}
else {
this.projects = [project];
}
}
}
exports.default = ApiUser;
//# sourceMappingURL=api-user.js.map