44 lines
1.1 KiB
JavaScript
44 lines
1.1 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.FeatureEntitlement = exports.ENTERPRISE_FEATURES = exports.PRO_FEATURES = exports.FREE_FEATURES = void 0;
|
|
exports.FREE_FEATURES = [
|
|
'exploration:basic',
|
|
'findings:basic',
|
|
'findings:export',
|
|
'reports:basic',
|
|
'auth:apikeys',
|
|
];
|
|
exports.PRO_FEATURES = [
|
|
...exports.FREE_FEATURES,
|
|
'exploration:scheduled',
|
|
'reports:pdf',
|
|
'integrations:webhook',
|
|
'integrations:slack',
|
|
'integrations:github',
|
|
'integrations:jira',
|
|
];
|
|
exports.ENTERPRISE_FEATURES = [
|
|
...exports.PRO_FEATURES,
|
|
'auth:sso',
|
|
'auth:ldap',
|
|
'audit:logs',
|
|
'branding:whitelabel',
|
|
'data:retention',
|
|
'infra:postgres',
|
|
];
|
|
class FeatureEntitlement {
|
|
constructor(features) {
|
|
this.features = features;
|
|
}
|
|
static forFeatures(features) {
|
|
return new FeatureEntitlement(new Set(features));
|
|
}
|
|
has(feature) {
|
|
return this.features.has(feature);
|
|
}
|
|
toArray() {
|
|
return Array.from(this.features);
|
|
}
|
|
}
|
|
exports.FeatureEntitlement = FeatureEntitlement;
|