Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: move plan feature proto enum (#16479)

Danny Xub0900235de4c
diff --git a/backend/api/directory-sync/webhook.go b/backend/api/directory-sync/webhook.go
index 93fe5a3731..ebc1097d5b 100644
--- a/backend/api/directory-sync/webhook.go
+++ b/backend/api/directory-sync/webhook.go
@@ -36,7 +36,7 @@ func (s *Service) RegisterDirectorySyncRoutes(g *echo.Group) {
if err := s.validRequestURL(ctx, c); err != nil {
return c.String(http.StatusInternalServerError, err.Error())
}
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DIRECTORY_SYNC_ENTRA_ID); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DIRECTORY_SYNC); err != nil {
return c.String(http.StatusForbidden, err.Error())
}
@@ -103,7 +103,7 @@ func (s *Service) RegisterDirectorySyncRoutes(g *echo.Group) {
if err := s.validRequestURL(ctx, c); err != nil {
return c.String(http.StatusInternalServerError, err.Error())
}
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DIRECTORY_SYNC_ENTRA_ID); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DIRECTORY_SYNC); err != nil {
return c.String(http.StatusForbidden, err.Error())
}
@@ -134,7 +134,7 @@ func (s *Service) RegisterDirectorySyncRoutes(g *echo.Group) {
if err := s.validRequestURL(ctx, c); err != nil {
return c.String(http.StatusInternalServerError, err.Error())
}
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DIRECTORY_SYNC_ENTRA_ID); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DIRECTORY_SYNC); err != nil {
return c.String(http.StatusForbidden, err.Error())
}
@@ -190,7 +190,7 @@ func (s *Service) RegisterDirectorySyncRoutes(g *echo.Group) {
if err := s.validRequestURL(ctx, c); err != nil {
return c.String(http.StatusInternalServerError, err.Error())
}
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DIRECTORY_SYNC_ENTRA_ID); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DIRECTORY_SYNC); err != nil {
return c.String(http.StatusForbidden, err.Error())
}
@@ -222,7 +222,7 @@ func (s *Service) RegisterDirectorySyncRoutes(g *echo.Group) {
if err := s.validRequestURL(ctx, c); err != nil {
return c.String(http.StatusInternalServerError, err.Error())
}
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DIRECTORY_SYNC_ENTRA_ID); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DIRECTORY_SYNC); err != nil {
return c.String(http.StatusForbidden, err.Error())
}
@@ -296,7 +296,7 @@ func (s *Service) RegisterDirectorySyncRoutes(g *echo.Group) {
if err := s.validRequestURL(ctx, c); err != nil {
return c.String(http.StatusInternalServerError, err.Error())
}
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DIRECTORY_SYNC_ENTRA_ID); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DIRECTORY_SYNC); err != nil {
return c.String(http.StatusForbidden, err.Error())
}
@@ -334,7 +334,7 @@ func (s *Service) RegisterDirectorySyncRoutes(g *echo.Group) {
if err := s.validRequestURL(ctx, c); err != nil {
return c.String(http.StatusInternalServerError, err.Error())
}
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DIRECTORY_SYNC_ENTRA_ID); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DIRECTORY_SYNC); err != nil {
return c.String(http.StatusForbidden, err.Error())
}
@@ -365,7 +365,7 @@ func (s *Service) RegisterDirectorySyncRoutes(g *echo.Group) {
if err := s.validRequestURL(ctx, c); err != nil {
return c.String(http.StatusInternalServerError, err.Error())
}
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DIRECTORY_SYNC_ENTRA_ID); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DIRECTORY_SYNC); err != nil {
return c.String(http.StatusForbidden, err.Error())
}
@@ -418,7 +418,7 @@ func (s *Service) RegisterDirectorySyncRoutes(g *echo.Group) {
if err := s.validRequestURL(ctx, c); err != nil {
return c.String(http.StatusInternalServerError, err.Error())
}
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DIRECTORY_SYNC_ENTRA_ID); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DIRECTORY_SYNC); err != nil {
return c.String(http.StatusForbidden, err.Error())
}
@@ -443,7 +443,7 @@ func (s *Service) RegisterDirectorySyncRoutes(g *echo.Group) {
if err := s.validRequestURL(ctx, c); err != nil {
return c.String(http.StatusInternalServerError, err.Error())
}
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DIRECTORY_SYNC_ENTRA_ID); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DIRECTORY_SYNC); err != nil {
return c.String(http.StatusForbidden, err.Error())
}
diff --git a/backend/api/v1/actuator_service.go b/backend/api/v1/actuator_service.go
index 8547eb64f7..92d01a9010 100644
--- a/backend/api/v1/actuator_service.go
+++ b/backend/api/v1/actuator_service.go
@@ -332,8 +332,8 @@ func (s *ActuatorService) getServerInfo(ctx context.Context) (*v1pb.ActuatorInfo
return &serverInfo, nil
}
-func (s *ActuatorService) getUsedFeatures(ctx context.Context) ([]v1pb.PlanLimitConfig_Feature, error) {
- var features []v1pb.PlanLimitConfig_Feature
+func (s *ActuatorService) getUsedFeatures(ctx context.Context) ([]v1pb.PlanFeature, error) {
+ var features []v1pb.PlanFeature
// idp
idps, err := s.store.ListIdentityProviders(ctx, &store.FindIdentityProviderMessage{})
@@ -342,7 +342,7 @@ func (s *ActuatorService) getUsedFeatures(ctx context.Context) ([]v1pb.PlanLimit
}
// TODO(d): use fine-grained feature control for SSO.
if len(idps) > 0 {
- features = append(features, v1pb.PlanLimitConfig_ENTERPRISE_SSO)
+ features = append(features, v1pb.PlanFeature_FEATURE_ENTERPRISE_SSO)
}
// setting
@@ -351,7 +351,7 @@ func (s *ActuatorService) getUsedFeatures(ctx context.Context) ([]v1pb.PlanLimit
return nil, errors.Wrapf(err, "failed to get branding logo setting")
}
if brandingLogo != nil && brandingLogo.Value != "" {
- features = append(features, v1pb.PlanLimitConfig_CUSTOM_LOGO)
+ features = append(features, v1pb.PlanFeature_FEATURE_CUSTOM_LOGO)
}
watermark, err := s.store.GetSettingV2(ctx, storepb.SettingName_WATERMARK)
@@ -359,7 +359,7 @@ func (s *ActuatorService) getUsedFeatures(ctx context.Context) ([]v1pb.PlanLimit
return nil, errors.Wrapf(err, "failed to get watermark setting")
}
if watermark != nil && watermark.Value == "1" {
- features = append(features, v1pb.PlanLimitConfig_WATERMARK)
+ features = append(features, v1pb.PlanFeature_FEATURE_WATERMARK)
}
setting, err := s.store.GetWorkspaceGeneralSetting(ctx)
@@ -367,16 +367,16 @@ func (s *ActuatorService) getUsedFeatures(ctx context.Context) ([]v1pb.PlanLimit
return nil, errors.Wrapf(err, "failed to get workspace general setting")
}
if setting.DisallowSignup && !s.profile.SaaS {
- features = append(features, v1pb.PlanLimitConfig_DISALLOW_SELF_SERVICE_SIGNUP)
+ features = append(features, v1pb.PlanFeature_FEATURE_DISALLOW_SELF_SERVICE_SIGNUP)
}
if setting.Require_2Fa {
- features = append(features, v1pb.PlanLimitConfig_TWO_FA)
+ features = append(features, v1pb.PlanFeature_FEATURE_TWO_FA)
}
if setting.GetTokenDuration().GetSeconds() > 0 && float64(setting.GetTokenDuration().GetSeconds()) != auth.DefaultTokenDuration.Seconds() {
- features = append(features, v1pb.PlanLimitConfig_SIGN_IN_FREQUENCY_CONTROL)
+ features = append(features, v1pb.PlanFeature_FEATURE_SIGN_IN_FREQUENCY_CONTROL)
}
if setting.GetAnnouncement().GetText() != "" {
- features = append(features, v1pb.PlanLimitConfig_DASHBOARD_ANNOUNCEMENT)
+ features = append(features, v1pb.PlanFeature_FEATURE_DASHBOARD_ANNOUNCEMENT)
}
// environment tier
@@ -386,7 +386,7 @@ func (s *ActuatorService) getUsedFeatures(ctx context.Context) ([]v1pb.PlanLimit
}
for _, env := range environments.GetEnvironments() {
if v, ok := env.Tags["protected"]; ok && v == "protected" {
- features = append(features, v1pb.PlanLimitConfig_ENVIRONMENT_TIERS)
+ features = append(features, v1pb.PlanFeature_FEATURE_ENVIRONMENT_TIERS)
break
}
}
@@ -397,13 +397,13 @@ func (s *ActuatorService) getUsedFeatures(ctx context.Context) ([]v1pb.PlanLimit
return nil, errors.Wrapf(err, "failed to list database groups")
}
if len(databaseGroups) > 0 {
- features = append(features, v1pb.PlanLimitConfig_DATABASE_GROUPS)
+ features = append(features, v1pb.PlanFeature_FEATURE_DATABASE_GROUPS)
}
return features, nil
}
-func (s *ActuatorService) getUnlicensedFeatures(features []v1pb.PlanLimitConfig_Feature) []v1pb.PlanLimitConfig_Feature {
- var unlicensedFeatures []v1pb.PlanLimitConfig_Feature
+func (s *ActuatorService) getUnlicensedFeatures(features []v1pb.PlanFeature) []v1pb.PlanFeature {
+ var unlicensedFeatures []v1pb.PlanFeature
for _, feature := range features {
if err := s.licenseService.IsFeatureEnabled(feature); err != nil {
unlicensedFeatures = append(unlicensedFeatures, feature)
diff --git a/backend/api/v1/audit_log_service.go b/backend/api/v1/audit_log_service.go
index 75e7463a2a..2bacadd7a9 100644
--- a/backend/api/v1/audit_log_service.go
+++ b/backend/api/v1/audit_log_service.go
@@ -39,7 +39,7 @@ func NewAuditLogService(store *store.Store, iamManager *iam.Manager, licenseServ
}
func (s *AuditLogService) SearchAuditLogs(ctx context.Context, request *v1pb.SearchAuditLogsRequest) (*v1pb.SearchAuditLogsResponse, error) {
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_AUDIT_LOG); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_AUDIT_LOG); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
filter, serr := s.getSearchAuditLogsFilter(ctx, request.Filter)
@@ -97,7 +97,7 @@ func (s *AuditLogService) SearchAuditLogs(ctx context.Context, request *v1pb.Sea
}
func (s *AuditLogService) ExportAuditLogs(ctx context.Context, request *v1pb.ExportAuditLogsRequest) (*v1pb.ExportAuditLogsResponse, error) {
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_AUDIT_LOG); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_AUDIT_LOG); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
if request.Filter == "" {
diff --git a/backend/api/v1/auth_service.go b/backend/api/v1/auth_service.go
index d7487d444b..e65ab0ffd5 100644
--- a/backend/api/v1/auth_service.go
+++ b/backend/api/v1/auth_service.go
@@ -139,7 +139,7 @@ func (s *AuthService) Login(ctx context.Context, request *v1pb.LoginRequest) (*v
tokenDuration := auth.GetTokenDuration(ctx, s.store)
userMFAEnabled := loginUser.MFAConfig != nil && loginUser.MFAConfig.OtpSecret != ""
// We only allow MFA login (2-step) when the feature is enabled and user has enabled MFA.
- if s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_TWO_FA) == nil && !mfaSecondLogin && userMFAEnabled {
+ if s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_TWO_FA) == nil && !mfaSecondLogin && userMFAEnabled {
mfaTempToken, err := auth.GenerateMFATempToken(loginUser.Name, loginUser.ID, s.profile.Mode, s.secret, tokenDuration)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to generate MFA temp token")
@@ -210,7 +210,7 @@ func (s *AuthService) needResetPassword(ctx context.Context, user *store.UserMes
if user.Type != storepb.PrincipalType_END_USER {
return false
}
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_PASSWORD_RESTRICTIONS); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_PASSWORD_RESTRICTIONS); err != nil {
return false
}
@@ -411,7 +411,7 @@ func (s *AuthService) getOrCreateUserWithIDP(ctx context.Context, request *v1pb.
return user, nil
}
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_ENTERPRISE_SSO); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_ENTERPRISE_SSO); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
// Create new user from identity provider.
diff --git a/backend/api/v1/database_group_service.go b/backend/api/v1/database_group_service.go
index 1180d42306..fce3dbb9a1 100644
--- a/backend/api/v1/database_group_service.go
+++ b/backend/api/v1/database_group_service.go
@@ -38,7 +38,7 @@ func NewDatabaseGroupService(store *store.Store, profile *config.Profile, iamMan
// CreateDatabaseGroup creates a database group.
func (s *DatabaseGroupService) CreateDatabaseGroup(ctx context.Context, request *v1pb.CreateDatabaseGroupRequest) (*v1pb.DatabaseGroup, error) {
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DATABASE_GROUPS); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DATABASE_GROUPS); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
projectResourceID, err := common.GetProjectID(request.Parent)
@@ -102,7 +102,7 @@ func (s *DatabaseGroupService) CreateDatabaseGroup(ctx context.Context, request
// UpdateDatabaseGroup updates a database group.
func (s *DatabaseGroupService) UpdateDatabaseGroup(ctx context.Context, request *v1pb.UpdateDatabaseGroupRequest) (*v1pb.DatabaseGroup, error) {
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DATABASE_GROUPS); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DATABASE_GROUPS); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
projectResourceID, databaseGroupResourceID, err := common.GetProjectIDDatabaseGroupID(request.DatabaseGroup.Name)
diff --git a/backend/api/v1/database_service.go b/backend/api/v1/database_service.go
index 742f12a496..8612d94fa1 100644
--- a/backend/api/v1/database_service.go
+++ b/backend/api/v1/database_service.go
@@ -979,7 +979,7 @@ func (s *DatabaseService) UpdateSecret(ctx context.Context, request *v1pb.Update
return nil, status.Errorf(codes.NotFound, "instance %q not found", instanceID)
}
- if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanLimitConfig_DATABASE_SECRET_VARIABLES, instance); err != nil {
+ if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanFeature_FEATURE_DATABASE_SECRET_VARIABLES, instance); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
@@ -1069,7 +1069,7 @@ func (s *DatabaseService) DeleteSecret(ctx context.Context, request *v1pb.Delete
return nil, status.Errorf(codes.NotFound, "instance %q not found", instanceID)
}
- if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanLimitConfig_DATABASE_SECRET_VARIABLES, instance); err != nil {
+ if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanFeature_FEATURE_DATABASE_SECRET_VARIABLES, instance); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
diff --git a/backend/api/v1/idp_service.go b/backend/api/v1/idp_service.go
index 05935e4070..56d52f1ba7 100644
--- a/backend/api/v1/idp_service.go
+++ b/backend/api/v1/idp_service.go
@@ -199,7 +199,7 @@ func (s *IdentityProviderService) DeleteIdentityProvider(ctx context.Context, re
}
func (s *IdentityProviderService) checkFeatureAvailable(ssoType v1pb.IdentityProviderType) error {
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_ENTERPRISE_SSO); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_ENTERPRISE_SSO); err != nil {
return status.Error(codes.PermissionDenied, err.Error())
}
plan := s.licenseService.GetEffectivePlan()
diff --git a/backend/api/v1/instance_service.go b/backend/api/v1/instance_service.go
index bd026a665d..1333a301fd 100644
--- a/backend/api/v1/instance_service.go
+++ b/backend/api/v1/instance_service.go
@@ -389,7 +389,7 @@ func (s *InstanceService) checkDataSource(instance *store.InstanceMessage, dataS
return status.Errorf(codes.InvalidArgument, "data source id is required")
}
- if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanLimitConfig_EXTERNAL_SECRET_MANAGER, instance); err != nil {
+ if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanFeature_FEATURE_EXTERNAL_SECRET_MANAGER, instance); err != nil {
missingFeatureError := status.Error(codes.PermissionDenied, err.Error())
if dataSource.GetExternalSecret() != nil {
return missingFeatureError
@@ -463,12 +463,12 @@ func (s *InstanceService) UpdateInstance(ctx context.Context, request *v1pb.Upda
}
patch.Metadata.Activation = request.Instance.Activation
case "sync_interval":
- if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanLimitConfig_CUSTOM_INSTANCE_SYNC_TIME, instance); err != nil {
+ if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanFeature_FEATURE_CUSTOM_INSTANCE_SYNC_TIME, instance); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
patch.Metadata.SyncInterval = request.Instance.SyncInterval
case "maximum_connections":
- if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanLimitConfig_CUSTOM_INSTANCE_CONNECTION_LIMIT, instance); err != nil {
+ if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanFeature_FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT, instance); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
patch.Metadata.MaximumConnections = request.Instance.MaximumConnections
@@ -692,7 +692,7 @@ func (s *InstanceService) AddDataSource(ctx context.Context, request *v1pb.AddDa
if dataSource.GetType() != storepb.DataSourceType_READ_ONLY {
return nil, status.Error(codes.InvalidArgument, "only read-only data source can be added.")
}
- if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanLimitConfig_INSTANCE_READ_ONLY_CONNECTION, instance); err != nil {
+ if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanFeature_FEATURE_INSTANCE_READ_ONLY_CONNECTION, instance); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
@@ -741,7 +741,7 @@ func (s *InstanceService) UpdateDataSource(ctx context.Context, request *v1pb.Up
}
if dataSource.GetType() == storepb.DataSourceType_READ_ONLY {
- if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanLimitConfig_INSTANCE_READ_ONLY_CONNECTION, instance); err != nil {
+ if err := s.licenseService.IsFeatureEnabledForInstance(v1pb.PlanFeature_FEATURE_INSTANCE_READ_ONLY_CONNECTION, instance); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
}
diff --git a/backend/api/v1/org_policy_service.go b/backend/api/v1/org_policy_service.go
index 85db628bd2..0ae70fb577 100644
--- a/backend/api/v1/org_policy_service.go
+++ b/backend/api/v1/org_policy_service.go
@@ -368,7 +368,7 @@ func (s *OrgPolicyService) convertPolicyPayloadToString(ctx context.Context, pol
case v1pb.PolicyType_ROLLOUT_POLICY:
rolloutPolicy := convertToStorePBRolloutPolicy(policy.GetRolloutPolicy())
if !rolloutPolicy.Automatic {
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_ROLLOUT_POLICY); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_ROLLOUT_POLICY); err != nil {
return "", status.Error(codes.PermissionDenied, err.Error())
}
}
@@ -387,7 +387,7 @@ func (s *OrgPolicyService) convertPolicyPayloadToString(ctx context.Context, pol
}
return string(payloadBytes), nil
case v1pb.PolicyType_DISABLE_COPY_DATA:
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_RESTRICT_COPYING_DATA); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_RESTRICT_COPYING_DATA); err != nil {
return "", status.Error(codes.PermissionDenied, err.Error())
}
payload, err := convertToDisableCopyDataPolicyPayload(policy.GetDisableCopyDataPolicy())
@@ -400,7 +400,7 @@ func (s *OrgPolicyService) convertPolicyPayloadToString(ctx context.Context, pol
}
return string(payloadBytes), nil
case v1pb.PolicyType_DATA_EXPORT:
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_QUERY_DATASOURCE_RESTRICTION); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_QUERY_DATASOURCE_RESTRICTION); err != nil {
return "", status.Error(codes.PermissionDenied, err.Error())
}
payload, err := convertToExportDataPolicyPayload(policy.GetExportDataPolicy())
@@ -413,7 +413,7 @@ func (s *OrgPolicyService) convertPolicyPayloadToString(ctx context.Context, pol
}
return string(payloadBytes), nil
case v1pb.PolicyType_DATA_QUERY:
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_QUERY_DATASOURCE_RESTRICTION); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_QUERY_DATASOURCE_RESTRICTION); err != nil {
return "", status.Error(codes.PermissionDenied, err.Error())
}
payload, err := convertToQueryDataPolicyPayload(policy.GetQueryDataPolicy())
@@ -426,7 +426,7 @@ func (s *OrgPolicyService) convertPolicyPayloadToString(ctx context.Context, pol
}
return string(payloadBytes), nil
case v1pb.PolicyType_MASKING_RULE:
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DATA_MASKING); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DATA_MASKING); err != nil {
return "", status.Error(codes.PermissionDenied, err.Error())
}
payload, err := convertToStorePBMskingRulePolicy(policy.GetMaskingRulePolicy())
@@ -439,7 +439,7 @@ func (s *OrgPolicyService) convertPolicyPayloadToString(ctx context.Context, pol
}
return string(payloadBytes), nil
case v1pb.PolicyType_MASKING_EXCEPTION:
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DATA_MASKING); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DATA_MASKING); err != nil {
return "", status.Error(codes.PermissionDenied, err.Error())
}
payload, err := s.convertToStorePBMaskingExceptionPolicyPayload(ctx, policy.GetMaskingExceptionPolicy())
diff --git a/backend/api/v1/risk_service.go b/backend/api/v1/risk_service.go
index 9527ade01c..6d3c9b1077 100644
--- a/backend/api/v1/risk_service.go
+++ b/backend/api/v1/risk_service.go
@@ -68,7 +68,7 @@ func (s *RiskService) GetRisk(ctx context.Context, request *v1pb.GetRiskRequest)
// CreateRisk creates a risk.
func (s *RiskService) CreateRisk(ctx context.Context, request *v1pb.CreateRiskRequest) (*v1pb.Risk, error) {
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_RISK_ASSESSMENT); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_RISK_ASSESSMENT); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
// Validate the condition.
@@ -91,7 +91,7 @@ func (s *RiskService) CreateRisk(ctx context.Context, request *v1pb.CreateRiskRe
// UpdateRisk updates a risk.
func (s *RiskService) UpdateRisk(ctx context.Context, request *v1pb.UpdateRiskRequest) (*v1pb.Risk, error) {
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_RISK_ASSESSMENT); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_RISK_ASSESSMENT); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
if request.UpdateMask == nil {
diff --git a/backend/api/v1/role_service.go b/backend/api/v1/role_service.go
index 1d39953543..9f629ae602 100644
--- a/backend/api/v1/role_service.go
+++ b/backend/api/v1/role_service.go
@@ -82,7 +82,7 @@ func (s *RoleService) getBuildinRole(roleID string) *store.RoleMessage {
// CreateRole creates a new role.
func (s *RoleService) CreateRole(ctx context.Context, request *v1pb.CreateRoleRequest) (*v1pb.Role, error) {
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_CUSTOM_ROLES); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_CUSTOM_ROLES); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
@@ -125,7 +125,7 @@ func (s *RoleService) CreateRole(ctx context.Context, request *v1pb.CreateRoleRe
// UpdateRole updates an existing role.
func (s *RoleService) UpdateRole(ctx context.Context, request *v1pb.UpdateRoleRequest) (*v1pb.Role, error) {
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_CUSTOM_ROLES); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_CUSTOM_ROLES); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
if request.UpdateMask == nil {
diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.go
index b4aa24ebfc..7efe80f283 100644
--- a/backend/api/v1/setting_service.go
+++ b/backend/api/v1/setting_service.go
@@ -200,7 +200,7 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
if s.profile.SaaS {
return nil, status.Errorf(codes.InvalidArgument, "feature %s is unavailable in current mode", settingName)
}
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DISALLOW_SELF_SERVICE_SIGNUP); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DISALLOW_SELF_SERVICE_SIGNUP); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
oldSetting.DisallowSignup = payload.DisallowSignup
@@ -217,14 +217,14 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
}
oldSetting.ExternalUrl = payload.ExternalUrl
case "value.workspace_profile_setting_value.require_2fa":
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_TWO_FA); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_TWO_FA); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
oldSetting.Require_2Fa = payload.Require_2Fa
case "value.workspace_profile_setting_value.outbound_ip_list":
// We're not support update outbound_ip_list via api.
case "value.workspace_profile_setting_value.token_duration":
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_SIGN_IN_FREQUENCY_CONTROL); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_SIGN_IN_FREQUENCY_CONTROL); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
if payload.TokenDuration != nil && payload.TokenDuration.Seconds > 0 && payload.TokenDuration.AsDuration() < time.Hour {
@@ -232,7 +232,7 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
}
oldSetting.TokenDuration = payload.TokenDuration
case "value.workspace_profile_setting_value.announcement":
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_DASHBOARD_ANNOUNCEMENT); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DASHBOARD_ANNOUNCEMENT); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
oldSetting.Announcement = payload.Announcement
@@ -251,7 +251,7 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
oldSetting.Domains = payload.Domains
case "value.workspace_profile_setting_value.enforce_identity_domain":
if payload.EnforceIdentityDomain {
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_USER_EMAIL_DOMAIN_RESTRICTION); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_USER_EMAIL_DOMAIN_RESTRICTION); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
}
@@ -284,7 +284,7 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
}
storeSettingValue = string(bytes)
case storepb.SettingName_WORKSPACE_APPROVAL:
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_APPROVAL_WORKFLOW); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_APPROVAL_WORKFLOW); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
@@ -369,7 +369,7 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
}
storeSettingValue = string(bytes)
case storepb.SettingName_BRANDING_LOGO:
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_CUSTOM_LOGO); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_CUSTOM_LOGO); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
storeSettingValue = request.Setting.Value.GetStringValue()
@@ -450,7 +450,7 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
storeSettingValue = string(bytes)
case storepb.SettingName_SCHEMA_TEMPLATE:
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_SCHEMA_TEMPLATE); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_SCHEMA_TEMPLATE); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
schemaTemplateSetting := request.Setting.Value.GetSchemaTemplateSettingValue()
@@ -515,7 +515,7 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
}
storeSettingValue = string(bytes)
case storepb.SettingName_WATERMARK:
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_WATERMARK); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_WATERMARK); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
storeSettingValue = request.Setting.Value.GetStringValue()
@@ -545,7 +545,7 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
}
storeSettingValue = string(bytes)
case storepb.SettingName_PASSWORD_RESTRICTION:
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_PASSWORD_RESTRICTIONS); err != nil {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_PASSWORD_RESTRICTIONS); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
passwordSetting := new(storepb.PasswordRestrictionSetting)
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.go
index 75fa60b910..6f5b26ebf6 100644
--- a/backend/api/v1/sql_service.go
+++ b/backend/api/v1/sql_service.go
@@ -439,7 +439,7 @@ func queryRetry(
return nil, nil, time.Duration(0), err
}
}
- if licenseService.IsFeatureEnabledForInstance(v1pb.PlanLimitConfig_DATA_MASKING, instance) == nil {
+ if licenseService.IsFeatureEnabledForInstance(v1pb.PlanFeature_FEATURE_DATA_MASKING, instance) == nil {
masker := NewQueryResultMasker(stores)
sensitivePredicateColumns, err = masker.ExtractSensitivePredicateColumns(ctx, spans, instance, user, action)
if err != nil {
@@ -503,7 +503,7 @@ func queryRetry(
if err := replaceBackupTableWithSource(ctx, stores, instance, database, spans); err != nil {
slog.Debug("failed to replace backup table with source", log.BBError(err))
}
- if licenseService.IsFeatureEnabledForInstance(v1pb.PlanLimitConfig_DATA_MASKING, instance) == nil {
+ if licenseService.IsFeatureEnabledForInstance(v1pb.PlanFeature_FEATURE_DATA_MASKING, instance) == nil {
masker := NewQueryResultMasker(stores)
sensitivePredicateColumns, err = masker.ExtractSensitivePredicateColumns(ctx, spans, instance, user, action)
if err != nil {
@@ -523,7 +523,7 @@ func queryRetry(
}
}
- if licenseService.IsFeatureEnabledForInstance(v1pb.PlanLimitConfig_DATA_MASKING, instance) == nil && !queryContext.Explain {
+ if licenseService.IsFeatureEnabledForInstance(v1pb.PlanFeature_FEATURE_DATA_MASKING, instance) == nil && !queryContext.Explain {
// TODO(zp): Refactor Document Database and RDBMS to use the same masking logic.
if instance.Metadata.GetEngine() == storepb.Engine_COSMOSDB {
if len(spans) != 1 {
@@ -667,7 +667,7 @@ func executeWithTimeout(ctx context.Context, stores *store.Store, licenseService
var timeout time.Duration
// For access control feature, we will use the timeout from request and query data policy.
// Otherwise, no timeout will be applied.
- if licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_QUERY_DATASOURCE_RESTRICTION) == nil {
+ if licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_QUERY_DATASOURCE_RESTRICTION) == nil {
queryDataPolicy, err := stores.GetQueryDataPolicy(ctx)
if err != nil {
return nil, time.Duration(0), errors.Wrap(err, "failed to get query data policy")
@@ -895,7 +895,7 @@ func DoExport(
return nil, duration, errors.New(results[0].GetError())
}
- if licenseService.IsFeatureEnabledForInstance(v1pb.PlanLimitConfig_DATA_MASKING, instance) == nil {
+ if licenseService.IsFeatureEnabledForInstance(v1pb.PlanFeature_FEATURE_DATA_MASKING, instance) == nil {
masker := NewQueryResultMasker(stores)
if err := masker.MaskResults(ctx, spans, results, instance, user, storepb.MaskingExceptionPolicy_MaskingException_EXPORT); err != nil {
return nil, duration, err
diff --git a/backend/api/v1/subscription_service.go b/backend/api/v1/subscription_service.go
index fffffd735a..a522fb89dc 100644
--- a/backend/api/v1/subscription_service.go
+++ b/backend/api/v1/subscription_service.go
@@ -49,7 +49,7 @@ func (*SubscriptionService) GetFeatureMatrix(_ context.Context, _ *v1pb.GetFeatu
resp := &v1pb.FeatureMatrix{}
// Create a map to collect features
- featureMap := make(map[v1pb.PlanLimitConfig_Feature]map[string]bool)
+ featureMap := make(map[v1pb.PlanFeature]map[string]bool)
// Iterate through all plans and features
for planType, features := range enterprise.PlanFeatureMatrix {
diff --git a/backend/api/v1/user_service.go b/backend/api/v1/user_service.go
index 7dd8591baf..fef43695ea 100644
--- a/backend/api/v1/user_service.go
+++ b/backend/api/v1/user_service.go
@@ -821,7 +821,7 @@ func convertToPrincipalType(userType v1pb.UserType) (storepb.PrincipalType, erro
}
func validateEmailWithDomains(ctx context.Context, licenseService enterprise.LicenseService, stores *store.Store, email string, isServiceAccount bool, checkDomainSetting bool) error {
- if licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_USER_EMAIL_DOMAIN_RESTRICTION) != nil {
+ if licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_USER_EMAIL_DOMAIN_RESTRICTION) != nil {
// nolint:nilerr
// feature not enabled, only validate email and skip domain restriction.
if err := validateEmail(email); err != nil {
diff --git a/backend/component/iam/manager.go b/backend/component/iam/manager.go
index d7d9425e41..96dca220a0 100644
--- a/backend/component/iam/manager.go
+++ b/backend/component/iam/manager.go
@@ -53,7 +53,7 @@ func NewManager(store *store.Store, licenseService enterprise.LicenseService) (*
// CEL on the binding is not considered.
// When multiple projects are specified, the user should have permission on every projects.
func (m *Manager) CheckPermission(ctx context.Context, p Permission, user *store.UserMessage, projectIDs ...string) (bool, error) {
- if m.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_IAM) != nil {
+ if m.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_IAM) != nil {
// nolint
return true, nil
}
diff --git a/backend/enterprise/api/license.go b/backend/enterprise/api/license.go
index 7e0c92593e..4cd575e0fc 100644
--- a/backend/enterprise/api/license.go
+++ b/backend/enterprise/api/license.go
@@ -65,9 +65,9 @@ type LicenseService interface {
// LoadSubscription will load subscription.
LoadSubscription(ctx context.Context) *Subscription
// IsFeatureEnabled returns whether a feature is enabled.
- IsFeatureEnabled(feature v1pb.PlanLimitConfig_Feature) error
+ IsFeatureEnabled(feature v1pb.PlanFeature) error
// IsFeatureEnabledForInstance returns whether a feature is enabled for the instance.
- IsFeatureEnabledForInstance(feature v1pb.PlanLimitConfig_Feature, instance *store.InstanceMessage) error
+ IsFeatureEnabledForInstance(feature v1pb.PlanFeature, instance *store.InstanceMessage) error
// GetEffectivePlan gets the effective plan.
GetEffectivePlan() v1pb.PlanType
// GetPlanLimitValue gets the limit value for the plan.
diff --git a/backend/enterprise/api/limit.go b/backend/enterprise/api/limit.go
index 7a57d3142b..a54eca4075 100644
--- a/backend/enterprise/api/limit.go
+++ b/backend/enterprise/api/limit.go
@@ -30,7 +30,7 @@ var PlanLimitValues = map[PlanLimit]map[v1pb.PlanType]int{
}
// PlanFeatureMatrix maps plans to their available features
-var PlanFeatureMatrix = make(map[v1pb.PlanType]map[v1pb.PlanLimitConfig_Feature]bool)
+var PlanFeatureMatrix = make(map[v1pb.PlanType]map[v1pb.PlanFeature]bool)
func init() {
// First unmarshal YAML to a generic map, then convert to JSON for protojson
@@ -56,7 +56,7 @@ func init() {
PlanLimitValues[PlanLimitMaximumUser][plan.Type] = int(plan.MaximumSeatCount)
// Initialize feature map for this plan
- PlanFeatureMatrix[plan.Type] = make(map[v1pb.PlanLimitConfig_Feature]bool)
+ PlanFeatureMatrix[plan.Type] = make(map[v1pb.PlanFeature]bool)
for _, feature := range plan.Features {
PlanFeatureMatrix[plan.Type][feature] = true
}
diff --git a/backend/enterprise/api/plan.yaml b/backend/enterprise/api/plan.yaml
index f8320ba1c2..0558916dec 100644
--- a/backend/enterprise/api/plan.yaml
+++ b/backend/enterprise/api/plan.yaml
@@ -4,174 +4,173 @@ plans:
maximumSeatCount: 20
features:
# Database Change Management
- - DATABASE_CHANGE
- - GIT_BASED_SCHEMA_VERSION_CONTROL
- - DECLARATIVE_SCHEMA_MIGRATION
- - COMPARE_AND_SYNC_SCHEMA
- - ONLINE_SCHEMA_CHANGE
- - PRE_DEPLOYMENT_SQL_REVIEW
- - AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES
- - ONE_CLICK_DATA_ROLLBACK
- - MULTI_DATABASE_BATCH_CHANGES
- - PROGRESSIVE_ENVIRONMENT_DEPLOYMENT
- - SCHEDULED_ROLLOUT_TIME
- - DATABASE_CHANGELOG
- - SCHEMA_DRIFT_DETECTION
- - CHANGELIST
- - SCHEMA_TEMPLATE
- - ROLLOUT_POLICY
+ - FEATURE_DATABASE_CHANGE
+ - FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL
+ - FEATURE_DECLARATIVE_SCHEMA_MIGRATION
+ - FEATURE_COMPARE_AND_SYNC_SCHEMA
+ - FEATURE_ONLINE_SCHEMA_CHANGE
+ - FEATURE_PRE_DEPLOYMENT_SQL_REVIEW
+ - FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES
+ - FEATURE_ONE_CLICK_DATA_ROLLBACK
+ - FEATURE_MULTI_DATABASE_BATCH_CHANGES
+ - FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT
+ - FEATURE_SCHEDULED_ROLLOUT_TIME
+ - FEATURE_DATABASE_CHANGELOG
+ - FEATURE_SCHEMA_DRIFT_DETECTION
+ - FEATURE_CHANGELIST
+ - FEATURE_SCHEMA_TEMPLATE
+ - FEATURE_ROLLOUT_POLICY
# SQL Editor & Development
- - WEB_BASED_SQL_EDITOR
- - SQL_EDITOR_ADMIN_MODE
- - NATURAL_LANGUAGE_TO_SQL
- - AI_QUERY_EXPLANATION
- - AI_QUERY_SUGGESTIONS
- - AUTO_COMPLETE
- - SCHEMA_DIAGRAM
- - SCHEMA_EDITOR
- - DATA_EXPORT
- - QUERY_HISTORY
- - SAVED_AND_SHARED_SQL_SCRIPTS
+ - FEATURE_WEB_BASED_SQL_EDITOR
+ - FEATURE_SQL_EDITOR_ADMIN_MODE
+ - FEATURE_NATURAL_LANGUAGE_TO_SQL
+ - FEATURE_AI_QUERY_EXPLANATION
+ - FEATURE_AI_QUERY_SUGGESTIONS
+ - FEATURE_AUTO_COMPLETE
+ - FEATURE_SCHEMA_DIAGRAM
+ - FEATURE_SCHEMA_EDITOR
+ - FEATURE_DATA_EXPORT
+ - FEATURE_QUERY_HISTORY
+ - FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS
# Security & Compliance
- - IAM
- - INSTANCE_SSL_CONNECTION
- - INSTANCE_CONNECTION_OVER_SSH_TUNNEL
- - INSTANCE_CONNECTION_IAM_AUTHENTICATION
+ - FEATURE_IAM
+ - FEATURE_INSTANCE_SSL_CONNECTION
+ - FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL
+ - FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION
# Administration & Support
- - ENVIRONMENT_MANAGEMENT
- - IM_NOTIFICATIONS
- - TERRAFORM_PROVIDER
- - COMMUNITY_SUPPORT
+ - FEATURE_ENVIRONMENT_MANAGEMENT
+ - FEATURE_IM_NOTIFICATIONS
+ - FEATURE_TERRAFORM_PROVIDER
+ - FEATURE_COMMUNITY_SUPPORT
- type: TEAM
maximumInstanceCount: 10
maximumSeatCount: 20
features:
# Database Change Management
- - DATABASE_CHANGE
- - GIT_BASED_SCHEMA_VERSION_CONTROL
- - DECLARATIVE_SCHEMA_MIGRATION
- - COMPARE_AND_SYNC_SCHEMA
- - ONLINE_SCHEMA_CHANGE
- - PRE_DEPLOYMENT_SQL_REVIEW
- - AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES
- - ONE_CLICK_DATA_ROLLBACK
- - MULTI_DATABASE_BATCH_CHANGES
- - PROGRESSIVE_ENVIRONMENT_DEPLOYMENT
- - SCHEDULED_ROLLOUT_TIME
- - DATABASE_CHANGELOG
- - SCHEMA_DRIFT_DETECTION
- - CHANGELIST
- - SCHEMA_TEMPLATE
- - ROLLOUT_POLICY
+ - FEATURE_DATABASE_CHANGE
+ - FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL
+ - FEATURE_DECLARATIVE_SCHEMA_MIGRATION
+ - FEATURE_COMPARE_AND_SYNC_SCHEMA
+ - FEATURE_ONLINE_SCHEMA_CHANGE
+ - FEATURE_PRE_DEPLOYMENT_SQL_REVIEW
+ - FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES
+ - FEATURE_ONE_CLICK_DATA_ROLLBACK
+ - FEATURE_MULTI_DATABASE_BATCH_CHANGES
+ - FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT
+ - FEATURE_SCHEDULED_ROLLOUT_TIME
+ - FEATURE_DATABASE_CHANGELOG
+ - FEATURE_SCHEMA_DRIFT_DETECTION
+ - FEATURE_CHANGELIST
+ - FEATURE_SCHEMA_TEMPLATE
+ - FEATURE_ROLLOUT_POLICY
# SQL Editor & Development
- - WEB_BASED_SQL_EDITOR
- - SQL_EDITOR_ADMIN_MODE
- - NATURAL_LANGUAGE_TO_SQL
- - AI_QUERY_EXPLANATION
- - AI_QUERY_SUGGESTIONS
- - AUTO_COMPLETE
- - SCHEMA_DIAGRAM
- - SCHEMA_EDITOR
- - DATA_EXPORT
- - QUERY_HISTORY
- - SAVED_AND_SHARED_SQL_SCRIPTS
- - SQL_EDITOR_DDL_DML_RESTRICTION
- - BATCH_QUERY
- - INSTANCE_READ_ONLY_CONNECTION
+ - FEATURE_WEB_BASED_SQL_EDITOR
+ - FEATURE_SQL_EDITOR_ADMIN_MODE
+ - FEATURE_NATURAL_LANGUAGE_TO_SQL
+ - FEATURE_AI_QUERY_EXPLANATION
+ - FEATURE_AI_QUERY_SUGGESTIONS
+ - FEATURE_AUTO_COMPLETE
+ - FEATURE_SCHEMA_DIAGRAM
+ - FEATURE_SCHEMA_EDITOR
+ - FEATURE_DATA_EXPORT
+ - FEATURE_QUERY_HISTORY
+ - FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS
+ - FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION
+ - FEATURE_BATCH_QUERY
+ - FEATURE_INSTANCE_READ_ONLY_CONNECTION
# Security & Compliance
- - IAM
- - INSTANCE_SSL_CONNECTION
- - INSTANCE_CONNECTION_OVER_SSH_TUNNEL
- - INSTANCE_CONNECTION_IAM_AUTHENTICATION
- - GOOGLE_AND_GITHUB_SSO
- - USER_GROUPS
- - DISALLOW_SELF_SERVICE_SIGNUP
- - DATABASE_SECRET_VARIABLES
- - QUERY_DATASOURCE_RESTRICTION
- - CUSTOM_INSTANCE_SYNC_TIME
- - CUSTOM_INSTANCE_CONNECTION_LIMIT
- - AUDIT_LOG # Limited for TEAM
+ - FEATURE_IAM
+ - FEATURE_INSTANCE_SSL_CONNECTION
+ - FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL
+ - FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION
+ - FEATURE_GOOGLE_AND_GITHUB_SSO
+ - FEATURE_USER_GROUPS
+ - FEATURE_DISALLOW_SELF_SERVICE_SIGNUP
+ - FEATURE_DATABASE_SECRET_VARIABLES
+ - FEATURE_QUERY_DATASOURCE_RESTRICTION
+ - FEATURE_CUSTOM_INSTANCE_SYNC_TIME
+ - FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT
+ - FEATURE_AUDIT_LOG # Limited for TEAM
# Administration & Support
- - ENVIRONMENT_MANAGEMENT
- - IM_NOTIFICATIONS
- - TERRAFORM_PROVIDER
- - DATABASE_GROUPS
- - EMAIL_SUPPORT
+ - FEATURE_ENVIRONMENT_MANAGEMENT
+ - FEATURE_IM_NOTIFICATIONS
+ - FEATURE_TERRAFORM_PROVIDER
+ - FEATURE_DATABASE_GROUPS
+ - FEATURE_EMAIL_SUPPORT
- type: ENTERPRISE
maximumInstanceCount: -1
maximumSeatCount: -1
features:
# Database Change Management
- - DATABASE_CHANGE
- - GIT_BASED_SCHEMA_VERSION_CONTROL
- - DECLARATIVE_SCHEMA_MIGRATION
- - COMPARE_AND_SYNC_SCHEMA
- - ONLINE_SCHEMA_CHANGE
- - PRE_DEPLOYMENT_SQL_REVIEW
- - AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES
- - ONE_CLICK_DATA_ROLLBACK
- - MULTI_DATABASE_BATCH_CHANGES
- - PROGRESSIVE_ENVIRONMENT_DEPLOYMENT
- - SCHEDULED_ROLLOUT_TIME
- - DATABASE_CHANGELOG
- - SCHEMA_DRIFT_DETECTION
- - CHANGELIST
- - SCHEMA_TEMPLATE
- - ROLLOUT_POLICY
+ - FEATURE_DATABASE_CHANGE
+ - FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL
+ - FEATURE_DECLARATIVE_SCHEMA_MIGRATION
+ - FEATURE_COMPARE_AND_SYNC_SCHEMA
+ - FEATURE_ONLINE_SCHEMA_CHANGE
+ - FEATURE_PRE_DEPLOYMENT_SQL_REVIEW
+ - FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES
+ - FEATURE_ONE_CLICK_DATA_ROLLBACK
+ - FEATURE_MULTI_DATABASE_BATCH_CHANGES
+ - FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT
+ - FEATURE_SCHEDULED_ROLLOUT_TIME
+ - FEATURE_DATABASE_CHANGELOG
+ - FEATURE_SCHEMA_DRIFT_DETECTION
+ - FEATURE_CHANGELIST
+ - FEATURE_SCHEMA_TEMPLATE
+ - FEATURE_ROLLOUT_POLICY
# SQL Editor & Development
- - WEB_BASED_SQL_EDITOR
- - SQL_EDITOR_ADMIN_MODE
- - NATURAL_LANGUAGE_TO_SQL
- - AI_QUERY_EXPLANATION
- - AI_QUERY_SUGGESTIONS
- - AUTO_COMPLETE
- - SCHEMA_DIAGRAM
- - SCHEMA_EDITOR
- - DATA_EXPORT
- - QUERY_HISTORY
- - SAVED_AND_SHARED_SQL_SCRIPTS
- - SQL_EDITOR_DDL_DML_RESTRICTION
- - BATCH_QUERY
- - INSTANCE_READ_ONLY_CONNECTION
- - RESTRICT_COPYING_DATA
+ - FEATURE_WEB_BASED_SQL_EDITOR
+ - FEATURE_SQL_EDITOR_ADMIN_MODE
+ - FEATURE_NATURAL_LANGUAGE_TO_SQL
+ - FEATURE_AI_QUERY_EXPLANATION
+ - FEATURE_AI_QUERY_SUGGESTIONS
+ - FEATURE_AUTO_COMPLETE
+ - FEATURE_SCHEMA_DIAGRAM
+ - FEATURE_SCHEMA_EDITOR
+ - FEATURE_DATA_EXPORT
+ - FEATURE_QUERY_HISTORY
+ - FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS
+ - FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION
+ - FEATURE_BATCH_QUERY
+ - FEATURE_INSTANCE_READ_ONLY_CONNECTION
+ - FEATURE_RESTRICT_COPYING_DATA
# Security & Compliance
- - IAM
- - INSTANCE_SSL_CONNECTION
- - INSTANCE_CONNECTION_OVER_SSH_TUNNEL
- - INSTANCE_CONNECTION_IAM_AUTHENTICATION
- - GOOGLE_AND_GITHUB_SSO
- - USER_GROUPS
- - DISALLOW_SELF_SERVICE_SIGNUP
- - DATABASE_SECRET_VARIABLES
- - QUERY_DATASOURCE_RESTRICTION
- - CUSTOM_INSTANCE_SYNC_TIME
- - CUSTOM_INSTANCE_CONNECTION_LIMIT
- - RISK_ASSESSMENT
- - APPROVAL_WORKFLOW
- - AUDIT_LOG # Full for ENTERPRISE
- - ENTERPRISE_SSO
- - TWO_FA
- - PASSWORD_RESTRICTIONS
- - CUSTOM_ROLES
- - REQUEST_ROLE_WORKFLOW
- - DATA_MASKING
- - DATA_CLASSIFICATION
- - SCIM
- - DIRECTORY_SYNC_ENTRA_ID
- - DIRECTORY_SYNC_OKTA
- - SIGN_IN_FREQUENCY_CONTROL
- - EXTERNAL_SECRET_MANAGER
- - USER_EMAIL_DOMAIN_RESTRICTION
+ - FEATURE_IAM
+ - FEATURE_INSTANCE_SSL_CONNECTION
+ - FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL
+ - FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION
+ - FEATURE_GOOGLE_AND_GITHUB_SSO
+ - FEATURE_USER_GROUPS
+ - FEATURE_DISALLOW_SELF_SERVICE_SIGNUP
+ - FEATURE_DATABASE_SECRET_VARIABLES
+ - FEATURE_QUERY_DATASOURCE_RESTRICTION
+ - FEATURE_CUSTOM_INSTANCE_SYNC_TIME
+ - FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT
+ - FEATURE_RISK_ASSESSMENT
+ - FEATURE_APPROVAL_WORKFLOW
+ - FEATURE_AUDIT_LOG # Full for ENTERPRISE
+ - FEATURE_ENTERPRISE_SSO
+ - FEATURE_TWO_FA
+ - FEATURE_PASSWORD_RESTRICTIONS
+ - FEATURE_CUSTOM_ROLES
+ - FEATURE_REQUEST_ROLE_WORKFLOW
+ - FEATURE_DATA_MASKING
+ - FEATURE_DATA_CLASSIFICATION
+ - FEATURE_SCIM
+ - FEATURE_DIRECTORY_SYNC
+ - FEATURE_SIGN_IN_FREQUENCY_CONTROL
+ - FEATURE_EXTERNAL_SECRET_MANAGER
+ - FEATURE_USER_EMAIL_DOMAIN_RESTRICTION
# Administration & Support
- - ENVIRONMENT_MANAGEMENT
- - IM_NOTIFICATIONS
- - TERRAFORM_PROVIDER
- - DATABASE_GROUPS
- - ENVIRONMENT_TIERS
- - DASHBOARD_ANNOUNCEMENT
- - API_INTEGRATION_GUIDANCE
- - CUSTOM_LOGO
- - WATERMARK
- - ROADMAP_PRIORITIZATION
- - CUSTOM_MSA
- - DEDICATED_SUPPORT_WITH_SLA
\ No newline at end of file
+ - FEATURE_ENVIRONMENT_MANAGEMENT
+ - FEATURE_IM_NOTIFICATIONS
+ - FEATURE_TERRAFORM_PROVIDER
+ - FEATURE_DATABASE_GROUPS
+ - FEATURE_ENVIRONMENT_TIERS
+ - FEATURE_DASHBOARD_ANNOUNCEMENT
+ - FEATURE_API_INTEGRATION_GUIDANCE
+ - FEATURE_CUSTOM_LOGO
+ - FEATURE_WATERMARK
+ - FEATURE_ROADMAP_PRIORITIZATION
+ - FEATURE_CUSTOM_MSA
+ - FEATURE_DEDICATED_SUPPORT_WITH_SLA
\ No newline at end of file
diff --git a/backend/enterprise/service/license.go b/backend/enterprise/service/license.go
index bc4ede4d81..15045030d8 100644
--- a/backend/enterprise/service/license.go
+++ b/backend/enterprise/service/license.go
@@ -85,7 +85,7 @@ func (s *LicenseService) LoadSubscription(ctx context.Context) *enterprise.Subsc
}
// IsFeatureEnabled returns whether a feature is enabled.
-func (s *LicenseService) IsFeatureEnabled(f v1pb.PlanLimitConfig_Feature) error {
+func (s *LicenseService) IsFeatureEnabled(f v1pb.PlanFeature) error {
plan := s.GetEffectivePlan()
features, ok := enterprise.PlanFeatureMatrix[plan]
if !ok || !features[f] {
@@ -95,7 +95,7 @@ func (s *LicenseService) IsFeatureEnabled(f v1pb.PlanLimitConfig_Feature) error
}
// IsFeatureEnabledForInstance returns whether a feature is enabled for the instance.
-func (s *LicenseService) IsFeatureEnabledForInstance(f v1pb.PlanLimitConfig_Feature, instance *store.InstanceMessage) error {
+func (s *LicenseService) IsFeatureEnabledForInstance(f v1pb.PlanFeature, instance *store.InstanceMessage) error {
plan := s.GetEffectivePlan()
// DONOT check instance license fo FREE plan.
if plan == v1pb.PlanType_FREE {
@@ -178,13 +178,13 @@ func (s *LicenseService) RefreshCache(ctx context.Context) {
// Helper functions to avoid circular import
// accessErrorMessage returns a error message with feature name and minimum supported plan.
-func accessErrorMessage(f v1pb.PlanLimitConfig_Feature) string {
+func accessErrorMessage(f v1pb.PlanFeature) string {
plan := minimumSupportedPlan(f)
return fmt.Sprintf("%s is a %s feature, please upgrade to access it.", f.String(), plan.String())
}
// minimumSupportedPlan will find the minimum plan which supports the target feature.
-func minimumSupportedPlan(f v1pb.PlanLimitConfig_Feature) v1pb.PlanType {
+func minimumSupportedPlan(f v1pb.PlanFeature) v1pb.PlanType {
// Check from lowest to highest plan
if enterprise.PlanFeatureMatrix[v1pb.PlanType_FREE][f] {
return v1pb.PlanType_FREE
@@ -196,8 +196,8 @@ func minimumSupportedPlan(f v1pb.PlanLimitConfig_Feature) v1pb.PlanType {
}
// instanceLimitFeature is the map for instance feature. Only allowed to access these feature for activate instance.
-var instanceLimitFeature = map[v1pb.PlanLimitConfig_Feature]bool{
- v1pb.PlanLimitConfig_DATABASE_SECRET_VARIABLES: true,
- v1pb.PlanLimitConfig_INSTANCE_READ_ONLY_CONNECTION: true,
- v1pb.PlanLimitConfig_DATA_MASKING: true,
+var instanceLimitFeature = map[v1pb.PlanFeature]bool{
+ v1pb.PlanFeature_FEATURE_DATABASE_SECRET_VARIABLES: true,
+ v1pb.PlanFeature_FEATURE_INSTANCE_READ_ONLY_CONNECTION: true,
+ v1pb.PlanFeature_FEATURE_DATA_MASKING: true,
}
diff --git a/backend/runner/approval/runner.go b/backend/runner/approval/runner.go
index bf231931d9..3f3e535b1e 100644
--- a/backend/runner/approval/runner.go
+++ b/backend/runner/approval/runner.go
@@ -137,7 +137,7 @@ func (r *Runner) findApprovalTemplateForIssue(ctx context.Context, issue *store.
// no need to find if
// - feature is not enabled
// - approval setting rules are empty
- if r.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_APPROVAL_WORKFLOW) != nil || len(approvalSetting.Rules) == 0 {
+ if r.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_APPROVAL_WORKFLOW) != nil || len(approvalSetting.Rules) == 0 {
// nolint:nilerr
return nil, 0, true, nil
}
diff --git a/backend/runner/plancheck/statement_advise_executor.go b/backend/runner/plancheck/statement_advise_executor.go
index 9d4a4b9a3e..a0470063df 100644
--- a/backend/runner/plancheck/statement_advise_executor.go
+++ b/backend/runner/plancheck/statement_advise_executor.go
@@ -51,7 +51,7 @@ func (e *StatementAdviseExecutor) Run(ctx context.Context, config *storepb.PlanC
if config.ChangeDatabaseType == storepb.PlanCheckRunConfig_CHANGE_DATABASE_TYPE_UNSPECIFIED {
return nil, errors.Errorf("change database type is unspecified")
}
- if err := e.licenseService.IsFeatureEnabled(v1pb.PlanLimitConfig_PRE_DEPLOYMENT_SQL_REVIEW); err != nil {
+ if err := e.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_PRE_DEPLOYMENT_SQL_REVIEW); err != nil {
// nolint:nilerr
return []*storepb.PlanCheckRunResult_Result{
{
diff --git a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
index 356d74da8a..25474d2b19 100644
--- a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
@@ -112,7 +112,7 @@ import {
environmentNamePrefix,
} from "@/store/modules/v1/common";
import { Engine } from "@/types/proto/v1/common";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type { SearchParams, SearchScope } from "@/utils";
import {
allowUsingSchemaEditor,
@@ -153,7 +153,7 @@ const disableSchemaEditor = useAppFeature(
);
const featureModalContext = ref<{
- feature?: PlanLimitConfig_Feature;
+ feature?: PlanFeature;
}>({});
const schemaEditorContext = ref<{
diff --git a/frontend/src/components/ColumnDataTable/SemanticTypeCell.vue b/frontend/src/components/ColumnDataTable/SemanticTypeCell.vue
index b200b3a1dc..01725b5ff9 100644
--- a/frontend/src/components/ColumnDataTable/SemanticTypeCell.vue
+++ b/frontend/src/components/ColumnDataTable/SemanticTypeCell.vue
@@ -24,7 +24,7 @@
</div>
<FeatureModal
- :feature="PlanLimitConfig_Feature.DATA_MASKING"
+ :feature="PlanFeature.FEATURE_DATA_MASKING"
:instance="database.instanceResource"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
@@ -47,7 +47,7 @@ import { useSemanticType } from "@/components/SensitiveData/useSemanticType";
import { MiniActionButton } from "@/components/v2";
import { useSubscriptionV1Store } from "@/store";
import type { ComposedDatabase } from "@/types";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import FeatureModal from "../FeatureGuard/FeatureModal.vue";
import SemanticTypesDrawer from "../SensitiveData/components/SemanticTypesDrawer.vue";
@@ -76,12 +76,12 @@ const { semanticType, semanticTypeList } = useSemanticType(
);
const hasSensitiveDataFeature = computed(() => {
- return subscriptionV1Store.hasFeature(PlanLimitConfig_Feature.DATA_MASKING);
+ return subscriptionV1Store.hasFeature(PlanFeature.FEATURE_DATA_MASKING);
});
const instanceMissingLicense = computed(() => {
return subscriptionV1Store.instanceMissingLicense(
- PlanLimitConfig_Feature.DATA_MASKING,
+ PlanFeature.FEATURE_DATA_MASKING,
props.database.instanceResource
);
});
diff --git a/frontend/src/components/ColumnDataTable/index.vue b/frontend/src/components/ColumnDataTable/index.vue
index b187d744f8..2ddb435311 100644
--- a/frontend/src/components/ColumnDataTable/index.vue
+++ b/frontend/src/components/ColumnDataTable/index.vue
@@ -24,7 +24,7 @@ import {
} from "@/store";
import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type {
ColumnMetadata,
TableMetadata,
@@ -64,7 +64,7 @@ const engine = computed(() => {
const subscriptionV1Store = useSubscriptionV1Store();
const hasSensitiveDataFeature = computed(() => {
- return subscriptionV1Store.hasFeature(PlanLimitConfig_Feature.DATA_MASKING);
+ return subscriptionV1Store.hasFeature(PlanFeature.FEATURE_DATA_MASKING);
});
const showSensitiveColumn = computed(() => {
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/Toolbar.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/Toolbar.vue
index d67de73463..debbab61d3 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/Toolbar.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/Toolbar.vue
@@ -2,7 +2,7 @@
<div class="flex items-center gap-x-2">
<NButton type="primary" :disabled="!allowAdmin" @click="createRule">
<FeatureBadge
- :feature="PlanLimitConfig_Feature.APPROVAL_WORKFLOW"
+ :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW"
class="mr-1 text-white"
/>
{{ $t("common.create") }}
@@ -13,7 +13,7 @@
<script lang="ts" setup>
import { NButton } from "naive-ui";
import { FeatureBadge } from "@/components/FeatureGuard";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { useCustomApprovalContext } from "../context";
import { emptyLocalApprovalRule } from "../logic";
diff --git a/frontend/src/components/Database/DatabaseSensitiveDataPanel.vue b/frontend/src/components/Database/DatabaseSensitiveDataPanel.vue
index ad5aef5c74..e692440e97 100644
--- a/frontend/src/components/Database/DatabaseSensitiveDataPanel.vue
+++ b/frontend/src/components/Database/DatabaseSensitiveDataPanel.vue
@@ -1,7 +1,7 @@
<template>
<div class="w-full space-y-4">
<FeatureAttention
- :feature="PlanLimitConfig_Feature.DATA_MASKING"
+ :feature="PlanFeature.FEATURE_DATA_MASKING"
:instance="database.instanceResource"
/>
<div
@@ -21,7 +21,7 @@
<template #icon>
<ShieldCheckIcon v-if="hasSensitiveDataFeature" class="w-4" />
<FeatureBadge
- :feature="PlanLimitConfig_Feature.DATA_MASKING"
+ :feature="PlanFeature.FEATURE_DATA_MASKING"
class="text-white"
:instance="database.instanceResource"
/>
@@ -43,7 +43,7 @@
</div>
<FeatureModal
- :feature="PlanLimitConfig_Feature.DATA_MASKING"
+ :feature="PlanFeature.FEATURE_DATA_MASKING"
:open="state.showFeatureModal"
:instance="database.instanceResource"
@cancel="state.showFeatureModal = false"
@@ -85,7 +85,7 @@ import { isCurrentColumnException } from "@/components/SensitiveData/utils";
import { SearchBox } from "@/components/v2";
import { featureToRef, usePolicyV1Store, useDatabaseCatalog } from "@/store";
import { type ComposedDatabase } from "@/types";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import {
ObjectSchema_Type,
type ObjectSchema,
@@ -142,7 +142,7 @@ const hasPolicyPermission = computed(() => {
const policyStore = usePolicyV1Store();
-const hasSensitiveDataFeature = featureToRef(PlanLimitConfig_Feature.DATA_MASKING);
+const hasSensitiveDataFeature = featureToRef(PlanFeature.FEATURE_DATA_MASKING);
const databaseCatalog = useDatabaseCatalog(props.database.name, false);
diff --git a/frontend/src/components/DatabaseDetail/Settings/components/Secrets.vue b/frontend/src/components/DatabaseDetail/Settings/components/Secrets.vue
index 3553d88072..6b628ba4ca 100644
--- a/frontend/src/components/DatabaseDetail/Settings/components/Secrets.vue
+++ b/frontend/src/components/DatabaseDetail/Settings/components/Secrets.vue
@@ -7,7 +7,7 @@
{{ $t("database.secret.self") }}
</p>
<FeatureBadge
- :feature="PlanLimitConfig_Feature.DATABASE_SECRET_VARIABLES"
+ :feature="PlanFeature.FEATURE_DATABASE_SECRET_VARIABLES"
class="ml-2"
:instance="database.instanceResource"
/>
@@ -33,7 +33,7 @@
</div>
</div>
<FeatureAttention
- :feature="PlanLimitConfig_Feature.DATABASE_SECRET_VARIABLES"
+ :feature="PlanFeature.FEATURE_DATABASE_SECRET_VARIABLES"
:instance="database.instanceResource"
/>
<div>
@@ -159,7 +159,7 @@
</Drawer>
</div>
<FeatureModal
- :feature="PlanLimitConfig_Feature.DATABASE_SECRET_VARIABLES"
+ :feature="PlanFeature.FEATURE_DATABASE_SECRET_VARIABLES"
:open="showFeatureModal"
:instance="database.instanceResource"
@cancel="showFeatureModal = false"
@@ -186,7 +186,7 @@ import {
} from "@/store";
import { type ComposedDatabase } from "@/types";
import { Secret } from "@/types/proto/v1/database_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
export type Detail = {
secret: Secret;
@@ -261,7 +261,7 @@ const extractSecretName = (name: string) => {
const hasSecretFeature = computed(() => {
return subscriptionV1Store.hasInstanceFeature(
- PlanLimitConfig_Feature.DATABASE_SECRET_VARIABLES,
+ PlanFeature.FEATURE_DATABASE_SECRET_VARIABLES,
props.database.instanceResource
);
});
diff --git a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
index 588f920a5d..2cf8318a9c 100644
--- a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
+++ b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
@@ -6,7 +6,7 @@
</label>
<!-- TODO(d): fix this feature control. -->
<FeatureBadge
- :feature="PlanLimitConfig_Feature.QUERY_DATASOURCE_RESTRICTION"
+ :feature="PlanFeature.FEATURE_QUERY_DATASOURCE_RESTRICTION"
/>
</div>
<div>
@@ -110,7 +110,7 @@ import {
DisableCopyDataPolicy,
PolicyType,
} from "@/types/proto/v1/org_policy_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import { FeatureBadge } from "../FeatureGuard";
import { Switch } from "../v2";
@@ -172,7 +172,7 @@ const adminDataSourceQueruRestrictionEnabled = computed(() => {
});
const hasAccessControlFeature = computed(() =>
- hasFeature(PlanLimitConfig_Feature.QUERY_DATASOURCE_RESTRICTION)
+ hasFeature(PlanFeature.FEATURE_QUERY_DATASOURCE_RESTRICTION)
);
const allowUpdatePolicy = computed(() => {
diff --git a/frontend/src/components/EnvironmentForm/EnvironmentForm.vue b/frontend/src/components/EnvironmentForm/EnvironmentForm.vue
index 92a039859e..d99f08dec6 100644
--- a/frontend/src/components/EnvironmentForm/EnvironmentForm.vue
+++ b/frontend/src/components/EnvironmentForm/EnvironmentForm.vue
@@ -18,7 +18,7 @@ import { hasFeature } from "@/store";
import { VirtualRoleType } from "@/types";
import type { Policy } from "@/types/proto/v1/org_policy_service";
import { PolicyType } from "@/types/proto/v1/org_policy_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type { Environment } from "@/types/v1/environment";
import { FeatureModal } from "../FeatureGuard";
import { provideEnvironmentFormContext } from "./context";
@@ -83,21 +83,21 @@ onBeforeRouteLeave((to, from, next) => {
useEmitteryEventListener(events, "create", (params) => {
const { rolloutPolicy, environment } = params;
if (environment.tags?.protected === "protected") {
- if (!hasFeature(PlanLimitConfig_Feature.ENVIRONMENT_TIERS)) {
- missingFeature.value = PlanLimitConfig_Feature.ENVIRONMENT_TIERS;
+ if (!hasFeature(PlanFeature.FEATURE_ENVIRONMENT_TIERS)) {
+ missingFeature.value = PlanFeature.FEATURE_ENVIRONMENT_TIERS;
return;
}
}
const rp = rolloutPolicy.rolloutPolicy;
if (rp?.automatic === false) {
if (rp.issueRoles.includes(VirtualRoleType.LAST_APPROVER)) {
- if (!hasFeature(PlanLimitConfig_Feature.APPROVAL_WORKFLOW)) {
- missingFeature.value = PlanLimitConfig_Feature.APPROVAL_WORKFLOW;
+ if (!hasFeature(PlanFeature.FEATURE_APPROVAL_WORKFLOW)) {
+ missingFeature.value = PlanFeature.FEATURE_APPROVAL_WORKFLOW;
return;
}
}
- if (!hasFeature(PlanLimitConfig_Feature.ROLLOUT_POLICY)) {
- missingFeature.value = PlanLimitConfig_Feature.ROLLOUT_POLICY;
+ if (!hasFeature(PlanFeature.FEATURE_ROLLOUT_POLICY)) {
+ missingFeature.value = PlanFeature.FEATURE_ROLLOUT_POLICY;
return;
}
}
@@ -107,9 +107,9 @@ useEmitteryEventListener(events, "create", (params) => {
useEmitteryEventListener(events, "update", (environment) => {
if (
environment.tags.protected === "protected" &&
- !hasFeature(PlanLimitConfig_Feature.ENVIRONMENT_TIERS)
+ !hasFeature(PlanFeature.FEATURE_ENVIRONMENT_TIERS)
) {
- missingFeature.value = PlanLimitConfig_Feature.ENVIRONMENT_TIERS;
+ missingFeature.value = PlanFeature.FEATURE_ENVIRONMENT_TIERS;
return;
}
@@ -121,13 +121,13 @@ useEmitteryEventListener(events, "update-policy", (params) => {
const rp = policy.rolloutPolicy;
if (rp?.automatic === false) {
if (rp.issueRoles.includes(VirtualRoleType.LAST_APPROVER)) {
- if (!hasFeature(PlanLimitConfig_Feature.APPROVAL_WORKFLOW)) {
- missingFeature.value = PlanLimitConfig_Feature.APPROVAL_WORKFLOW;
+ if (!hasFeature(PlanFeature.FEATURE_APPROVAL_WORKFLOW)) {
+ missingFeature.value = PlanFeature.FEATURE_APPROVAL_WORKFLOW;
return;
}
}
- if (!hasFeature(PlanLimitConfig_Feature.ROLLOUT_POLICY)) {
- missingFeature.value = PlanLimitConfig_Feature.ROLLOUT_POLICY;
+ if (!hasFeature(PlanFeature.FEATURE_ROLLOUT_POLICY)) {
+ missingFeature.value = PlanFeature.FEATURE_ROLLOUT_POLICY;
return;
}
}
diff --git a/frontend/src/components/EnvironmentForm/Form.vue b/frontend/src/components/EnvironmentForm/Form.vue
index 0e2ea4dff6..696542d65c 100644
--- a/frontend/src/components/EnvironmentForm/Form.vue
+++ b/frontend/src/components/EnvironmentForm/Form.vue
@@ -36,7 +36,7 @@
<div v-if="features.includes('TIER')" class="flex flex-col gap-y-2">
<label class="font-medium flex items-center">
{{ $t("policy.environment-tier.name") }}
- <FeatureBadge :feature="PlanLimitConfig_Feature.ENVIRONMENT_TIERS" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_ENVIRONMENT_TIERS" />
</label>
<p class="text-sm text-gray-600">
<i18n-t tag="span" keypath="policy.environment-tier.description">
@@ -146,7 +146,7 @@ import {
pushNotification,
} from "@/store";
import { environmentNamePrefix } from "@/store/modules/v1/common";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { FeatureBadge } from "../FeatureGuard";
import SQLReviewForResource from "../SQLReview/components/SQLReviewForResource.vue";
import { ResourceIdField } from "../v2";
@@ -206,7 +206,7 @@ watch(
);
const hasEnvironmentPolicyFeature = computed(() =>
- hasFeature(PlanLimitConfig_Feature.ENVIRONMENT_TIERS)
+ hasFeature(PlanFeature.FEATURE_ENVIRONMENT_TIERS)
);
const allowArchive = computed(() => {
@@ -242,7 +242,7 @@ const renderColorPicker = () => {
}}
onUpdateValue={(color: string) => {
if (!hasEnvironmentPolicyFeature.value) {
- missingFeature.value = PlanLimitConfig_Feature.ENVIRONMENT_TIERS;
+ missingFeature.value = PlanFeature.FEATURE_ENVIRONMENT_TIERS;
return;
}
state.value.environment.color = color;
diff --git a/frontend/src/components/EnvironmentForm/context.ts b/frontend/src/components/EnvironmentForm/context.ts
index 32a1af9332..0e9e9453e2 100644
--- a/frontend/src/components/EnvironmentForm/context.ts
+++ b/frontend/src/components/EnvironmentForm/context.ts
@@ -5,7 +5,7 @@ import type { InjectionKey, Ref } from "vue";
import { provide, inject, computed, ref, watch } from "vue";
import type { ResourceIdField } from "@/components/v2";
import { PolicyType, type Policy } from "@/types/proto/v1/org_policy_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type { Environment } from "@/types/v1/environment";
import { hasWorkspacePermissionV2 } from "@/utils";
@@ -49,7 +49,7 @@ export const provideEnvironmentFormContext = (baseContext: {
rolloutPolicy: cloneDeep(rolloutPolicy.value),
policyChanged: false,
});
- const missingFeature = ref<PlanLimitConfig_Feature | undefined>(undefined);
+ const missingFeature = ref<PlanFeature | undefined>(undefined);
const resourceIdField = ref<InstanceType<typeof ResourceIdField>>();
const valueChanged = (
diff --git a/frontend/src/components/FeatureGuard/FeatureAttention.vue b/frontend/src/components/FeatureGuard/FeatureAttention.vue
index 6a1a10d2d7..608b57d144 100644
--- a/frontend/src/components/FeatureGuard/FeatureAttention.vue
+++ b/frontend/src/components/FeatureGuard/FeatureAttention.vue
@@ -29,7 +29,7 @@ import type {
Instance,
InstanceResource,
} from "@/types/proto/v1/instance_service";
-import { PlanLimitConfig_Feature, PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanFeature, PlanType } from "@/types/proto/v1/subscription_service";
import { autoSubscriptionRoute, hasWorkspacePermissionV2 } from "@/utils";
import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
@@ -44,7 +44,7 @@ interface LocalState {
const props = withDefaults(
defineProps<{
- feature: PlanLimitConfig_Feature;
+ feature: PlanFeature;
description?: string;
type?: "info" | "warning" | "error";
instance?: Instance | InstanceResource;
diff --git a/frontend/src/components/FeatureGuard/FeatureBadge.vue b/frontend/src/components/FeatureGuard/FeatureBadge.vue
index 6bf1337867..e59f07a683 100644
--- a/frontend/src/components/FeatureGuard/FeatureBadge.vue
+++ b/frontend/src/components/FeatureGuard/FeatureBadge.vue
@@ -65,7 +65,7 @@ import type {
Instance,
InstanceResource,
} from "@/types/proto/v1/instance_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { autoSubscriptionRoute, hasWorkspacePermissionV2 } from "@/utils";
import InstanceAssignment from "../InstanceAssignment.vue";
@@ -75,7 +75,7 @@ interface LocalState {
const props = withDefaults(
defineProps<{
- feature: PlanLimitConfig_Feature;
+ feature: PlanFeature;
instance?: Instance | InstanceResource;
showInstanceMissingLicense?: boolean;
clickable?: boolean;
diff --git a/frontend/src/components/FeatureGuard/FeatureModal.vue b/frontend/src/components/FeatureGuard/FeatureModal.vue
index 9f0e9908b5..6cb7e3e624 100644
--- a/frontend/src/components/FeatureGuard/FeatureModal.vue
+++ b/frontend/src/components/FeatureGuard/FeatureModal.vue
@@ -110,7 +110,7 @@ import type {
InstanceResource,
} from "@/types/proto/v1/instance_service";
import {
- PlanLimitConfig_Feature,
+ PlanFeature,
PlanType,
} from "@/types/proto/v1/subscription_service";
import { autoSubscriptionRoute, hasWorkspacePermissionV2 } from "@/utils";
@@ -125,11 +125,11 @@ interface LocalState {
const props = withDefaults(
defineProps<{
open: boolean;
- feature?: PlanLimitConfig_Feature;
+ feature?: PlanFeature;
instance?: Instance | InstanceResource;
}>(),
{
- feature: PlanLimitConfig_Feature.FEATURE_UNSPECIFIED,
+ feature: PlanFeature.FEATURE_UNSPECIFIED,
instance: undefined,
}
);
diff --git a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue
index c242ee2bdb..4aef35407e 100644
--- a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue
+++ b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue
@@ -5,7 +5,7 @@
<h1 class="text-2xl font-bold">
{{ title }}
</h1>
- <FeatureBadge :feature="PlanLimitConfig_Feature.NATURAL_LANGUAGE_TO_SQL" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_NATURAL_LANGUAGE_TO_SQL" />
</div>
<span v-if="!allowEdit" class="text-sm text-gray-400">
{{ $t("settings.general.workspace.only-admin-can-edit") }}
@@ -167,7 +167,7 @@ import {
AISetting_Provider,
Setting_SettingName,
} from "@/types/proto/v1/setting_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { FeatureBadge } from "../FeatureGuard";
interface LocalState {
@@ -199,7 +199,7 @@ const aiSetting = computed(
() => settingV1Store.getSettingByName(Setting_SettingName.AI)?.value?.aiSetting
);
-const hasAIFeature = computed(() => hasFeature(PlanLimitConfig_Feature.NATURAL_LANGUAGE_TO_SQL));
+const hasAIFeature = computed(() => hasFeature(PlanFeature.FEATURE_NATURAL_LANGUAGE_TO_SQL));
const getInitialState = (): LocalState => {
return {
diff --git a/frontend/src/components/GeneralSetting/AccountSetting.vue b/frontend/src/components/GeneralSetting/AccountSetting.vue
index 6777c9e305..fbad6aeb38 100644
--- a/frontend/src/components/GeneralSetting/AccountSetting.vue
+++ b/frontend/src/components/GeneralSetting/AccountSetting.vue
@@ -21,7 +21,7 @@
/>
<div class="font-medium flex items-center gap-x-2">
{{ $t("settings.general.workspace.disallow-signup.enable") }}
- <FeatureBadge :feature="PlanLimitConfig_Feature.DISALLOW_SELF_SERVICE_SIGNUP" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_DISALLOW_SELF_SERVICE_SIGNUP" />
</div>
</div>
<div class="mt-1 mb-3 text-sm text-gray-400">
@@ -47,7 +47,7 @@
/>
<div class="font-medium flex items-center gap-x-2">
{{ $t("settings.general.workspace.require-2fa.enable") }}
- <FeatureBadge :feature="PlanLimitConfig_Feature.TWO_FA" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_TWO_FA" />
</div>
</div>
<div class="mt-1 mb-3 text-sm text-gray-400">
@@ -86,7 +86,7 @@
)
}}
</NTooltip>
- <FeatureBadge :feature="PlanLimitConfig_Feature.DISALLOW_PASSWORD_SIGNIN" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_DISALLOW_PASSWORD_SIGNIN" />
</div>
</div>
<div class="mt-1 mb-3 text-sm text-gray-400">
@@ -123,7 +123,7 @@ import {
} from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
import { type WorkspaceProfileSetting } from "@/types/proto/v1/setting_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { isEqual } from "lodash-es";
import { TriangleAlertIcon } from "lucide-vue-next";
import { NDivider, NTooltip } from "naive-ui";
@@ -134,7 +134,7 @@ import PasswordRestrictionSetting from "./PasswordRestrictionSetting.vue";
import SignInFrequencySetting from "./SignInFrequencySetting.vue";
interface LocalState {
- featureNameForModal?: PlanLimitConfig_Feature;
+ featureNameForModal?: PlanFeature;
disallowSignup: boolean;
require2fa: boolean;
disallowPasswordSignin: boolean;
@@ -168,10 +168,10 @@ const state = reactive<LocalState>({
});
const { isSaaSMode } = storeToRefs(actuatorStore);
-const has2FAFeature = featureToRef(PlanLimitConfig_Feature.TWO_FA);
-const hasDisallowSignupFeature = featureToRef(PlanLimitConfig_Feature.DISALLOW_SELF_SERVICE_SIGNUP);
+const has2FAFeature = featureToRef(PlanFeature.FEATURE_TWO_FA);
+const hasDisallowSignupFeature = featureToRef(PlanFeature.FEATURE_DISALLOW_SELF_SERVICE_SIGNUP);
const hasDisallowPasswordSigninFeature = featureToRef(
- PlanLimitConfig_Feature.DISALLOW_PASSWORD_SIGNIN
+ PlanFeature.FEATURE_DISALLOW_PASSWORD_SIGNIN
);
watchEffect(async () => {
diff --git a/frontend/src/components/GeneralSetting/AnnouncementSetting.vue b/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
index c0b38fbf87..bd6b8307bd 100644
--- a/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
+++ b/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
@@ -5,7 +5,7 @@
<h1 class="text-2xl font-bold">
{{ title }}
</h1>
- <FeatureBadge :feature="PlanLimitConfig_Feature.DASHBOARD_ANNOUNCEMENT" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_DASHBOARD_ANNOUNCEMENT" />
</div>
<span v-if="!allowEdit" class="text-sm text-gray-400">
@@ -107,7 +107,7 @@ import { featureToRef } from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
import { Announcement } from "@/types/proto/v1/setting_service";
import { Announcement_AlertLevel } from "@/types/proto/v1/setting_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { FeatureBadge } from "../FeatureGuard";
const props = defineProps<{
@@ -116,7 +116,7 @@ const props = defineProps<{
}>();
const settingV1Store = useSettingV1Store();
-const hasAnnouncementFeature = featureToRef(PlanLimitConfig_Feature.DASHBOARD_ANNOUNCEMENT);
+const hasAnnouncementFeature = featureToRef(PlanFeature.FEATURE_DASHBOARD_ANNOUNCEMENT);
const rawAnnouncement = computed(() =>
cloneDeep(
diff --git a/frontend/src/components/GeneralSetting/BrandingSetting.vue b/frontend/src/components/GeneralSetting/BrandingSetting.vue
index 3f03d8a521..d959e9736c 100644
--- a/frontend/src/components/GeneralSetting/BrandingSetting.vue
+++ b/frontend/src/components/GeneralSetting/BrandingSetting.vue
@@ -5,7 +5,7 @@
<h1 class="text-2xl font-bold">
{{ title }}
</h1>
- <FeatureBadge :feature="PlanLimitConfig_Feature.CUSTOM_LOGO" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_CUSTOM_LOGO" />
</div>
<span v-if="!allowEdit" class="text-sm text-gray-400">
{{ $t("settings.general.workspace.only-admin-can-edit") }}
@@ -55,7 +55,7 @@
</div>
<FeatureModal
- :feature="PlanLimitConfig_Feature.CUSTOM_LOGO"
+ :feature="PlanFeature.FEATURE_CUSTOM_LOGO"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
/>
@@ -68,7 +68,7 @@ import { featureToRef } from "@/store";
import { useActuatorV1Store } from "@/store/modules/v1/actuator";
import { useSettingV1Store } from "@/store/modules/v1/setting";
import { Setting_SettingName } from "@/types/proto/v1/setting_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { FeatureBadge, FeatureModal } from "../FeatureGuard";
import SingleFileSelector from "../SingleFileSelector.vue";
@@ -107,7 +107,7 @@ const allowSave = computed((): boolean => {
return state.logoUrl !== settingV1Store.brandingLogo;
});
-const hasBrandingFeature = featureToRef(PlanLimitConfig_Feature.CUSTOM_LOGO);
+const hasBrandingFeature = featureToRef(PlanFeature.FEATURE_CUSTOM_LOGO);
const doUpdate = async (content: string) => {
if (state.loading) {
diff --git a/frontend/src/components/GeneralSetting/DomainRestrictionSetting.vue b/frontend/src/components/GeneralSetting/DomainRestrictionSetting.vue
index 7e6fdd9ea3..215951139e 100644
--- a/frontend/src/components/GeneralSetting/DomainRestrictionSetting.vue
+++ b/frontend/src/components/GeneralSetting/DomainRestrictionSetting.vue
@@ -34,7 +34,7 @@
"settings.general.workspace.domain-restriction.members-restriction.self"
)
}}
- <FeatureBadge :feature="PlanLimitConfig_Feature.USER_EMAIL_DOMAIN_RESTRICTION" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_USER_EMAIL_DOMAIN_RESTRICTION" />
</div>
<p class="text-sm text-gray-400 leading-tight">
{{
@@ -55,7 +55,7 @@ import { NCheckbox, NInput } from "naive-ui";
import { computed, reactive } from "vue";
import { featureToRef } from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { FeatureBadge } from "../FeatureGuard";
const initialState = computed((): LocalState => {
@@ -87,7 +87,7 @@ defineProps<{
const settingV1Store = useSettingV1Store();
const state = reactive<LocalState>(initialState.value);
-const hasFeature = featureToRef(PlanLimitConfig_Feature.USER_EMAIL_DOMAIN_RESTRICTION);
+const hasFeature = featureToRef(PlanFeature.FEATURE_USER_EMAIL_DOMAIN_RESTRICTION);
defineExpose({
isDirty: computed(() => !isEqual(state, initialState.value)),
diff --git a/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue b/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue
index f90cb2a637..6ea3022f36 100644
--- a/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue
+++ b/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue
@@ -4,7 +4,7 @@
class="font-medium flex flex-row justify-start items-center mb-2 gap-x-2"
>
{{ $t("settings.general.workspace.password-restriction.self") }}
- <FeatureBadge :feature="PlanLimitConfig_Feature.PASSWORD_RESTRICTIONS" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_PASSWORD_RESTRICTIONS" />
</p>
<div class="w-full flex flex-col space-y-3">
<div class="flex items-center space-x-2">
@@ -167,7 +167,7 @@
</div>
<FeatureModal
- :feature="PlanLimitConfig_Feature.PASSWORD_RESTRICTIONS"
+ :feature="PlanFeature.FEATURE_PASSWORD_RESTRICTIONS"
:open="showFeatureModal"
@cancel="showFeatureModal = false"
/>
@@ -181,7 +181,7 @@ import { featureToRef } from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
import { Duration } from "@/types/proto/google/protobuf/duration";
import { PasswordRestrictionSetting, Setting_SettingName } from "@/types/proto/v1/setting_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { FeatureBadge, FeatureModal } from "../FeatureGuard";
const DEFAULT_MIN_LENGTH = 8;
@@ -192,7 +192,7 @@ defineProps<{
const settingV1Store = useSettingV1Store();
const showFeatureModal = ref<boolean>(false);
-const hasPasswordFeature = featureToRef(PlanLimitConfig_Feature.PASSWORD_RESTRICTIONS);
+const hasPasswordFeature = featureToRef(PlanFeature.FEATURE_PASSWORD_RESTRICTIONS);
const passwordRestrictionSetting = computed(
() =>
diff --git a/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue b/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue
index 201f242db3..97d8987065 100644
--- a/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue
+++ b/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue
@@ -4,7 +4,7 @@
<span class="mr-2">
{{ $t("settings.general.workspace.query-data-policy.timeout.self") }}
</span>
- <FeatureBadge :feature="PlanLimitConfig_Feature.QUERY_DATASOURCE_RESTRICTION" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_QUERY_DATASOURCE_RESTRICTION" />
</p>
<p class="text-sm text-gray-400 mt-1">
{{
@@ -42,14 +42,14 @@ import {
PolicyResourceType,
PolicyType,
} from "@/types/proto/v1/org_policy_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import { NInputNumber } from "naive-ui";
import { computed, ref } from "vue";
import { FeatureBadge } from "../FeatureGuard";
const policyV1Store = usePolicyV1Store();
-const hasAccessControlFeature = featureToRef(PlanLimitConfig_Feature.IAM);
+const hasAccessControlFeature = featureToRef(PlanFeature.FEATURE_IAM);
const { policy: queryDataPolicy } = usePolicyByParentAndType(
computed(() => ({
diff --git a/frontend/src/components/GeneralSetting/RestrictIssueCreationConfigure.vue b/frontend/src/components/GeneralSetting/RestrictIssueCreationConfigure.vue
index 3e9421140e..75557461ba 100644
--- a/frontend/src/components/GeneralSetting/RestrictIssueCreationConfigure.vue
+++ b/frontend/src/components/GeneralSetting/RestrictIssueCreationConfigure.vue
@@ -34,7 +34,7 @@ import {
PolicyResourceType,
PolicyType,
} from "@/types/proto/v1/org_policy_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import { computed, ref, watch } from "vue";
import { Switch } from "../v2";
@@ -56,7 +56,7 @@ const allowEdit = computed(() => {
return (
props.allowEdit &&
hasWorkspacePermissionV2("bb.policies.update") &&
- hasFeature(PlanLimitConfig_Feature.IAM)
+ hasFeature(PlanFeature.FEATURE_IAM)
);
});
diff --git a/frontend/src/components/GeneralSetting/SecuritySetting.vue b/frontend/src/components/GeneralSetting/SecuritySetting.vue
index 270ac2b137..ae053b89bf 100644
--- a/frontend/src/components/GeneralSetting/SecuritySetting.vue
+++ b/frontend/src/components/GeneralSetting/SecuritySetting.vue
@@ -22,7 +22,7 @@
<span class="font-medium">
{{ $t("settings.general.workspace.watermark.enable") }}
</span>
- <FeatureBadge :feature="PlanLimitConfig_Feature.WATERMARK" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_WATERMARK" />
</div>
<div class="mt-1 mb-3 text-sm text-gray-400">
{{ $t("settings.general.workspace.watermark.description") }}
@@ -38,7 +38,7 @@
<span class="font-medium">
{{ $t("settings.general.workspace.data-export.enable") }}
</span>
- <FeatureBadge :feature="PlanLimitConfig_Feature.RESTRICT_COPYING_DATA" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_RESTRICT_COPYING_DATA" />
</div>
<div class="mt-1 mb-3 text-sm text-gray-400">
{{ $t("settings.general.workspace.data-export.description") }}
@@ -86,7 +86,7 @@ import {
PolicyType,
} from "@/types/proto/v1/org_policy_service";
import { Setting_SettingName } from "@/types/proto/v1/setting_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { isEqual } from "lodash-es";
import { computed, reactive, ref } from "vue";
import { FeatureBadge, FeatureModal } from "../FeatureGuard";
@@ -97,7 +97,7 @@ import QueryDataPolicySetting from "./QueryDataPolicySetting.vue";
import RestrictIssueCreationConfigure from "./RestrictIssueCreationConfigure.vue";
interface LocalState {
- featureNameForModal?: PlanLimitConfig_Feature;
+ featureNameForModal?: PlanFeature;
enableWatermark: boolean;
enableDataExport: boolean;
}
@@ -109,7 +109,7 @@ const props = defineProps<{
const settingV1Store = useSettingV1Store();
const policyV1Store = usePolicyV1Store();
-const hasWatermarkFeature = featureToRef(PlanLimitConfig_Feature.WATERMARK);
+const hasWatermarkFeature = featureToRef(PlanFeature.FEATURE_WATERMARK);
const domainRestrictionSettingRef =
ref<InstanceType<typeof DomainRestrictionSetting>>();
diff --git a/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue b/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue
index 96aadbba2e..9c9e78b3eb 100644
--- a/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue
+++ b/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue
@@ -4,7 +4,7 @@
<span class="mr-2">{{
$t("settings.general.workspace.sign-in-frequency.self")
}}</span>
- <FeatureBadge :feature="PlanLimitConfig_Feature.SIGN_IN_FREQUENCY_CONTROL" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_SIGN_IN_FREQUENCY_CONTROL" />
</p>
<p class="text-sm text-gray-400 mt-1">
{{ $t("settings.general.workspace.sign-in-frequency.description") }}
@@ -42,7 +42,7 @@
</div>
<FeatureModal
- :feature="PlanLimitConfig_Feature.SIGN_IN_FREQUENCY_CONTROL"
+ :feature="PlanFeature.FEATURE_SIGN_IN_FREQUENCY_CONTROL"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
/>
@@ -56,7 +56,7 @@ import { featureToRef } from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
import { defaultTokenDurationInHours } from "@/types";
import { Duration } from "@/types/proto/google/protobuf/duration";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { FeatureBadge, FeatureModal } from "../FeatureGuard";
const getInitialState = (): LocalState => {
@@ -92,7 +92,7 @@ const props = defineProps<{
const settingV1Store = useSettingV1Store();
const state = reactive<LocalState>(getInitialState());
-const hasSecureTokenFeature = featureToRef(PlanLimitConfig_Feature.SIGN_IN_FREQUENCY_CONTROL);
+const hasSecureTokenFeature = featureToRef(PlanFeature.FEATURE_SIGN_IN_FREQUENCY_CONTROL);
const allowChangeSetting = computed(() => {
return hasSecureTokenFeature.value && props.allowEdit;
diff --git a/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue b/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue
index ecb594bf03..cfbf4eb06e 100644
--- a/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue
+++ b/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue
@@ -48,7 +48,7 @@ import { computed, onMounted, reactive, watch } from "vue";
import { FeatureBadge, FeatureModal } from "@/components/FeatureGuard";
import { useProjectByName, hasFeature } from "@/store";
import type { DatabaseResource } from "@/types";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import DatabaseResourceSelector from "./DatabaseResourceSelector.vue";
interface LocalState {
@@ -61,7 +61,7 @@ const props = withDefaults(
defineProps<{
disabled?: boolean;
projectName: string;
- requiredFeature: PlanLimitConfig_Feature;
+ requiredFeature: PlanFeature;
includeCloumn: boolean;
allowSelectAll?: boolean;
databaseResources?: DatabaseResource[];
diff --git a/frontend/src/components/InstanceForm/Buttons.vue b/frontend/src/components/InstanceForm/Buttons.vue
index 4514c78c90..c9c2d41c88 100644
--- a/frontend/src/components/InstanceForm/Buttons.vue
+++ b/frontend/src/components/InstanceForm/Buttons.vue
@@ -62,7 +62,7 @@ import {
DataSourceType,
Instance,
} from "@/types/proto/v1/instance_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { defer, isValidSpannerHost } from "@/utils";
import { cloneDeep, isEqual } from "lodash-es";
import { NButton } from "naive-ui";
@@ -198,7 +198,7 @@ const tryCreate = async () => {
};
const hasExternalSecretFeature = computed(() =>
- subscriptionStore.hasFeature(PlanLimitConfig_Feature.EXTERNAL_SECRET_MANAGER)
+ subscriptionStore.hasFeature(PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER)
);
const checkExternalSecretFeature = (dataSources: DataSource[]) => {
if (hasExternalSecretFeature.value) {
@@ -257,7 +257,7 @@ const doCreate = async () => {
}
if (!checkExternalSecretFeature(pendingCreateInstance.value.dataSources)) {
- missingFeature.value = PlanLimitConfig_Feature.EXTERNAL_SECRET_MANAGER;
+ missingFeature.value = PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER;
return;
}
@@ -309,12 +309,12 @@ const doUpdate = async () => {
return;
}
if (!checkRODataSourceFeature(inst)) {
- missingFeature.value = PlanLimitConfig_Feature.INSTANCE_READ_ONLY_CONNECTION;
+ missingFeature.value = PlanFeature.FEATURE_INSTANCE_READ_ONLY_CONNECTION;
return;
}
if (!checkExternalSecretFeature([adminDataSource.value])) {
- missingFeature.value = PlanLimitConfig_Feature.EXTERNAL_SECRET_MANAGER;
+ missingFeature.value = PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER;
return;
}
@@ -324,7 +324,7 @@ const doUpdate = async () => {
...readonlyDataSourceList.value,
])
) {
- missingFeature.value = PlanLimitConfig_Feature.EXTERNAL_SECRET_MANAGER;
+ missingFeature.value = PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER;
return;
}
diff --git a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
index c23efd8f27..2b11a17927 100644
--- a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
+++ b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
@@ -276,7 +276,7 @@
<NRadio :value="DataSourceExternalSecret_SecretType.VAULT_KV_V2">
<div class="flex items-center gap-x-1">
{{ $t("instance.password-type.external-secret-vault") }}
- <FeatureBadge :feature="PlanLimitConfig_Feature.EXTERNAL_SECRET_MANAGER" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER" />
</div>
</NRadio>
<NRadio
@@ -284,7 +284,7 @@
>
<div class="flex items-center gap-x-1">
{{ $t("instance.password-type.external-secret-aws") }}
- <FeatureBadge :feature="PlanLimitConfig_Feature.EXTERNAL_SECRET_MANAGER" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER" />
</div>
</NRadio>
<NRadio
@@ -292,7 +292,7 @@
>
<div class="flex items-center gap-x-1">
{{ $t("instance.password-type.external-secret-gcp") }}
- <FeatureBadge :feature="PlanLimitConfig_Feature.EXTERNAL_SECRET_MANAGER" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER" />
</div>
</NRadio>
</NRadioGroup>
@@ -318,7 +318,7 @@
url="https://www.bytebase.com/docs/get-started/instance/#use-secret-manager?source=console"
class="ml-1 text-sm"
/>
- <FeatureBadge :feature="PlanLimitConfig_Feature.EXTERNAL_SECRET_MANAGER" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER" />
</div>
<div class="mt-2">
<NCheckbox
@@ -998,7 +998,7 @@ import {
KerberosConfig,
SASLConfig,
} from "@/types/proto/v1/instance_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { onlyAllowNumber } from "@/utils";
import {
NButton,
@@ -1248,7 +1248,7 @@ const handleHostInput = (value: string) => {
if (ds.host || ds.port) {
ds.host = adminDataSource.value.host;
ds.port = adminDataSource.value.port;
- missingFeature.value = PlanLimitConfig_Feature.INSTANCE_READ_ONLY_CONNECTION;
+ missingFeature.value = PlanFeature.FEATURE_INSTANCE_READ_ONLY_CONNECTION;
return;
}
}
@@ -1263,7 +1263,7 @@ const handlePortInput = (value: string) => {
if (ds.host || ds.port) {
ds.host = adminDataSource.value.host;
ds.port = adminDataSource.value.port;
- missingFeature.value = PlanLimitConfig_Feature.INSTANCE_READ_ONLY_CONNECTION;
+ missingFeature.value = PlanFeature.FEATURE_INSTANCE_READ_ONLY_CONNECTION;
return;
}
}
diff --git a/frontend/src/components/InstanceForm/MaximumConnectionsInput.vue b/frontend/src/components/InstanceForm/MaximumConnectionsInput.vue
index b7ab35bcb2..0605903d0f 100644
--- a/frontend/src/components/InstanceForm/MaximumConnectionsInput.vue
+++ b/frontend/src/components/InstanceForm/MaximumConnectionsInput.vue
@@ -8,7 +8,7 @@
{{ $t("instance.maximum-connections.self") }}
</label>
<FeatureBadge
- :feature="PlanLimitConfig_Feature.CUSTOM_INSTANCE_CONNECTION_LIMIT"
+ :feature="PlanFeature.FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT"
:instance="instance"
/>
</div>
@@ -63,7 +63,7 @@
import { NInputNumber, NRadio } from "naive-ui";
import { computed, reactive, watch } from "vue";
import { useSubscriptionV1Store } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { FeatureBadge } from "../FeatureGuard";
import { useInstanceFormContext } from "./context";
@@ -90,7 +90,7 @@ const { instance, hideAdvancedFeatures } = useInstanceFormContext();
const hasFeature = computed(() => {
return subscriptionStore.hasInstanceFeature(
- PlanLimitConfig_Feature.CUSTOM_INSTANCE_CONNECTION_LIMIT,
+ PlanFeature.FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT,
instance.value
);
});
diff --git a/frontend/src/components/InstanceForm/ScanIntervalInput.vue b/frontend/src/components/InstanceForm/ScanIntervalInput.vue
index 440201b3b6..6c3b03d5a1 100644
--- a/frontend/src/components/InstanceForm/ScanIntervalInput.vue
+++ b/frontend/src/components/InstanceForm/ScanIntervalInput.vue
@@ -8,7 +8,7 @@
{{ $t("instance.scan-interval.self") }}
</label>
<FeatureBadge
- :feature="PlanLimitConfig_Feature.CUSTOM_INSTANCE_SYNC_TIME"
+ :feature="PlanFeature.FEATURE_CUSTOM_INSTANCE_SYNC_TIME"
:instance="instance"
/>
</div>
@@ -65,7 +65,7 @@ import { NInputNumber, NRadio } from "naive-ui";
import { computed, reactive, watch } from "vue";
import { useSubscriptionV1Store } from "@/store";
import { Duration } from "@/types/proto/google/protobuf/duration";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { FeatureBadge } from "../FeatureGuard";
import { useInstanceFormContext } from "./context";
@@ -93,7 +93,7 @@ const { instance, hideAdvancedFeatures } = useInstanceFormContext();
const hasFeature = computed(() => {
return subscriptionStore.hasInstanceFeature(
- PlanLimitConfig_Feature.CUSTOM_INSTANCE_SYNC_TIME,
+ PlanFeature.FEATURE_CUSTOM_INSTANCE_SYNC_TIME,
instance.value
);
});
diff --git a/frontend/src/components/InstanceForm/context.ts b/frontend/src/components/InstanceForm/context.ts
index d0d4a71d7d..24d9ba2274 100644
--- a/frontend/src/components/InstanceForm/context.ts
+++ b/frontend/src/components/InstanceForm/context.ts
@@ -24,7 +24,7 @@ import {
DataSource_AuthenticationType,
DataSource_RedisType,
} from "@/types/proto/v1/instance_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import {
extractInstanceResourceName,
hasWorkspacePermissionV2,
@@ -101,7 +101,7 @@ export const provideInstanceFormContext = (baseContext: {
const hasReadonlyReplicaFeature = computed(() => {
return useSubscriptionV1Store().hasInstanceFeature(
- PlanLimitConfig_Feature.INSTANCE_READ_ONLY_CONNECTION,
+ PlanFeature.FEATURE_INSTANCE_READ_ONLY_CONNECTION,
instance.value
);
});
@@ -109,7 +109,7 @@ export const provideInstanceFormContext = (baseContext: {
const resetDataSource = () => {
dataSourceEditState.value = extractDataSourceEditState(instance.value);
};
- const missingFeature = ref<PlanLimitConfig_Feature | undefined>(undefined);
+ const missingFeature = ref<PlanFeature | undefined>(undefined);
const resourceIdField = ref<InstanceType<typeof ResourceIdField>>();
diff --git a/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue b/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue
index 859a5dd2a9..323fdb9c2a 100644
--- a/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue
+++ b/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue
@@ -2,7 +2,7 @@
<div ref="containerRef" class="h-full flex flex-col">
<div class="border-b">
<BannerSection v-if="!isCreating" />
- <FeatureAttention :feature="PlanLimitConfig_Feature.APPROVAL_WORKFLOW" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />
<HeaderSection />
</div>
<div class="flex-1 flex flex-row">
@@ -65,7 +65,7 @@
import { computed, ref } from "vue";
import { FeatureAttention } from "@/components/FeatureGuard";
import { useCurrentProjectV1 } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type { Plan, Plan_Spec } from "@/types/proto/v1/plan_service";
import type { Task } from "@/types/proto/v1/rollout_service";
import { SQLCheckSection } from "../Plan/components";
diff --git a/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue b/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue
index 95d6fccd38..bbc010087d 100644
--- a/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue
+++ b/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue
@@ -2,7 +2,7 @@
<div ref="containerRef" class="h-full flex flex-col">
<div class="border-b">
<BannerSection v-if="!isCreating" />
- <FeatureAttention :feature="PlanLimitConfig_Feature.APPROVAL_WORKFLOW" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />
<HeaderSection />
</div>
@@ -117,7 +117,7 @@ import { computedAsync } from "@vueuse/core";
import { computed, ref } from "vue";
import { FeatureAttention } from "@/components/FeatureGuard";
import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { displayRoleTitle } from "@/utils";
import { convertFromCELString } from "@/utils/issue/cel";
import { provideSidebarContext } from "../Plan/logic";
diff --git a/frontend/src/components/IssueV1/IssueDetailPage.vue b/frontend/src/components/IssueV1/IssueDetailPage.vue
index b075a053a1..c9a21acbf5 100644
--- a/frontend/src/components/IssueV1/IssueDetailPage.vue
+++ b/frontend/src/components/IssueV1/IssueDetailPage.vue
@@ -2,7 +2,7 @@
<div ref="containerRef" class="h-full flex flex-col">
<div class="border-b">
<BannerSection v-if="!isCreating" />
- <FeatureAttention :feature="PlanLimitConfig_Feature.APPROVAL_WORKFLOW" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />
<HeaderSection />
</div>
@@ -68,7 +68,7 @@
import { computed, ref } from "vue";
import { FeatureAttention } from "@/components/FeatureGuard";
import { useCurrentProjectV1 } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type { Plan, Plan_Spec } from "@/types/proto/v1/plan_service";
import { type Task } from "@/types/proto/v1/rollout_service";
import { SQLCheckSection } from "../Plan/components";
diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue
index df0a3aa97f..a8230657e2 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue
@@ -6,7 +6,7 @@
<div>
<div class="textlabel flex items-center gap-x-1">
{{ $t("issue.approval-flow.self") }}
- <FeatureBadge :feature="PlanLimitConfig_Feature.APPROVAL_WORKFLOW" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />
</div>
</div>
</template>
@@ -62,7 +62,7 @@
<div v-if="isCreating" class="flex flex-col gap-y-1">
<div class="textlabel flex items-center gap-x-1">
{{ $t("issue.approval-flow.self") }}
- <FeatureBadge :feature="PlanLimitConfig_Feature.APPROVAL_WORKFLOW" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />
</div>
<div class="text-control-placeholder text-xs">
{{ $t("issue.approval-flow.pre-issue-created-tips") }}
@@ -77,7 +77,7 @@ import { BBSpin } from "@/bbkit";
import FeatureBadge from "@/components/FeatureGuard/FeatureBadge.vue";
import { useIssueContext, useWrappedReviewStepsV1 } from "@/components/IssueV1";
import { useIssueV1Store } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import RiskLevelTag from "./RiskLevelTag.vue";
import Timeline from "./Timeline.vue";
diff --git a/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue b/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue
index 5c063ad3a8..0ab4a7c2b2 100644
--- a/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue
+++ b/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue
@@ -10,7 +10,7 @@
</span>
<span v-if="isCreating" class="text-red-600">*</span>
<NButton
- v-if="!isCreating && !hasFeature(PlanLimitConfig_Feature.PRE_DEPLOYMENT_SQL_REVIEW)"
+ v-if="!isCreating && !hasFeature(PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW)"
size="tiny"
@click.prevent="state.showFeatureModal = true"
>
@@ -181,7 +181,7 @@
<FeatureModal
:open="state.showFeatureModal"
- :feature="PlanLimitConfig_Feature.PRE_DEPLOYMENT_SQL_REVIEW"
+ :feature="PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW"
@cancel="state.showFeatureModal = false"
/>
</template>
@@ -196,7 +196,7 @@ import { useI18n } from "vue-i18n";
import { useRoute } from "vue-router";
import { BBAttention, BBModal } from "@/bbkit";
import { FeatureModal } from "@/components/FeatureGuard";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { ErrorList } from "@/components/IssueV1/components/common";
import {
useIssueContext,
diff --git a/frontend/src/components/IssueV1/components/StatementSection/SDLView/SDLView.vue b/frontend/src/components/IssueV1/components/StatementSection/SDLView/SDLView.vue
index 1014e6c1b5..815059362c 100644
--- a/frontend/src/components/IssueV1/components/StatementSection/SDLView/SDLView.vue
+++ b/frontend/src/components/IssueV1/components/StatementSection/SDLView/SDLView.vue
@@ -1,6 +1,6 @@
<template>
<div class="flex flex-col gap-y-2">
- <div v-if="!hasFeature(PlanLimitConfig_Feature.PRE_DEPLOYMENT_SQL_REVIEW)">
+ <div v-if="!hasFeature(PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW)">
<div class="flex space-x-4 flex-1">
<NButton size="small" @click.prevent="state.showFeatureModal = true">
🎈{{ $t("sql-review.unlock-full-feature") }}
@@ -76,7 +76,7 @@
</div>
<FeatureModal
:open="state.showFeatureModal"
- :feature="PlanLimitConfig_Feature.PRE_DEPLOYMENT_SQL_REVIEW"
+ :feature="PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW"
@cancel="state.showFeatureModal = false"
/>
</template>
@@ -89,7 +89,7 @@ import { FeatureModal } from "@/components/FeatureGuard";
import { useIssueContext } from "@/components/IssueV1/logic";
import { DiffEditor, MonacoEditor } from "@/components/MonacoEditor";
import { hasFeature, pushNotification } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { useSQLAdviceMarkers } from "../useSQLAdviceMarkers";
import { useSDLState } from "./useSDLState";
diff --git a/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue b/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue
index 4bf2457637..a87dfcc46c 100644
--- a/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue
+++ b/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue
@@ -11,7 +11,7 @@
</span>
<span v-if="isCreating" class="text-red-600">*</span>
<NButton
- v-if="!isCreating && !hasFeature(PlanLimitConfig_Feature.PRE_DEPLOYMENT_SQL_REVIEW)"
+ v-if="!isCreating && !hasFeature(PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW)"
size="small"
@click.prevent="state.showFeatureModal = true"
>
@@ -177,7 +177,7 @@
<FeatureModal
:open="state.showFeatureModal"
- :feature="PlanLimitConfig_Feature.PRE_DEPLOYMENT_SQL_REVIEW"
+ :feature="PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW"
@cancel="state.showFeatureModal = false"
/>
</template>
@@ -192,7 +192,7 @@ import { computed, reactive, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import { BBAttention, BBModal } from "@/bbkit";
import { FeatureModal } from "@/components/FeatureGuard";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { MonacoEditor } from "@/components/MonacoEditor";
import { extensionNameOfLanguage } from "@/components/MonacoEditor/utils";
import { ErrorList } from "@/components/Plan/components/common";
diff --git a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
index 44a4d62b7f..523c1db0a0 100644
--- a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
+++ b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
@@ -58,7 +58,7 @@
<QuerierDatabaseResourceForm
v-model:database-resources="state.databaseResources"
:project-name="projectName"
- :required-feature="PlanLimitConfig_Feature.IAM"
+ :required-feature="PlanFeature.FEATURE_IAM"
:include-cloumn="false"
/>
</div>
@@ -96,7 +96,7 @@ import RequiredStar from "@/components/RequiredStar.vue";
import { RoleSelect } from "@/components/v2/Select";
import { PresetRoleType, type DatabaseResource } from "@/types";
import type { Binding } from "@/types/proto/v1/iam_policy";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { checkRoleContainsAnyPermission } from "@/utils";
import { buildConditionExpr } from "@/utils/issue/cel";
import { isUndefined } from "lodash-es";
diff --git a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue
index 626f5034f8..e8e0882900 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue
@@ -41,7 +41,7 @@
v-model:database-resources="state.databaseResources"
:project-name="project.name"
:include-cloumn="false"
- :required-feature="PlanLimitConfig_Feature.IAM"
+ :required-feature="PlanFeature.FEATURE_IAM"
/>
</div>
@@ -141,7 +141,7 @@ import type { ComposedProject, DatabaseResource } from "@/types";
import { PresetRoleType } from "@/types";
import { State } from "@/types/proto/v1/common";
import type { Binding } from "@/types/proto/v1/iam_policy";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { displayRoleTitle, checkRoleContainsAnyPermission } from "@/utils";
import { convertFromExpr, buildConditionExpr } from "@/utils/issue/cel";
import { getBindingIdentifier } from "../utils";
diff --git a/frontend/src/components/Role/Setting/RoleSetting.vue b/frontend/src/components/Role/Setting/RoleSetting.vue
index 764f85f82b..d1577e90af 100644
--- a/frontend/src/components/Role/Setting/RoleSetting.vue
+++ b/frontend/src/components/Role/Setting/RoleSetting.vue
@@ -21,7 +21,7 @@
<template #icon>
<PlusIcon class="h-4 w-4" />
<FeatureBadge
- :feature="PlanLimitConfig_Feature.CUSTOM_ROLES"
+ :feature="PlanFeature.FEATURE_CUSTOM_ROLES"
class="mr-1 text-white"
/>
</template>
@@ -48,7 +48,7 @@
/>
<FeatureModal
- :feature="PlanLimitConfig_Feature.CUSTOM_ROLES"
+ :feature="PlanFeature.FEATURE_CUSTOM_ROLES"
:open="showFeatureModal"
@cancel="showFeatureModal = false"
/>
@@ -65,7 +65,7 @@ import { FeatureBadge, FeatureModal } from "@/components/FeatureGuard";
import { featureToRef, useRoleStore } from "@/store";
import { PRESET_ROLES } from "@/types";
import { Role } from "@/types/proto/v1/role_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import { RoleDataTable, RolePanel } from "./components";
import { provideCustomRoleSettingContext } from "./context";
@@ -93,7 +93,7 @@ const state = reactive<LocalState>({
},
});
-const hasCustomRoleFeature = featureToRef(PlanLimitConfig_Feature.CUSTOM_ROLES);
+const hasCustomRoleFeature = featureToRef(PlanFeature.FEATURE_CUSTOM_ROLES);
const showFeatureModal = ref(false);
const allowCreateRole = computed(() => {
diff --git a/frontend/src/components/Role/Setting/components/RolePanel.vue b/frontend/src/components/Role/Setting/components/RolePanel.vue
index 12fe37e97c..165576a0c8 100644
--- a/frontend/src/components/Role/Setting/components/RolePanel.vue
+++ b/frontend/src/components/Role/Setting/components/RolePanel.vue
@@ -85,7 +85,7 @@
<NButton @click="$emit('close')">{{ $t("common.cancel") }}</NButton>
<NButton type="primary" :disabled="!allowSave" @click="handleSave">
<FeatureBadge
- :feature="PlanLimitConfig_Feature.CUSTOM_ROLES"
+ :feature="PlanFeature.FEATURE_CUSTOM_ROLES"
class="mr-1 text-white"
/>
{{ mode === "ADD" ? $t("common.add") : $t("common.update") }}
@@ -116,7 +116,7 @@ import { roleNamePrefix } from "@/store/modules/v1/common";
import type { ValidatedMessage } from "@/types";
import { PERMISSIONS } from "@/types";
import { Role } from "@/types/proto/v1/role_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { extractRoleResourceName } from "@/utils";
import { displayPermissionTitle } from "@/utils/permission";
import { useCustomRoleSettingContext } from "../context";
diff --git a/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue
index 2bebf9178b..64f079a3fb 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue
@@ -35,7 +35,7 @@
@click="state.showSchemaTemplateDrawer = true"
>
<template #icon>
- <FeatureBadge :feature="PlanLimitConfig_Feature.SCHEMA_TEMPLATE" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_SCHEMA_TEMPLATE" />
<PlusIcon class="w-4 h-4" />
</template>
{{ $t("schema-editor.actions.add-from-template") }}
@@ -142,7 +142,7 @@
</Drawer>
<FeatureModal
- :feature="PlanLimitConfig_Feature.SCHEMA_TEMPLATE"
+ :feature="PlanFeature.FEATURE_SCHEMA_TEMPLATE"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
/>
@@ -159,7 +159,7 @@ import { Drawer, DrawerContent } from "@/components/v2";
import { hasFeature } from "@/store";
import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type {
ColumnMetadata,
DatabaseMetadata,
@@ -341,7 +341,7 @@ const tryEditColumn = async (
const handleApplyTemplate = (template: SchemaTemplateSetting_TableTemplate) => {
state.showSchemaTemplateDrawer = false;
- if (!hasFeature(PlanLimitConfig_Feature.SCHEMA_TEMPLATE)) {
+ if (!hasFeature(PlanFeature.FEATURE_SCHEMA_TEMPLATE)) {
state.showFeatureModal = true;
return;
}
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue
index 68fa0c141a..0943860f61 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue
@@ -67,7 +67,7 @@ import LabelEditorDrawer from "@/components/LabelEditorDrawer.vue";
import SemanticTypesDrawer from "@/components/SensitiveData/components/SemanticTypesDrawer.vue";
import { InlineInput } from "@/components/v2";
import { useSettingV1Store, hasFeature } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
import { ColumnCatalog } from "@/types/proto/v1/database_catalog_service";
@@ -379,7 +379,7 @@ const columns = computed(() => {
maxWidth: 320,
hide:
!props.showDatabaseCatalogColumn ||
- !hasFeature(PlanLimitConfig_Feature.DATA_MASKING),
+ !hasFeature(PlanFeature.FEATURE_DATA_MASKING),
render: (column) => {
return h(SemanticTypeCell, {
database: props.database.name,
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue
index 7068cde735..04c69275d7 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue
@@ -49,7 +49,7 @@
>
<template #icon>
<PlusIcon class="w-4 h-auto mr-1 text-gray-400" />
- <FeatureBadge :feature="PlanLimitConfig_Feature.SCHEMA_TEMPLATE" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_SCHEMA_TEMPLATE" />
</template>
{{ $t("schema-editor.actions.add-from-template") }}
</NButton>
@@ -184,7 +184,7 @@
</DrawerContent>
</Drawer>
<FeatureModal
- :feature="PlanLimitConfig_Feature.SCHEMA_TEMPLATE"
+ :feature="PlanFeature.FEATURE_SCHEMA_TEMPLATE"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
/>
@@ -201,7 +201,7 @@ import { FeatureBadge, FeatureModal } from "@/components/FeatureGuard";
import { IndexIcon, TablePartitionIcon } from "@/components/Icon";
import { Drawer, DrawerContent } from "@/components/v2";
import { hasFeature, pushNotification } from "@/store/modules";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type { ComposedDatabase } from "@/types";
import {
DatabaseCatalog,
@@ -413,7 +413,7 @@ const handleApplyColumnTemplate = (
template: SchemaTemplateSetting_FieldTemplate
) => {
state.showSchemaTemplateDrawer = false;
- if (!hasFeature(PlanLimitConfig_Feature.SCHEMA_TEMPLATE)) {
+ if (!hasFeature(PlanFeature.FEATURE_SCHEMA_TEMPLATE)) {
state.showFeatureModal = true;
return;
}
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableList/TableList.vue b/frontend/src/components/SchemaEditorLite/Panels/TableList/TableList.vue
index 01caf6aa48..ae09c283f7 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableList/TableList.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableList/TableList.vue
@@ -40,7 +40,7 @@
</Drawer>
<FeatureModal
- :feature="PlanLimitConfig_Feature.SCHEMA_TEMPLATE"
+ :feature="PlanFeature.FEATURE_SCHEMA_TEMPLATE"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
/>
@@ -57,7 +57,7 @@ import ClassificationCell from "@/components/ColumnDataTable/ClassificationCell.
import FeatureModal from "@/components/FeatureGuard/FeatureModal.vue";
import { Drawer, DrawerContent, InlineInput } from "@/components/v2";
import { hasFeature } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type { ComposedDatabase } from "@/types";
import {
TableCatalog,
@@ -376,7 +376,7 @@ const handleRestoreTable = (table: TableMetadata) => {
const handleApplyTemplate = (template: SchemaTemplateSetting_TableTemplate) => {
state.showSchemaTemplateDrawer = false;
- if (!hasFeature(PlanLimitConfig_Feature.SCHEMA_TEMPLATE)) {
+ if (!hasFeature(PlanFeature.FEATURE_SCHEMA_TEMPLATE)) {
state.showFeatureModal = true;
return;
}
diff --git a/frontend/src/components/SchemaTemplate/TableTemplateForm.vue b/frontend/src/components/SchemaTemplate/TableTemplateForm.vue
index 778445a0ef..f55d1cb400 100644
--- a/frontend/src/components/SchemaTemplate/TableTemplateForm.vue
+++ b/frontend/src/components/SchemaTemplate/TableTemplateForm.vue
@@ -105,7 +105,7 @@
@click="state.showFieldTemplateDrawer = true"
>
<template #icon>
- <FeatureBadge :feature="PlanLimitConfig_Feature.SCHEMA_TEMPLATE" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_SCHEMA_TEMPLATE" />
<PlusIcon class="w-4 h-4 text-control-placeholder" />
</template>
{{ $t("schema-editor.actions.add-from-template") }}
@@ -210,7 +210,7 @@ import {
type SchemaTemplateSetting_FieldTemplate,
} from "@/types/proto/v1/setting_service";
import { SchemaTemplateSetting, Setting_SettingName } from "@/types/proto/v1/setting_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { arraySwap, instanceV1AllowsReorderColumns } from "@/utils";
import FieldTemplates from "@/views/SchemaTemplate/FieldTemplates.vue";
import ClassificationLevelBadge from "./ClassificationLevelBadge.vue";
diff --git a/frontend/src/components/SensitiveData/ClassificationView.vue b/frontend/src/components/SensitiveData/ClassificationView.vue
index 63f0de1198..da7db0016a 100644
--- a/frontend/src/components/SensitiveData/ClassificationView.vue
+++ b/frontend/src/components/SensitiveData/ClassificationView.vue
@@ -99,7 +99,7 @@ import { v4 as uuidv4 } from "uuid";
import { computed, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
import { featureToRef, useSettingV1Store, pushNotification } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import {
DataClassificationSetting_DataClassificationConfig_Level as ClassificationLevel,
DataClassificationSetting_DataClassificationConfig_DataClassification as DataClassification,
@@ -213,7 +213,7 @@ const allowEdit = computed(() => {
return hasWorkspacePermissionV2("bb.settings.set");
});
-const hasSensitiveDataFeature = featureToRef(PlanLimitConfig_Feature.DATA_MASKING);
+const hasSensitiveDataFeature = featureToRef(PlanFeature.FEATURE_DATA_MASKING);
const onUpload = () => {
uploader.value?.click();
diff --git a/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue b/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue
index fa1e1d6eab..ff0a189a92 100644
--- a/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue
+++ b/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue
@@ -143,7 +143,7 @@ import {
PolicyResourceType,
MaskingRulePolicy_MaskingRule,
} from "@/types/proto/v1/org_policy_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import {
arraySwap,
hasWorkspacePermissionV2,
@@ -183,7 +183,7 @@ const policyStore = usePolicyV1Store();
const hasPermission = computed(() => {
return hasWorkspacePermissionV2("bb.policies.update");
});
-const hasSensitiveDataFeature = featureToRef(PlanLimitConfig_Feature.DATA_MASKING);
+const hasSensitiveDataFeature = featureToRef(PlanFeature.FEATURE_DATA_MASKING);
const layout = {
mainContainerRef: ref<HTMLDivElement>(),
};
diff --git a/frontend/src/components/SensitiveData/GrantAccessForm.vue b/frontend/src/components/SensitiveData/GrantAccessForm.vue
index cc4bfe4055..2cb6453021 100644
--- a/frontend/src/components/SensitiveData/GrantAccessForm.vue
+++ b/frontend/src/components/SensitiveData/GrantAccessForm.vue
@@ -12,7 +12,7 @@
<DatabaseResourceForm
v-model:database-resources="state.databaseResources"
:project-name="projectName"
- :required-feature="PlanLimitConfig_Feature.DATA_MASKING"
+ :required-feature="PlanFeature.FEATURE_DATA_MASKING"
:include-cloumn="true"
/>
</div>
@@ -119,7 +119,7 @@ import {
MaskingExceptionPolicy_MaskingException_Action,
maskingExceptionPolicy_MaskingException_ActionToJSON,
} from "@/types/proto/v1/org_policy_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type { SensitiveColumn } from "./types";
import {
getExpressionsForDatabaseResource,
diff --git a/frontend/src/components/SensitiveData/SemanticTypesView.vue b/frontend/src/components/SensitiveData/SemanticTypesView.vue
index 4ed502e098..70c44daac8 100644
--- a/frontend/src/components/SensitiveData/SemanticTypesView.vue
+++ b/frontend/src/components/SensitiveData/SemanticTypesView.vue
@@ -44,7 +44,7 @@ import { computed, reactive, onMounted } from "vue";
import { useI18n } from "vue-i18n";
import { featureToRef, pushNotification, useSettingV1Store } from "@/store";
import { SemanticTypeSetting_SemanticType, Setting_SettingName } from "@/types/proto/v1/setting_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import SemanticTemplateDrawer from "./components/SemanticTemplateDrawer.vue";
import type { SemanticItem } from "./components/SemanticTypesTable.vue";
@@ -67,7 +67,7 @@ const settingStore = useSettingV1Store();
const hasPermission = computed(() => {
return hasWorkspacePermissionV2("bb.policies.update");
});
-const hasSensitiveDataFeature = featureToRef(PlanLimitConfig_Feature.DATA_MASKING);
+const hasSensitiveDataFeature = featureToRef(PlanFeature.FEATURE_DATA_MASKING);
const semanticTypeSettingValue = computed(() => {
const semanticTypeSetting = settingStore.getSettingByName(
diff --git a/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue b/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue
index 143012a469..d4f32b55db 100644
--- a/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue
+++ b/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue
@@ -52,7 +52,7 @@
</div>
<FeatureModal
- :feature="PlanLimitConfig_Feature.COMPARE_AND_SYNC_SCHEMA"
+ :feature="PlanFeature.FEATURE_COMPARE_AND_SYNC_SCHEMA"
:open="state.showFeatureModal"
:instance="database?.instanceResource"
@cancel="state.showFeatureModal = false"
@@ -83,7 +83,7 @@ import {
Changelog_Type,
changelog_TypeToJSON,
} from "@/types/proto/v1/database_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import {
extractChangelogUID,
isValidChangelogName,
@@ -136,7 +136,7 @@ const isPreparingSchemaVersionOptions = ref(false);
const hasSyncSchemaFeature = computed(() => {
return useSubscriptionV1Store().hasInstanceFeature(
- PlanLimitConfig_Feature.COMPARE_AND_SYNC_SCHEMA,
+ PlanFeature.FEATURE_COMPARE_AND_SYNC_SCHEMA,
database.value?.instanceResource
);
});
@@ -212,7 +212,7 @@ const renderSchemaVersionLabel = (option: SelectOption) => {
<div class="flex flex-row justify-start items-center truncate gap-1">
{index > 0 && (
<FeatureBadge
- feature={PlanLimitConfig_Feature.COMPARE_AND_SYNC_SCHEMA}
+ feature={PlanFeature.FEATURE_COMPARE_AND_SYNC_SCHEMA}
instance={database.value?.instanceResource}
/>
)}
diff --git a/frontend/src/components/TableDataTable.vue b/frontend/src/components/TableDataTable.vue
index 870de9dfd6..bcbace25ac 100644
--- a/frontend/src/components/TableDataTable.vue
+++ b/frontend/src/components/TableDataTable.vue
@@ -26,25 +26,25 @@
</template>
<script lang="ts" setup>
-import type { DataTableColumn } from "naive-ui";
-import { NDataTable } from "naive-ui";
-import type { PropType } from "vue";
-import { computed, reactive, onMounted, h, watch } from "vue";
-import { useI18n } from "vue-i18n";
-import { useRoute, useRouter } from "vue-router";
import ClassificationCell from "@/components/ColumnDataTable/ClassificationCell.vue";
import { updateTableCatalog } from "@/components/ColumnDataTable/utils";
import {
featureToRef,
- useSettingV1Store,
- useDatabaseCatalog,
getTableCatalog,
+ useDatabaseCatalog,
+ useSettingV1Store,
} from "@/store/modules";
import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
import type { TableMetadata } from "@/types/proto/v1/database_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { bytesToString, hasSchemaProperty } from "@/utils";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
+import type { PropType } from "vue";
+import { computed, h, onMounted, reactive, watch } from "vue";
+import { useI18n } from "vue-i18n";
+import { useRoute, useRouter } from "vue-router";
import TableDetailDrawer from "./TableDetailDrawer.vue";
type LocalState = {
@@ -101,7 +101,7 @@ const classificationConfig = computed(() => {
);
});
-const hasSensitiveDataFeature = featureToRef(PlanLimitConfig_Feature.DATA_MASKING);
+const hasSensitiveDataFeature = featureToRef(PlanFeature.FEATURE_DATA_MASKING);
const engine = computed(() => props.database.instanceResource.engine);
diff --git a/frontend/src/components/misc/Watermark.vue b/frontend/src/components/misc/Watermark.vue
index 278eb19dfb..9062c3616e 100644
--- a/frontend/src/components/misc/Watermark.vue
+++ b/frontend/src/components/misc/Watermark.vue
@@ -39,7 +39,7 @@ import { featureToRef, useCurrentUserV1, extractUserId, useActuatorV1Store } fro
import { useSettingV1Store } from "@/store/modules/v1/setting";
import { UNKNOWN_USER_NAME } from "@/types";
import { Setting_SettingName } from "@/types/proto/v1/setting_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
const GAP = 320;
const SIZE = 16;
@@ -50,7 +50,7 @@ const version = computed(() => useActuatorV1Store().version + "-" + useActuatorV
const setting = computed(() =>
useSettingV1Store().getSettingByName(Setting_SettingName.WATERMARK)
);
-const hasWatermarkFeature = featureToRef(PlanLimitConfig_Feature.WATERMARK);
+const hasWatermarkFeature = featureToRef(PlanFeature.FEATURE_WATERMARK);
const lines = computed(() => {
const user = currentUserV1.value;
diff --git a/frontend/src/components/v2/Model/DatabaseView.vue b/frontend/src/components/v2/Model/DatabaseView.vue
index 397af62817..5d5df0a6c3 100644
--- a/frontend/src/components/v2/Model/DatabaseView.vue
+++ b/frontend/src/components/v2/Model/DatabaseView.vue
@@ -1,7 +1,7 @@
<template>
<div class="flex flex-row justify-start items-center gap-x-1" v-bind="$attrs">
<FeatureBadge
- :feature="PlanLimitConfig_Feature.DATABASE_GROUPS"
+ :feature="PlanFeature.FEATURE_DATABASE_GROUPS"
class="mr-2"
:instance="database.instanceResource"
/>
@@ -26,7 +26,7 @@
import { FeatureBadge } from "@/components/FeatureGuard";
import { DatabaseV1Name, EnvironmentV1Name } from "@/components/v2";
import { useDatabaseV1ByName } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { InstanceV1EngineIcon } from "./Instance";
const props = defineProps<{
diff --git a/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue b/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue
index 35fba66599..1f79220337 100644
--- a/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue
+++ b/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue
@@ -17,7 +17,7 @@ import { NTooltip } from "naive-ui";
import { computed } from "vue";
import { featureToRef } from "@/store";
import type { Environment } from "@/types/v1/environment";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
const props = withDefaults(
defineProps<{
@@ -30,7 +30,7 @@ const props = withDefaults(
);
const hasEnvironmentTierPolicyFeature = featureToRef(
- PlanLimitConfig_Feature.ENVIRONMENT_TIERS
+ PlanFeature.FEATURE_ENVIRONMENT_TIERS
);
const enabled = computed((): boolean => {
diff --git a/frontend/src/components/v2/Select/RoleSelect.vue b/frontend/src/components/v2/Select/RoleSelect.vue
index 286e77530c..ec468b0bf4 100644
--- a/frontend/src/components/v2/Select/RoleSelect.vue
+++ b/frontend/src/components/v2/Select/RoleSelect.vue
@@ -13,7 +13,7 @@
@update:value="onValueUpdate"
/>
<FeatureModal
- :feature="PlanLimitConfig_Feature.CUSTOM_ROLES"
+ :feature="PlanFeature.FEATURE_CUSTOM_ROLES"
:open="showFeatureModal"
@cancel="showFeatureModal = false"
/>
@@ -27,7 +27,7 @@ import FeatureBadge from "@/components/FeatureGuard/FeatureBadge.vue";
import FeatureModal from "@/components/FeatureGuard/FeatureModal.vue";
import { t } from "@/plugins/i18n";
import { useAppFeature, useRoleStore, featureToRef } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import {
PRESET_PROJECT_ROLES,
PRESET_ROLES,
@@ -67,7 +67,7 @@ const emit = defineEmits<{
const roleStore = useRoleStore();
const hideProjectRoles = useAppFeature("bb.feature.members.hide-project-roles");
const showFeatureModal = ref(false);
-const hasCustomRoleFeature = featureToRef(PlanLimitConfig_Feature.CUSTOM_ROLES);
+const hasCustomRoleFeature = featureToRef(PlanFeature.FEATURE_CUSTOM_ROLES);
const filterRole = (role: string) => {
if (!props.supportRoles || props.supportRoles.length === 0) {
@@ -133,7 +133,7 @@ const renderLabel = (option: SelectOption) => {
}
const icon = h(FeatureBadge, {
- feature: PlanLimitConfig_Feature.CUSTOM_ROLES,
+ feature: PlanFeature.FEATURE_CUSTOM_ROLES,
clickable: false,
});
return h(
diff --git a/frontend/src/composables/useExecuteSQL.ts b/frontend/src/composables/useExecuteSQL.ts
index dfc9d520df..e4a0ac2fce 100644
--- a/frontend/src/composables/useExecuteSQL.ts
+++ b/frontend/src/composables/useExecuteSQL.ts
@@ -28,7 +28,7 @@ import type {
QueryDataSourceType,
} from "@/types";
import { isValidDatabaseName } from "@/types";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { Engine } from "@/types/proto/v1/common";
import { DatabaseGroupView } from "@/types/proto/v1/database_group_service";
import {
@@ -217,7 +217,7 @@ const useExecuteSQL = () => {
]);
// Check if the user selects multiple databases to query.
- if (tab.batchQueryContext && hasFeature(PlanLimitConfig_Feature.BATCH_QUERY)) {
+ if (tab.batchQueryContext && hasFeature(PlanFeature.FEATURE_BATCH_QUERY)) {
const { databases = [], databaseGroups = [] } = tab.batchQueryContext;
for (const databaseResourceName of databases) {
if (!isValidDatabaseName(databaseResourceName)) {
@@ -229,7 +229,7 @@ const useExecuteSQL = () => {
batchQueryDatabaseSet.add(databaseResourceName);
}
- if (hasFeature(PlanLimitConfig_Feature.DATABASE_GROUPS)) {
+ if (hasFeature(PlanFeature.FEATURE_DATABASE_GROUPS)) {
for (const databaseGroupName of databaseGroups) {
try {
const databaseGroup = await dbGroupStore.getOrFetchDBGroupByName(
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts
index 7f6826b6a4..bb770353c6 100644
--- a/frontend/src/router/index.ts
+++ b/frontend/src/router/index.ts
@@ -13,7 +13,7 @@ import {
useSQLEditorTabStore,
useAppFeature,
} from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import authRoutes, {
AUTH_2FA_SETUP_MODULE,
AUTH_MFA_MODULE,
@@ -163,7 +163,7 @@ router.beforeEach((to, from, next) => {
const currentUserV1 = useCurrentUserV1();
// If 2FA is required, redirect to MFA setup page if the user has not enabled 2FA.
- if (hasFeature(PlanLimitConfig_Feature.TWO_FA) && actuatorStore.serverInfo?.require2fa) {
+ if (hasFeature(PlanFeature.FEATURE_TWO_FA) && actuatorStore.serverInfo?.require2fa) {
const user = currentUserV1.value;
if (user && !user.mfaEnabled) {
next({
diff --git a/frontend/src/store/modules/sqlEditor/tab.ts b/frontend/src/store/modules/sqlEditor/tab.ts
index 43604f1be6..ac5c88eb53 100644
--- a/frontend/src/store/modules/sqlEditor/tab.ts
+++ b/frontend/src/store/modules/sqlEditor/tab.ts
@@ -28,7 +28,7 @@ import {
extractUserId,
hasFeature,
} from "../v1";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { useSQLEditorStore } from "./editor";
import {
EXTENDED_TAB_FIELDS,
@@ -206,7 +206,7 @@ export const useSQLEditorTabStore = defineStore("sqlEditorTab", () => {
if (!currentTab.value) {
return false;
}
- if (!hasFeature(PlanLimitConfig_Feature.BATCH_QUERY)) {
+ if (!hasFeature(PlanFeature.FEATURE_BATCH_QUERY)) {
return false;
}
const { batchQueryContext } = currentTab.value;
@@ -214,7 +214,7 @@ export const useSQLEditorTabStore = defineStore("sqlEditorTab", () => {
return false;
}
const { databaseGroups = [], databases = [] } = batchQueryContext;
- if (!hasFeature(PlanLimitConfig_Feature.DATABASE_GROUPS)) {
+ if (!hasFeature(PlanFeature.FEATURE_DATABASE_GROUPS)) {
return databases.length > 1;
}
return databaseGroups.length > 0 || databases.length > 1;
diff --git a/frontend/src/store/modules/v1/subscription.ts b/frontend/src/store/modules/v1/subscription.ts
index d63d07c9d2..a72c948b5d 100644
--- a/frontend/src/store/modules/v1/subscription.ts
+++ b/frontend/src/store/modules/v1/subscription.ts
@@ -13,7 +13,7 @@ import type {
} from "@/types/proto/v1/instance_service";
import type { Subscription } from "@/types/proto/v1/subscription_service";
import {
- PlanLimitConfig_Feature,
+ PlanFeature,
PlanType,
planTypeFromJSON,
planTypeToNumber,
@@ -176,14 +176,14 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {
setSubscription(subscription: Subscription) {
this.subscription = subscription;
},
- hasFeature(feature: PlanLimitConfig_Feature) {
+ hasFeature(feature: PlanFeature) {
if (this.isExpired) {
return false;
}
return checkFeature(this.currentPlan, feature);
},
hasInstanceFeature(
- feature: PlanLimitConfig_Feature,
+ feature: PlanFeature,
instance: Instance | InstanceResource | undefined = undefined
) {
// For FREE plan, don't check instance activation
@@ -199,7 +199,7 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {
return checkInstanceFeature(this.currentPlan, feature, instance.activation);
},
instanceMissingLicense(
- feature: PlanLimitConfig_Feature,
+ feature: PlanFeature,
instance: Instance | InstanceResource | undefined = undefined
) {
// Only relevant for instance-limited features
@@ -215,7 +215,7 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {
currentPlanGTE(plan: PlanType): boolean {
return planTypeToNumber(this.currentPlan) >= planTypeToNumber(plan);
},
- getMinimumRequiredPlan(feature: PlanLimitConfig_Feature): PlanType {
+ getMinimumRequiredPlan(feature: PlanFeature): PlanType {
return getMinimumRequiredPlan(feature);
},
async fetchSubscription() {
@@ -241,13 +241,13 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {
},
});
-export const hasFeature = (feature: PlanLimitConfig_Feature) => {
+export const hasFeature = (feature: PlanFeature) => {
const store = useSubscriptionV1Store();
return store.hasFeature(feature);
};
export const featureToRef = (
- feature: PlanLimitConfig_Feature,
+ feature: PlanFeature,
instance: Instance | InstanceResource | undefined = undefined
): Ref<boolean> => {
const store = useSubscriptionV1Store();
diff --git a/frontend/src/types/plan.ts b/frontend/src/types/plan.ts
index 49bddd46bc..3e413df611 100644
--- a/frontend/src/types/plan.ts
+++ b/frontend/src/types/plan.ts
@@ -2,18 +2,18 @@ import {
PlanType,
type PlanConfig,
type PlanLimitConfig,
- PlanLimitConfig_Feature,
+ PlanFeature,
} from "@/types/proto/v1/subscription_service";
import planData from "./plan.yaml";
// Use proto Feature enum as the primary feature type
-export type Feature = PlanLimitConfig_Feature;
+export type Feature = PlanFeature;
// Instance-limited features that require activated instances
-export const instanceLimitFeature = new Set<PlanLimitConfig_Feature>([
- PlanLimitConfig_Feature.DATABASE_SECRET_VARIABLES,
- PlanLimitConfig_Feature.INSTANCE_READ_ONLY_CONNECTION,
- PlanLimitConfig_Feature.DATA_MASKING,
+export const instanceLimitFeature = new Set<PlanFeature>([
+ PlanFeature.FEATURE_DATABASE_SECRET_VARIABLES,
+ PlanFeature.FEATURE_INSTANCE_READ_ONLY_CONNECTION,
+ PlanFeature.FEATURE_DATA_MASKING,
]);
export const planTypeToString = (planType: PlanType): string => {
@@ -36,7 +36,7 @@ export const PLAN_CONFIG: PlanConfig = planData;
export const PLANS: PlanLimitConfig[] = planData.plans;
// Create a plan feature matrix from the YAML data
-export const PLAN_FEATURE_MATRIX = new Map<PlanType, Set<PlanLimitConfig_Feature>>();
+export const PLAN_FEATURE_MATRIX = new Map<PlanType, Set<PlanFeature>>();
// Initialize the feature matrix from plan data
PLANS.forEach((plan) => {
@@ -44,13 +44,13 @@ PLANS.forEach((plan) => {
});
// Helper function to check if a plan has a feature
-export const planHasFeature = (plan: PlanType, feature: PlanLimitConfig_Feature): boolean => {
+export const planHasFeature = (plan: PlanType, feature: PlanFeature): boolean => {
const planFeatures = PLAN_FEATURE_MATRIX.get(plan);
return planFeatures?.has(feature) ?? false;
};
// Helper function to get minimum required plan for a feature
-export const getMinimumRequiredPlan = (feature: PlanLimitConfig_Feature): PlanType => {
+export const getMinimumRequiredPlan = (feature: PlanFeature): PlanType => {
const planOrder = [PlanType.FREE, PlanType.TEAM, PlanType.ENTERPRISE];
for (const plan of planOrder) {
if (planHasFeature(plan, feature)) {
@@ -61,12 +61,12 @@ export const getMinimumRequiredPlan = (feature: PlanLimitConfig_Feature): PlanTy
};
// Helper function to check if a feature is available for a plan
-export const hasFeature = (plan: PlanType, feature: PlanLimitConfig_Feature): boolean => {
+export const hasFeature = (plan: PlanType, feature: PlanFeature): boolean => {
return planHasFeature(plan, feature);
};
// Helper function to check instance features
-export const hasInstanceFeature = (plan: PlanType, feature: PlanLimitConfig_Feature, instanceActivated = true): boolean => {
+export const hasInstanceFeature = (plan: PlanType, feature: PlanFeature, instanceActivated = true): boolean => {
if (!hasFeature(plan, feature)) {
return false;
}
diff --git a/frontend/src/types/proto/v1/subscription_service.ts b/frontend/src/types/proto/v1/subscription_service.ts
index 188311873c..75130498b1 100644
--- a/frontend/src/types/proto/v1/subscription_service.ts
+++ b/frontend/src/types/proto/v1/subscription_service.ts
@@ -72,686 +72,678 @@ export function planTypeToNumber(object: PlanType): number {
}
}
-export interface GetSubscriptionRequest {
-}
-
-export interface GetFeatureMatrixRequest {
-}
-
-export interface UpdateSubscriptionRequest {
- patch: PatchSubscription | undefined;
-}
-
-export interface PatchSubscription {
- license: string;
-}
-
-export interface Subscription {
- seatCount: number;
- instanceCount: number;
- expiresTime: Timestamp | undefined;
- startedTime: Timestamp | undefined;
- plan: PlanType;
- trialing: boolean;
- orgId: string;
- orgName: string;
-}
-
-export interface FeatureMatrix {
- features: Feature[];
-}
-
-export interface Feature {
- /** Name is the feature name. */
- name: string;
- /** Matrix is the feature matrix for different plan. The key is the plan enum in string value. */
- matrix: { [key: string]: boolean };
-}
-
-export interface Feature_MatrixEntry {
- key: string;
- value: boolean;
-}
-
-/** PlanConfig represents the configuration for all plans loaded from plan.yaml */
-export interface PlanConfig {
- plans: PlanLimitConfig[];
-}
-
-/** PlanLimitConfig represents a single plan's configuration */
-export interface PlanLimitConfig {
- type: PlanType;
- maximumInstanceCount: number;
- maximumSeatCount: number;
- features: PlanLimitConfig_Feature[];
-}
-
-/** Feature represents the available features in Bytebase */
-export enum PlanLimitConfig_Feature {
+/** PlanFeature represents the available features in Bytebase */
+export enum PlanFeature {
FEATURE_UNSPECIFIED = "FEATURE_UNSPECIFIED",
- /** DATABASE_CHANGE - Database Change Management */
- DATABASE_CHANGE = "DATABASE_CHANGE",
- GIT_BASED_SCHEMA_VERSION_CONTROL = "GIT_BASED_SCHEMA_VERSION_CONTROL",
- DECLARATIVE_SCHEMA_MIGRATION = "DECLARATIVE_SCHEMA_MIGRATION",
- COMPARE_AND_SYNC_SCHEMA = "COMPARE_AND_SYNC_SCHEMA",
- ONLINE_SCHEMA_CHANGE = "ONLINE_SCHEMA_CHANGE",
- PRE_DEPLOYMENT_SQL_REVIEW = "PRE_DEPLOYMENT_SQL_REVIEW",
- AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES = "AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES",
- ONE_CLICK_DATA_ROLLBACK = "ONE_CLICK_DATA_ROLLBACK",
- MULTI_DATABASE_BATCH_CHANGES = "MULTI_DATABASE_BATCH_CHANGES",
- PROGRESSIVE_ENVIRONMENT_DEPLOYMENT = "PROGRESSIVE_ENVIRONMENT_DEPLOYMENT",
- SCHEDULED_ROLLOUT_TIME = "SCHEDULED_ROLLOUT_TIME",
- DATABASE_CHANGELOG = "DATABASE_CHANGELOG",
- SCHEMA_DRIFT_DETECTION = "SCHEMA_DRIFT_DETECTION",
- CHANGELIST = "CHANGELIST",
- SCHEMA_TEMPLATE = "SCHEMA_TEMPLATE",
- ROLLOUT_POLICY = "ROLLOUT_POLICY",
- /** WEB_BASED_SQL_EDITOR - SQL Editor & Development */
- WEB_BASED_SQL_EDITOR = "WEB_BASED_SQL_EDITOR",
- SQL_EDITOR_ADMIN_MODE = "SQL_EDITOR_ADMIN_MODE",
- NATURAL_LANGUAGE_TO_SQL = "NATURAL_LANGUAGE_TO_SQL",
- AI_QUERY_EXPLANATION = "AI_QUERY_EXPLANATION",
- AI_QUERY_SUGGESTIONS = "AI_QUERY_SUGGESTIONS",
- AUTO_COMPLETE = "AUTO_COMPLETE",
- SCHEMA_DIAGRAM = "SCHEMA_DIAGRAM",
- SCHEMA_EDITOR = "SCHEMA_EDITOR",
- DATA_EXPORT = "DATA_EXPORT",
- QUERY_HISTORY = "QUERY_HISTORY",
- SAVED_AND_SHARED_SQL_SCRIPTS = "SAVED_AND_SHARED_SQL_SCRIPTS",
- SQL_EDITOR_DDL_DML_RESTRICTION = "SQL_EDITOR_DDL_DML_RESTRICTION",
- BATCH_QUERY = "BATCH_QUERY",
- INSTANCE_READ_ONLY_CONNECTION = "INSTANCE_READ_ONLY_CONNECTION",
- RESTRICT_COPYING_DATA = "RESTRICT_COPYING_DATA",
- /** IAM - Security & Compliance */
- IAM = "IAM",
- INSTANCE_SSL_CONNECTION = "INSTANCE_SSL_CONNECTION",
- INSTANCE_CONNECTION_OVER_SSH_TUNNEL = "INSTANCE_CONNECTION_OVER_SSH_TUNNEL",
- INSTANCE_CONNECTION_IAM_AUTHENTICATION = "INSTANCE_CONNECTION_IAM_AUTHENTICATION",
- GOOGLE_AND_GITHUB_SSO = "GOOGLE_AND_GITHUB_SSO",
- USER_GROUPS = "USER_GROUPS",
- DISALLOW_SELF_SERVICE_SIGNUP = "DISALLOW_SELF_SERVICE_SIGNUP",
- DATABASE_SECRET_VARIABLES = "DATABASE_SECRET_VARIABLES",
- QUERY_DATASOURCE_RESTRICTION = "QUERY_DATASOURCE_RESTRICTION",
- CUSTOM_INSTANCE_SYNC_TIME = "CUSTOM_INSTANCE_SYNC_TIME",
- CUSTOM_INSTANCE_CONNECTION_LIMIT = "CUSTOM_INSTANCE_CONNECTION_LIMIT",
- RISK_ASSESSMENT = "RISK_ASSESSMENT",
- APPROVAL_WORKFLOW = "APPROVAL_WORKFLOW",
- AUDIT_LOG = "AUDIT_LOG",
- ENTERPRISE_SSO = "ENTERPRISE_SSO",
- TWO_FA = "TWO_FA",
- PASSWORD_RESTRICTIONS = "PASSWORD_RESTRICTIONS",
- DISALLOW_PASSWORD_SIGNIN = "DISALLOW_PASSWORD_SIGNIN",
- CUSTOM_ROLES = "CUSTOM_ROLES",
- REQUEST_ROLE_WORKFLOW = "REQUEST_ROLE_WORKFLOW",
- DATA_MASKING = "DATA_MASKING",
- DATA_CLASSIFICATION = "DATA_CLASSIFICATION",
- SCIM = "SCIM",
- DIRECTORY_SYNC_ENTRA_ID = "DIRECTORY_SYNC_ENTRA_ID",
- DIRECTORY_SYNC_OKTA = "DIRECTORY_SYNC_OKTA",
- SIGN_IN_FREQUENCY_CONTROL = "SIGN_IN_FREQUENCY_CONTROL",
- EXTERNAL_SECRET_MANAGER = "EXTERNAL_SECRET_MANAGER",
- USER_EMAIL_DOMAIN_RESTRICTION = "USER_EMAIL_DOMAIN_RESTRICTION",
- /** ENVIRONMENT_MANAGEMENT - Administration & Support */
- ENVIRONMENT_MANAGEMENT = "ENVIRONMENT_MANAGEMENT",
- IM_NOTIFICATIONS = "IM_NOTIFICATIONS",
- TERRAFORM_PROVIDER = "TERRAFORM_PROVIDER",
- DATABASE_GROUPS = "DATABASE_GROUPS",
- ENVIRONMENT_TIERS = "ENVIRONMENT_TIERS",
- DASHBOARD_ANNOUNCEMENT = "DASHBOARD_ANNOUNCEMENT",
- API_INTEGRATION_GUIDANCE = "API_INTEGRATION_GUIDANCE",
- CUSTOM_LOGO = "CUSTOM_LOGO",
- WATERMARK = "WATERMARK",
- ROADMAP_PRIORITIZATION = "ROADMAP_PRIORITIZATION",
- CUSTOM_MSA = "CUSTOM_MSA",
- COMMUNITY_SUPPORT = "COMMUNITY_SUPPORT",
- EMAIL_SUPPORT = "EMAIL_SUPPORT",
- DEDICATED_SUPPORT_WITH_SLA = "DEDICATED_SUPPORT_WITH_SLA",
+ /** FEATURE_DATABASE_CHANGE - Database Change Management */
+ FEATURE_DATABASE_CHANGE = "FEATURE_DATABASE_CHANGE",
+ FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL = "FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL",
+ FEATURE_DECLARATIVE_SCHEMA_MIGRATION = "FEATURE_DECLARATIVE_SCHEMA_MIGRATION",
+ FEATURE_COMPARE_AND_SYNC_SCHEMA = "FEATURE_COMPARE_AND_SYNC_SCHEMA",
+ FEATURE_ONLINE_SCHEMA_CHANGE = "FEATURE_ONLINE_SCHEMA_CHANGE",
+ FEATURE_PRE_DEPLOYMENT_SQL_REVIEW = "FEATURE_PRE_DEPLOYMENT_SQL_REVIEW",
+ FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES = "FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES",
+ FEATURE_ONE_CLICK_DATA_ROLLBACK = "FEATURE_ONE_CLICK_DATA_ROLLBACK",
+ FEATURE_MULTI_DATABASE_BATCH_CHANGES = "FEATURE_MULTI_DATABASE_BATCH_CHANGES",
+ FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT = "FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT",
+ FEATURE_SCHEDULED_ROLLOUT_TIME = "FEATURE_SCHEDULED_ROLLOUT_TIME",
+ FEATURE_DATABASE_CHANGELOG = "FEATURE_DATABASE_CHANGELOG",
+ FEATURE_SCHEMA_DRIFT_DETECTION = "FEATURE_SCHEMA_DRIFT_DETECTION",
+ FEATURE_CHANGELIST = "FEATURE_CHANGELIST",
+ FEATURE_SCHEMA_TEMPLATE = "FEATURE_SCHEMA_TEMPLATE",
+ FEATURE_ROLLOUT_POLICY = "FEATURE_ROLLOUT_POLICY",
+ /** FEATURE_WEB_BASED_SQL_EDITOR - SQL Editor & Development */
+ FEATURE_WEB_BASED_SQL_EDITOR = "FEATURE_WEB_BASED_SQL_EDITOR",
+ FEATURE_SQL_EDITOR_ADMIN_MODE = "FEATURE_SQL_EDITOR_ADMIN_MODE",
+ FEATURE_NATURAL_LANGUAGE_TO_SQL = "FEATURE_NATURAL_LANGUAGE_TO_SQL",
+ FEATURE_AI_QUERY_EXPLANATION = "FEATURE_AI_QUERY_EXPLANATION",
+ FEATURE_AI_QUERY_SUGGESTIONS = "FEATURE_AI_QUERY_SUGGESTIONS",
+ FEATURE_AUTO_COMPLETE = "FEATURE_AUTO_COMPLETE",
+ FEATURE_SCHEMA_DIAGRAM = "FEATURE_SCHEMA_DIAGRAM",
+ FEATURE_SCHEMA_EDITOR = "FEATURE_SCHEMA_EDITOR",
+ FEATURE_DATA_EXPORT = "FEATURE_DATA_EXPORT",
+ FEATURE_QUERY_HISTORY = "FEATURE_QUERY_HISTORY",
+ FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS = "FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS",
+ FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION = "FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION",
+ FEATURE_BATCH_QUERY = "FEATURE_BATCH_QUERY",
+ FEATURE_INSTANCE_READ_ONLY_CONNECTION = "FEATURE_INSTANCE_READ_ONLY_CONNECTION",
+ FEATURE_RESTRICT_COPYING_DATA = "FEATURE_RESTRICT_COPYING_DATA",
+ /** FEATURE_IAM - Security & Compliance */
+ FEATURE_IAM = "FEATURE_IAM",
+ FEATURE_INSTANCE_SSL_CONNECTION = "FEATURE_INSTANCE_SSL_CONNECTION",
+ FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL = "FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL",
+ FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION = "FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION",
+ FEATURE_GOOGLE_AND_GITHUB_SSO = "FEATURE_GOOGLE_AND_GITHUB_SSO",
+ FEATURE_USER_GROUPS = "FEATURE_USER_GROUPS",
+ FEATURE_DISALLOW_SELF_SERVICE_SIGNUP = "FEATURE_DISALLOW_SELF_SERVICE_SIGNUP",
+ FEATURE_DATABASE_SECRET_VARIABLES = "FEATURE_DATABASE_SECRET_VARIABLES",
+ FEATURE_QUERY_DATASOURCE_RESTRICTION = "FEATURE_QUERY_DATASOURCE_RESTRICTION",
+ FEATURE_CUSTOM_INSTANCE_SYNC_TIME = "FEATURE_CUSTOM_INSTANCE_SYNC_TIME",
+ FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT = "FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT",
+ FEATURE_RISK_ASSESSMENT = "FEATURE_RISK_ASSESSMENT",
+ FEATURE_APPROVAL_WORKFLOW = "FEATURE_APPROVAL_WORKFLOW",
+ FEATURE_AUDIT_LOG = "FEATURE_AUDIT_LOG",
+ FEATURE_ENTERPRISE_SSO = "FEATURE_ENTERPRISE_SSO",
+ FEATURE_TWO_FA = "FEATURE_TWO_FA",
+ FEATURE_PASSWORD_RESTRICTIONS = "FEATURE_PASSWORD_RESTRICTIONS",
+ FEATURE_DISALLOW_PASSWORD_SIGNIN = "FEATURE_DISALLOW_PASSWORD_SIGNIN",
+ FEATURE_CUSTOM_ROLES = "FEATURE_CUSTOM_ROLES",
+ FEATURE_REQUEST_ROLE_WORKFLOW = "FEATURE_REQUEST_ROLE_WORKFLOW",
+ FEATURE_DATA_MASKING = "FEATURE_DATA_MASKING",
+ FEATURE_DATA_CLASSIFICATION = "FEATURE_DATA_CLASSIFICATION",
+ FEATURE_SCIM = "FEATURE_SCIM",
+ FEATURE_DIRECTORY_SYNC = "FEATURE_DIRECTORY_SYNC",
+ FEATURE_SIGN_IN_FREQUENCY_CONTROL = "FEATURE_SIGN_IN_FREQUENCY_CONTROL",
+ FEATURE_EXTERNAL_SECRET_MANAGER = "FEATURE_EXTERNAL_SECRET_MANAGER",
+ FEATURE_USER_EMAIL_DOMAIN_RESTRICTION = "FEATURE_USER_EMAIL_DOMAIN_RESTRICTION",
+ /** FEATURE_ENVIRONMENT_MANAGEMENT - Administration & Support */
+ FEATURE_ENVIRONMENT_MANAGEMENT = "FEATURE_ENVIRONMENT_MANAGEMENT",
+ FEATURE_IM_NOTIFICATIONS = "FEATURE_IM_NOTIFICATIONS",
+ FEATURE_TERRAFORM_PROVIDER = "FEATURE_TERRAFORM_PROVIDER",
+ FEATURE_DATABASE_GROUPS = "FEATURE_DATABASE_GROUPS",
+ FEATURE_ENVIRONMENT_TIERS = "FEATURE_ENVIRONMENT_TIERS",
+ FEATURE_DASHBOARD_ANNOUNCEMENT = "FEATURE_DASHBOARD_ANNOUNCEMENT",
+ FEATURE_API_INTEGRATION_GUIDANCE = "FEATURE_API_INTEGRATION_GUIDANCE",
+ FEATURE_CUSTOM_LOGO = "FEATURE_CUSTOM_LOGO",
+ FEATURE_WATERMARK = "FEATURE_WATERMARK",
+ FEATURE_ROADMAP_PRIORITIZATION = "FEATURE_ROADMAP_PRIORITIZATION",
+ FEATURE_CUSTOM_MSA = "FEATURE_CUSTOM_MSA",
+ FEATURE_COMMUNITY_SUPPORT = "FEATURE_COMMUNITY_SUPPORT",
+ FEATURE_EMAIL_SUPPORT = "FEATURE_EMAIL_SUPPORT",
+ FEATURE_DEDICATED_SUPPORT_WITH_SLA = "FEATURE_DEDICATED_SUPPORT_WITH_SLA",
UNRECOGNIZED = "UNRECOGNIZED",
}
-export function planLimitConfig_FeatureFromJSON(object: any): PlanLimitConfig_Feature {
+export function planFeatureFromJSON(object: any): PlanFeature {
switch (object) {
case 0:
case "FEATURE_UNSPECIFIED":
- return PlanLimitConfig_Feature.FEATURE_UNSPECIFIED;
+ return PlanFeature.FEATURE_UNSPECIFIED;
case 1:
- case "DATABASE_CHANGE":
- return PlanLimitConfig_Feature.DATABASE_CHANGE;
+ case "FEATURE_DATABASE_CHANGE":
+ return PlanFeature.FEATURE_DATABASE_CHANGE;
case 2:
- case "GIT_BASED_SCHEMA_VERSION_CONTROL":
- return PlanLimitConfig_Feature.GIT_BASED_SCHEMA_VERSION_CONTROL;
+ case "FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL":
+ return PlanFeature.FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL;
case 3:
- case "DECLARATIVE_SCHEMA_MIGRATION":
- return PlanLimitConfig_Feature.DECLARATIVE_SCHEMA_MIGRATION;
+ case "FEATURE_DECLARATIVE_SCHEMA_MIGRATION":
+ return PlanFeature.FEATURE_DECLARATIVE_SCHEMA_MIGRATION;
case 4:
- case "COMPARE_AND_SYNC_SCHEMA":
- return PlanLimitConfig_Feature.COMPARE_AND_SYNC_SCHEMA;
+ case "FEATURE_COMPARE_AND_SYNC_SCHEMA":
+ return PlanFeature.FEATURE_COMPARE_AND_SYNC_SCHEMA;
case 5:
- case "ONLINE_SCHEMA_CHANGE":
- return PlanLimitConfig_Feature.ONLINE_SCHEMA_CHANGE;
+ case "FEATURE_ONLINE_SCHEMA_CHANGE":
+ return PlanFeature.FEATURE_ONLINE_SCHEMA_CHANGE;
case 6:
- case "PRE_DEPLOYMENT_SQL_REVIEW":
- return PlanLimitConfig_Feature.PRE_DEPLOYMENT_SQL_REVIEW;
+ case "FEATURE_PRE_DEPLOYMENT_SQL_REVIEW":
+ return PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW;
case 7:
- case "AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES":
- return PlanLimitConfig_Feature.AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES;
+ case "FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES":
+ return PlanFeature.FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES;
case 8:
- case "ONE_CLICK_DATA_ROLLBACK":
- return PlanLimitConfig_Feature.ONE_CLICK_DATA_ROLLBACK;
+ case "FEATURE_ONE_CLICK_DATA_ROLLBACK":
+ return PlanFeature.FEATURE_ONE_CLICK_DATA_ROLLBACK;
case 9:
- case "MULTI_DATABASE_BATCH_CHANGES":
- return PlanLimitConfig_Feature.MULTI_DATABASE_BATCH_CHANGES;
+ case "FEATURE_MULTI_DATABASE_BATCH_CHANGES":
+ return PlanFeature.FEATURE_MULTI_DATABASE_BATCH_CHANGES;
case 10:
- case "PROGRESSIVE_ENVIRONMENT_DEPLOYMENT":
- return PlanLimitConfig_Feature.PROGRESSIVE_ENVIRONMENT_DEPLOYMENT;
+ case "FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT":
+ return PlanFeature.FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT;
case 11:
- case "SCHEDULED_ROLLOUT_TIME":
- return PlanLimitConfig_Feature.SCHEDULED_ROLLOUT_TIME;
+ case "FEATURE_SCHEDULED_ROLLOUT_TIME":
+ return PlanFeature.FEATURE_SCHEDULED_ROLLOUT_TIME;
case 12:
- case "DATABASE_CHANGELOG":
- return PlanLimitConfig_Feature.DATABASE_CHANGELOG;
+ case "FEATURE_DATABASE_CHANGELOG":
+ return PlanFeature.FEATURE_DATABASE_CHANGELOG;
case 13:
- case "SCHEMA_DRIFT_DETECTION":
- return PlanLimitConfig_Feature.SCHEMA_DRIFT_DETECTION;
+ case "FEATURE_SCHEMA_DRIFT_DETECTION":
+ return PlanFeature.FEATURE_SCHEMA_DRIFT_DETECTION;
case 14:
- case "CHANGELIST":
- return PlanLimitConfig_Feature.CHANGELIST;
+ case "FEATURE_CHANGELIST":
+ return PlanFeature.FEATURE_CHANGELIST;
case 15:
- case "SCHEMA_TEMPLATE":
- return PlanLimitConfig_Feature.SCHEMA_TEMPLATE;
+ case "FEATURE_SCHEMA_TEMPLATE":
+ return PlanFeature.FEATURE_SCHEMA_TEMPLATE;
case 16:
- case "ROLLOUT_POLICY":
- return PlanLimitConfig_Feature.ROLLOUT_POLICY;
+ case "FEATURE_ROLLOUT_POLICY":
+ return PlanFeature.FEATURE_ROLLOUT_POLICY;
case 17:
- case "WEB_BASED_SQL_EDITOR":
- return PlanLimitConfig_Feature.WEB_BASED_SQL_EDITOR;
+ case "FEATURE_WEB_BASED_SQL_EDITOR":
+ return PlanFeature.FEATURE_WEB_BASED_SQL_EDITOR;
case 18:
- case "SQL_EDITOR_ADMIN_MODE":
- return PlanLimitConfig_Feature.SQL_EDITOR_ADMIN_MODE;
+ case "FEATURE_SQL_EDITOR_ADMIN_MODE":
+ return PlanFeature.FEATURE_SQL_EDITOR_ADMIN_MODE;
case 19:
- case "NATURAL_LANGUAGE_TO_SQL":
- return PlanLimitConfig_Feature.NATURAL_LANGUAGE_TO_SQL;
+ case "FEATURE_NATURAL_LANGUAGE_TO_SQL":
+ return PlanFeature.FEATURE_NATURAL_LANGUAGE_TO_SQL;
case 20:
- case "AI_QUERY_EXPLANATION":
- return PlanLimitConfig_Feature.AI_QUERY_EXPLANATION;
+ case "FEATURE_AI_QUERY_EXPLANATION":
+ return PlanFeature.FEATURE_AI_QUERY_EXPLANATION;
case 21:
- case "AI_QUERY_SUGGESTIONS":
- return PlanLimitConfig_Feature.AI_QUERY_SUGGESTIONS;
+ case "FEATURE_AI_QUERY_SUGGESTIONS":
+ return PlanFeature.FEATURE_AI_QUERY_SUGGESTIONS;
case 22:
- case "AUTO_COMPLETE":
- return PlanLimitConfig_Feature.AUTO_COMPLETE;
+ case "FEATURE_AUTO_COMPLETE":
+ return PlanFeature.FEATURE_AUTO_COMPLETE;
case 23:
- case "SCHEMA_DIAGRAM":
- return PlanLimitConfig_Feature.SCHEMA_DIAGRAM;
+ case "FEATURE_SCHEMA_DIAGRAM":
+ return PlanFeature.FEATURE_SCHEMA_DIAGRAM;
case 24:
- case "SCHEMA_EDITOR":
- return PlanLimitConfig_Feature.SCHEMA_EDITOR;
+ case "FEATURE_SCHEMA_EDITOR":
+ return PlanFeature.FEATURE_SCHEMA_EDITOR;
case 25:
- case "DATA_EXPORT":
- return PlanLimitConfig_Feature.DATA_EXPORT;
+ case "FEATURE_DATA_EXPORT":
+ return PlanFeature.FEATURE_DATA_EXPORT;
case 26:
- case "QUERY_HISTORY":
- return PlanLimitConfig_Feature.QUERY_HISTORY;
+ case "FEATURE_QUERY_HISTORY":
+ return PlanFeature.FEATURE_QUERY_HISTORY;
case 27:
- case "SAVED_AND_SHARED_SQL_SCRIPTS":
- return PlanLimitConfig_Feature.SAVED_AND_SHARED_SQL_SCRIPTS;
+ case "FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS":
+ return PlanFeature.FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS;
case 28:
- case "SQL_EDITOR_DDL_DML_RESTRICTION":
- return PlanLimitConfig_Feature.SQL_EDITOR_DDL_DML_RESTRICTION;
+ case "FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION":
+ return PlanFeature.FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION;
case 29:
- case "BATCH_QUERY":
- return PlanLimitConfig_Feature.BATCH_QUERY;
+ case "FEATURE_BATCH_QUERY":
+ return PlanFeature.FEATURE_BATCH_QUERY;
case 30:
- case "INSTANCE_READ_ONLY_CONNECTION":
- return PlanLimitConfig_Feature.INSTANCE_READ_ONLY_CONNECTION;
+ case "FEATURE_INSTANCE_READ_ONLY_CONNECTION":
+ return PlanFeature.FEATURE_INSTANCE_READ_ONLY_CONNECTION;
case 31:
- case "RESTRICT_COPYING_DATA":
- return PlanLimitConfig_Feature.RESTRICT_COPYING_DATA;
+ case "FEATURE_RESTRICT_COPYING_DATA":
+ return PlanFeature.FEATURE_RESTRICT_COPYING_DATA;
case 32:
- case "IAM":
- return PlanLimitConfig_Feature.IAM;
+ case "FEATURE_IAM":
+ return PlanFeature.FEATURE_IAM;
case 33:
- case "INSTANCE_SSL_CONNECTION":
- return PlanLimitConfig_Feature.INSTANCE_SSL_CONNECTION;
+ case "FEATURE_INSTANCE_SSL_CONNECTION":
+ return PlanFeature.FEATURE_INSTANCE_SSL_CONNECTION;
case 34:
- case "INSTANCE_CONNECTION_OVER_SSH_TUNNEL":
- return PlanLimitConfig_Feature.INSTANCE_CONNECTION_OVER_SSH_TUNNEL;
+ case "FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL":
+ return PlanFeature.FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL;
case 35:
- case "INSTANCE_CONNECTION_IAM_AUTHENTICATION":
- return PlanLimitConfig_Feature.INSTANCE_CONNECTION_IAM_AUTHENTICATION;
+ case "FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION":
+ return PlanFeature.FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION;
case 36:
- case "GOOGLE_AND_GITHUB_SSO":
- return PlanLimitConfig_Feature.GOOGLE_AND_GITHUB_SSO;
+ case "FEATURE_GOOGLE_AND_GITHUB_SSO":
+ return PlanFeature.FEATURE_GOOGLE_AND_GITHUB_SSO;
case 37:
- case "USER_GROUPS":
- return PlanLimitConfig_Feature.USER_GROUPS;
+ case "FEATURE_USER_GROUPS":
+ return PlanFeature.FEATURE_USER_GROUPS;
case 38:
- case "DISALLOW_SELF_SERVICE_SIGNUP":
- return PlanLimitConfig_Feature.DISALLOW_SELF_SERVICE_SIGNUP;
+ case "FEATURE_DISALLOW_SELF_SERVICE_SIGNUP":
+ return PlanFeature.FEATURE_DISALLOW_SELF_SERVICE_SIGNUP;
case 39:
- case "DATABASE_SECRET_VARIABLES":
- return PlanLimitConfig_Feature.DATABASE_SECRET_VARIABLES;
+ case "FEATURE_DATABASE_SECRET_VARIABLES":
+ return PlanFeature.FEATURE_DATABASE_SECRET_VARIABLES;
case 40:
- case "QUERY_DATASOURCE_RESTRICTION":
- return PlanLimitConfig_Feature.QUERY_DATASOURCE_RESTRICTION;
+ case "FEATURE_QUERY_DATASOURCE_RESTRICTION":
+ return PlanFeature.FEATURE_QUERY_DATASOURCE_RESTRICTION;
case 41:
- case "CUSTOM_INSTANCE_SYNC_TIME":
- return PlanLimitConfig_Feature.CUSTOM_INSTANCE_SYNC_TIME;
+ case "FEATURE_CUSTOM_INSTANCE_SYNC_TIME":
+ return PlanFeature.FEATURE_CUSTOM_INSTANCE_SYNC_TIME;
case 42:
- case "CUSTOM_INSTANCE_CONNECTION_LIMIT":
- return PlanLimitConfig_Feature.CUSTOM_INSTANCE_CONNECTION_LIMIT;
+ case "FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT":
+ return PlanFeature.FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT;
case 43:
- case "RISK_ASSESSMENT":
- return PlanLimitConfig_Feature.RISK_ASSESSMENT;
+ case "FEATURE_RISK_ASSESSMENT":
+ return PlanFeature.FEATURE_RISK_ASSESSMENT;
case 44:
- case "APPROVAL_WORKFLOW":
- return PlanLimitConfig_Feature.APPROVAL_WORKFLOW;
+ case "FEATURE_APPROVAL_WORKFLOW":
+ return PlanFeature.FEATURE_APPROVAL_WORKFLOW;
case 45:
- case "AUDIT_LOG":
- return PlanLimitConfig_Feature.AUDIT_LOG;
+ case "FEATURE_AUDIT_LOG":
+ return PlanFeature.FEATURE_AUDIT_LOG;
case 46:
- case "ENTERPRISE_SSO":
- return PlanLimitConfig_Feature.ENTERPRISE_SSO;
+ case "FEATURE_ENTERPRISE_SSO":
+ return PlanFeature.FEATURE_ENTERPRISE_SSO;
case 47:
- case "TWO_FA":
- return PlanLimitConfig_Feature.TWO_FA;
+ case "FEATURE_TWO_FA":
+ return PlanFeature.FEATURE_TWO_FA;
case 48:
- case "PASSWORD_RESTRICTIONS":
- return PlanLimitConfig_Feature.PASSWORD_RESTRICTIONS;
+ case "FEATURE_PASSWORD_RESTRICTIONS":
+ return PlanFeature.FEATURE_PASSWORD_RESTRICTIONS;
case 49:
- case "DISALLOW_PASSWORD_SIGNIN":
- return PlanLimitConfig_Feature.DISALLOW_PASSWORD_SIGNIN;
+ case "FEATURE_DISALLOW_PASSWORD_SIGNIN":
+ return PlanFeature.FEATURE_DISALLOW_PASSWORD_SIGNIN;
case 50:
- case "CUSTOM_ROLES":
- return PlanLimitConfig_Feature.CUSTOM_ROLES;
+ case "FEATURE_CUSTOM_ROLES":
+ return PlanFeature.FEATURE_CUSTOM_ROLES;
case 51:
- case "REQUEST_ROLE_WORKFLOW":
- return PlanLimitConfig_Feature.REQUEST_ROLE_WORKFLOW;
+ case "FEATURE_REQUEST_ROLE_WORKFLOW":
+ return PlanFeature.FEATURE_REQUEST_ROLE_WORKFLOW;
case 52:
- case "DATA_MASKING":
- return PlanLimitConfig_Feature.DATA_MASKING;
+ case "FEATURE_DATA_MASKING":
+ return PlanFeature.FEATURE_DATA_MASKING;
case 53:
- case "DATA_CLASSIFICATION":
- return PlanLimitConfig_Feature.DATA_CLASSIFICATION;
+ case "FEATURE_DATA_CLASSIFICATION":
+ return PlanFeature.FEATURE_DATA_CLASSIFICATION;
case 54:
- case "SCIM":
- return PlanLimitConfig_Feature.SCIM;
+ case "FEATURE_SCIM":
+ return PlanFeature.FEATURE_SCIM;
case 55:
- case "DIRECTORY_SYNC_ENTRA_ID":
- return PlanLimitConfig_Feature.DIRECTORY_SYNC_ENTRA_ID;
+ case "FEATURE_DIRECTORY_SYNC":
+ return PlanFeature.FEATURE_DIRECTORY_SYNC;
case 56:
- case "DIRECTORY_SYNC_OKTA":
- return PlanLimitConfig_Feature.DIRECTORY_SYNC_OKTA;
+ case "FEATURE_SIGN_IN_FREQUENCY_CONTROL":
+ return PlanFeature.FEATURE_SIGN_IN_FREQUENCY_CONTROL;
case 57:
- case "SIGN_IN_FREQUENCY_CONTROL":
- return PlanLimitConfig_Feature.SIGN_IN_FREQUENCY_CONTROL;
+ case "FEATURE_EXTERNAL_SECRET_MANAGER":
+ return PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER;
case 58:
- case "EXTERNAL_SECRET_MANAGER":
- return PlanLimitConfig_Feature.EXTERNAL_SECRET_MANAGER;
+ case "FEATURE_USER_EMAIL_DOMAIN_RESTRICTION":
+ return PlanFeature.FEATURE_USER_EMAIL_DOMAIN_RESTRICTION;
case 59:
- case "USER_EMAIL_DOMAIN_RESTRICTION":
- return PlanLimitConfig_Feature.USER_EMAIL_DOMAIN_RESTRICTION;
+ case "FEATURE_ENVIRONMENT_MANAGEMENT":
+ return PlanFeature.FEATURE_ENVIRONMENT_MANAGEMENT;
case 60:
- case "ENVIRONMENT_MANAGEMENT":
- return PlanLimitConfig_Feature.ENVIRONMENT_MANAGEMENT;
+ case "FEATURE_IM_NOTIFICATIONS":
+ return PlanFeature.FEATURE_IM_NOTIFICATIONS;
case 61:
- case "IM_NOTIFICATIONS":
- return PlanLimitConfig_Feature.IM_NOTIFICATIONS;
+ case "FEATURE_TERRAFORM_PROVIDER":
+ return PlanFeature.FEATURE_TERRAFORM_PROVIDER;
case 62:
- case "TERRAFORM_PROVIDER":
- return PlanLimitConfig_Feature.TERRAFORM_PROVIDER;
+ case "FEATURE_DATABASE_GROUPS":
+ return PlanFeature.FEATURE_DATABASE_GROUPS;
case 63:
- case "DATABASE_GROUPS":
- return PlanLimitConfig_Feature.DATABASE_GROUPS;
+ case "FEATURE_ENVIRONMENT_TIERS":
+ return PlanFeature.FEATURE_ENVIRONMENT_TIERS;
case 64:
- case "ENVIRONMENT_TIERS":
- return PlanLimitConfig_Feature.ENVIRONMENT_TIERS;
+ case "FEATURE_DASHBOARD_ANNOUNCEMENT":
+ return PlanFeature.FEATURE_DASHBOARD_ANNOUNCEMENT;
case 65:
- case "DASHBOARD_ANNOUNCEMENT":
- return PlanLimitConfig_Feature.DASHBOARD_ANNOUNCEMENT;
+ case "FEATURE_API_INTEGRATION_GUIDANCE":
+ return PlanFeature.FEATURE_API_INTEGRATION_GUIDANCE;
case 66:
- case "API_INTEGRATION_GUIDANCE":
- return PlanLimitConfig_Feature.API_INTEGRATION_GUIDANCE;
+ case "FEATURE_CUSTOM_LOGO":
+ return PlanFeature.FEATURE_CUSTOM_LOGO;
case 67:
- case "CUSTOM_LOGO":
- return PlanLimitConfig_Feature.CUSTOM_LOGO;
+ case "FEATURE_WATERMARK":
+ return PlanFeature.FEATURE_WATERMARK;
case 68:
- case "WATERMARK":
- return PlanLimitConfig_Feature.WATERMARK;
+ case "FEATURE_ROADMAP_PRIORITIZATION":
+ return PlanFeature.FEATURE_ROADMAP_PRIORITIZATION;
case 69:
- case "ROADMAP_PRIORITIZATION":
- return PlanLimitConfig_Feature.ROADMAP_PRIORITIZATION;
+ case "FEATURE_CUSTOM_MSA":
+ return PlanFeature.FEATURE_CUSTOM_MSA;
case 70:
- case "CUSTOM_MSA":
- return PlanLimitConfig_Feature.CUSTOM_MSA;
+ case "FEATURE_COMMUNITY_SUPPORT":
+ return PlanFeature.FEATURE_COMMUNITY_SUPPORT;
case 71:
- case "COMMUNITY_SUPPORT":
- return PlanLimitConfig_Feature.COMMUNITY_SUPPORT;
+ case "FEATURE_EMAIL_SUPPORT":
+ return PlanFeature.FEATURE_EMAIL_SUPPORT;
case 72:
- case "EMAIL_SUPPORT":
- return PlanLimitConfig_Feature.EMAIL_SUPPORT;
- case 73:
- case "DEDICATED_SUPPORT_WITH_SLA":
- return PlanLimitConfig_Feature.DEDICATED_SUPPORT_WITH_SLA;
+ case "FEATURE_DEDICATED_SUPPORT_WITH_SLA":
+ return PlanFeature.FEATURE_DEDICATED_SUPPORT_WITH_SLA;
case -1:
case "UNRECOGNIZED":
default:
- return PlanLimitConfig_Feature.UNRECOGNIZED;
+ return PlanFeature.UNRECOGNIZED;
}
}
-export function planLimitConfig_FeatureToJSON(object: PlanLimitConfig_Feature): string {
+export function planFeatureToJSON(object: PlanFeature): string {
switch (object) {
- case PlanLimitConfig_Feature.FEATURE_UNSPECIFIED:
+ case PlanFeature.FEATURE_UNSPECIFIED:
return "FEATURE_UNSPECIFIED";
- case PlanLimitConfig_Feature.DATABASE_CHANGE:
- return "DATABASE_CHANGE";
- case PlanLimitConfig_Feature.GIT_BASED_SCHEMA_VERSION_CONTROL:
- return "GIT_BASED_SCHEMA_VERSION_CONTROL";
- case PlanLimitConfig_Feature.DECLARATIVE_SCHEMA_MIGRATION:
- return "DECLARATIVE_SCHEMA_MIGRATION";
- case PlanLimitConfig_Feature.COMPARE_AND_SYNC_SCHEMA:
- return "COMPARE_AND_SYNC_SCHEMA";
- case PlanLimitConfig_Feature.ONLINE_SCHEMA_CHANGE:
- return "ONLINE_SCHEMA_CHANGE";
- case PlanLimitConfig_Feature.PRE_DEPLOYMENT_SQL_REVIEW:
- return "PRE_DEPLOYMENT_SQL_REVIEW";
- case PlanLimitConfig_Feature.AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES:
- return "AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES";
- case PlanLimitConfig_Feature.ONE_CLICK_DATA_ROLLBACK:
- return "ONE_CLICK_DATA_ROLLBACK";
- case PlanLimitConfig_Feature.MULTI_DATABASE_BATCH_CHANGES:
- return "MULTI_DATABASE_BATCH_CHANGES";
- case PlanLimitConfig_Feature.PROGRESSIVE_ENVIRONMENT_DEPLOYMENT:
- return "PROGRESSIVE_ENVIRONMENT_DEPLOYMENT";
- case PlanLimitConfig_Feature.SCHEDULED_ROLLOUT_TIME:
- return "SCHEDULED_ROLLOUT_TIME";
- case PlanLimitConfig_Feature.DATABASE_CHANGELOG:
- return "DATABASE_CHANGELOG";
- case PlanLimitConfig_Feature.SCHEMA_DRIFT_DETECTION:
- return "SCHEMA_DRIFT_DETECTION";
- case PlanLimitConfig_Feature.CHANGELIST:
- return "CHANGELIST";
- case PlanLimitConfig_Feature.SCHEMA_TEMPLATE:
- return "SCHEMA_TEMPLATE";
- case PlanLimitConfig_Feature.ROLLOUT_POLICY:
- return "ROLLOUT_POLICY";
- case PlanLimitConfig_Feature.WEB_BASED_SQL_EDITOR:
- return "WEB_BASED_SQL_EDITOR";
- case PlanLimitConfig_Feature.SQL_EDITOR_ADMIN_MODE:
- return "SQL_EDITOR_ADMIN_MODE";
- case PlanLimitConfig_Feature.NATURAL_LANGUAGE_TO_SQL:
- return "NATURAL_LANGUAGE_TO_SQL";
- case PlanLimitConfig_Feature.AI_QUERY_EXPLANATION:
- return "AI_QUERY_EXPLANATION";
- case PlanLimitConfig_Feature.AI_QUERY_SUGGESTIONS:
- return "AI_QUERY_SUGGESTIONS";
- case PlanLimitConfig_Feature.AUTO_COMPLETE:
- return "AUTO_COMPLETE";
- case PlanLimitConfig_Feature.SCHEMA_DIAGRAM:
- return "SCHEMA_DIAGRAM";
- case PlanLimitConfig_Feature.SCHEMA_EDITOR:
- return "SCHEMA_EDITOR";
- case PlanLimitConfig_Feature.DATA_EXPORT:
- return "DATA_EXPORT";
- case PlanLimitConfig_Feature.QUERY_HISTORY:
- return "QUERY_HISTORY";
- case PlanLimitConfig_Feature.SAVED_AND_SHARED_SQL_SCRIPTS:
- return "SAVED_AND_SHARED_SQL_SCRIPTS";
- case PlanLimitConfig_Feature.SQL_EDITOR_DDL_DML_RESTRICTION:
- return "SQL_EDITOR_DDL_DML_RESTRICTION";
- case PlanLimitConfig_Feature.BATCH_QUERY:
- return "BATCH_QUERY";
- case PlanLimitConfig_Feature.INSTANCE_READ_ONLY_CONNECTION:
- return "INSTANCE_READ_ONLY_CONNECTION";
- case PlanLimitConfig_Feature.RESTRICT_COPYING_DATA:
- return "RESTRICT_COPYING_DATA";
- case PlanLimitConfig_Feature.IAM:
- return "IAM";
- case PlanLimitConfig_Feature.INSTANCE_SSL_CONNECTION:
- return "INSTANCE_SSL_CONNECTION";
- case PlanLimitConfig_Feature.INSTANCE_CONNECTION_OVER_SSH_TUNNEL:
- return "INSTANCE_CONNECTION_OVER_SSH_TUNNEL";
- case PlanLimitConfig_Feature.INSTANCE_CONNECTION_IAM_AUTHENTICATION:
- return "INSTANCE_CONNECTION_IAM_AUTHENTICATION";
- case PlanLimitConfig_Feature.GOOGLE_AND_GITHUB_SSO:
- return "GOOGLE_AND_GITHUB_SSO";
- case PlanLimitConfig_Feature.USER_GROUPS:
- return "USER_GROUPS";
- case PlanLimitConfig_Feature.DISALLOW_SELF_SERVICE_SIGNUP:
- return "DISALLOW_SELF_SERVICE_SIGNUP";
- case PlanLimitConfig_Feature.DATABASE_SECRET_VARIABLES:
- return "DATABASE_SECRET_VARIABLES";
- case PlanLimitConfig_Feature.QUERY_DATASOURCE_RESTRICTION:
- return "QUERY_DATASOURCE_RESTRICTION";
- case PlanLimitConfig_Feature.CUSTOM_INSTANCE_SYNC_TIME:
- return "CUSTOM_INSTANCE_SYNC_TIME";
- case PlanLimitConfig_Feature.CUSTOM_INSTANCE_CONNECTION_LIMIT:
- return "CUSTOM_INSTANCE_CONNECTION_LIMIT";
- case PlanLimitConfig_Feature.RISK_ASSESSMENT:
- return "RISK_ASSESSMENT";
- case PlanLimitConfig_Feature.APPROVAL_WORKFLOW:
- return "APPROVAL_WORKFLOW";
- case PlanLimitConfig_Feature.AUDIT_LOG:
- return "AUDIT_LOG";
- case PlanLimitConfig_Feature.ENTERPRISE_SSO:
- return "ENTERPRISE_SSO";
- case PlanLimitConfig_Feature.TWO_FA:
- return "TWO_FA";
- case PlanLimitConfig_Feature.PASSWORD_RESTRICTIONS:
- return "PASSWORD_RESTRICTIONS";
- case PlanLimitConfig_Feature.DISALLOW_PASSWORD_SIGNIN:
- return "DISALLOW_PASSWORD_SIGNIN";
- case PlanLimitConfig_Feature.CUSTOM_ROLES:
- return "CUSTOM_ROLES";
- case PlanLimitConfig_Feature.REQUEST_ROLE_WORKFLOW:
- return "REQUEST_ROLE_WORKFLOW";
- case PlanLimitConfig_Feature.DATA_MASKING:
- return "DATA_MASKING";
- case PlanLimitConfig_Feature.DATA_CLASSIFICATION:
- return "DATA_CLASSIFICATION";
- case PlanLimitConfig_Feature.SCIM:
- return "SCIM";
- case PlanLimitConfig_Feature.DIRECTORY_SYNC_ENTRA_ID:
- return "DIRECTORY_SYNC_ENTRA_ID";
- case PlanLimitConfig_Feature.DIRECTORY_SYNC_OKTA:
- return "DIRECTORY_SYNC_OKTA";
- case PlanLimitConfig_Feature.SIGN_IN_FREQUENCY_CONTROL:
- return "SIGN_IN_FREQUENCY_CONTROL";
- case PlanLimitConfig_Feature.EXTERNAL_SECRET_MANAGER:
- return "EXTERNAL_SECRET_MANAGER";
- case PlanLimitConfig_Feature.USER_EMAIL_DOMAIN_RESTRICTION:
- return "USER_EMAIL_DOMAIN_RESTRICTION";
- case PlanLimitConfig_Feature.ENVIRONMENT_MANAGEMENT:
- return "ENVIRONMENT_MANAGEMENT";
- case PlanLimitConfig_Feature.IM_NOTIFICATIONS:
- return "IM_NOTIFICATIONS";
- case PlanLimitConfig_Feature.TERRAFORM_PROVIDER:
- return "TERRAFORM_PROVIDER";
- case PlanLimitConfig_Feature.DATABASE_GROUPS:
- return "DATABASE_GROUPS";
- case PlanLimitConfig_Feature.ENVIRONMENT_TIERS:
- return "ENVIRONMENT_TIERS";
- case PlanLimitConfig_Feature.DASHBOARD_ANNOUNCEMENT:
- return "DASHBOARD_ANNOUNCEMENT";
- case PlanLimitConfig_Feature.API_INTEGRATION_GUIDANCE:
- return "API_INTEGRATION_GUIDANCE";
- case PlanLimitConfig_Feature.CUSTOM_LOGO:
- return "CUSTOM_LOGO";
- case PlanLimitConfig_Feature.WATERMARK:
- return "WATERMARK";
- case PlanLimitConfig_Feature.ROADMAP_PRIORITIZATION:
- return "ROADMAP_PRIORITIZATION";
- case PlanLimitConfig_Feature.CUSTOM_MSA:
- return "CUSTOM_MSA";
- case PlanLimitConfig_Feature.COMMUNITY_SUPPORT:
- return "COMMUNITY_SUPPORT";
- case PlanLimitConfig_Feature.EMAIL_SUPPORT:
- return "EMAIL_SUPPORT";
- case PlanLimitConfig_Feature.DEDICATED_SUPPORT_WITH_SLA:
- return "DEDICATED_SUPPORT_WITH_SLA";
- case PlanLimitConfig_Feature.UNRECOGNIZED:
+ case PlanFeature.FEATURE_DATABASE_CHANGE:
+ return "FEATURE_DATABASE_CHANGE";
+ case PlanFeature.FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL:
+ return "FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL";
+ case PlanFeature.FEATURE_DECLARATIVE_SCHEMA_MIGRATION:
+ return "FEATURE_DECLARATIVE_SCHEMA_MIGRATION";
+ case PlanFeature.FEATURE_COMPARE_AND_SYNC_SCHEMA:
+ return "FEATURE_COMPARE_AND_SYNC_SCHEMA";
+ case PlanFeature.FEATURE_ONLINE_SCHEMA_CHANGE:
+ return "FEATURE_ONLINE_SCHEMA_CHANGE";
+ case PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW:
+ return "FEATURE_PRE_DEPLOYMENT_SQL_REVIEW";
+ case PlanFeature.FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES:
+ return "FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES";
+ case PlanFeature.FEATURE_ONE_CLICK_DATA_ROLLBACK:
+ return "FEATURE_ONE_CLICK_DATA_ROLLBACK";
+ case PlanFeature.FEATURE_MULTI_DATABASE_BATCH_CHANGES:
+ return "FEATURE_MULTI_DATABASE_BATCH_CHANGES";
+ case PlanFeature.FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT:
+ return "FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT";
+ case PlanFeature.FEATURE_SCHEDULED_ROLLOUT_TIME:
+ return "FEATURE_SCHEDULED_ROLLOUT_TIME";
+ case PlanFeature.FEATURE_DATABASE_CHANGELOG:
+ return "FEATURE_DATABASE_CHANGELOG";
+ case PlanFeature.FEATURE_SCHEMA_DRIFT_DETECTION:
+ return "FEATURE_SCHEMA_DRIFT_DETECTION";
+ case PlanFeature.FEATURE_CHANGELIST:
+ return "FEATURE_CHANGELIST";
+ case PlanFeature.FEATURE_SCHEMA_TEMPLATE:
+ return "FEATURE_SCHEMA_TEMPLATE";
+ case PlanFeature.FEATURE_ROLLOUT_POLICY:
+ return "FEATURE_ROLLOUT_POLICY";
+ case PlanFeature.FEATURE_WEB_BASED_SQL_EDITOR:
+ return "FEATURE_WEB_BASED_SQL_EDITOR";
+ case PlanFeature.FEATURE_SQL_EDITOR_ADMIN_MODE:
+ return "FEATURE_SQL_EDITOR_ADMIN_MODE";
+ case PlanFeature.FEATURE_NATURAL_LANGUAGE_TO_SQL:
+ return "FEATURE_NATURAL_LANGUAGE_TO_SQL";
+ case PlanFeature.FEATURE_AI_QUERY_EXPLANATION:
+ return "FEATURE_AI_QUERY_EXPLANATION";
+ case PlanFeature.FEATURE_AI_QUERY_SUGGESTIONS:
+ return "FEATURE_AI_QUERY_SUGGESTIONS";
+ case PlanFeature.FEATURE_AUTO_COMPLETE:
+ return "FEATURE_AUTO_COMPLETE";
+ case PlanFeature.FEATURE_SCHEMA_DIAGRAM:
+ return "FEATURE_SCHEMA_DIAGRAM";
+ case PlanFeature.FEATURE_SCHEMA_EDITOR:
+ return "FEATURE_SCHEMA_EDITOR";
+ case PlanFeature.FEATURE_DATA_EXPORT:
+ return "FEATURE_DATA_EXPORT";
+ case PlanFeature.FEATURE_QUERY_HISTORY:
+ return "FEATURE_QUERY_HISTORY";
+ case PlanFeature.FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS:
+ return "FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS";
+ case PlanFeature.FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION:
+ return "FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION";
+ case PlanFeature.FEATURE_BATCH_QUERY:
+ return "FEATURE_BATCH_QUERY";
+ case PlanFeature.FEATURE_INSTANCE_READ_ONLY_CONNECTION:
+ return "FEATURE_INSTANCE_READ_ONLY_CONNECTION";
+ case PlanFeature.FEATURE_RESTRICT_COPYING_DATA:
+ return "FEATURE_RESTRICT_COPYING_DATA";
+ case PlanFeature.FEATURE_IAM:
+ return "FEATURE_IAM";
+ case PlanFeature.FEATURE_INSTANCE_SSL_CONNECTION:
+ return "FEATURE_INSTANCE_SSL_CONNECTION";
+ case PlanFeature.FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL:
+ return "FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL";
+ case PlanFeature.FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION:
+ return "FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION";
+ case PlanFeature.FEATURE_GOOGLE_AND_GITHUB_SSO:
+ return "FEATURE_GOOGLE_AND_GITHUB_SSO";
+ case PlanFeature.FEATURE_USER_GROUPS:
+ return "FEATURE_USER_GROUPS";
+ case PlanFeature.FEATURE_DISALLOW_SELF_SERVICE_SIGNUP:
+ return "FEATURE_DISALLOW_SELF_SERVICE_SIGNUP";
+ case PlanFeature.FEATURE_DATABASE_SECRET_VARIABLES:
+ return "FEATURE_DATABASE_SECRET_VARIABLES";
+ case PlanFeature.FEATURE_QUERY_DATASOURCE_RESTRICTION:
+ return "FEATURE_QUERY_DATASOURCE_RESTRICTION";
+ case PlanFeature.FEATURE_CUSTOM_INSTANCE_SYNC_TIME:
+ return "FEATURE_CUSTOM_INSTANCE_SYNC_TIME";
+ case PlanFeature.FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT:
+ return "FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT";
+ case PlanFeature.FEATURE_RISK_ASSESSMENT:
+ return "FEATURE_RISK_ASSESSMENT";
+ case PlanFeature.FEATURE_APPROVAL_WORKFLOW:
+ return "FEATURE_APPROVAL_WORKFLOW";
+ case PlanFeature.FEATURE_AUDIT_LOG:
+ return "FEATURE_AUDIT_LOG";
+ case PlanFeature.FEATURE_ENTERPRISE_SSO:
+ return "FEATURE_ENTERPRISE_SSO";
+ case PlanFeature.FEATURE_TWO_FA:
+ return "FEATURE_TWO_FA";
+ case PlanFeature.FEATURE_PASSWORD_RESTRICTIONS:
+ return "FEATURE_PASSWORD_RESTRICTIONS";
+ case PlanFeature.FEATURE_DISALLOW_PASSWORD_SIGNIN:
+ return "FEATURE_DISALLOW_PASSWORD_SIGNIN";
+ case PlanFeature.FEATURE_CUSTOM_ROLES:
+ return "FEATURE_CUSTOM_ROLES";
+ case PlanFeature.FEATURE_REQUEST_ROLE_WORKFLOW:
+ return "FEATURE_REQUEST_ROLE_WORKFLOW";
+ case PlanFeature.FEATURE_DATA_MASKING:
+ return "FEATURE_DATA_MASKING";
+ case PlanFeature.FEATURE_DATA_CLASSIFICATION:
+ return "FEATURE_DATA_CLASSIFICATION";
+ case PlanFeature.FEATURE_SCIM:
+ return "FEATURE_SCIM";
+ case PlanFeature.FEATURE_DIRECTORY_SYNC:
+ return "FEATURE_DIRECTORY_SYNC";
+ case PlanFeature.FEATURE_SIGN_IN_FREQUENCY_CONTROL:
+ return "FEATURE_SIGN_IN_FREQUENCY_CONTROL";
+ case PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER:
+ return "FEATURE_EXTERNAL_SECRET_MANAGER";
+ case PlanFeature.FEATURE_USER_EMAIL_DOMAIN_RESTRICTION:
+ return "FEATURE_USER_EMAIL_DOMAIN_RESTRICTION";
+ case PlanFeature.FEATURE_ENVIRONMENT_MANAGEMENT:
+ return "FEATURE_ENVIRONMENT_MANAGEMENT";
+ case PlanFeature.FEATURE_IM_NOTIFICATIONS:
+ return "FEATURE_IM_NOTIFICATIONS";
+ case PlanFeature.FEATURE_TERRAFORM_PROVIDER:
+ return "FEATURE_TERRAFORM_PROVIDER";
+ case PlanFeature.FEATURE_DATABASE_GROUPS:
+ return "FEATURE_DATABASE_GROUPS";
+ case PlanFeature.FEATURE_ENVIRONMENT_TIERS:
+ return "FEATURE_ENVIRONMENT_TIERS";
+ case PlanFeature.FEATURE_DASHBOARD_ANNOUNCEMENT:
+ return "FEATURE_DASHBOARD_ANNOUNCEMENT";
+ case PlanFeature.FEATURE_API_INTEGRATION_GUIDANCE:
+ return "FEATURE_API_INTEGRATION_GUIDANCE";
+ case PlanFeature.FEATURE_CUSTOM_LOGO:
+ return "FEATURE_CUSTOM_LOGO";
+ case PlanFeature.FEATURE_WATERMARK:
+ return "FEATURE_WATERMARK";
+ case PlanFeature.FEATURE_ROADMAP_PRIORITIZATION:
+ return "FEATURE_ROADMAP_PRIORITIZATION";
+ case PlanFeature.FEATURE_CUSTOM_MSA:
+ return "FEATURE_CUSTOM_MSA";
+ case PlanFeature.FEATURE_COMMUNITY_SUPPORT:
+ return "FEATURE_COMMUNITY_SUPPORT";
+ case PlanFeature.FEATURE_EMAIL_SUPPORT:
+ return "FEATURE_EMAIL_SUPPORT";
+ case PlanFeature.FEATURE_DEDICATED_SUPPORT_WITH_SLA:
+ return "FEATURE_DEDICATED_SUPPORT_WITH_SLA";
+ case PlanFeature.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
-export function planLimitConfig_FeatureToNumber(object: PlanLimitConfig_Feature): number {
+export function planFeatureToNumber(object: PlanFeature): number {
switch (object) {
- case PlanLimitConfig_Feature.FEATURE_UNSPECIFIED:
+ case PlanFeature.FEATURE_UNSPECIFIED:
return 0;
- case PlanLimitConfig_Feature.DATABASE_CHANGE:
+ case PlanFeature.FEATURE_DATABASE_CHANGE:
return 1;
- case PlanLimitConfig_Feature.GIT_BASED_SCHEMA_VERSION_CONTROL:
+ case PlanFeature.FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL:
return 2;
- case PlanLimitConfig_Feature.DECLARATIVE_SCHEMA_MIGRATION:
+ case PlanFeature.FEATURE_DECLARATIVE_SCHEMA_MIGRATION:
return 3;
- case PlanLimitConfig_Feature.COMPARE_AND_SYNC_SCHEMA:
+ case PlanFeature.FEATURE_COMPARE_AND_SYNC_SCHEMA:
return 4;
- case PlanLimitConfig_Feature.ONLINE_SCHEMA_CHANGE:
+ case PlanFeature.FEATURE_ONLINE_SCHEMA_CHANGE:
return 5;
- case PlanLimitConfig_Feature.PRE_DEPLOYMENT_SQL_REVIEW:
+ case PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW:
return 6;
- case PlanLimitConfig_Feature.AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES:
+ case PlanFeature.FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES:
return 7;
- case PlanLimitConfig_Feature.ONE_CLICK_DATA_ROLLBACK:
+ case PlanFeature.FEATURE_ONE_CLICK_DATA_ROLLBACK:
return 8;
- case PlanLimitConfig_Feature.MULTI_DATABASE_BATCH_CHANGES:
+ case PlanFeature.FEATURE_MULTI_DATABASE_BATCH_CHANGES:
return 9;
- case PlanLimitConfig_Feature.PROGRESSIVE_ENVIRONMENT_DEPLOYMENT:
+ case PlanFeature.FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT:
return 10;
- case PlanLimitConfig_Feature.SCHEDULED_ROLLOUT_TIME:
+ case PlanFeature.FEATURE_SCHEDULED_ROLLOUT_TIME:
return 11;
- case PlanLimitConfig_Feature.DATABASE_CHANGELOG:
+ case PlanFeature.FEATURE_DATABASE_CHANGELOG:
return 12;
- case PlanLimitConfig_Feature.SCHEMA_DRIFT_DETECTION:
+ case PlanFeature.FEATURE_SCHEMA_DRIFT_DETECTION:
return 13;
- case PlanLimitConfig_Feature.CHANGELIST:
+ case PlanFeature.FEATURE_CHANGELIST:
return 14;
- case PlanLimitConfig_Feature.SCHEMA_TEMPLATE:
+ case PlanFeature.FEATURE_SCHEMA_TEMPLATE:
return 15;
- case PlanLimitConfig_Feature.ROLLOUT_POLICY:
+ case PlanFeature.FEATURE_ROLLOUT_POLICY:
return 16;
- case PlanLimitConfig_Feature.WEB_BASED_SQL_EDITOR:
+ case PlanFeature.FEATURE_WEB_BASED_SQL_EDITOR:
return 17;
- case PlanLimitConfig_Feature.SQL_EDITOR_ADMIN_MODE:
+ case PlanFeature.FEATURE_SQL_EDITOR_ADMIN_MODE:
return 18;
- case PlanLimitConfig_Feature.NATURAL_LANGUAGE_TO_SQL:
+ case PlanFeature.FEATURE_NATURAL_LANGUAGE_TO_SQL:
return 19;
- case PlanLimitConfig_Feature.AI_QUERY_EXPLANATION:
+ case PlanFeature.FEATURE_AI_QUERY_EXPLANATION:
return 20;
- case PlanLimitConfig_Feature.AI_QUERY_SUGGESTIONS:
+ case PlanFeature.FEATURE_AI_QUERY_SUGGESTIONS:
return 21;
- case PlanLimitConfig_Feature.AUTO_COMPLETE:
+ case PlanFeature.FEATURE_AUTO_COMPLETE:
return 22;
- case PlanLimitConfig_Feature.SCHEMA_DIAGRAM:
+ case PlanFeature.FEATURE_SCHEMA_DIAGRAM:
return 23;
- case PlanLimitConfig_Feature.SCHEMA_EDITOR:
+ case PlanFeature.FEATURE_SCHEMA_EDITOR:
return 24;
- case PlanLimitConfig_Feature.DATA_EXPORT:
+ case PlanFeature.FEATURE_DATA_EXPORT:
return 25;
- case PlanLimitConfig_Feature.QUERY_HISTORY:
+ case PlanFeature.FEATURE_QUERY_HISTORY:
return 26;
- case PlanLimitConfig_Feature.SAVED_AND_SHARED_SQL_SCRIPTS:
+ case PlanFeature.FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS:
return 27;
- case PlanLimitConfig_Feature.SQL_EDITOR_DDL_DML_RESTRICTION:
+ case PlanFeature.FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION:
return 28;
- case PlanLimitConfig_Feature.BATCH_QUERY:
+ case PlanFeature.FEATURE_BATCH_QUERY:
return 29;
- case PlanLimitConfig_Feature.INSTANCE_READ_ONLY_CONNECTION:
+ case PlanFeature.FEATURE_INSTANCE_READ_ONLY_CONNECTION:
return 30;
- case PlanLimitConfig_Feature.RESTRICT_COPYING_DATA:
+ case PlanFeature.FEATURE_RESTRICT_COPYING_DATA:
return 31;
- case PlanLimitConfig_Feature.IAM:
+ case PlanFeature.FEATURE_IAM:
return 32;
- case PlanLimitConfig_Feature.INSTANCE_SSL_CONNECTION:
+ case PlanFeature.FEATURE_INSTANCE_SSL_CONNECTION:
return 33;
- case PlanLimitConfig_Feature.INSTANCE_CONNECTION_OVER_SSH_TUNNEL:
+ case PlanFeature.FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL:
return 34;
- case PlanLimitConfig_Feature.INSTANCE_CONNECTION_IAM_AUTHENTICATION:
+ case PlanFeature.FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION:
return 35;
- case PlanLimitConfig_Feature.GOOGLE_AND_GITHUB_SSO:
+ case PlanFeature.FEATURE_GOOGLE_AND_GITHUB_SSO:
return 36;
- case PlanLimitConfig_Feature.USER_GROUPS:
+ case PlanFeature.FEATURE_USER_GROUPS:
return 37;
- case PlanLimitConfig_Feature.DISALLOW_SELF_SERVICE_SIGNUP:
+ case PlanFeature.FEATURE_DISALLOW_SELF_SERVICE_SIGNUP:
return 38;
- case PlanLimitConfig_Feature.DATABASE_SECRET_VARIABLES:
+ case PlanFeature.FEATURE_DATABASE_SECRET_VARIABLES:
return 39;
- case PlanLimitConfig_Feature.QUERY_DATASOURCE_RESTRICTION:
+ case PlanFeature.FEATURE_QUERY_DATASOURCE_RESTRICTION:
return 40;
- case PlanLimitConfig_Feature.CUSTOM_INSTANCE_SYNC_TIME:
+ case PlanFeature.FEATURE_CUSTOM_INSTANCE_SYNC_TIME:
return 41;
- case PlanLimitConfig_Feature.CUSTOM_INSTANCE_CONNECTION_LIMIT:
+ case PlanFeature.FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT:
return 42;
- case PlanLimitConfig_Feature.RISK_ASSESSMENT:
+ case PlanFeature.FEATURE_RISK_ASSESSMENT:
return 43;
- case PlanLimitConfig_Feature.APPROVAL_WORKFLOW:
+ case PlanFeature.FEATURE_APPROVAL_WORKFLOW:
return 44;
- case PlanLimitConfig_Feature.AUDIT_LOG:
+ case PlanFeature.FEATURE_AUDIT_LOG:
return 45;
- case PlanLimitConfig_Feature.ENTERPRISE_SSO:
+ case PlanFeature.FEATURE_ENTERPRISE_SSO:
return 46;
- case PlanLimitConfig_Feature.TWO_FA:
+ case PlanFeature.FEATURE_TWO_FA:
return 47;
- case PlanLimitConfig_Feature.PASSWORD_RESTRICTIONS:
+ case PlanFeature.FEATURE_PASSWORD_RESTRICTIONS:
return 48;
- case PlanLimitConfig_Feature.DISALLOW_PASSWORD_SIGNIN:
+ case PlanFeature.FEATURE_DISALLOW_PASSWORD_SIGNIN:
return 49;
- case PlanLimitConfig_Feature.CUSTOM_ROLES:
+ case PlanFeature.FEATURE_CUSTOM_ROLES:
return 50;
- case PlanLimitConfig_Feature.REQUEST_ROLE_WORKFLOW:
+ case PlanFeature.FEATURE_REQUEST_ROLE_WORKFLOW:
return 51;
- case PlanLimitConfig_Feature.DATA_MASKING:
+ case PlanFeature.FEATURE_DATA_MASKING:
return 52;
- case PlanLimitConfig_Feature.DATA_CLASSIFICATION:
+ case PlanFeature.FEATURE_DATA_CLASSIFICATION:
return 53;
- case PlanLimitConfig_Feature.SCIM:
+ case PlanFeature.FEATURE_SCIM:
return 54;
- case PlanLimitConfig_Feature.DIRECTORY_SYNC_ENTRA_ID:
+ case PlanFeature.FEATURE_DIRECTORY_SYNC:
return 55;
- case PlanLimitConfig_Feature.DIRECTORY_SYNC_OKTA:
+ case PlanFeature.FEATURE_SIGN_IN_FREQUENCY_CONTROL:
return 56;
- case PlanLimitConfig_Feature.SIGN_IN_FREQUENCY_CONTROL:
+ case PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER:
return 57;
- case PlanLimitConfig_Feature.EXTERNAL_SECRET_MANAGER:
+ case PlanFeature.FEATURE_USER_EMAIL_DOMAIN_RESTRICTION:
return 58;
- case PlanLimitConfig_Feature.USER_EMAIL_DOMAIN_RESTRICTION:
+ case PlanFeature.FEATURE_ENVIRONMENT_MANAGEMENT:
return 59;
- case PlanLimitConfig_Feature.ENVIRONMENT_MANAGEMENT:
+ case PlanFeature.FEATURE_IM_NOTIFICATIONS:
return 60;
- case PlanLimitConfig_Feature.IM_NOTIFICATIONS:
+ case PlanFeature.FEATURE_TERRAFORM_PROVIDER:
return 61;
- case PlanLimitConfig_Feature.TERRAFORM_PROVIDER:
+ case PlanFeature.FEATURE_DATABASE_GROUPS:
return 62;
- case PlanLimitConfig_Feature.DATABASE_GROUPS:
+ case PlanFeature.FEATURE_ENVIRONMENT_TIERS:
return 63;
- case PlanLimitConfig_Feature.ENVIRONMENT_TIERS:
+ case PlanFeature.FEATURE_DASHBOARD_ANNOUNCEMENT:
return 64;
- case PlanLimitConfig_Feature.DASHBOARD_ANNOUNCEMENT:
+ case PlanFeature.FEATURE_API_INTEGRATION_GUIDANCE:
return 65;
- case PlanLimitConfig_Feature.API_INTEGRATION_GUIDANCE:
+ case PlanFeature.FEATURE_CUSTOM_LOGO:
return 66;
- case PlanLimitConfig_Feature.CUSTOM_LOGO:
+ case PlanFeature.FEATURE_WATERMARK:
return 67;
- case PlanLimitConfig_Feature.WATERMARK:
+ case PlanFeature.FEATURE_ROADMAP_PRIORITIZATION:
return 68;
- case PlanLimitConfig_Feature.ROADMAP_PRIORITIZATION:
+ case PlanFeature.FEATURE_CUSTOM_MSA:
return 69;
- case PlanLimitConfig_Feature.CUSTOM_MSA:
+ case PlanFeature.FEATURE_COMMUNITY_SUPPORT:
return 70;
- case PlanLimitConfig_Feature.COMMUNITY_SUPPORT:
+ case PlanFeature.FEATURE_EMAIL_SUPPORT:
return 71;
- case PlanLimitConfig_Feature.EMAIL_SUPPORT:
+ case PlanFeature.FEATURE_DEDICATED_SUPPORT_WITH_SLA:
return 72;
- case PlanLimitConfig_Feature.DEDICATED_SUPPORT_WITH_SLA:
- return 73;
- case PlanLimitConfig_Feature.UNRECOGNIZED:
+ case PlanFeature.UNRECOGNIZED:
default:
return -1;
}
}
+export interface GetSubscriptionRequest {
+}
+
+export interface GetFeatureMatrixRequest {
+}
+
+export interface UpdateSubscriptionRequest {
+ patch: PatchSubscription | undefined;
+}
+
+export interface PatchSubscription {
+ license: string;
+}
+
+export interface Subscription {
+ seatCount: number;
+ instanceCount: number;
+ expiresTime: Timestamp | undefined;
+ startedTime: Timestamp | undefined;
+ plan: PlanType;
+ trialing: boolean;
+ orgId: string;
+ orgName: string;
+}
+
+export interface FeatureMatrix {
+ features: Feature[];
+}
+
+export interface Feature {
+ /** Name is the feature name. */
+ name: string;
+ /** Matrix is the feature matrix for different plan. The key is the plan enum in string value. */
+ matrix: { [key: string]: boolean };
+}
+
+export interface Feature_MatrixEntry {
+ key: string;
+ value: boolean;
+}
+
+/** PlanConfig represents the configuration for all plans loaded from plan.yaml */
+export interface PlanConfig {
+ plans: PlanLimitConfig[];
+}
+
+/** PlanLimitConfig represents a single plan's configuration */
+export interface PlanLimitConfig {
+ type: PlanType;
+ maximumInstanceCount: number;
+ maximumSeatCount: number;
+ features: PlanFeature[];
+}
+
function createBaseGetSubscriptionRequest(): GetSubscriptionRequest {
return {};
}
@@ -1389,7 +1381,7 @@ export const PlanLimitConfig: MessageFns<PlanLimitConfig> = {
}
writer.uint32(34).fork();
for (const v of message.features) {
- writer.int32(planLimitConfig_FeatureToNumber(v));
+ writer.int32(planFeatureToNumber(v));
}
writer.join();
return writer;
@@ -1428,7 +1420,7 @@ export const PlanLimitConfig: MessageFns<PlanLimitConfig> = {
}
case 4: {
if (tag === 32) {
- message.features.push(planLimitConfig_FeatureFromJSON(reader.int32()));
+ message.features.push(planFeatureFromJSON(reader.int32()));
continue;
}
@@ -1436,7 +1428,7 @@ export const PlanLimitConfig: MessageFns<PlanLimitConfig> = {
if (tag === 34) {
const end2 = reader.uint32() + reader.pos;
while (reader.pos < end2) {
- message.features.push(planLimitConfig_FeatureFromJSON(reader.int32()));
+ message.features.push(planFeatureFromJSON(reader.int32()));
}
continue;
@@ -1465,7 +1457,7 @@ export const PlanLimitConfig: MessageFns<PlanLimitConfig> = {
obj.maximumSeatCount = Math.round(message.maximumSeatCount);
}
if (message.features?.length) {
- obj.features = message.features.map((e) => planLimitConfig_FeatureToJSON(e));
+ obj.features = message.features.map((e) => planFeatureToJSON(e));
}
return obj;
},
diff --git a/frontend/src/utils/v1/database.ts b/frontend/src/utils/v1/database.ts
index 975691a86d..4cd8c518e5 100644
--- a/frontend/src/utils/v1/database.ts
+++ b/frontend/src/utils/v1/database.ts
@@ -1,5 +1,5 @@
import { checkQuerierPermission, hasFeature } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import {
databaseNamePrefix,
instanceNamePrefix,
@@ -51,7 +51,7 @@ export const isArchivedDatabaseV1 = (_db: ComposedDatabase): boolean => {
// isDatabaseV1Alterable checks if database alterable for user.
export const isDatabaseV1Alterable = (database: ComposedDatabase): boolean => {
- if (!hasFeature(PlanLimitConfig_Feature.IAM)) {
+ if (!hasFeature(PlanFeature.FEATURE_IAM)) {
// The current plan doesn't have access control feature.
// Fallback to true.
return true;
diff --git a/frontend/src/views/BannerUpgradeSubscription.vue b/frontend/src/views/BannerUpgradeSubscription.vue
index 14acdef308..b9a2283588 100644
--- a/frontend/src/views/BannerUpgradeSubscription.vue
+++ b/frontend/src/views/BannerUpgradeSubscription.vue
@@ -55,7 +55,7 @@
({{
$t(
`subscription.plan.${planTypeToString(
- subscriptionStore.getMinimumRequiredPlan(feature as PlanLimitConfig_Feature)
+ subscriptionStore.getMinimumRequiredPlan(feature as PlanFeature)
)}.title`
)
}})
@@ -79,7 +79,7 @@ import { useRouter } from "vue-router";
import { BBModal } from "@/bbkit";
import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/router/dashboard/workspaceSetting";
import { useSubscriptionV1Store, useActuatorV1Store } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { planTypeToString } from "@/types";
import {
PlanType,
@@ -115,7 +115,7 @@ const neededPlan = computed(() => {
for (const feature of unlicensedFeatures.value) {
const requiredPlan = subscriptionStore.getMinimumRequiredPlan(
- feature as PlanLimitConfig_Feature
+ feature as PlanFeature
);
if (planTypeToNumber(requiredPlan) > planTypeToNumber(plan)) {
plan = requiredPlan;
diff --git a/frontend/src/views/InstanceDashboard.vue b/frontend/src/views/InstanceDashboard.vue
index 2cfe8f02a8..66c28937ff 100644
--- a/frontend/src/views/InstanceDashboard.vue
+++ b/frontend/src/views/InstanceDashboard.vue
@@ -67,7 +67,7 @@
<FeatureModal
:open="state.showFeatureModal"
- :feature="PlanLimitConfig_Feature.IAM"
+ :feature="PlanFeature.FEATURE_IAM"
@cancel="state.showFeatureModal = false"
/>
</template>
@@ -105,7 +105,7 @@ import { environmentNamePrefix } from "@/store/modules/v1/common";
import { isValidInstanceName } from "@/types";
import { engineFromJSON } from "@/types/proto/v1/common";
import type { Instance } from "@/types/proto/v1/instance_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { type SearchParams, hasWorkspacePermissionV2 } from "@/utils";
interface LocalState {
diff --git a/frontend/src/views/ProfileDashboard.vue b/frontend/src/views/ProfileDashboard.vue
index 8ff687b41a..2cd6f2158d 100644
--- a/frontend/src/views/ProfileDashboard.vue
+++ b/frontend/src/views/ProfileDashboard.vue
@@ -154,7 +154,7 @@
class="text-lg font-medium flex flex-row justify-start items-center"
>
{{ $t("two-factor.self") }}
- <FeatureBadge :feature="PlanLimitConfig_Feature.TWO_FA" class="ml-2" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_TWO_FA" class="ml-2" />
</span>
<div class="space-x-2">
<NButton v-if="user.email === currentUser.email" @click="enable2FA">
@@ -203,7 +203,7 @@
</main>
<FeatureModal
- :feature="PlanLimitConfig_Feature.TWO_FA"
+ :feature="PlanFeature.FEATURE_TWO_FA"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
/>
@@ -249,7 +249,7 @@ import {
unknownUser,
} from "@/types";
import { State } from "@/types/proto/v1/common";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import {
UpdateUserRequest,
UserType,
@@ -325,8 +325,8 @@ onUnmounted(() => {
document.removeEventListener("keydown", keyboardHandler);
});
-const hasRBACFeature = featureToRef(PlanLimitConfig_Feature.IAM);
-const has2FAFeature = featureToRef(PlanLimitConfig_Feature.TWO_FA);
+const hasRBACFeature = featureToRef(PlanFeature.FEATURE_IAM);
+const has2FAFeature = featureToRef(PlanFeature.FEATURE_TWO_FA);
const isMFAEnabled = computed(() => {
return user.value.mfaEnabled;
diff --git a/frontend/src/views/SettingWorkspaceAuditLog.vue b/frontend/src/views/SettingWorkspaceAuditLog.vue
index 98cf63ceeb..8455374248 100644
--- a/frontend/src/views/SettingWorkspaceAuditLog.vue
+++ b/frontend/src/views/SettingWorkspaceAuditLog.vue
@@ -1,6 +1,6 @@
<template>
<div class="w-full space-y-4 pb-6">
- <FeatureAttention :feature="PlanLimitConfig_Feature.AUDIT_LOG" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_AUDIT_LOG" />
<AuditLogSearch v-model:params="state.params">
<template #searchbox-suffix>
<DataExportButton
@@ -62,7 +62,7 @@ import { projectNamePrefix } from "@/store/modules/v1/common";
import { type SearchAuditLogsParams } from "@/types";
import type { AuditLog } from "@/types/proto/v1/audit_log_service";
import { ExportFormat } from "@/types/proto/v1/common";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { type SearchParams, extractProjectResourceName } from "@/utils";
interface LocalState {
@@ -90,7 +90,7 @@ const state = reactive<LocalState>({
const { t } = useI18n();
const auditLogStore = useAuditLogStore();
const auditLogPagedTable = ref<ComponentExposed<typeof PagedTable<AuditLog>>>();
-const hasAuditLogFeature = featureToRef(PlanLimitConfig_Feature.AUDIT_LOG);
+const hasAuditLogFeature = featureToRef(PlanFeature.FEATURE_AUDIT_LOG);
const searchAuditLogs = computed((): SearchAuditLogsParams => {
return {
diff --git a/frontend/src/views/SettingWorkspaceCustomApproval.vue b/frontend/src/views/SettingWorkspaceCustomApproval.vue
index 75c9e56769..00e9146552 100644
--- a/frontend/src/views/SettingWorkspaceCustomApproval.vue
+++ b/frontend/src/views/SettingWorkspaceCustomApproval.vue
@@ -1,6 +1,6 @@
<template>
<div class="w-full space-y-4 text-sm">
- <FeatureAttention :feature="PlanLimitConfig_Feature.APPROVAL_WORKFLOW" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />
<CustomApproval v-if="state.ready" />
<div v-else class="w-full py-[4rem] flex justify-center items-center">
@@ -11,7 +11,7 @@
<ApprovalRuleDialog />
<FeatureModal
- :feature="PlanLimitConfig_Feature.APPROVAL_WORKFLOW"
+ :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
/>
@@ -33,7 +33,7 @@ import {
useWorkspaceApprovalSettingStore,
useRiskStore,
} from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
interface LocalState {
ready: boolean;
@@ -49,7 +49,7 @@ const state = reactive<LocalState>({
showFeatureModal: false,
});
const tab = useRouteHash("rules", TabValueList, "replace");
-const hasCustomApprovalFeature = featureToRef(PlanLimitConfig_Feature.APPROVAL_WORKFLOW);
+const hasCustomApprovalFeature = featureToRef(PlanFeature.FEATURE_APPROVAL_WORKFLOW);
provideCustomApprovalContext({
hasFeature: hasCustomApprovalFeature,
diff --git a/frontend/src/views/SettingWorkspaceDataClassification.vue b/frontend/src/views/SettingWorkspaceDataClassification.vue
index 898569461a..5497b03a67 100644
--- a/frontend/src/views/SettingWorkspaceDataClassification.vue
+++ b/frontend/src/views/SettingWorkspaceDataClassification.vue
@@ -2,7 +2,7 @@
<div class="w-full space-y-4">
<FeatureAttention
v-if="!hasSensitiveDataFeature"
- :feature="PlanLimitConfig_Feature.DATA_CLASSIFICATION"
+ :feature="PlanFeature.FEATURE_DATA_CLASSIFICATION"
/>
<ClassificationView />
</div>
@@ -12,7 +12,7 @@
import { FeatureAttention } from "@/components/FeatureGuard";
import { ClassificationView } from "@/components/SensitiveData";
import { featureToRef } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
-const hasSensitiveDataFeature = featureToRef(PlanLimitConfig_Feature.DATA_CLASSIFICATION);
+const hasSensitiveDataFeature = featureToRef(PlanFeature.FEATURE_DATA_CLASSIFICATION);
</script>
diff --git a/frontend/src/views/SettingWorkspaceDataMasking.vue b/frontend/src/views/SettingWorkspaceDataMasking.vue
index 5a58bbead2..3632f4d793 100644
--- a/frontend/src/views/SettingWorkspaceDataMasking.vue
+++ b/frontend/src/views/SettingWorkspaceDataMasking.vue
@@ -2,7 +2,7 @@
<div class="w-full space-y-4">
<FeatureAttention
v-if="!hasSensitiveDataFeature"
- :feature="PlanLimitConfig_Feature.DATA_MASKING"
+ :feature="PlanFeature.FEATURE_DATA_MASKING"
/>
<GlobalMaskingRulesView :embedded="embedded" />
</div>
@@ -12,11 +12,11 @@
import { FeatureAttention } from "@/components/FeatureGuard";
import { GlobalMaskingRulesView } from "@/components/SensitiveData";
import { featureToRef } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
defineProps<{
embedded?: boolean;
}>();
-const hasSensitiveDataFeature = featureToRef(PlanLimitConfig_Feature.DATA_MASKING);
+const hasSensitiveDataFeature = featureToRef(PlanFeature.FEATURE_DATA_MASKING);
</script>
diff --git a/frontend/src/views/SettingWorkspaceMembers.vue b/frontend/src/views/SettingWorkspaceMembers.vue
index 4a0364145f..660ec3de51 100644
--- a/frontend/src/views/SettingWorkspaceMembers.vue
+++ b/frontend/src/views/SettingWorkspaceMembers.vue
@@ -1,6 +1,6 @@
<template>
<div class="w-full mx-auto space-y-4">
- <FeatureAttention :feature="PlanLimitConfig_Feature.IAM" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_IAM" />
<NoPermissionPlaceholder
v-if="permissionStore.onlyWorkspaceMember"
@@ -106,7 +106,7 @@ import {
} from "@/store";
import { userBindingPrefix } from "@/types";
import { User, UserType } from "@/types/proto/v1/user_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { hasWorkspacePermissionV2 } from "@/utils";
interface LocalState {
diff --git a/frontend/src/views/SettingWorkspaceRiskCenter.vue b/frontend/src/views/SettingWorkspaceRiskCenter.vue
index a528eafe82..8c06f9a797 100644
--- a/frontend/src/views/SettingWorkspaceRiskCenter.vue
+++ b/frontend/src/views/SettingWorkspaceRiskCenter.vue
@@ -1,5 +1,5 @@
<template>
- <FeatureAttention :feature="PlanLimitConfig_Feature.RISK_ASSESSMENT" class="mb-4" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_RISK_ASSESSMENT" class="mb-4" />
<div class="w-full space-y-4 text-sm">
<div class="textinfolabel">
@@ -22,7 +22,7 @@
<RiskDialog />
<FeatureModal
- :feature="PlanLimitConfig_Feature.RISK_ASSESSMENT"
+ :feature="PlanFeature.FEATURE_RISK_ASSESSMENT"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
/>
@@ -38,7 +38,7 @@ import {
import { provideRiskFilter } from "@/components/CustomApproval/Settings/components/common";
import { FeatureAttention, FeatureModal } from "@/components/FeatureGuard";
import { featureToRef, useRiskStore } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import { computed, onMounted, reactive, ref, toRef } from "vue";
@@ -51,7 +51,7 @@ const state = reactive<LocalState>({
ready: false,
showFeatureModal: false,
});
-const hasRiskAssessmentFeature = featureToRef(PlanLimitConfig_Feature.RISK_ASSESSMENT);
+const hasRiskAssessmentFeature = featureToRef(PlanFeature.FEATURE_RISK_ASSESSMENT);
const allowAdmin = computed(() => {
return hasWorkspacePermissionV2("bb.risks.update");
diff --git a/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue b/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue
index 8df762ad4f..9edb5bb030 100644
--- a/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue
+++ b/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue
@@ -1,6 +1,6 @@
<template>
<div class="space-y-4 h-full flex flex-col">
- <FeatureAttention :feature="PlanLimitConfig_Feature.PRE_DEPLOYMENT_SQL_REVIEW" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW" />
<SQLReviewCreation
class="flex-1"
:selected-rule-list="[]"
@@ -14,7 +14,7 @@ import { computed, watchEffect } from "vue";
import { FeatureAttention } from "@/components/FeatureGuard";
import { SQLReviewCreation } from "@/components/SQLReview";
import { useSQLReviewStore } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
const attachedResources = computed(() => {
const url = new URL(window.location.href);
diff --git a/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue b/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue
index 1d5091340a..f79d70529e 100644
--- a/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue
+++ b/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue
@@ -1,5 +1,5 @@
<template>
- <FeatureAttention class="mb-4" :feature="PlanLimitConfig_Feature.PRE_DEPLOYMENT_SQL_REVIEW" />
+ <FeatureAttention class="mb-4" :feature="PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW" />
<SQLReviewCreation
v-if="state.editMode"
key="sql-review-creation"
@@ -165,7 +165,7 @@ import {
} from "@/bbkit";
import { FeatureAttention } from "@/components/FeatureGuard";
import { SQLReviewCreation } from "@/components/SQLReview";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import SQLReviewAttachResourcesPanel from "@/components/SQLReview/components/SQLReviewAttachResourcesPanel.vue";
import SQLReviewTabsByEngine from "@/components/SQLReview/components/SQLReviewTabsByEngine.vue";
import SQLRuleTableWithFilter from "@/components/SQLReview/components/SQLRuleTableWithFilter.vue";
diff --git a/frontend/src/views/SettingWorkspaceSSO.vue b/frontend/src/views/SettingWorkspaceSSO.vue
index 9557b403ae..5a8cb2d66f 100644
--- a/frontend/src/views/SettingWorkspaceSSO.vue
+++ b/frontend/src/views/SettingWorkspaceSSO.vue
@@ -20,7 +20,7 @@
<template #icon>
<PlusIcon class="h-4 w-4" />
</template>
- <FeatureBadge :feature="PlanLimitConfig_Feature.ENTERPRISE_SSO" class="mr-1 text-white" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_ENTERPRISE_SSO" class="mr-1 text-white" />
{{ $t("settings.sso.create") }}
</NButton>
</div>
@@ -36,7 +36,7 @@
</div>
<FeatureModal
- :feature="PlanLimitConfig_Feature.ENTERPRISE_SSO"
+ :feature="PlanFeature.FEATURE_ENTERPRISE_SSO"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
/>
@@ -58,7 +58,7 @@ import { featureToRef } from "@/store";
import { useIdentityProviderStore } from "@/store/modules/idp";
import { getSSOId } from "@/store/modules/v1/common";
import type { IdentityProvider } from "@/types/proto/v1/idp_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import {
hasWorkspacePermissionV2,
identityProviderTypeToString,
@@ -85,7 +85,7 @@ const state = reactive<LocalState>({
selectedIdentityProviderName: "",
});
const identityProviderStore = useIdentityProviderStore();
-const hasSSOFeature = featureToRef(PlanLimitConfig_Feature.ENTERPRISE_SSO);
+const hasSSOFeature = featureToRef(PlanFeature.FEATURE_ENTERPRISE_SSO);
const identityProviderList = computed(() => {
return identityProviderStore.identityProviderList;
diff --git a/frontend/src/views/SettingWorkspaceSSODetail.vue b/frontend/src/views/SettingWorkspaceSSODetail.vue
index d9e6110b7c..8be143e7dc 100644
--- a/frontend/src/views/SettingWorkspaceSSODetail.vue
+++ b/frontend/src/views/SettingWorkspaceSSODetail.vue
@@ -27,7 +27,7 @@
<BBSpin v-else class="w-full h-64" />
<FeatureModal
- :feature="PlanLimitConfig_Feature.ENTERPRISE_SSO"
+ :feature="PlanFeature.FEATURE_ENTERPRISE_SSO"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
/>
@@ -41,7 +41,7 @@ import IdentityProviderCreateForm from "@/components/SSO/IdentityProviderCreateF
import { useIdentityProviderStore } from "@/store/modules/idp";
import { ssoNamePrefix } from "@/store/modules/v1/common";
import type { IdentityProvider } from "@/types/proto/v1/idp_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
const props = defineProps<{
ssoId?: string;
diff --git a/frontend/src/views/SettingWorkspaceSchemaTemplate.vue b/frontend/src/views/SettingWorkspaceSchemaTemplate.vue
index a570c97dc0..e49170e850 100644
--- a/frontend/src/views/SettingWorkspaceSchemaTemplate.vue
+++ b/frontend/src/views/SettingWorkspaceSchemaTemplate.vue
@@ -1,6 +1,6 @@
<template>
<div class="w-full space-y-4">
- <FeatureAttention :feature="PlanLimitConfig_Feature.SCHEMA_TEMPLATE" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_SCHEMA_TEMPLATE" />
<NTabs v-model:value="state.selectedTab" type="line">
<NTabPane
name="FIELD_TEMPLATE"
@@ -39,7 +39,7 @@ import ColumnTypes from "@/views/SchemaTemplate/ColumnTypes.vue";
import FieldTemplates from "@/views/SchemaTemplate/FieldTemplates.vue";
import TableTemplates from "@/views/SchemaTemplate/TableTemplates.vue";
import { FeatureAttention } from "@/components/FeatureGuard";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
interface LocalState {
selectedTab: "FIELD_TEMPLATE" | "COLUMN_TYPE_RESTRICTION" | "TABLE_TEMPLATE";
@@ -55,7 +55,7 @@ const state = reactive<LocalState>({
selectedTab: "FIELD_TEMPLATE",
});
-const hasFeature = featureToRef(PlanLimitConfig_Feature.SCHEMA_TEMPLATE);
+const hasFeature = featureToRef(PlanFeature.FEATURE_SCHEMA_TEMPLATE);
watch(
() => route.hash,
diff --git a/frontend/src/views/SettingWorkspaceSemanticTypes.vue b/frontend/src/views/SettingWorkspaceSemanticTypes.vue
index 138bbb625a..65c68f2bf4 100644
--- a/frontend/src/views/SettingWorkspaceSemanticTypes.vue
+++ b/frontend/src/views/SettingWorkspaceSemanticTypes.vue
@@ -1,6 +1,6 @@
<template>
<div class="w-full space-y-4">
- <FeatureAttention :feature="PlanLimitConfig_Feature.DATA_MASKING" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_DATA_MASKING" />
<SemanticTypesView />
</div>
</template>
@@ -8,5 +8,5 @@
<script lang="tsx" setup>
import { FeatureAttention } from "@/components/FeatureGuard";
import { SemanticTypesView } from "@/components/SensitiveData";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
</script>
diff --git a/frontend/src/views/SettingWorkspaceUsers.vue b/frontend/src/views/SettingWorkspaceUsers.vue
index fba96483dc..744ff95c39 100644
--- a/frontend/src/views/SettingWorkspaceUsers.vue
+++ b/frontend/src/views/SettingWorkspaceUsers.vue
@@ -76,7 +76,7 @@
<template #icon>
<SettingsIcon class="h-5 w-5" />
<FeatureBadge
- :feature="PlanLimitConfig_Feature.DIRECTORY_SYNC_ENTRA_ID"
+ :feature="PlanFeature.FEATURE_DIRECTORY_SYNC"
/>
</template>
{{ $t(`settings.members.entra-sync.self`) }}
@@ -180,19 +180,13 @@
/>
<FeatureModal
- :feature="PlanLimitConfig_Feature.DIRECTORY_SYNC_ENTRA_ID"
+ :feature="PlanFeature.FEATURE_DIRECTORY_SYNC"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
/>
</template>
<script setup lang="ts">
-import { PlusIcon, SettingsIcon } from "lucide-vue-next";
-import { NButton, NCheckbox, NPopover, NTabPane, NTabs } from "naive-ui";
-import { computed, onMounted, reactive, ref, watch } from "vue";
-import type { ComponentExposed } from "vue-component-type-helpers";
-import { useI18n } from "vue-i18n";
-import { RouterLink, useRoute, useRouter } from "vue-router";
import { BBAttention } from "@/bbkit";
import { FeatureBadge, FeatureModal } from "@/components/FeatureGuard";
import AADSyncDrawer from "@/components/User/Settings/AADSyncDrawer.vue";
@@ -216,9 +210,15 @@ import { groupNamePrefix } from "@/store/modules/v1/common";
import { State } from "@/types/proto/v1/common";
import type { Group } from "@/types/proto/v1/group_service";
import { WorkspaceProfileSetting } from "@/types/proto/v1/setting_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { type User } from "@/types/proto/v1/user_service";
import { hasWorkspacePermissionV2 } from "@/utils";
+import { PlusIcon, SettingsIcon } from "lucide-vue-next";
+import { NButton, NCheckbox, NPopover, NTabPane, NTabs } from "naive-ui";
+import { computed, onMounted, reactive, ref, watch } from "vue";
+import type { ComponentExposed } from "vue-component-type-helpers";
+import { useI18n } from "vue-i18n";
+import { RouterLink, useRoute, useRouter } from "vue-router";
const tabList = ["USERS", "GROUPS"] as const;
type MemberTab = (typeof tabList)[number];
@@ -332,7 +332,7 @@ const workspaceProfileSetting = computed(() =>
);
const hasDirectorySyncFeature = featureToRef(
- PlanLimitConfig_Feature.DIRECTORY_SYNC_ENTRA_ID
+ PlanFeature.FEATURE_DIRECTORY_SYNC
);
const allowGetSCIMSetting = computed(() =>
diff --git a/frontend/src/views/project/ProjectAuditLogDashboard.vue b/frontend/src/views/project/ProjectAuditLogDashboard.vue
index 09520c09f2..73efc4d311 100644
--- a/frontend/src/views/project/ProjectAuditLogDashboard.vue
+++ b/frontend/src/views/project/ProjectAuditLogDashboard.vue
@@ -1,6 +1,6 @@
<template>
<div class="w-full space-y-4">
- <FeatureAttention :feature="PlanLimitConfig_Feature.AUDIT_LOG" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_AUDIT_LOG" />
<AuditLogSearch v-model:params="state.params">
<template #searchbox-suffix>
<DataExportButton
@@ -58,7 +58,7 @@ import { featureToRef, useAuditLogStore, useUserStore } from "@/store";
import { type SearchAuditLogsParams } from "@/types";
import type { AuditLog } from "@/types/proto/v1/audit_log_service";
import { ExportFormat } from "@/types/proto/v1/common";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type { SearchParams, SearchScope } from "@/utils";
interface LocalState {
@@ -99,7 +99,7 @@ watch(
);
const { t } = useI18n();
-const hasAuditLogFeature = featureToRef(PlanLimitConfig_Feature.AUDIT_LOG);
+const hasAuditLogFeature = featureToRef(PlanFeature.FEATURE_AUDIT_LOG);
const auditLogPagedTable = ref<ComponentExposed<typeof PagedTable<AuditLog>>>();
const auditLogStore = useAuditLogStore();
diff --git a/frontend/src/views/project/ProjectDatabaseGroupDashboard.vue b/frontend/src/views/project/ProjectDatabaseGroupDashboard.vue
index fa10a47c4f..2207374cef 100644
--- a/frontend/src/views/project/ProjectDatabaseGroupDashboard.vue
+++ b/frontend/src/views/project/ProjectDatabaseGroupDashboard.vue
@@ -1,6 +1,6 @@
<template>
<div class="flex flex-col gap-y-4">
- <FeatureAttention :feature="PlanLimitConfig_Feature.DATABASE_GROUPS" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_DATABASE_GROUPS" />
<div class="flex flex-row items-center justify-end gap-x-2">
<SearchBox
@@ -26,7 +26,7 @@
<template #icon>
<PlusIcon class="w-4" />
<FeatureBadge
- :feature="PlanLimitConfig_Feature.DATABASE_GROUPS"
+ :feature="PlanFeature.FEATURE_DATABASE_GROUPS"
class="text-white"
/>
</template>
@@ -38,7 +38,7 @@
<FeatureModal
:open="state.showFeatureModal"
- :feature="PlanLimitConfig_Feature.DATABASE_GROUPS"
+ :feature="PlanFeature.FEATURE_DATABASE_GROUPS"
@cancel="state.showFeatureModal = false"
/>
</template>
@@ -57,7 +57,7 @@ import {
import { SearchBox } from "@/components/v2";
import { PROJECT_V1_ROUTE_DATABASE_GROUPS_CREATE } from "@/router/dashboard/projectV1";
import { useProjectByName, hasFeature } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { projectNamePrefix } from "@/store/modules/v1/common";
import { hasProjectPermissionV2 } from "@/utils";
@@ -84,6 +84,6 @@ const allowCreate = computed(() =>
);
const hasDBGroupFeature = computed(() =>
- hasFeature(PlanLimitConfig_Feature.DATABASE_GROUPS)
+ hasFeature(PlanFeature.FEATURE_DATABASE_GROUPS)
);
</script>
diff --git a/frontend/src/views/project/ProjectDatabaseGroupDetail.vue b/frontend/src/views/project/ProjectDatabaseGroupDetail.vue
index 816cb7ab5b..f54389de2a 100644
--- a/frontend/src/views/project/ProjectDatabaseGroupDetail.vue
+++ b/frontend/src/views/project/ProjectDatabaseGroupDetail.vue
@@ -4,7 +4,7 @@
v-bind="$attrs"
class="h-full flex-1 relative space-y-4"
>
- <FeatureAttention :feature="PlanLimitConfig_Feature.DATABASE_GROUPS" class="mb-4" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_DATABASE_GROUPS" class="mb-4" />
<div
v-if="hasDatabaseGroupFeature && !state.editing"
@@ -66,7 +66,7 @@ import {
projectNamePrefix,
} from "@/store/modules/v1/common";
import { DatabaseGroupView } from "@/types/proto/v1/database_group_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { hasPermissionToCreateChangeDatabaseIssueInProject } from "@/utils";
import { generateDatabaseGroupIssueRoute } from "@/utils/databaseGroup/issue";
@@ -105,7 +105,7 @@ const hasMatchedDatabases = computed(
() => (databaseGroup.value?.matchedDatabases.length ?? 0) > 0
);
-const hasDatabaseGroupFeature = featureToRef(PlanLimitConfig_Feature.DATABASE_GROUPS);
+const hasDatabaseGroupFeature = featureToRef(PlanFeature.FEATURE_DATABASE_GROUPS);
watchEffect(async () => {
await dbGroupStore.getOrFetchDBGroupByName(databaseGroupResourceName.value, {
diff --git a/frontend/src/views/project/ProjectMaskingExemption.vue b/frontend/src/views/project/ProjectMaskingExemption.vue
index e06137bb14..9b1db6eace 100644
--- a/frontend/src/views/project/ProjectMaskingExemption.vue
+++ b/frontend/src/views/project/ProjectMaskingExemption.vue
@@ -43,7 +43,7 @@
<template #icon>
<ShieldCheckIcon class="w-4" />
<FeatureBadge
- :feature="PlanLimitConfig_Feature.DATA_MASKING"
+ :feature="PlanFeature.FEATURE_DATA_MASKING"
class="text-white"
/>
</template>
@@ -62,7 +62,7 @@
<FeatureModal
:open="state.showFeatureModal"
- :feature="PlanLimitConfig_Feature.DATA_MASKING"
+ :feature="PlanFeature.FEATURE_DATA_MASKING"
@cancel="state.showFeatureModal = false"
/>
</template>
@@ -79,7 +79,7 @@ import { type AccessUser } from "@/components/SensitiveData/types";
import { SearchBox, DatabaseSelect } from "@/components/v2";
import { PROJECT_V1_ROUTE_MASKING_EXEMPTION_CREATE } from "@/router/dashboard/projectV1";
import { useProjectByName, hasFeature } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { projectNamePrefix } from "@/store/modules/v1/common";
import { MaskingExceptionPolicy_MaskingException_Action as Action } from "@/types/proto/v1/org_policy_service";
import { hasProjectPermissionV2 } from "@/utils";
@@ -106,7 +106,7 @@ const { project } = useProjectByName(
);
const hasSensitiveDataFeature = computed(() => {
- return hasFeature(PlanLimitConfig_Feature.DATA_MASKING);
+ return hasFeature(PlanFeature.FEATURE_DATA_MASKING);
});
const allowCreate = computed(() => {
diff --git a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/BatchQueryDatabaseGroupSelector.vue b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/BatchQueryDatabaseGroupSelector.vue
index 9f5efb5073..9f5adc29a2 100644
--- a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/BatchQueryDatabaseGroupSelector.vue
+++ b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/BatchQueryDatabaseGroupSelector.vue
@@ -45,7 +45,7 @@
</NPopover>
<FeatureModal
- :feature="PlanLimitConfig_Feature.DATABASE_GROUPS"
+ :feature="PlanFeature.FEATURE_DATABASE_GROUPS"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
/>
@@ -58,7 +58,7 @@ import { computed, reactive, watch } from "vue";
import DatabaseGroupDataTable from "@/components/DatabaseGroup/DatabaseGroupDataTable.vue";
import { FeatureModal } from "@/components/FeatureGuard";
import { SearchBox } from "@/components/v2";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import {
featureToRef,
useAppFeature,
@@ -85,8 +85,8 @@ const state = reactive<LocalState>({
});
// Save the stringified label key-value pairs.
const currentTab = computed(() => tabStore.currentTab);
-const hasBatchQueryFeature = featureToRef(PlanLimitConfig_Feature.BATCH_QUERY);
-const hasDatabaseGroupFeature = featureToRef(PlanLimitConfig_Feature.DATABASE_GROUPS);
+const hasBatchQueryFeature = featureToRef(PlanFeature.FEATURE_BATCH_QUERY);
+const hasDatabaseGroupFeature = featureToRef(PlanFeature.FEATURE_DATABASE_GROUPS);
const disallowBatchQuery = useAppFeature(
"bb.feature.sql-editor.disallow-batch-query"
);
diff --git a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue
index 0008f5108f..f6ad6c46cd 100644
--- a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue
+++ b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue
@@ -5,7 +5,7 @@
class="textinfolabel mb-2 w-full leading-4 flex flex-col 2xl:flex-row items-start 2xl:items-center gap-x-1"
>
<div class="flex items-center gap-x-1">
- <FeatureBadge :feature="PlanLimitConfig_Feature.BATCH_QUERY" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_BATCH_QUERY" />
{{
$t("sql-editor.batch-query.description", {
database: state.selectedDatabases.size,
@@ -158,7 +158,7 @@
</div>
<FeatureModal
- :feature="PlanLimitConfig_Feature.BATCH_QUERY"
+ :feature="PlanFeature.FEATURE_BATCH_QUERY"
:open="state.showFeatureModal"
@cancel="state.showFeatureModal = false"
/>
@@ -218,7 +218,7 @@ import {
} from "@/types";
import { engineFromJSON } from "@/types/proto/v1/common";
import { DataSourceType } from "@/types/proto/v1/instance_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import {
findAncestor,
isDescendantOf,
@@ -277,8 +277,8 @@ watch(
{ deep: true }
);
-const hasBatchQueryFeature = featureToRef(PlanLimitConfig_Feature.BATCH_QUERY);
-const hasDatabaseGroupFeature = featureToRef(PlanLimitConfig_Feature.DATABASE_GROUPS);
+const hasBatchQueryFeature = featureToRef(PlanFeature.FEATURE_BATCH_QUERY);
+const hasDatabaseGroupFeature = featureToRef(PlanFeature.FEATURE_DATABASE_GROUPS);
const state = reactive<LocalState>({
selectedDatabases: new Set(),
diff --git a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/TreeNode/DatabaseNode.vue b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/TreeNode/DatabaseNode.vue
index 33a1f1e287..3546fc7266 100644
--- a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/TreeNode/DatabaseNode.vue
+++ b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/TreeNode/DatabaseNode.vue
@@ -41,7 +41,7 @@ import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
} from "@/types";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { isDatabaseV1Queryable } from "@/utils";
import RequestQueryButton from "../../../EditorCommon/ResultView/RequestQueryButton.vue";
@@ -79,7 +79,7 @@ const canQuery = computed(() => isDatabaseV1Queryable(database.value));
const showRequestQueryButton = computed(() => {
// Developer self-helped request query is guarded by "Access Control" feature
return (
- hasFeature(PlanLimitConfig_Feature.IAM) &&
+ hasFeature(PlanFeature.FEATURE_IAM) &&
!disallowRequestQuery.value &&
!canQuery.value
);
diff --git a/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue b/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue
index 6d338201d0..942d79fbf1 100644
--- a/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue
@@ -111,7 +111,7 @@
<template #default>
<div class="flex items-center gap-1">
<span>{{ $t("common.share") }}</span>
- <FeatureBadge :feature="PlanLimitConfig_Feature.SAVED_AND_SHARED_SQL_SCRIPTS" />
+ <FeatureBadge :feature="PlanFeature.FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS" />
</div>
</template>
</NPopover>
@@ -171,7 +171,7 @@ import {
type SQLEditorQueryParams,
} from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { keyboardShortcutStr, isWorksheetWritableV1 } from "@/utils";
import { useSQLEditorContext } from "../context";
import AdminModeButton from "./AdminModeButton.vue";
@@ -183,7 +183,7 @@ import SchemaChooser from "./SchemaChooser.vue";
import SharePopover from "./SharePopover.vue";
interface LocalState {
- requiredFeatureName?: PlanLimitConfig_Feature;
+ requiredFeatureName?: PlanFeature;
}
defineOptions({
@@ -200,7 +200,7 @@ const tabStore = useSQLEditorTabStore();
const uiStateStore = useUIStateStore();
const { events } = useSQLEditorContext();
const { resultRowsLimit } = storeToRefs(useSQLEditorStore());
-const hasSharedSQLScriptFeature = featureToRef(PlanLimitConfig_Feature.SAVED_AND_SHARED_SQL_SCRIPTS);
+const hasSharedSQLScriptFeature = featureToRef(PlanFeature.FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS);
const disallowShareWorksheet = useAppFeature(
"bb.feature.sql-editor.disallow-share-worksheet"
);
@@ -342,7 +342,7 @@ const handleClickSave = () => {
const handleShareButtonClick = () => {
if (!hasSharedSQLScriptFeature.value) {
- state.requiredFeatureName = PlanLimitConfig_Feature.SAVED_AND_SHARED_SQL_SCRIPTS;
+ state.requiredFeatureName = PlanFeature.FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS;
}
};
</script>
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataBlock.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataBlock.vue
index 3ec42f4fd4..815742f72d 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataBlock.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataBlock.vue
@@ -25,7 +25,7 @@
/>
<FeatureBadge
v-else-if="isColumnMissingSensitive(header.index)"
- :feature="PlanLimitConfig_Feature.DATA_MASKING"
+ :feature="PlanFeature.FEATURE_DATA_MASKING"
class="ml-0.5 shrink-0"
:instance="database.instanceResource"
/>
@@ -57,7 +57,7 @@ import type { Table } from "@tanstack/vue-table";
import { computed } from "vue";
import { FeatureBadge } from "@/components/FeatureGuard";
import { useConnectionOfCurrentSQLEditorTab } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type { QueryRow, RowValue } from "@/types/proto/v1/sql_service";
import TableCell from "./DataTable/TableCell.vue";
import SensitiveDataIcon from "./DataTable/common/SensitiveDataIcon.vue";
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vue
index 42e45d7fa6..6a538c64c8 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vue
@@ -46,7 +46,7 @@
/>
<FeatureBadge
v-else-if="isColumnMissingSensitive(header.index)"
- :feature="PlanLimitConfig_Feature.DATA_MASKING"
+ :feature="PlanFeature.FEATURE_DATA_MASKING"
class="ml-0.5 shrink-0"
:instance="database.instanceResource"
/>
@@ -132,7 +132,7 @@ import { NEmpty } from "naive-ui";
import { computed, nextTick, onMounted, ref, watch } from "vue";
import { FeatureBadge } from "@/components/FeatureGuard";
import { useConnectionOfCurrentSQLEditorTab } from "@/store";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { type QueryRow, type RowValue } from "@/types/proto/v1/sql_service";
import { useSQLResultViewContext } from "../context";
import TableCell from "./TableCell.vue";
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue
index fc46567b76..1e35e41062 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue
@@ -144,7 +144,7 @@ import type {
DatabaseResource,
} from "@/types";
import { PolicyType } from "@/types/proto/v1/org_policy_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import DetailPanel from "./DetailPanel";
import EmptyView from "./EmptyView.vue";
@@ -213,7 +213,7 @@ const missingResource = computed((): DatabaseResource | undefined => {
const showRequestQueryButton = computed(() => {
// Developer self-helped request query is guarded by "Access Control" feature
return (
- hasFeature(PlanLimitConfig_Feature.IAM) &&
+ hasFeature(PlanFeature.FEATURE_IAM) &&
!disallowRequestQuery.value &&
missingResource.value
);
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue
index 43baae2ea1..1586f7ada7 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue
@@ -230,7 +230,7 @@ import { ExportFormat } from "@/types/proto/v1/common";
import { Engine } from "@/types/proto/v1/common";
import { PolicyType } from "@/types/proto/v1/org_policy_service";
import { DatabaseChangeMode } from "@/types/proto/v1/setting_service";
-import { PlanLimitConfig_Feature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto/v1/subscription_service";
import type {
QueryResult,
QueryRow,
@@ -334,7 +334,7 @@ const allowToRequestExportData = computed(() => {
// The current plan doesn't have access control feature.
// Developers can not self-helped to request export.
- if (!featureToRef(PlanLimitConfig_Feature.IAM).value) {
+ if (!featureToRef(PlanFeature.FEATURE_IAM).value) {
return false;
}
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 259c091795..c7b94d7899 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -217,7 +217,7 @@
- [Subscription](#bytebase-v1-Subscription)
- [UpdateSubscriptionRequest](#bytebase-v1-UpdateSubscriptionRequest)
- - [PlanLimitConfig.Feature](#bytebase-v1-PlanLimitConfig-Feature)
+ - [PlanFeature](#bytebase-v1-PlanFeature)
- [PlanType](#bytebase-v1-PlanType)
- [SubscriptionService](#bytebase-v1-SubscriptionService)
@@ -4032,7 +4032,7 @@ PlanLimitConfig represents a single plan&#39;s configuration
| type | [PlanType](#bytebase-v1-PlanType) | | |
| maximum_instance_count | [int32](#int32) | | |
| maximum_seat_count | [int32](#int32) | | |
-| features | [PlanLimitConfig.Feature](#bytebase-v1-PlanLimitConfig-Feature) | repeated | |
+| features | [PlanFeature](#bytebase-v1-PlanFeature) | repeated | |
@@ -4078,87 +4078,86 @@ PlanLimitConfig represents a single plan&#39;s configuration
-<a name="bytebase-v1-PlanLimitConfig-Feature"></a>
+<a name="bytebase-v1-PlanFeature"></a>
-### PlanLimitConfig.Feature
-Feature represents the available features in Bytebase
+### PlanFeature
+PlanFeature represents the available features in Bytebase
| Name | Number | Description |
| ---- | ------ | ----------- |
| FEATURE_UNSPECIFIED | 0 | |
-| DATABASE_CHANGE | 1 | Database Change Management |
-| GIT_BASED_SCHEMA_VERSION_CONTROL | 2 | |
-| DECLARATIVE_SCHEMA_MIGRATION | 3 | |
-| COMPARE_AND_SYNC_SCHEMA | 4 | |
-| ONLINE_SCHEMA_CHANGE | 5 | |
-| PRE_DEPLOYMENT_SQL_REVIEW | 6 | |
-| AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES | 7 | |
-| ONE_CLICK_DATA_ROLLBACK | 8 | |
-| MULTI_DATABASE_BATCH_CHANGES | 9 | |
-| PROGRESSIVE_ENVIRONMENT_DEPLOYMENT | 10 | |
-| SCHEDULED_ROLLOUT_TIME | 11 | |
-| DATABASE_CHANGELOG | 12 | |
-| SCHEMA_DRIFT_DETECTION | 13 | |
-| CHANGELIST | 14 | |
-| SCHEMA_TEMPLATE | 15 | |
-| ROLLOUT_POLICY | 16 | |
-| WEB_BASED_SQL_EDITOR | 17 | SQL Editor &amp; Development |
-| SQL_EDITOR_ADMIN_MODE | 18 | |
-| NATURAL_LANGUAGE_TO_SQL | 19 | |
-| AI_QUERY_EXPLANATION | 20 | |
-| AI_QUERY_SUGGESTIONS | 21 | |
-| AUTO_COMPLETE | 22 | |
-| SCHEMA_DIAGRAM | 23 | |
-| SCHEMA_EDITOR | 24 | |
-| DATA_EXPORT | 25 | |
-| QUERY_HISTORY | 26 | |
-| SAVED_AND_SHARED_SQL_SCRIPTS | 27 | |
-| SQL_EDITOR_DDL_DML_RESTRICTION | 28 | |
-| BATCH_QUERY | 29 | |
-| INSTANCE_READ_ONLY_CONNECTION | 30 | |
-| RESTRICT_COPYING_DATA | 31 | |
-| IAM | 32 | Security &amp; Compliance |
-| INSTANCE_SSL_CONNECTION | 33 | |
-| INSTANCE_CONNECTION_OVER_SSH_TUNNEL | 34 | |
-| INSTANCE_CONNECTION_IAM_AUTHENTICATION | 35 | |
-| GOOGLE_AND_GITHUB_SSO | 36 | |
-| USER_GROUPS | 37 | |
-| DISALLOW_SELF_SERVICE_SIGNUP | 38 | |
-| DATABASE_SECRET_VARIABLES | 39 | |
-| QUERY_DATASOURCE_RESTRICTION | 40 | |
-| CUSTOM_INSTANCE_SYNC_TIME | 41 | |
-| CUSTOM_INSTANCE_CONNECTION_LIMIT | 42 | |
-| RISK_ASSESSMENT | 43 | |
-| APPROVAL_WORKFLOW | 44 | |
-| AUDIT_LOG | 45 | |
-| ENTERPRISE_SSO | 46 | |
-| TWO_FA | 47 | |
-| PASSWORD_RESTRICTIONS | 48 | |
-| DISALLOW_PASSWORD_SIGNIN | 49 | |
-| CUSTOM_ROLES | 50 | |
-| REQUEST_ROLE_WORKFLOW | 51 | |
-| DATA_MASKING | 52 | |
-| DATA_CLASSIFICATION | 53 | |
-| SCIM | 54 | |
-| DIRECTORY_SYNC_ENTRA_ID | 55 | |
-| DIRECTORY_SYNC_OKTA | 56 | |
-| SIGN_IN_FREQUENCY_CONTROL | 57 | |
-| EXTERNAL_SECRET_MANAGER | 58 | |
-| USER_EMAIL_DOMAIN_RESTRICTION | 59 | |
-| ENVIRONMENT_MANAGEMENT | 60 | Administration &amp; Support |
-| IM_NOTIFICATIONS | 61 | |
-| TERRAFORM_PROVIDER | 62 | |
-| DATABASE_GROUPS | 63 | |
-| ENVIRONMENT_TIERS | 64 | |
-| DASHBOARD_ANNOUNCEMENT | 65 | |
-| API_INTEGRATION_GUIDANCE | 66 | |
-| CUSTOM_LOGO | 67 | |
-| WATERMARK | 68 | |
-| ROADMAP_PRIORITIZATION | 69 | |
-| CUSTOM_MSA | 70 | |
-| COMMUNITY_SUPPORT | 71 | |
-| EMAIL_SUPPORT | 72 | |
-| DEDICATED_SUPPORT_WITH_SLA | 73 | |
+| FEATURE_DATABASE_CHANGE | 1 | Database Change Management |
+| FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL | 2 | |
+| FEATURE_DECLARATIVE_SCHEMA_MIGRATION | 3 | |
+| FEATURE_COMPARE_AND_SYNC_SCHEMA | 4 | |
+| FEATURE_ONLINE_SCHEMA_CHANGE | 5 | |
+| FEATURE_PRE_DEPLOYMENT_SQL_REVIEW | 6 | |
+| FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES | 7 | |
+| FEATURE_ONE_CLICK_DATA_ROLLBACK | 8 | |
+| FEATURE_MULTI_DATABASE_BATCH_CHANGES | 9 | |
+| FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT | 10 | |
+| FEATURE_SCHEDULED_ROLLOUT_TIME | 11 | |
+| FEATURE_DATABASE_CHANGELOG | 12 | |
+| FEATURE_SCHEMA_DRIFT_DETECTION | 13 | |
+| FEATURE_CHANGELIST | 14 | |
+| FEATURE_SCHEMA_TEMPLATE | 15 | |
+| FEATURE_ROLLOUT_POLICY | 16 | |
+| FEATURE_WEB_BASED_SQL_EDITOR | 17 | SQL Editor &amp; Development |
+| FEATURE_SQL_EDITOR_ADMIN_MODE | 18 | |
+| FEATURE_NATURAL_LANGUAGE_TO_SQL | 19 | |
+| FEATURE_AI_QUERY_EXPLANATION | 20 | |
+| FEATURE_AI_QUERY_SUGGESTIONS | 21 | |
+| FEATURE_AUTO_COMPLETE | 22 | |
+| FEATURE_SCHEMA_DIAGRAM | 23 | |
+| FEATURE_SCHEMA_EDITOR | 24 | |
+| FEATURE_DATA_EXPORT | 25 | |
+| FEATURE_QUERY_HISTORY | 26 | |
+| FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS | 27 | |
+| FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION | 28 | |
+| FEATURE_BATCH_QUERY | 29 | |
+| FEATURE_INSTANCE_READ_ONLY_CONNECTION | 30 | |
+| FEATURE_RESTRICT_COPYING_DATA | 31 | |
+| FEATURE_IAM | 32 | Security &amp; Compliance |
+| FEATURE_INSTANCE_SSL_CONNECTION | 33 | |
+| FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL | 34 | |
+| FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION | 35 | |
+| FEATURE_GOOGLE_AND_GITHUB_SSO | 36 | |
+| FEATURE_USER_GROUPS | 37 | |
+| FEATURE_DISALLOW_SELF_SERVICE_SIGNUP | 38 | |
+| FEATURE_DATABASE_SECRET_VARIABLES | 39 | |
+| FEATURE_QUERY_DATASOURCE_RESTRICTION | 40 | |
+| FEATURE_CUSTOM_INSTANCE_SYNC_TIME | 41 | |
+| FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT | 42 | |
+| FEATURE_RISK_ASSESSMENT | 43 | |
+| FEATURE_APPROVAL_WORKFLOW | 44 | |
+| FEATURE_AUDIT_LOG | 45 | |
+| FEATURE_ENTERPRISE_SSO | 46 | |
+| FEATURE_TWO_FA | 47 | |
+| FEATURE_PASSWORD_RESTRICTIONS | 48 | |
+| FEATURE_DISALLOW_PASSWORD_SIGNIN | 49 | |
+| FEATURE_CUSTOM_ROLES | 50 | |
+| FEATURE_REQUEST_ROLE_WORKFLOW | 51 | |
+| FEATURE_DATA_MASKING | 52 | |
+| FEATURE_DATA_CLASSIFICATION | 53 | |
+| FEATURE_SCIM | 54 | |
+| FEATURE_DIRECTORY_SYNC | 55 | |
+| FEATURE_SIGN_IN_FREQUENCY_CONTROL | 56 | |
+| FEATURE_EXTERNAL_SECRET_MANAGER | 57 | |
+| FEATURE_USER_EMAIL_DOMAIN_RESTRICTION | 58 | |
+| FEATURE_ENVIRONMENT_MANAGEMENT | 59 | Administration &amp; Support |
+| FEATURE_IM_NOTIFICATIONS | 60 | |
+| FEATURE_TERRAFORM_PROVIDER | 61 | |
+| FEATURE_DATABASE_GROUPS | 62 | |
+| FEATURE_ENVIRONMENT_TIERS | 63 | |
+| FEATURE_DASHBOARD_ANNOUNCEMENT | 64 | |
+| FEATURE_API_INTEGRATION_GUIDANCE | 65 | |
+| FEATURE_CUSTOM_LOGO | 66 | |
+| FEATURE_WATERMARK | 67 | |
+| FEATURE_ROADMAP_PRIORITIZATION | 68 | |
+| FEATURE_CUSTOM_MSA | 69 | |
+| FEATURE_COMMUNITY_SUPPORT | 70 | |
+| FEATURE_EMAIL_SUPPORT | 71 | |
+| FEATURE_DEDICATED_SUPPORT_WITH_SLA | 72 | |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 7361268e75..8807e23205 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -1005,7 +1005,7 @@
<li>
- <a href="#bytebase.v1.PlanLimitConfig.Feature"><span class="badge">E</span>PlanLimitConfig.Feature</a>
+ <a href="#bytebase.v1.PlanFeature"><span class="badge">E</span>PlanFeature</a>
</li>
<li>
@@ -12001,7 +12001,7 @@ The access is based on approval flow.</p></td>
<tr>
<td>features</td>
- <td><a href="#bytebase.v1.PlanLimitConfig.Feature">PlanLimitConfig.Feature</a></td>
+ <td><a href="#bytebase.v1.PlanFeature">PlanFeature</a></td>
<td>repeated</td>
<td><p> </p></td>
</tr>
@@ -12112,8 +12112,8 @@ The access is based on approval flow.</p></td>
- <h3 id="bytebase.v1.PlanLimitConfig.Feature">PlanLimitConfig.Feature</h3>
- <p>Feature represents the available features in Bytebase</p>
+ <h3 id="bytebase.v1.PlanFeature">PlanFeature</h3>
+ <p>PlanFeature represents the available features in Bytebase</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -12127,443 +12127,437 @@ The access is based on approval flow.</p></td>
</tr>
<tr>
- <td>DATABASE_CHANGE</td>
+ <td>FEATURE_DATABASE_CHANGE</td>
<td>1</td>
<td><p>Database Change Management</p></td>
</tr>
<tr>
- <td>GIT_BASED_SCHEMA_VERSION_CONTROL</td>
+ <td>FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL</td>
<td>2</td>
<td><p></p></td>
</tr>
<tr>
- <td>DECLARATIVE_SCHEMA_MIGRATION</td>
+ <td>FEATURE_DECLARATIVE_SCHEMA_MIGRATION</td>
<td>3</td>
<td><p></p></td>
</tr>
<tr>
- <td>COMPARE_AND_SYNC_SCHEMA</td>
+ <td>FEATURE_COMPARE_AND_SYNC_SCHEMA</td>
<td>4</td>
<td><p></p></td>
</tr>
<tr>
- <td>ONLINE_SCHEMA_CHANGE</td>
+ <td>FEATURE_ONLINE_SCHEMA_CHANGE</td>
<td>5</td>
<td><p></p></td>
</tr>
<tr>
- <td>PRE_DEPLOYMENT_SQL_REVIEW</td>
+ <td>FEATURE_PRE_DEPLOYMENT_SQL_REVIEW</td>
<td>6</td>
<td><p></p></td>
</tr>
<tr>
- <td>AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES</td>
+ <td>FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES</td>
<td>7</td>
<td><p></p></td>
</tr>
<tr>
- <td>ONE_CLICK_DATA_ROLLBACK</td>
+ <td>FEATURE_ONE_CLICK_DATA_ROLLBACK</td>
<td>8</td>
<td><p></p></td>
</tr>
<tr>
- <td>MULTI_DATABASE_BATCH_CHANGES</td>
+ <td>FEATURE_MULTI_DATABASE_BATCH_CHANGES</td>
<td>9</td>
<td><p></p></td>
</tr>
<tr>
- <td>PROGRESSIVE_ENVIRONMENT_DEPLOYMENT</td>
+ <td>FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT</td>
<td>10</td>
<td><p></p></td>
</tr>
<tr>
- <td>SCHEDULED_ROLLOUT_TIME</td>
+ <td>FEATURE_SCHEDULED_ROLLOUT_TIME</td>
<td>11</td>
<td><p></p></td>
</tr>
<tr>
- <td>DATABASE_CHANGELOG</td>
+ <td>FEATURE_DATABASE_CHANGELOG</td>
<td>12</td>
<td><p></p></td>
</tr>
<tr>
- <td>SCHEMA_DRIFT_DETECTION</td>
+ <td>FEATURE_SCHEMA_DRIFT_DETECTION</td>
<td>13</td>
<td><p></p></td>
</tr>
<tr>
- <td>CHANGELIST</td>
+ <td>FEATURE_CHANGELIST</td>
<td>14</td>
<td><p></p></td>
</tr>
<tr>
- <td>SCHEMA_TEMPLATE</td>
+ <td>FEATURE_SCHEMA_TEMPLATE</td>
<td>15</td>
<td><p></p></td>
</tr>
<tr>
- <td>ROLLOUT_POLICY</td>
+ <td>FEATURE_ROLLOUT_POLICY</td>
<td>16</td>
<td><p></p></td>
</tr>
<tr>
- <td>WEB_BASED_SQL_EDITOR</td>
+ <td>FEATURE_WEB_BASED_SQL_EDITOR</td>
<td>17</td>
<td><p>SQL Editor &amp; Development</p></td>
</tr>
<tr>
- <td>SQL_EDITOR_ADMIN_MODE</td>
+ <td>FEATURE_SQL_EDITOR_ADMIN_MODE</td>
<td>18</td>
<td><p></p></td>
</tr>
<tr>
- <td>NATURAL_LANGUAGE_TO_SQL</td>
+ <td>FEATURE_NATURAL_LANGUAGE_TO_SQL</td>
<td>19</td>
<td><p></p></td>
</tr>
<tr>
- <td>AI_QUERY_EXPLANATION</td>
+ <td>FEATURE_AI_QUERY_EXPLANATION</td>
<td>20</td>
<td><p></p></td>
</tr>
<tr>
- <td>AI_QUERY_SUGGESTIONS</td>
+ <td>FEATURE_AI_QUERY_SUGGESTIONS</td>
<td>21</td>
<td><p></p></td>
</tr>
<tr>
- <td>AUTO_COMPLETE</td>
+ <td>FEATURE_AUTO_COMPLETE</td>
<td>22</td>
<td><p></p></td>
</tr>
<tr>
- <td>SCHEMA_DIAGRAM</td>
+ <td>FEATURE_SCHEMA_DIAGRAM</td>
<td>23</td>
<td><p></p></td>
</tr>
<tr>
- <td>SCHEMA_EDITOR</td>
+ <td>FEATURE_SCHEMA_EDITOR</td>
<td>24</td>
<td><p></p></td>
</tr>
<tr>
- <td>DATA_EXPORT</td>
+ <td>FEATURE_DATA_EXPORT</td>
<td>25</td>
<td><p></p></td>
</tr>
<tr>
- <td>QUERY_HISTORY</td>
+ <td>FEATURE_QUERY_HISTORY</td>
<td>26</td>
<td><p></p></td>
</tr>
<tr>
- <td>SAVED_AND_SHARED_SQL_SCRIPTS</td>
+ <td>FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS</td>
<td>27</td>
<td><p></p></td>
</tr>
<tr>
- <td>SQL_EDITOR_DDL_DML_RESTRICTION</td>
+ <td>FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION</td>
<td>28</td>
<td><p></p></td>
</tr>
<tr>
- <td>BATCH_QUERY</td>
+ <td>FEATURE_BATCH_QUERY</td>
<td>29</td>
<td><p></p></td>
</tr>
<tr>
- <td>INSTANCE_READ_ONLY_CONNECTION</td>
+ <td>FEATURE_INSTANCE_READ_ONLY_CONNECTION</td>
<td>30</td>
<td><p></p></td>
</tr>
<tr>
- <td>RESTRICT_COPYING_DATA</td>
+ <td>FEATURE_RESTRICT_COPYING_DATA</td>
<td>31</td>
<td><p></p></td>
</tr>
<tr>
- <td>IAM</td>
+ <td>FEATURE_IAM</td>
<td>32</td>
<td><p>Security &amp; Compliance</p></td>
</tr>
<tr>
- <td>INSTANCE_SSL_CONNECTION</td>
+ <td>FEATURE_INSTANCE_SSL_CONNECTION</td>
<td>33</td>
<td><p></p></td>
</tr>
<tr>
- <td>INSTANCE_CONNECTION_OVER_SSH_TUNNEL</td>
+ <td>FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL</td>
<td>34</td>
<td><p></p></td>
</tr>
<tr>
- <td>INSTANCE_CONNECTION_IAM_AUTHENTICATION</td>
+ <td>FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION</td>
<td>35</td>
<td><p></p></td>
</tr>
<tr>
- <td>GOOGLE_AND_GITHUB_SSO</td>
+ <td>FEATURE_GOOGLE_AND_GITHUB_SSO</td>
<td>36</td>
<td><p></p></td>
</tr>
<tr>
- <td>USER_GROUPS</td>
+ <td>FEATURE_USER_GROUPS</td>
<td>37</td>
<td><p></p></td>
</tr>
<tr>
- <td>DISALLOW_SELF_SERVICE_SIGNUP</td>
+ <td>FEATURE_DISALLOW_SELF_SERVICE_SIGNUP</td>
<td>38</td>
<td><p></p></td>
</tr>
<tr>
- <td>DATABASE_SECRET_VARIABLES</td>
+ <td>FEATURE_DATABASE_SECRET_VARIABLES</td>
<td>39</td>
<td><p></p></td>
</tr>
<tr>
- <td>QUERY_DATASOURCE_RESTRICTION</td>
+ <td>FEATURE_QUERY_DATASOURCE_RESTRICTION</td>
<td>40</td>
<td><p></p></td>
</tr>
<tr>
- <td>CUSTOM_INSTANCE_SYNC_TIME</td>
+ <td>FEATURE_CUSTOM_INSTANCE_SYNC_TIME</td>
<td>41</td>
<td><p></p></td>
</tr>
<tr>
- <td>CUSTOM_INSTANCE_CONNECTION_LIMIT</td>
+ <td>FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT</td>
<td>42</td>
<td><p></p></td>
</tr>
<tr>
- <td>RISK_ASSESSMENT</td>
+ <td>FEATURE_RISK_ASSESSMENT</td>
<td>43</td>
<td><p></p></td>
</tr>
<tr>
- <td>APPROVAL_WORKFLOW</td>
+ <td>FEATURE_APPROVAL_WORKFLOW</td>
<td>44</td>
<td><p></p></td>
</tr>
<tr>
- <td>AUDIT_LOG</td>
+ <td>FEATURE_AUDIT_LOG</td>
<td>45</td>
<td><p></p></td>
</tr>
<tr>
- <td>ENTERPRISE_SSO</td>
+ <td>FEATURE_ENTERPRISE_SSO</td>
<td>46</td>
<td><p></p></td>
</tr>
<tr>
- <td>TWO_FA</td>
+ <td>FEATURE_TWO_FA</td>
<td>47</td>
<td><p></p></td>
</tr>
<tr>
- <td>PASSWORD_RESTRICTIONS</td>
+ <td>FEATURE_PASSWORD_RESTRICTIONS</td>
<td>48</td>
<td><p></p></td>
</tr>
<tr>
- <td>DISALLOW_PASSWORD_SIGNIN</td>
+ <td>FEATURE_DISALLOW_PASSWORD_SIGNIN</td>
<td>49</td>
<td><p></p></td>
</tr>
<tr>
- <td>CUSTOM_ROLES</td>
+ <td>FEATURE_CUSTOM_ROLES</td>
<td>50</td>
<td><p></p></td>
</tr>
<tr>
- <td>REQUEST_ROLE_WORKFLOW</td>
+ <td>FEATURE_REQUEST_ROLE_WORKFLOW</td>
<td>51</td>
<td><p></p></td>
</tr>
<tr>
- <td>DATA_MASKING</td>
+ <td>FEATURE_DATA_MASKING</td>
<td>52</td>
<td><p></p></td>
</tr>
<tr>
- <td>DATA_CLASSIFICATION</td>
+ <td>FEATURE_DATA_CLASSIFICATION</td>
<td>53</td>
<td><p></p></td>
</tr>
<tr>
- <td>SCIM</td>
+ <td>FEATURE_SCIM</td>
<td>54</td>
<td><p></p></td>
</tr>
<tr>
- <td>DIRECTORY_SYNC_ENTRA_ID</td>
+ <td>FEATURE_DIRECTORY_SYNC</td>
<td>55</td>
<td><p></p></td>
</tr>
<tr>
- <td>DIRECTORY_SYNC_OKTA</td>
+ <td>FEATURE_SIGN_IN_FREQUENCY_CONTROL</td>
<td>56</td>
<td><p></p></td>
</tr>
<tr>
- <td>SIGN_IN_FREQUENCY_CONTROL</td>
+ <td>FEATURE_EXTERNAL_SECRET_MANAGER</td>
<td>57</td>
<td><p></p></td>
</tr>
<tr>
- <td>EXTERNAL_SECRET_MANAGER</td>
+ <td>FEATURE_USER_EMAIL_DOMAIN_RESTRICTION</td>
<td>58</td>
<td><p></p></td>
</tr>
<tr>
- <td>USER_EMAIL_DOMAIN_RESTRICTION</td>
+ <td>FEATURE_ENVIRONMENT_MANAGEMENT</td>
<td>59</td>
- <td><p></p></td>
+ <td><p>Administration &amp; Support</p></td>
</tr>
<tr>
- <td>ENVIRONMENT_MANAGEMENT</td>
+ <td>FEATURE_IM_NOTIFICATIONS</td>
<td>60</td>
- <td><p>Administration &amp; Support</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>IM_NOTIFICATIONS</td>
+ <td>FEATURE_TERRAFORM_PROVIDER</td>
<td>61</td>
<td><p></p></td>
</tr>
<tr>
- <td>TERRAFORM_PROVIDER</td>
+ <td>FEATURE_DATABASE_GROUPS</td>
<td>62</td>
<td><p></p></td>
</tr>
<tr>
- <td>DATABASE_GROUPS</td>
+ <td>FEATURE_ENVIRONMENT_TIERS</td>
<td>63</td>
<td><p></p></td>
</tr>
<tr>
- <td>ENVIRONMENT_TIERS</td>
+ <td>FEATURE_DASHBOARD_ANNOUNCEMENT</td>
<td>64</td>
<td><p></p></td>
</tr>
<tr>
- <td>DASHBOARD_ANNOUNCEMENT</td>
+ <td>FEATURE_API_INTEGRATION_GUIDANCE</td>
<td>65</td>
<td><p></p></td>
</tr>
<tr>
- <td>API_INTEGRATION_GUIDANCE</td>
+ <td>FEATURE_CUSTOM_LOGO</td>
<td>66</td>
<td><p></p></td>
</tr>
<tr>
- <td>CUSTOM_LOGO</td>
+ <td>FEATURE_WATERMARK</td>
<td>67</td>
<td><p></p></td>
</tr>
<tr>
- <td>WATERMARK</td>
+ <td>FEATURE_ROADMAP_PRIORITIZATION</td>
<td>68</td>
<td><p></p></td>
</tr>
<tr>
- <td>ROADMAP_PRIORITIZATION</td>
+ <td>FEATURE_CUSTOM_MSA</td>
<td>69</td>
<td><p></p></td>
</tr>
<tr>
- <td>CUSTOM_MSA</td>
+ <td>FEATURE_COMMUNITY_SUPPORT</td>
<td>70</td>
<td><p></p></td>
</tr>
<tr>
- <td>COMMUNITY_SUPPORT</td>
+ <td>FEATURE_EMAIL_SUPPORT</td>
<td>71</td>
<td><p></p></td>
</tr>
<tr>
- <td>EMAIL_SUPPORT</td>
+ <td>FEATURE_DEDICATED_SUPPORT_WITH_SLA</td>
<td>72</td>
<td><p></p></td>
</tr>
- <tr>
- <td>DEDICATED_SUPPORT_WITH_SLA</td>
- <td>73</td>
- <td><p></p></td>
- </tr>
-
</tbody>
</table>
diff --git a/proto/generated-go/v1/subscription_service.pb.go b/proto/generated-go/v1/subscription_service.pb.go
index ff3a456e0b..0f339cd3e1 100644
--- a/proto/generated-go/v1/subscription_service.pb.go
+++ b/proto/generated-go/v1/subscription_service.pb.go
@@ -75,271 +75,268 @@ func (PlanType) EnumDescriptor() ([]byte, []int) {
return file_v1_subscription_service_proto_rawDescGZIP(), []int{0}
}
-// Feature represents the available features in Bytebase
-type PlanLimitConfig_Feature int32
+// PlanFeature represents the available features in Bytebase
+type PlanFeature int32
const (
- PlanLimitConfig_FEATURE_UNSPECIFIED PlanLimitConfig_Feature = 0
+ PlanFeature_FEATURE_UNSPECIFIED PlanFeature = 0
// Database Change Management
- PlanLimitConfig_DATABASE_CHANGE PlanLimitConfig_Feature = 1
- PlanLimitConfig_GIT_BASED_SCHEMA_VERSION_CONTROL PlanLimitConfig_Feature = 2
- PlanLimitConfig_DECLARATIVE_SCHEMA_MIGRATION PlanLimitConfig_Feature = 3
- PlanLimitConfig_COMPARE_AND_SYNC_SCHEMA PlanLimitConfig_Feature = 4
- PlanLimitConfig_ONLINE_SCHEMA_CHANGE PlanLimitConfig_Feature = 5
- PlanLimitConfig_PRE_DEPLOYMENT_SQL_REVIEW PlanLimitConfig_Feature = 6
- PlanLimitConfig_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES PlanLimitConfig_Feature = 7
- PlanLimitConfig_ONE_CLICK_DATA_ROLLBACK PlanLimitConfig_Feature = 8
- PlanLimitConfig_MULTI_DATABASE_BATCH_CHANGES PlanLimitConfig_Feature = 9
- PlanLimitConfig_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT PlanLimitConfig_Feature = 10
- PlanLimitConfig_SCHEDULED_ROLLOUT_TIME PlanLimitConfig_Feature = 11
- PlanLimitConfig_DATABASE_CHANGELOG PlanLimitConfig_Feature = 12
- PlanLimitConfig_SCHEMA_DRIFT_DETECTION PlanLimitConfig_Feature = 13
- PlanLimitConfig_CHANGELIST PlanLimitConfig_Feature = 14
- PlanLimitConfig_SCHEMA_TEMPLATE PlanLimitConfig_Feature = 15
- PlanLimitConfig_ROLLOUT_POLICY PlanLimitConfig_Feature = 16
+ PlanFeature_FEATURE_DATABASE_CHANGE PlanFeature = 1
+ PlanFeature_FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL PlanFeature = 2
+ PlanFeature_FEATURE_DECLARATIVE_SCHEMA_MIGRATION PlanFeature = 3
+ PlanFeature_FEATURE_COMPARE_AND_SYNC_SCHEMA PlanFeature = 4
+ PlanFeature_FEATURE_ONLINE_SCHEMA_CHANGE PlanFeature = 5
+ PlanFeature_FEATURE_PRE_DEPLOYMENT_SQL_REVIEW PlanFeature = 6
+ PlanFeature_FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES PlanFeature = 7
+ PlanFeature_FEATURE_ONE_CLICK_DATA_ROLLBACK PlanFeature = 8
+ PlanFeature_FEATURE_MULTI_DATABASE_BATCH_CHANGES PlanFeature = 9
+ PlanFeature_FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT PlanFeature = 10
+ PlanFeature_FEATURE_SCHEDULED_ROLLOUT_TIME PlanFeature = 11
+ PlanFeature_FEATURE_DATABASE_CHANGELOG PlanFeature = 12
+ PlanFeature_FEATURE_SCHEMA_DRIFT_DETECTION PlanFeature = 13
+ PlanFeature_FEATURE_CHANGELIST PlanFeature = 14
+ PlanFeature_FEATURE_SCHEMA_TEMPLATE PlanFeature = 15
+ PlanFeature_FEATURE_ROLLOUT_POLICY PlanFeature = 16
// SQL Editor & Development
- PlanLimitConfig_WEB_BASED_SQL_EDITOR PlanLimitConfig_Feature = 17
- PlanLimitConfig_SQL_EDITOR_ADMIN_MODE PlanLimitConfig_Feature = 18
- PlanLimitConfig_NATURAL_LANGUAGE_TO_SQL PlanLimitConfig_Feature = 19
- PlanLimitConfig_AI_QUERY_EXPLANATION PlanLimitConfig_Feature = 20
- PlanLimitConfig_AI_QUERY_SUGGESTIONS PlanLimitConfig_Feature = 21
- PlanLimitConfig_AUTO_COMPLETE PlanLimitConfig_Feature = 22
- PlanLimitConfig_SCHEMA_DIAGRAM PlanLimitConfig_Feature = 23
- PlanLimitConfig_SCHEMA_EDITOR PlanLimitConfig_Feature = 24
- PlanLimitConfig_DATA_EXPORT PlanLimitConfig_Feature = 25
- PlanLimitConfig_QUERY_HISTORY PlanLimitConfig_Feature = 26
- PlanLimitConfig_SAVED_AND_SHARED_SQL_SCRIPTS PlanLimitConfig_Feature = 27
- PlanLimitConfig_SQL_EDITOR_DDL_DML_RESTRICTION PlanLimitConfig_Feature = 28
- PlanLimitConfig_BATCH_QUERY PlanLimitConfig_Feature = 29
- PlanLimitConfig_INSTANCE_READ_ONLY_CONNECTION PlanLimitConfig_Feature = 30
- PlanLimitConfig_RESTRICT_COPYING_DATA PlanLimitConfig_Feature = 31
+ PlanFeature_FEATURE_WEB_BASED_SQL_EDITOR PlanFeature = 17
+ PlanFeature_FEATURE_SQL_EDITOR_ADMIN_MODE PlanFeature = 18
+ PlanFeature_FEATURE_NATURAL_LANGUAGE_TO_SQL PlanFeature = 19
+ PlanFeature_FEATURE_AI_QUERY_EXPLANATION PlanFeature = 20
+ PlanFeature_FEATURE_AI_QUERY_SUGGESTIONS PlanFeature = 21
+ PlanFeature_FEATURE_AUTO_COMPLETE PlanFeature = 22
+ PlanFeature_FEATURE_SCHEMA_DIAGRAM PlanFeature = 23
+ PlanFeature_FEATURE_SCHEMA_EDITOR PlanFeature = 24
+ PlanFeature_FEATURE_DATA_EXPORT PlanFeature = 25
+ PlanFeature_FEATURE_QUERY_HISTORY PlanFeature = 26
+ PlanFeature_FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS PlanFeature = 27
+ PlanFeature_FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION PlanFeature = 28
+ PlanFeature_FEATURE_BATCH_QUERY PlanFeature = 29
+ PlanFeature_FEATURE_INSTANCE_READ_ONLY_CONNECTION PlanFeature = 30
+ PlanFeature_FEATURE_RESTRICT_COPYING_DATA PlanFeature = 31
// Security & Compliance
- PlanLimitConfig_IAM PlanLimitConfig_Feature = 32
- PlanLimitConfig_INSTANCE_SSL_CONNECTION PlanLimitConfig_Feature = 33
- PlanLimitConfig_INSTANCE_CONNECTION_OVER_SSH_TUNNEL PlanLimitConfig_Feature = 34
- PlanLimitConfig_INSTANCE_CONNECTION_IAM_AUTHENTICATION PlanLimitConfig_Feature = 35
- PlanLimitConfig_GOOGLE_AND_GITHUB_SSO PlanLimitConfig_Feature = 36
- PlanLimitConfig_USER_GROUPS PlanLimitConfig_Feature = 37
- PlanLimitConfig_DISALLOW_SELF_SERVICE_SIGNUP PlanLimitConfig_Feature = 38
- PlanLimitConfig_DATABASE_SECRET_VARIABLES PlanLimitConfig_Feature = 39
- PlanLimitConfig_QUERY_DATASOURCE_RESTRICTION PlanLimitConfig_Feature = 40
- PlanLimitConfig_CUSTOM_INSTANCE_SYNC_TIME PlanLimitConfig_Feature = 41
- PlanLimitConfig_CUSTOM_INSTANCE_CONNECTION_LIMIT PlanLimitConfig_Feature = 42
- PlanLimitConfig_RISK_ASSESSMENT PlanLimitConfig_Feature = 43
- PlanLimitConfig_APPROVAL_WORKFLOW PlanLimitConfig_Feature = 44
- PlanLimitConfig_AUDIT_LOG PlanLimitConfig_Feature = 45
- PlanLimitConfig_ENTERPRISE_SSO PlanLimitConfig_Feature = 46
- PlanLimitConfig_TWO_FA PlanLimitConfig_Feature = 47
- PlanLimitConfig_PASSWORD_RESTRICTIONS PlanLimitConfig_Feature = 48
- PlanLimitConfig_DISALLOW_PASSWORD_SIGNIN PlanLimitConfig_Feature = 49
- PlanLimitConfig_CUSTOM_ROLES PlanLimitConfig_Feature = 50
- PlanLimitConfig_REQUEST_ROLE_WORKFLOW PlanLimitConfig_Feature = 51
- PlanLimitConfig_DATA_MASKING PlanLimitConfig_Feature = 52
- PlanLimitConfig_DATA_CLASSIFICATION PlanLimitConfig_Feature = 53
- PlanLimitConfig_SCIM PlanLimitConfig_Feature = 54
- PlanLimitConfig_DIRECTORY_SYNC_ENTRA_ID PlanLimitConfig_Feature = 55
- PlanLimitConfig_DIRECTORY_SYNC_OKTA PlanLimitConfig_Feature = 56
- PlanLimitConfig_SIGN_IN_FREQUENCY_CONTROL PlanLimitConfig_Feature = 57
- PlanLimitConfig_EXTERNAL_SECRET_MANAGER PlanLimitConfig_Feature = 58
- PlanLimitConfig_USER_EMAIL_DOMAIN_RESTRICTION PlanLimitConfig_Feature = 59
+ PlanFeature_FEATURE_IAM PlanFeature = 32
+ PlanFeature_FEATURE_INSTANCE_SSL_CONNECTION PlanFeature = 33
+ PlanFeature_FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL PlanFeature = 34
+ PlanFeature_FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION PlanFeature = 35
+ PlanFeature_FEATURE_GOOGLE_AND_GITHUB_SSO PlanFeature = 36
+ PlanFeature_FEATURE_USER_GROUPS PlanFeature = 37
+ PlanFeature_FEATURE_DISALLOW_SELF_SERVICE_SIGNUP PlanFeature = 38
+ PlanFeature_FEATURE_DATABASE_SECRET_VARIABLES PlanFeature = 39
+ PlanFeature_FEATURE_QUERY_DATASOURCE_RESTRICTION PlanFeature = 40
+ PlanFeature_FEATURE_CUSTOM_INSTANCE_SYNC_TIME PlanFeature = 41
+ PlanFeature_FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT PlanFeature = 42
+ PlanFeature_FEATURE_RISK_ASSESSMENT PlanFeature = 43
+ PlanFeature_FEATURE_APPROVAL_WORKFLOW PlanFeature = 44
+ PlanFeature_FEATURE_AUDIT_LOG PlanFeature = 45
+ PlanFeature_FEATURE_ENTERPRISE_SSO PlanFeature = 46
+ PlanFeature_FEATURE_TWO_FA PlanFeature = 47
+ PlanFeature_FEATURE_PASSWORD_RESTRICTIONS PlanFeature = 48
+ PlanFeature_FEATURE_DISALLOW_PASSWORD_SIGNIN PlanFeature = 49
+ PlanFeature_FEATURE_CUSTOM_ROLES PlanFeature = 50
+ PlanFeature_FEATURE_REQUEST_ROLE_WORKFLOW PlanFeature = 51
+ PlanFeature_FEATURE_DATA_MASKING PlanFeature = 52
+ PlanFeature_FEATURE_DATA_CLASSIFICATION PlanFeature = 53
+ PlanFeature_FEATURE_SCIM PlanFeature = 54
+ PlanFeature_FEATURE_DIRECTORY_SYNC PlanFeature = 55
+ PlanFeature_FEATURE_SIGN_IN_FREQUENCY_CONTROL PlanFeature = 56
+ PlanFeature_FEATURE_EXTERNAL_SECRET_MANAGER PlanFeature = 57
+ PlanFeature_FEATURE_USER_EMAIL_DOMAIN_RESTRICTION PlanFeature = 58
// Administration & Support
- PlanLimitConfig_ENVIRONMENT_MANAGEMENT PlanLimitConfig_Feature = 60
- PlanLimitConfig_IM_NOTIFICATIONS PlanLimitConfig_Feature = 61
- PlanLimitConfig_TERRAFORM_PROVIDER PlanLimitConfig_Feature = 62
- PlanLimitConfig_DATABASE_GROUPS PlanLimitConfig_Feature = 63
- PlanLimitConfig_ENVIRONMENT_TIERS PlanLimitConfig_Feature = 64
- PlanLimitConfig_DASHBOARD_ANNOUNCEMENT PlanLimitConfig_Feature = 65
- PlanLimitConfig_API_INTEGRATION_GUIDANCE PlanLimitConfig_Feature = 66
- PlanLimitConfig_CUSTOM_LOGO PlanLimitConfig_Feature = 67
- PlanLimitConfig_WATERMARK PlanLimitConfig_Feature = 68
- PlanLimitConfig_ROADMAP_PRIORITIZATION PlanLimitConfig_Feature = 69
- PlanLimitConfig_CUSTOM_MSA PlanLimitConfig_Feature = 70
- PlanLimitConfig_COMMUNITY_SUPPORT PlanLimitConfig_Feature = 71
- PlanLimitConfig_EMAIL_SUPPORT PlanLimitConfig_Feature = 72
- PlanLimitConfig_DEDICATED_SUPPORT_WITH_SLA PlanLimitConfig_Feature = 73
+ PlanFeature_FEATURE_ENVIRONMENT_MANAGEMENT PlanFeature = 59
+ PlanFeature_FEATURE_IM_NOTIFICATIONS PlanFeature = 60
+ PlanFeature_FEATURE_TERRAFORM_PROVIDER PlanFeature = 61
+ PlanFeature_FEATURE_DATABASE_GROUPS PlanFeature = 62
+ PlanFeature_FEATURE_ENVIRONMENT_TIERS PlanFeature = 63
+ PlanFeature_FEATURE_DASHBOARD_ANNOUNCEMENT PlanFeature = 64
+ PlanFeature_FEATURE_API_INTEGRATION_GUIDANCE PlanFeature = 65
+ PlanFeature_FEATURE_CUSTOM_LOGO PlanFeature = 66
+ PlanFeature_FEATURE_WATERMARK PlanFeature = 67
+ PlanFeature_FEATURE_ROADMAP_PRIORITIZATION PlanFeature = 68
+ PlanFeature_FEATURE_CUSTOM_MSA PlanFeature = 69
+ PlanFeature_FEATURE_COMMUNITY_SUPPORT PlanFeature = 70
+ PlanFeature_FEATURE_EMAIL_SUPPORT PlanFeature = 71
+ PlanFeature_FEATURE_DEDICATED_SUPPORT_WITH_SLA PlanFeature = 72
)
-// Enum value maps for PlanLimitConfig_Feature.
+// Enum value maps for PlanFeature.
var (
- PlanLimitConfig_Feature_name = map[int32]string{
+ PlanFeature_name = map[int32]string{
0: "FEATURE_UNSPECIFIED",
- 1: "DATABASE_CHANGE",
- 2: "GIT_BASED_SCHEMA_VERSION_CONTROL",
- 3: "DECLARATIVE_SCHEMA_MIGRATION",
- 4: "COMPARE_AND_SYNC_SCHEMA",
- 5: "ONLINE_SCHEMA_CHANGE",
- 6: "PRE_DEPLOYMENT_SQL_REVIEW",
- 7: "AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES",
- 8: "ONE_CLICK_DATA_ROLLBACK",
- 9: "MULTI_DATABASE_BATCH_CHANGES",
- 10: "PROGRESSIVE_ENVIRONMENT_DEPLOYMENT",
- 11: "SCHEDULED_ROLLOUT_TIME",
- 12: "DATABASE_CHANGELOG",
- 13: "SCHEMA_DRIFT_DETECTION",
- 14: "CHANGELIST",
- 15: "SCHEMA_TEMPLATE",
- 16: "ROLLOUT_POLICY",
- 17: "WEB_BASED_SQL_EDITOR",
- 18: "SQL_EDITOR_ADMIN_MODE",
- 19: "NATURAL_LANGUAGE_TO_SQL",
- 20: "AI_QUERY_EXPLANATION",
- 21: "AI_QUERY_SUGGESTIONS",
- 22: "AUTO_COMPLETE",
- 23: "SCHEMA_DIAGRAM",
- 24: "SCHEMA_EDITOR",
- 25: "DATA_EXPORT",
- 26: "QUERY_HISTORY",
- 27: "SAVED_AND_SHARED_SQL_SCRIPTS",
- 28: "SQL_EDITOR_DDL_DML_RESTRICTION",
- 29: "BATCH_QUERY",
- 30: "INSTANCE_READ_ONLY_CONNECTION",
- 31: "RESTRICT_COPYING_DATA",
- 32: "IAM",
- 33: "INSTANCE_SSL_CONNECTION",
- 34: "INSTANCE_CONNECTION_OVER_SSH_TUNNEL",
- 35: "INSTANCE_CONNECTION_IAM_AUTHENTICATION",
- 36: "GOOGLE_AND_GITHUB_SSO",
- 37: "USER_GROUPS",
- 38: "DISALLOW_SELF_SERVICE_SIGNUP",
- 39: "DATABASE_SECRET_VARIABLES",
- 40: "QUERY_DATASOURCE_RESTRICTION",
- 41: "CUSTOM_INSTANCE_SYNC_TIME",
- 42: "CUSTOM_INSTANCE_CONNECTION_LIMIT",
- 43: "RISK_ASSESSMENT",
- 44: "APPROVAL_WORKFLOW",
- 45: "AUDIT_LOG",
- 46: "ENTERPRISE_SSO",
- 47: "TWO_FA",
- 48: "PASSWORD_RESTRICTIONS",
- 49: "DISALLOW_PASSWORD_SIGNIN",
- 50: "CUSTOM_ROLES",
- 51: "REQUEST_ROLE_WORKFLOW",
- 52: "DATA_MASKING",
- 53: "DATA_CLASSIFICATION",
- 54: "SCIM",
- 55: "DIRECTORY_SYNC_ENTRA_ID",
- 56: "DIRECTORY_SYNC_OKTA",
- 57: "SIGN_IN_FREQUENCY_CONTROL",
- 58: "EXTERNAL_SECRET_MANAGER",
- 59: "USER_EMAIL_DOMAIN_RESTRICTION",
- 60: "ENVIRONMENT_MANAGEMENT",
- 61: "IM_NOTIFICATIONS",
- 62: "TERRAFORM_PROVIDER",
- 63: "DATABASE_GROUPS",
- 64: "ENVIRONMENT_TIERS",
- 65: "DASHBOARD_ANNOUNCEMENT",
- 66: "API_INTEGRATION_GUIDANCE",
- 67: "CUSTOM_LOGO",
- 68: "WATERMARK",
- 69: "ROADMAP_PRIORITIZATION",
- 70: "CUSTOM_MSA",
- 71: "COMMUNITY_SUPPORT",
- 72: "EMAIL_SUPPORT",
- 73: "DEDICATED_SUPPORT_WITH_SLA",
- }
- PlanLimitConfig_Feature_value = map[string]int32{
- "FEATURE_UNSPECIFIED": 0,
- "DATABASE_CHANGE": 1,
- "GIT_BASED_SCHEMA_VERSION_CONTROL": 2,
- "DECLARATIVE_SCHEMA_MIGRATION": 3,
- "COMPARE_AND_SYNC_SCHEMA": 4,
- "ONLINE_SCHEMA_CHANGE": 5,
- "PRE_DEPLOYMENT_SQL_REVIEW": 6,
- "AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES": 7,
- "ONE_CLICK_DATA_ROLLBACK": 8,
- "MULTI_DATABASE_BATCH_CHANGES": 9,
- "PROGRESSIVE_ENVIRONMENT_DEPLOYMENT": 10,
- "SCHEDULED_ROLLOUT_TIME": 11,
- "DATABASE_CHANGELOG": 12,
- "SCHEMA_DRIFT_DETECTION": 13,
- "CHANGELIST": 14,
- "SCHEMA_TEMPLATE": 15,
- "ROLLOUT_POLICY": 16,
- "WEB_BASED_SQL_EDITOR": 17,
- "SQL_EDITOR_ADMIN_MODE": 18,
- "NATURAL_LANGUAGE_TO_SQL": 19,
- "AI_QUERY_EXPLANATION": 20,
- "AI_QUERY_SUGGESTIONS": 21,
- "AUTO_COMPLETE": 22,
- "SCHEMA_DIAGRAM": 23,
- "SCHEMA_EDITOR": 24,
- "DATA_EXPORT": 25,
- "QUERY_HISTORY": 26,
- "SAVED_AND_SHARED_SQL_SCRIPTS": 27,
- "SQL_EDITOR_DDL_DML_RESTRICTION": 28,
- "BATCH_QUERY": 29,
- "INSTANCE_READ_ONLY_CONNECTION": 30,
- "RESTRICT_COPYING_DATA": 31,
- "IAM": 32,
- "INSTANCE_SSL_CONNECTION": 33,
- "INSTANCE_CONNECTION_OVER_SSH_TUNNEL": 34,
- "INSTANCE_CONNECTION_IAM_AUTHENTICATION": 35,
- "GOOGLE_AND_GITHUB_SSO": 36,
- "USER_GROUPS": 37,
- "DISALLOW_SELF_SERVICE_SIGNUP": 38,
- "DATABASE_SECRET_VARIABLES": 39,
- "QUERY_DATASOURCE_RESTRICTION": 40,
- "CUSTOM_INSTANCE_SYNC_TIME": 41,
- "CUSTOM_INSTANCE_CONNECTION_LIMIT": 42,
- "RISK_ASSESSMENT": 43,
- "APPROVAL_WORKFLOW": 44,
- "AUDIT_LOG": 45,
- "ENTERPRISE_SSO": 46,
- "TWO_FA": 47,
- "PASSWORD_RESTRICTIONS": 48,
- "DISALLOW_PASSWORD_SIGNIN": 49,
- "CUSTOM_ROLES": 50,
- "REQUEST_ROLE_WORKFLOW": 51,
- "DATA_MASKING": 52,
- "DATA_CLASSIFICATION": 53,
- "SCIM": 54,
- "DIRECTORY_SYNC_ENTRA_ID": 55,
- "DIRECTORY_SYNC_OKTA": 56,
- "SIGN_IN_FREQUENCY_CONTROL": 57,
- "EXTERNAL_SECRET_MANAGER": 58,
- "USER_EMAIL_DOMAIN_RESTRICTION": 59,
- "ENVIRONMENT_MANAGEMENT": 60,
- "IM_NOTIFICATIONS": 61,
- "TERRAFORM_PROVIDER": 62,
- "DATABASE_GROUPS": 63,
- "ENVIRONMENT_TIERS": 64,
- "DASHBOARD_ANNOUNCEMENT": 65,
- "API_INTEGRATION_GUIDANCE": 66,
- "CUSTOM_LOGO": 67,
- "WATERMARK": 68,
- "ROADMAP_PRIORITIZATION": 69,
- "CUSTOM_MSA": 70,
- "COMMUNITY_SUPPORT": 71,
- "EMAIL_SUPPORT": 72,
- "DEDICATED_SUPPORT_WITH_SLA": 73,
+ 1: "FEATURE_DATABASE_CHANGE",
+ 2: "FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL",
+ 3: "FEATURE_DECLARATIVE_SCHEMA_MIGRATION",
+ 4: "FEATURE_COMPARE_AND_SYNC_SCHEMA",
+ 5: "FEATURE_ONLINE_SCHEMA_CHANGE",
+ 6: "FEATURE_PRE_DEPLOYMENT_SQL_REVIEW",
+ 7: "FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES",
+ 8: "FEATURE_ONE_CLICK_DATA_ROLLBACK",
+ 9: "FEATURE_MULTI_DATABASE_BATCH_CHANGES",
+ 10: "FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT",
+ 11: "FEATURE_SCHEDULED_ROLLOUT_TIME",
+ 12: "FEATURE_DATABASE_CHANGELOG",
+ 13: "FEATURE_SCHEMA_DRIFT_DETECTION",
+ 14: "FEATURE_CHANGELIST",
+ 15: "FEATURE_SCHEMA_TEMPLATE",
+ 16: "FEATURE_ROLLOUT_POLICY",
+ 17: "FEATURE_WEB_BASED_SQL_EDITOR",
+ 18: "FEATURE_SQL_EDITOR_ADMIN_MODE",
+ 19: "FEATURE_NATURAL_LANGUAGE_TO_SQL",
+ 20: "FEATURE_AI_QUERY_EXPLANATION",
+ 21: "FEATURE_AI_QUERY_SUGGESTIONS",
+ 22: "FEATURE_AUTO_COMPLETE",
+ 23: "FEATURE_SCHEMA_DIAGRAM",
+ 24: "FEATURE_SCHEMA_EDITOR",
+ 25: "FEATURE_DATA_EXPORT",
+ 26: "FEATURE_QUERY_HISTORY",
+ 27: "FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS",
+ 28: "FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION",
+ 29: "FEATURE_BATCH_QUERY",
+ 30: "FEATURE_INSTANCE_READ_ONLY_CONNECTION",
+ 31: "FEATURE_RESTRICT_COPYING_DATA",
+ 32: "FEATURE_IAM",
+ 33: "FEATURE_INSTANCE_SSL_CONNECTION",
+ 34: "FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL",
+ 35: "FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION",
+ 36: "FEATURE_GOOGLE_AND_GITHUB_SSO",
+ 37: "FEATURE_USER_GROUPS",
+ 38: "FEATURE_DISALLOW_SELF_SERVICE_SIGNUP",
+ 39: "FEATURE_DATABASE_SECRET_VARIABLES",
+ 40: "FEATURE_QUERY_DATASOURCE_RESTRICTION",
+ 41: "FEATURE_CUSTOM_INSTANCE_SYNC_TIME",
+ 42: "FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT",
+ 43: "FEATURE_RISK_ASSESSMENT",
+ 44: "FEATURE_APPROVAL_WORKFLOW",
+ 45: "FEATURE_AUDIT_LOG",
+ 46: "FEATURE_ENTERPRISE_SSO",
+ 47: "FEATURE_TWO_FA",
+ 48: "FEATURE_PASSWORD_RESTRICTIONS",
+ 49: "FEATURE_DISALLOW_PASSWORD_SIGNIN",
+ 50: "FEATURE_CUSTOM_ROLES",
+ 51: "FEATURE_REQUEST_ROLE_WORKFLOW",
+ 52: "FEATURE_DATA_MASKING",
+ 53: "FEATURE_DATA_CLASSIFICATION",
+ 54: "FEATURE_SCIM",
+ 55: "FEATURE_DIRECTORY_SYNC",
+ 56: "FEATURE_SIGN_IN_FREQUENCY_CONTROL",
+ 57: "FEATURE_EXTERNAL_SECRET_MANAGER",
+ 58: "FEATURE_USER_EMAIL_DOMAIN_RESTRICTION",
+ 59: "FEATURE_ENVIRONMENT_MANAGEMENT",
+ 60: "FEATURE_IM_NOTIFICATIONS",
+ 61: "FEATURE_TERRAFORM_PROVIDER",
+ 62: "FEATURE_DATABASE_GROUPS",
+ 63: "FEATURE_ENVIRONMENT_TIERS",
+ 64: "FEATURE_DASHBOARD_ANNOUNCEMENT",
+ 65: "FEATURE_API_INTEGRATION_GUIDANCE",
+ 66: "FEATURE_CUSTOM_LOGO",
+ 67: "FEATURE_WATERMARK",
+ 68: "FEATURE_ROADMAP_PRIORITIZATION",
+ 69: "FEATURE_CUSTOM_MSA",
+ 70: "FEATURE_COMMUNITY_SUPPORT",
+ 71: "FEATURE_EMAIL_SUPPORT",
+ 72: "FEATURE_DEDICATED_SUPPORT_WITH_SLA",
+ }
+ PlanFeature_value = map[string]int32{
+ "FEATURE_UNSPECIFIED": 0,
+ "FEATURE_DATABASE_CHANGE": 1,
+ "FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL": 2,
+ "FEATURE_DECLARATIVE_SCHEMA_MIGRATION": 3,
+ "FEATURE_COMPARE_AND_SYNC_SCHEMA": 4,
+ "FEATURE_ONLINE_SCHEMA_CHANGE": 5,
+ "FEATURE_PRE_DEPLOYMENT_SQL_REVIEW": 6,
+ "FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES": 7,
+ "FEATURE_ONE_CLICK_DATA_ROLLBACK": 8,
+ "FEATURE_MULTI_DATABASE_BATCH_CHANGES": 9,
+ "FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT": 10,
+ "FEATURE_SCHEDULED_ROLLOUT_TIME": 11,
+ "FEATURE_DATABASE_CHANGELOG": 12,
+ "FEATURE_SCHEMA_DRIFT_DETECTION": 13,
+ "FEATURE_CHANGELIST": 14,
+ "FEATURE_SCHEMA_TEMPLATE": 15,
+ "FEATURE_ROLLOUT_POLICY": 16,
+ "FEATURE_WEB_BASED_SQL_EDITOR": 17,
+ "FEATURE_SQL_EDITOR_ADMIN_MODE": 18,
+ "FEATURE_NATURAL_LANGUAGE_TO_SQL": 19,
+ "FEATURE_AI_QUERY_EXPLANATION": 20,
+ "FEATURE_AI_QUERY_SUGGESTIONS": 21,
+ "FEATURE_AUTO_COMPLETE": 22,
+ "FEATURE_SCHEMA_DIAGRAM": 23,
+ "FEATURE_SCHEMA_EDITOR": 24,
+ "FEATURE_DATA_EXPORT": 25,
+ "FEATURE_QUERY_HISTORY": 26,
+ "FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS": 27,
+ "FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION": 28,
+ "FEATURE_BATCH_QUERY": 29,
+ "FEATURE_INSTANCE_READ_ONLY_CONNECTION": 30,
+ "FEATURE_RESTRICT_COPYING_DATA": 31,
+ "FEATURE_IAM": 32,
+ "FEATURE_INSTANCE_SSL_CONNECTION": 33,
+ "FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL": 34,
+ "FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION": 35,
+ "FEATURE_GOOGLE_AND_GITHUB_SSO": 36,
+ "FEATURE_USER_GROUPS": 37,
+ "FEATURE_DISALLOW_SELF_SERVICE_SIGNUP": 38,
+ "FEATURE_DATABASE_SECRET_VARIABLES": 39,
+ "FEATURE_QUERY_DATASOURCE_RESTRICTION": 40,
+ "FEATURE_CUSTOM_INSTANCE_SYNC_TIME": 41,
+ "FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT": 42,
+ "FEATURE_RISK_ASSESSMENT": 43,
+ "FEATURE_APPROVAL_WORKFLOW": 44,
+ "FEATURE_AUDIT_LOG": 45,
+ "FEATURE_ENTERPRISE_SSO": 46,
+ "FEATURE_TWO_FA": 47,
+ "FEATURE_PASSWORD_RESTRICTIONS": 48,
+ "FEATURE_DISALLOW_PASSWORD_SIGNIN": 49,
+ "FEATURE_CUSTOM_ROLES": 50,
+ "FEATURE_REQUEST_ROLE_WORKFLOW": 51,
+ "FEATURE_DATA_MASKING": 52,
+ "FEATURE_DATA_CLASSIFICATION": 53,
+ "FEATURE_SCIM": 54,
+ "FEATURE_DIRECTORY_SYNC": 55,
+ "FEATURE_SIGN_IN_FREQUENCY_CONTROL": 56,
+ "FEATURE_EXTERNAL_SECRET_MANAGER": 57,
+ "FEATURE_USER_EMAIL_DOMAIN_RESTRICTION": 58,
+ "FEATURE_ENVIRONMENT_MANAGEMENT": 59,
+ "FEATURE_IM_NOTIFICATIONS": 60,
+ "FEATURE_TERRAFORM_PROVIDER": 61,
+ "FEATURE_DATABASE_GROUPS": 62,
+ "FEATURE_ENVIRONMENT_TIERS": 63,
+ "FEATURE_DASHBOARD_ANNOUNCEMENT": 64,
+ "FEATURE_API_INTEGRATION_GUIDANCE": 65,
+ "FEATURE_CUSTOM_LOGO": 66,
+ "FEATURE_WATERMARK": 67,
+ "FEATURE_ROADMAP_PRIORITIZATION": 68,
+ "FEATURE_CUSTOM_MSA": 69,
+ "FEATURE_COMMUNITY_SUPPORT": 70,
+ "FEATURE_EMAIL_SUPPORT": 71,
+ "FEATURE_DEDICATED_SUPPORT_WITH_SLA": 72,
}
)
-func (x PlanLimitConfig_Feature) Enum() *PlanLimitConfig_Feature {
- p := new(PlanLimitConfig_Feature)
+func (x PlanFeature) Enum() *PlanFeature {
+ p := new(PlanFeature)
*p = x
return p
}
-func (x PlanLimitConfig_Feature) String() string {
+func (x PlanFeature) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
-func (PlanLimitConfig_Feature) Descriptor() protoreflect.EnumDescriptor {
+func (PlanFeature) Descriptor() protoreflect.EnumDescriptor {
return file_v1_subscription_service_proto_enumTypes[1].Descriptor()
}
-func (PlanLimitConfig_Feature) Type() protoreflect.EnumType {
+func (PlanFeature) Type() protoreflect.EnumType {
return &file_v1_subscription_service_proto_enumTypes[1]
}
-func (x PlanLimitConfig_Feature) Number() protoreflect.EnumNumber {
+func (x PlanFeature) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
-// Deprecated: Use PlanLimitConfig_Feature.Descriptor instead.
-func (PlanLimitConfig_Feature) EnumDescriptor() ([]byte, []int) {
- return file_v1_subscription_service_proto_rawDescGZIP(), []int{8, 0}
+// Deprecated: Use PlanFeature.Descriptor instead.
+func (PlanFeature) EnumDescriptor() ([]byte, []int) {
+ return file_v1_subscription_service_proto_rawDescGZIP(), []int{1}
}
type GetSubscriptionRequest struct {
@@ -747,11 +744,11 @@ func (x *PlanConfig) GetPlans() []*PlanLimitConfig {
// PlanLimitConfig represents a single plan's configuration
type PlanLimitConfig struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Type PlanType `protobuf:"varint,1,opt,name=type,proto3,enum=bytebase.v1.PlanType" json:"type,omitempty"`
- MaximumInstanceCount int32 `protobuf:"varint,2,opt,name=maximum_instance_count,json=maximumInstanceCount,proto3" json:"maximum_instance_count,omitempty"`
- MaximumSeatCount int32 `protobuf:"varint,3,opt,name=maximum_seat_count,json=maximumSeatCount,proto3" json:"maximum_seat_count,omitempty"`
- Features []PlanLimitConfig_Feature `protobuf:"varint,4,rep,packed,name=features,proto3,enum=bytebase.v1.PlanLimitConfig_Feature" json:"features,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Type PlanType `protobuf:"varint,1,opt,name=type,proto3,enum=bytebase.v1.PlanType" json:"type,omitempty"`
+ MaximumInstanceCount int32 `protobuf:"varint,2,opt,name=maximum_instance_count,json=maximumInstanceCount,proto3" json:"maximum_instance_count,omitempty"`
+ MaximumSeatCount int32 `protobuf:"varint,3,opt,name=maximum_seat_count,json=maximumSeatCount,proto3" json:"maximum_seat_count,omitempty"`
+ Features []PlanFeature `protobuf:"varint,4,rep,packed,name=features,proto3,enum=bytebase.v1.PlanFeature" json:"features,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -807,7 +804,7 @@ func (x *PlanLimitConfig) GetMaximumSeatCount() int32 {
return 0
}
-func (x *PlanLimitConfig) GetFeatures() []PlanLimitConfig_Feature {
+func (x *PlanLimitConfig) GetFeatures() []PlanFeature {
if x != nil {
return x.Features
}
@@ -845,97 +842,93 @@ const file_v1_subscription_service_proto_rawDesc = "" +
"\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\"@\n" +
"\n" +
"PlanConfig\x122\n" +
- "\x05plans\x18\x01 \x03(\v2\x1c.bytebase.v1.PlanLimitConfigR\x05plans\"\xed\x10\n" +
+ "\x05plans\x18\x01 \x03(\v2\x1c.bytebase.v1.PlanLimitConfigR\x05plans\"\xd6\x01\n" +
"\x0fPlanLimitConfig\x12)\n" +
"\x04type\x18\x01 \x01(\x0e2\x15.bytebase.v1.PlanTypeR\x04type\x124\n" +
"\x16maximum_instance_count\x18\x02 \x01(\x05R\x14maximumInstanceCount\x12,\n" +
- "\x12maximum_seat_count\x18\x03 \x01(\x05R\x10maximumSeatCount\x12@\n" +
- "\bfeatures\x18\x04 \x03(\x0e2$.bytebase.v1.PlanLimitConfig.FeatureR\bfeatures\"\x88\x0f\n" +
- "\aFeature\x12\x17\n" +
- "\x13FEATURE_UNSPECIFIED\x10\x00\x12\x13\n" +
- "\x0fDATABASE_CHANGE\x10\x01\x12$\n" +
- " GIT_BASED_SCHEMA_VERSION_CONTROL\x10\x02\x12 \n" +
- "\x1cDECLARATIVE_SCHEMA_MIGRATION\x10\x03\x12\x1b\n" +
- "\x17COMPARE_AND_SYNC_SCHEMA\x10\x04\x12\x18\n" +
- "\x14ONLINE_SCHEMA_CHANGE\x10\x05\x12\x1d\n" +
- "\x19PRE_DEPLOYMENT_SQL_REVIEW\x10\x06\x12(\n" +
- "$AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES\x10\a\x12\x1b\n" +
- "\x17ONE_CLICK_DATA_ROLLBACK\x10\b\x12 \n" +
- "\x1cMULTI_DATABASE_BATCH_CHANGES\x10\t\x12&\n" +
- "\"PROGRESSIVE_ENVIRONMENT_DEPLOYMENT\x10\n" +
- "\x12\x1a\n" +
- "\x16SCHEDULED_ROLLOUT_TIME\x10\v\x12\x16\n" +
- "\x12DATABASE_CHANGELOG\x10\f\x12\x1a\n" +
- "\x16SCHEMA_DRIFT_DETECTION\x10\r\x12\x0e\n" +
- "\n" +
- "CHANGELIST\x10\x0e\x12\x13\n" +
- "\x0fSCHEMA_TEMPLATE\x10\x0f\x12\x12\n" +
- "\x0eROLLOUT_POLICY\x10\x10\x12\x18\n" +
- "\x14WEB_BASED_SQL_EDITOR\x10\x11\x12\x19\n" +
- "\x15SQL_EDITOR_ADMIN_MODE\x10\x12\x12\x1b\n" +
- "\x17NATURAL_LANGUAGE_TO_SQL\x10\x13\x12\x18\n" +
- "\x14AI_QUERY_EXPLANATION\x10\x14\x12\x18\n" +
- "\x14AI_QUERY_SUGGESTIONS\x10\x15\x12\x11\n" +
- "\rAUTO_COMPLETE\x10\x16\x12\x12\n" +
- "\x0eSCHEMA_DIAGRAM\x10\x17\x12\x11\n" +
- "\rSCHEMA_EDITOR\x10\x18\x12\x0f\n" +
- "\vDATA_EXPORT\x10\x19\x12\x11\n" +
- "\rQUERY_HISTORY\x10\x1a\x12 \n" +
- "\x1cSAVED_AND_SHARED_SQL_SCRIPTS\x10\x1b\x12\"\n" +
- "\x1eSQL_EDITOR_DDL_DML_RESTRICTION\x10\x1c\x12\x0f\n" +
- "\vBATCH_QUERY\x10\x1d\x12!\n" +
- "\x1dINSTANCE_READ_ONLY_CONNECTION\x10\x1e\x12\x19\n" +
- "\x15RESTRICT_COPYING_DATA\x10\x1f\x12\a\n" +
- "\x03IAM\x10 \x12\x1b\n" +
- "\x17INSTANCE_SSL_CONNECTION\x10!\x12'\n" +
- "#INSTANCE_CONNECTION_OVER_SSH_TUNNEL\x10\"\x12*\n" +
- "&INSTANCE_CONNECTION_IAM_AUTHENTICATION\x10#\x12\x19\n" +
- "\x15GOOGLE_AND_GITHUB_SSO\x10$\x12\x0f\n" +
- "\vUSER_GROUPS\x10%\x12 \n" +
- "\x1cDISALLOW_SELF_SERVICE_SIGNUP\x10&\x12\x1d\n" +
- "\x19DATABASE_SECRET_VARIABLES\x10'\x12 \n" +
- "\x1cQUERY_DATASOURCE_RESTRICTION\x10(\x12\x1d\n" +
- "\x19CUSTOM_INSTANCE_SYNC_TIME\x10)\x12$\n" +
- " CUSTOM_INSTANCE_CONNECTION_LIMIT\x10*\x12\x13\n" +
- "\x0fRISK_ASSESSMENT\x10+\x12\x15\n" +
- "\x11APPROVAL_WORKFLOW\x10,\x12\r\n" +
- "\tAUDIT_LOG\x10-\x12\x12\n" +
- "\x0eENTERPRISE_SSO\x10.\x12\n" +
- "\n" +
- "\x06TWO_FA\x10/\x12\x19\n" +
- "\x15PASSWORD_RESTRICTIONS\x100\x12\x1c\n" +
- "\x18DISALLOW_PASSWORD_SIGNIN\x101\x12\x10\n" +
- "\fCUSTOM_ROLES\x102\x12\x19\n" +
- "\x15REQUEST_ROLE_WORKFLOW\x103\x12\x10\n" +
- "\fDATA_MASKING\x104\x12\x17\n" +
- "\x13DATA_CLASSIFICATION\x105\x12\b\n" +
- "\x04SCIM\x106\x12\x1b\n" +
- "\x17DIRECTORY_SYNC_ENTRA_ID\x107\x12\x17\n" +
- "\x13DIRECTORY_SYNC_OKTA\x108\x12\x1d\n" +
- "\x19SIGN_IN_FREQUENCY_CONTROL\x109\x12\x1b\n" +
- "\x17EXTERNAL_SECRET_MANAGER\x10:\x12!\n" +
- "\x1dUSER_EMAIL_DOMAIN_RESTRICTION\x10;\x12\x1a\n" +
- "\x16ENVIRONMENT_MANAGEMENT\x10<\x12\x14\n" +
- "\x10IM_NOTIFICATIONS\x10=\x12\x16\n" +
- "\x12TERRAFORM_PROVIDER\x10>\x12\x13\n" +
- "\x0fDATABASE_GROUPS\x10?\x12\x15\n" +
- "\x11ENVIRONMENT_TIERS\x10@\x12\x1a\n" +
- "\x16DASHBOARD_ANNOUNCEMENT\x10A\x12\x1c\n" +
- "\x18API_INTEGRATION_GUIDANCE\x10B\x12\x0f\n" +
- "\vCUSTOM_LOGO\x10C\x12\r\n" +
- "\tWATERMARK\x10D\x12\x1a\n" +
- "\x16ROADMAP_PRIORITIZATION\x10E\x12\x0e\n" +
- "\n" +
- "CUSTOM_MSA\x10F\x12\x15\n" +
- "\x11COMMUNITY_SUPPORT\x10G\x12\x11\n" +
- "\rEMAIL_SUPPORT\x10H\x12\x1e\n" +
- "\x1aDEDICATED_SUPPORT_WITH_SLA\x10I*I\n" +
+ "\x12maximum_seat_count\x18\x03 \x01(\x05R\x10maximumSeatCount\x124\n" +
+ "\bfeatures\x18\x04 \x03(\x0e2\x18.bytebase.v1.PlanFeatureR\bfeatures*I\n" +
"\bPlanType\x12\x19\n" +
"\x15PLAN_TYPE_UNSPECIFIED\x10\x00\x12\b\n" +
"\x04FREE\x10\x01\x12\b\n" +
"\x04TEAM\x10\x02\x12\x0e\n" +
"\n" +
- "ENTERPRISE\x10\x032\x95\x03\n" +
+ "ENTERPRISE\x10\x03*\xaa\x13\n" +
+ "\vPlanFeature\x12\x17\n" +
+ "\x13FEATURE_UNSPECIFIED\x10\x00\x12\x1b\n" +
+ "\x17FEATURE_DATABASE_CHANGE\x10\x01\x12,\n" +
+ "(FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL\x10\x02\x12(\n" +
+ "$FEATURE_DECLARATIVE_SCHEMA_MIGRATION\x10\x03\x12#\n" +
+ "\x1fFEATURE_COMPARE_AND_SYNC_SCHEMA\x10\x04\x12 \n" +
+ "\x1cFEATURE_ONLINE_SCHEMA_CHANGE\x10\x05\x12%\n" +
+ "!FEATURE_PRE_DEPLOYMENT_SQL_REVIEW\x10\x06\x120\n" +
+ ",FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES\x10\a\x12#\n" +
+ "\x1fFEATURE_ONE_CLICK_DATA_ROLLBACK\x10\b\x12(\n" +
+ "$FEATURE_MULTI_DATABASE_BATCH_CHANGES\x10\t\x12.\n" +
+ "*FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT\x10\n" +
+ "\x12\"\n" +
+ "\x1eFEATURE_SCHEDULED_ROLLOUT_TIME\x10\v\x12\x1e\n" +
+ "\x1aFEATURE_DATABASE_CHANGELOG\x10\f\x12\"\n" +
+ "\x1eFEATURE_SCHEMA_DRIFT_DETECTION\x10\r\x12\x16\n" +
+ "\x12FEATURE_CHANGELIST\x10\x0e\x12\x1b\n" +
+ "\x17FEATURE_SCHEMA_TEMPLATE\x10\x0f\x12\x1a\n" +
+ "\x16FEATURE_ROLLOUT_POLICY\x10\x10\x12 \n" +
+ "\x1cFEATURE_WEB_BASED_SQL_EDITOR\x10\x11\x12!\n" +
+ "\x1dFEATURE_SQL_EDITOR_ADMIN_MODE\x10\x12\x12#\n" +
+ "\x1fFEATURE_NATURAL_LANGUAGE_TO_SQL\x10\x13\x12 \n" +
+ "\x1cFEATURE_AI_QUERY_EXPLANATION\x10\x14\x12 \n" +
+ "\x1cFEATURE_AI_QUERY_SUGGESTIONS\x10\x15\x12\x19\n" +
+ "\x15FEATURE_AUTO_COMPLETE\x10\x16\x12\x1a\n" +
+ "\x16FEATURE_SCHEMA_DIAGRAM\x10\x17\x12\x19\n" +
+ "\x15FEATURE_SCHEMA_EDITOR\x10\x18\x12\x17\n" +
+ "\x13FEATURE_DATA_EXPORT\x10\x19\x12\x19\n" +
+ "\x15FEATURE_QUERY_HISTORY\x10\x1a\x12(\n" +
+ "$FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS\x10\x1b\x12*\n" +
+ "&FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION\x10\x1c\x12\x17\n" +
+ "\x13FEATURE_BATCH_QUERY\x10\x1d\x12)\n" +
+ "%FEATURE_INSTANCE_READ_ONLY_CONNECTION\x10\x1e\x12!\n" +
+ "\x1dFEATURE_RESTRICT_COPYING_DATA\x10\x1f\x12\x0f\n" +
+ "\vFEATURE_IAM\x10 \x12#\n" +
+ "\x1fFEATURE_INSTANCE_SSL_CONNECTION\x10!\x12/\n" +
+ "+FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL\x10\"\x122\n" +
+ ".FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION\x10#\x12!\n" +
+ "\x1dFEATURE_GOOGLE_AND_GITHUB_SSO\x10$\x12\x17\n" +
+ "\x13FEATURE_USER_GROUPS\x10%\x12(\n" +
+ "$FEATURE_DISALLOW_SELF_SERVICE_SIGNUP\x10&\x12%\n" +
+ "!FEATURE_DATABASE_SECRET_VARIABLES\x10'\x12(\n" +
+ "$FEATURE_QUERY_DATASOURCE_RESTRICTION\x10(\x12%\n" +
+ "!FEATURE_CUSTOM_INSTANCE_SYNC_TIME\x10)\x12,\n" +
+ "(FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT\x10*\x12\x1b\n" +
+ "\x17FEATURE_RISK_ASSESSMENT\x10+\x12\x1d\n" +
+ "\x19FEATURE_APPROVAL_WORKFLOW\x10,\x12\x15\n" +
+ "\x11FEATURE_AUDIT_LOG\x10-\x12\x1a\n" +
+ "\x16FEATURE_ENTERPRISE_SSO\x10.\x12\x12\n" +
+ "\x0eFEATURE_TWO_FA\x10/\x12!\n" +
+ "\x1dFEATURE_PASSWORD_RESTRICTIONS\x100\x12$\n" +
+ " FEATURE_DISALLOW_PASSWORD_SIGNIN\x101\x12\x18\n" +
+ "\x14FEATURE_CUSTOM_ROLES\x102\x12!\n" +
+ "\x1dFEATURE_REQUEST_ROLE_WORKFLOW\x103\x12\x18\n" +
+ "\x14FEATURE_DATA_MASKING\x104\x12\x1f\n" +
+ "\x1bFEATURE_DATA_CLASSIFICATION\x105\x12\x10\n" +
+ "\fFEATURE_SCIM\x106\x12\x1a\n" +
+ "\x16FEATURE_DIRECTORY_SYNC\x107\x12%\n" +
+ "!FEATURE_SIGN_IN_FREQUENCY_CONTROL\x108\x12#\n" +
+ "\x1fFEATURE_EXTERNAL_SECRET_MANAGER\x109\x12)\n" +
+ "%FEATURE_USER_EMAIL_DOMAIN_RESTRICTION\x10:\x12\"\n" +
+ "\x1eFEATURE_ENVIRONMENT_MANAGEMENT\x10;\x12\x1c\n" +
+ "\x18FEATURE_IM_NOTIFICATIONS\x10<\x12\x1e\n" +
+ "\x1aFEATURE_TERRAFORM_PROVIDER\x10=\x12\x1b\n" +
+ "\x17FEATURE_DATABASE_GROUPS\x10>\x12\x1d\n" +
+ "\x19FEATURE_ENVIRONMENT_TIERS\x10?\x12\"\n" +
+ "\x1eFEATURE_DASHBOARD_ANNOUNCEMENT\x10@\x12$\n" +
+ " FEATURE_API_INTEGRATION_GUIDANCE\x10A\x12\x17\n" +
+ "\x13FEATURE_CUSTOM_LOGO\x10B\x12\x15\n" +
+ "\x11FEATURE_WATERMARK\x10C\x12\"\n" +
+ "\x1eFEATURE_ROADMAP_PRIORITIZATION\x10D\x12\x16\n" +
+ "\x12FEATURE_CUSTOM_MSA\x10E\x12\x1d\n" +
+ "\x19FEATURE_COMMUNITY_SUPPORT\x10F\x12\x19\n" +
+ "\x15FEATURE_EMAIL_SUPPORT\x10G\x12&\n" +
+ "\"FEATURE_DEDICATED_SUPPORT_WITH_SLA\x10H2\x95\x03\n" +
"\x13SubscriptionService\x12r\n" +
"\x0fGetSubscription\x12#.bytebase.v1.GetSubscriptionRequest\x1a\x19.bytebase.v1.Subscription\"\x1f\xdaA\x00\x80\xea0\x01\x82\xd3\xe4\x93\x02\x12\x12\x10/v1/subscription\x12p\n" +
"\x10GetFeatureMatrix\x12$.bytebase.v1.GetFeatureMatrixRequest\x1a\x1a.bytebase.v1.FeatureMatrix\"\x1a\xdaA\x00\x80\xea0\x01\x82\xd3\xe4\x93\x02\r\x12\v/v1/feature\x12\x97\x01\n" +
@@ -957,7 +950,7 @@ var file_v1_subscription_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_v1_subscription_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_v1_subscription_service_proto_goTypes = []any{
(PlanType)(0), // 0: bytebase.v1.PlanType
- (PlanLimitConfig_Feature)(0), // 1: bytebase.v1.PlanLimitConfig.Feature
+ (PlanFeature)(0), // 1: bytebase.v1.PlanFeature
(*GetSubscriptionRequest)(nil), // 2: bytebase.v1.GetSubscriptionRequest
(*GetFeatureMatrixRequest)(nil), // 3: bytebase.v1.GetFeatureMatrixRequest
(*UpdateSubscriptionRequest)(nil), // 4: bytebase.v1.UpdateSubscriptionRequest
@@ -979,7 +972,7 @@ var file_v1_subscription_service_proto_depIdxs = []int32{
11, // 5: bytebase.v1.Feature.matrix:type_name -> bytebase.v1.Feature.MatrixEntry
10, // 6: bytebase.v1.PlanConfig.plans:type_name -> bytebase.v1.PlanLimitConfig
0, // 7: bytebase.v1.PlanLimitConfig.type:type_name -> bytebase.v1.PlanType
- 1, // 8: bytebase.v1.PlanLimitConfig.features:type_name -> bytebase.v1.PlanLimitConfig.Feature
+ 1, // 8: bytebase.v1.PlanLimitConfig.features:type_name -> bytebase.v1.PlanFeature
2, // 9: bytebase.v1.SubscriptionService.GetSubscription:input_type -> bytebase.v1.GetSubscriptionRequest
3, // 10: bytebase.v1.SubscriptionService.GetFeatureMatrix:input_type -> bytebase.v1.GetFeatureMatrixRequest
4, // 11: bytebase.v1.SubscriptionService.UpdateSubscription:input_type -> bytebase.v1.UpdateSubscriptionRequest
diff --git a/proto/v1/v1/subscription_service.proto b/proto/v1/v1/subscription_service.proto
index cdb59ab696..ab97550a7a 100644
--- a/proto/v1/v1/subscription_service.proto
+++ b/proto/v1/v1/subscription_service.proto
@@ -86,6 +86,91 @@ message Feature {
map<string, bool> matrix = 2;
}
+// PlanFeature represents the available features in Bytebase
+enum PlanFeature {
+ FEATURE_UNSPECIFIED = 0;
+
+ // Database Change Management
+ FEATURE_DATABASE_CHANGE = 1;
+ FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL = 2;
+ FEATURE_DECLARATIVE_SCHEMA_MIGRATION = 3;
+ FEATURE_COMPARE_AND_SYNC_SCHEMA = 4;
+ FEATURE_ONLINE_SCHEMA_CHANGE = 5;
+ FEATURE_PRE_DEPLOYMENT_SQL_REVIEW = 6;
+ FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES = 7;
+ FEATURE_ONE_CLICK_DATA_ROLLBACK = 8;
+ FEATURE_MULTI_DATABASE_BATCH_CHANGES = 9;
+ FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT = 10;
+ FEATURE_SCHEDULED_ROLLOUT_TIME = 11;
+ FEATURE_DATABASE_CHANGELOG = 12;
+ FEATURE_SCHEMA_DRIFT_DETECTION = 13;
+ FEATURE_CHANGELIST = 14;
+ FEATURE_SCHEMA_TEMPLATE = 15;
+ FEATURE_ROLLOUT_POLICY = 16;
+
+ // SQL Editor & Development
+ FEATURE_WEB_BASED_SQL_EDITOR = 17;
+ FEATURE_SQL_EDITOR_ADMIN_MODE = 18;
+ FEATURE_NATURAL_LANGUAGE_TO_SQL = 19;
+ FEATURE_AI_QUERY_EXPLANATION = 20;
+ FEATURE_AI_QUERY_SUGGESTIONS = 21;
+ FEATURE_AUTO_COMPLETE = 22;
+ FEATURE_SCHEMA_DIAGRAM = 23;
+ FEATURE_SCHEMA_EDITOR = 24;
+ FEATURE_DATA_EXPORT = 25;
+ FEATURE_QUERY_HISTORY = 26;
+ FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS = 27;
+ FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION = 28;
+ FEATURE_BATCH_QUERY = 29;
+ FEATURE_INSTANCE_READ_ONLY_CONNECTION = 30;
+ FEATURE_RESTRICT_COPYING_DATA = 31;
+
+ // Security & Compliance
+ FEATURE_IAM = 32;
+ FEATURE_INSTANCE_SSL_CONNECTION = 33;
+ FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL = 34;
+ FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION = 35;
+ FEATURE_GOOGLE_AND_GITHUB_SSO = 36;
+ FEATURE_USER_GROUPS = 37;
+ FEATURE_DISALLOW_SELF_SERVICE_SIGNUP = 38;
+ FEATURE_DATABASE_SECRET_VARIABLES = 39;
+ FEATURE_QUERY_DATASOURCE_RESTRICTION = 40;
+ FEATURE_CUSTOM_INSTANCE_SYNC_TIME = 41;
+ FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT = 42;
+ FEATURE_RISK_ASSESSMENT = 43;
+ FEATURE_APPROVAL_WORKFLOW = 44;
+ FEATURE_AUDIT_LOG = 45;
+ FEATURE_ENTERPRISE_SSO = 46;
+ FEATURE_TWO_FA = 47;
+ FEATURE_PASSWORD_RESTRICTIONS = 48;
+ FEATURE_DISALLOW_PASSWORD_SIGNIN = 49;
+ FEATURE_CUSTOM_ROLES = 50;
+ FEATURE_REQUEST_ROLE_WORKFLOW = 51;
+ FEATURE_DATA_MASKING = 52;
+ FEATURE_DATA_CLASSIFICATION = 53;
+ FEATURE_SCIM = 54;
+ FEATURE_DIRECTORY_SYNC = 55;
+ FEATURE_SIGN_IN_FREQUENCY_CONTROL = 56;
+ FEATURE_EXTERNAL_SECRET_MANAGER = 57;
+ FEATURE_USER_EMAIL_DOMAIN_RESTRICTION = 58;
+
+ // Administration & Support
+ FEATURE_ENVIRONMENT_MANAGEMENT = 59;
+ FEATURE_IM_NOTIFICATIONS = 60;
+ FEATURE_TERRAFORM_PROVIDER = 61;
+ FEATURE_DATABASE_GROUPS = 62;
+ FEATURE_ENVIRONMENT_TIERS = 63;
+ FEATURE_DASHBOARD_ANNOUNCEMENT = 64;
+ FEATURE_API_INTEGRATION_GUIDANCE = 65;
+ FEATURE_CUSTOM_LOGO = 66;
+ FEATURE_WATERMARK = 67;
+ FEATURE_ROADMAP_PRIORITIZATION = 68;
+ FEATURE_CUSTOM_MSA = 69;
+ FEATURE_COMMUNITY_SUPPORT = 70;
+ FEATURE_EMAIL_SUPPORT = 71;
+ FEATURE_DEDICATED_SUPPORT_WITH_SLA = 72;
+}
+
// PlanConfig represents the configuration for all plans loaded from plan.yaml
message PlanConfig {
repeated PlanLimitConfig plans = 1;
@@ -93,94 +178,8 @@ message PlanConfig {
// PlanLimitConfig represents a single plan's configuration
message PlanLimitConfig {
- // Feature represents the available features in Bytebase
- enum Feature {
- FEATURE_UNSPECIFIED = 0;
-
- // Database Change Management
- DATABASE_CHANGE = 1;
- GIT_BASED_SCHEMA_VERSION_CONTROL = 2;
- DECLARATIVE_SCHEMA_MIGRATION = 3;
- COMPARE_AND_SYNC_SCHEMA = 4;
- ONLINE_SCHEMA_CHANGE = 5;
- PRE_DEPLOYMENT_SQL_REVIEW = 6;
- AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES = 7;
- ONE_CLICK_DATA_ROLLBACK = 8;
- MULTI_DATABASE_BATCH_CHANGES = 9;
- PROGRESSIVE_ENVIRONMENT_DEPLOYMENT = 10;
- SCHEDULED_ROLLOUT_TIME = 11;
- DATABASE_CHANGELOG = 12;
- SCHEMA_DRIFT_DETECTION = 13;
- CHANGELIST = 14;
- SCHEMA_TEMPLATE = 15;
- ROLLOUT_POLICY = 16;
-
- // SQL Editor & Development
- WEB_BASED_SQL_EDITOR = 17;
- SQL_EDITOR_ADMIN_MODE = 18;
- NATURAL_LANGUAGE_TO_SQL = 19;
- AI_QUERY_EXPLANATION = 20;
- AI_QUERY_SUGGESTIONS = 21;
- AUTO_COMPLETE = 22;
- SCHEMA_DIAGRAM = 23;
- SCHEMA_EDITOR = 24;
- DATA_EXPORT = 25;
- QUERY_HISTORY = 26;
- SAVED_AND_SHARED_SQL_SCRIPTS = 27;
- SQL_EDITOR_DDL_DML_RESTRICTION = 28;
- BATCH_QUERY = 29;
- INSTANCE_READ_ONLY_CONNECTION = 30;
- RESTRICT_COPYING_DATA = 31;
-
- // Security & Compliance
- IAM = 32;
- INSTANCE_SSL_CONNECTION = 33;
- INSTANCE_CONNECTION_OVER_SSH_TUNNEL = 34;
- INSTANCE_CONNECTION_IAM_AUTHENTICATION = 35;
- GOOGLE_AND_GITHUB_SSO = 36;
- USER_GROUPS = 37;
- DISALLOW_SELF_SERVICE_SIGNUP = 38;
- DATABASE_SECRET_VARIABLES = 39;
- QUERY_DATASOURCE_RESTRICTION = 40;
- CUSTOM_INSTANCE_SYNC_TIME = 41;
- CUSTOM_INSTANCE_CONNECTION_LIMIT = 42;
- RISK_ASSESSMENT = 43;
- APPROVAL_WORKFLOW = 44;
- AUDIT_LOG = 45;
- ENTERPRISE_SSO = 46;
- TWO_FA = 47;
- PASSWORD_RESTRICTIONS = 48;
- DISALLOW_PASSWORD_SIGNIN = 49;
- CUSTOM_ROLES = 50;
- REQUEST_ROLE_WORKFLOW = 51;
- DATA_MASKING = 52;
- DATA_CLASSIFICATION = 53;
- SCIM = 54;
- DIRECTORY_SYNC_ENTRA_ID = 55;
- DIRECTORY_SYNC_OKTA = 56;
- SIGN_IN_FREQUENCY_CONTROL = 57;
- EXTERNAL_SECRET_MANAGER = 58;
- USER_EMAIL_DOMAIN_RESTRICTION = 59;
-
- // Administration & Support
- ENVIRONMENT_MANAGEMENT = 60;
- IM_NOTIFICATIONS = 61;
- TERRAFORM_PROVIDER = 62;
- DATABASE_GROUPS = 63;
- ENVIRONMENT_TIERS = 64;
- DASHBOARD_ANNOUNCEMENT = 65;
- API_INTEGRATION_GUIDANCE = 66;
- CUSTOM_LOGO = 67;
- WATERMARK = 68;
- ROADMAP_PRIORITIZATION = 69;
- CUSTOM_MSA = 70;
- COMMUNITY_SUPPORT = 71;
- EMAIL_SUPPORT = 72;
- DEDICATED_SUPPORT_WITH_SLA = 73;
- }
-
PlanType type = 1;
int32 maximum_instance_count = 2;
int32 maximum_seat_count = 3;
- repeated Feature features = 4;
+ repeated PlanFeature features = 4;
}