Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: remove free feature guard and remove GetFeatureMatrix call (#16481)
Danny Xuc9653c70dac4
diff --git a/backend/api/v1/org_policy_service.go b/backend/api/v1/org_policy_service.goindex 0ae70fb577..60023b5e05 100644--- a/backend/api/v1/org_policy_service.go+++ b/backend/api/v1/org_policy_service.go@@ -367,11 +367,6 @@ func (s *OrgPolicyService) convertPolicyPayloadToString(ctx context.Context, polswitch policy.Type {case v1pb.PolicyType_ROLLOUT_POLICY:rolloutPolicy := convertToStorePBRolloutPolicy(policy.GetRolloutPolicy())- if !rolloutPolicy.Automatic {- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_ROLLOUT_POLICY); err != nil {- return "", status.Error(codes.PermissionDenied, err.Error())- }- }payloadBytes, err := protojson.Marshal(rolloutPolicy)if err != nil {return "", errors.Wrap(err, "failed to marshal rollout policy")@@ -400,7 +395,7 @@ func (s *OrgPolicyService) convertPolicyPayloadToString(ctx context.Context, pol}return string(payloadBytes), nilcase v1pb.PolicyType_DATA_EXPORT:- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_QUERY_DATASOURCE_RESTRICTION); err != nil {+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_QUERY_POLICY); err != nil {return "", status.Error(codes.PermissionDenied, err.Error())}payload, err := convertToExportDataPolicyPayload(policy.GetExportDataPolicy())@@ -413,7 +408,7 @@ func (s *OrgPolicyService) convertPolicyPayloadToString(ctx context.Context, pol}return string(payloadBytes), nilcase v1pb.PolicyType_DATA_QUERY:- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_QUERY_DATASOURCE_RESTRICTION); err != nil {+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_QUERY_POLICY); err != nil {return "", status.Error(codes.PermissionDenied, err.Error())}payload, err := convertToQueryDataPolicyPayload(policy.GetQueryDataPolicy())diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.goindex 7efe80f283..490540f855 100644--- a/backend/api/v1/setting_service.go+++ b/backend/api/v1/setting_service.go@@ -450,9 +450,6 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.UpdatestoreSettingValue = string(bytes)case storepb.SettingName_SCHEMA_TEMPLATE:- 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()if schemaTemplateSetting == nil {return nil, status.Errorf(codes.InvalidArgument, "value cannot be nil when setting schema template setting")diff --git a/backend/api/v1/subscription_service.go b/backend/api/v1/subscription_service.goindex a522fb89dc..693f08711a 100644--- a/backend/api/v1/subscription_service.go+++ b/backend/api/v1/subscription_service.go@@ -44,34 +44,6 @@ func (s *SubscriptionService) GetSubscription(ctx context.Context, _ *v1pb.GetSureturn s.loadSubscription(ctx)}-// GetFeatureMatrix gets the feature metric.-func (*SubscriptionService) GetFeatureMatrix(_ context.Context, _ *v1pb.GetFeatureMatrixRequest) (*v1pb.FeatureMatrix, error) {- resp := &v1pb.FeatureMatrix{}-- // Create a map to collect features- featureMap := make(map[v1pb.PlanFeature]map[string]bool)-- // Iterate through all plans and features- for planType, features := range enterprise.PlanFeatureMatrix {- for feature, enabled := range features {- if featureMap[feature] == nil {- featureMap[feature] = make(map[string]bool)- }- featureMap[feature][planType.String()] = enabled- }- }-- // Convert to response format- for feature, matrix := range featureMap {- resp.Features = append(resp.Features, &v1pb.Feature{- Name: feature.String(),- Matrix: matrix,- })- }-- return resp, nil-}-// UpdateSubscription updates the subscription license.func (s *SubscriptionService) UpdateSubscription(ctx context.Context, request *v1pb.UpdateSubscriptionRequest) (*v1pb.Subscription, error) {principalID, ok := ctx.Value(common.PrincipalIDContextKey).(int)diff --git a/backend/component/iam/manager.go b/backend/component/iam/manager.goindex 96dca220a0..1429ce56ec 100644--- a/backend/component/iam/manager.go+++ b/backend/component/iam/manager.go@@ -12,7 +12,6 @@ import (enterprise "github.com/bytebase/bytebase/backend/enterprise/api""github.com/bytebase/bytebase/backend/store"storepb "github.com/bytebase/bytebase/proto/generated-go/store"- v1pb "github.com/bytebase/bytebase/proto/generated-go/v1")//go:embed acl.yaml@@ -53,11 +52,6 @@ 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.PlanFeature_FEATURE_IAM) != nil {- // nolint- return true, nil- }-policyMessage, err := m.store.GetWorkspaceIamPolicy(ctx)if err != nil {return false, errdiff --git a/backend/enterprise/api/plan.yaml b/backend/enterprise/api/plan.yamlindex 2880d16116..6b23e514b7 100644--- a/backend/enterprise/api/plan.yaml+++ b/backend/enterprise/api/plan.yaml@@ -133,6 +133,7 @@ plans:- FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION- FEATURE_BATCH_QUERY- FEATURE_INSTANCE_READ_ONLY_CONNECTION+ - FEATURE_QUERY_POLICY- FEATURE_RESTRICT_COPYING_DATA# Security & Compliance- FEATURE_IAMdiff --git a/backend/runner/plancheck/statement_advise_executor.go b/backend/runner/plancheck/statement_advise_executor.goindex a0470063df..6415e06f2e 100644--- a/backend/runner/plancheck/statement_advise_executor.go+++ b/backend/runner/plancheck/statement_advise_executor.go@@ -20,7 +20,6 @@ import ("github.com/bytebase/bytebase/backend/store""github.com/bytebase/bytebase/backend/utils"storepb "github.com/bytebase/bytebase/proto/generated-go/store"- v1pb "github.com/bytebase/bytebase/proto/generated-go/v1")// NewStatementAdviseExecutor creates a plan check statement advise executor.@@ -51,22 +50,6 @@ func (e *StatementAdviseExecutor) Run(ctx context.Context, config *storepb.PlanCif config.ChangeDatabaseType == storepb.PlanCheckRunConfig_CHANGE_DATABASE_TYPE_UNSPECIFIED {return nil, errors.Errorf("change database type is unspecified")}- if err := e.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_PRE_DEPLOYMENT_SQL_REVIEW); err != nil {- // nolint:nilerr- return []*storepb.PlanCheckRunResult_Result{- {- Status: storepb.PlanCheckRunResult_Result_WARNING,- Code: advisor.Unsupported.Int32(),- Title: "SQL review is disabled",- Content: err.Error(),- Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{- SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{- Line: 0,- },- },- },- }, nil- }sheetUID := int(config.SheetUid)sheet, err := e.store.GetSheet(ctx, &store.FindSheetMessage{UID: &sheetUID})diff --git a/frontend/src/components/Database/context.ts b/frontend/src/components/Database/context.tsindex 3f727cc1eb..8d151ed7da 100644--- a/frontend/src/components/Database/context.ts+++ b/frontend/src/components/Database/context.ts@@ -1,5 +1,3 @@-import type { InjectionKey, Ref } from "vue";-import { computed, inject, provide, ref } from "vue";import { useAppFeature, useDatabaseV1ByName } from "@/store";import {databaseNamePrefix,@@ -8,11 +6,12 @@ import {import type { ComposedDatabase, Permission } from "@/types";import { DEFAULT_PROJECT_NAME } from "@/types";import {- hasProjectPermissionV2,- instanceV1HasAlterSchema,- isArchivedDatabaseV1,hasPermissionToCreateChangeDatabaseIssue,+ hasProjectPermissionV2,+ instanceV1HasAlterSchema} from "@/utils";+import type { InjectionKey, Ref } from "vue";+import { computed, inject, provide, ref } from "vue";export type DatabaseDetailContext = {database: Ref<ComposedDatabase>;@@ -62,7 +61,6 @@ export const provideDatabaseDetailContext = (const allowGetDatabase = computed(() => checkPermission("bb.databases.get"));const allowUpdateDatabase = computed(() =>- !isArchivedDatabaseV1(database.value) &&checkPermission("bb.databases.update"));const allowSyncDatabase = computed(() => {diff --git a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vueindex 2cf8318a9c..fa0f094d1b 100644--- a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue+++ b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue@@ -4,9 +4,8 @@<label>{{ $t("environment.access-control.title") }}</label>- <!-- TODO(d): fix this feature control. --><FeatureBadge- :feature="PlanFeature.FEATURE_QUERY_DATASOURCE_RESTRICTION"+ :feature="PlanFeature.FEATURE_QUERY_POLICY"/></div><div>@@ -99,9 +98,6 @@</template><script setup lang="ts">-import { cloneDeep, isEqual } from "lodash-es";-import { NRadio, NRadioGroup } from "naive-ui";-import { computed, reactive, watchEffect } from "vue";import { hasFeature, usePolicyV1Store } from "@/store";import { environmentNamePrefix } from "@/store/modules/v1/common";import {@@ -112,6 +108,9 @@ import {} from "@/types/proto/v1/org_policy_service";import { PlanFeature } from "@/types/proto/v1/subscription_service";import { hasWorkspacePermissionV2 } from "@/utils";+import { cloneDeep, isEqual } from "lodash-es";+import { NRadio, NRadioGroup } from "naive-ui";+import { computed, reactive, watchEffect } from "vue";import { FeatureBadge } from "../FeatureGuard";import { Switch } from "../v2";diff --git a/frontend/src/components/EnvironmentForm/EnvironmentForm.vue b/frontend/src/components/EnvironmentForm/EnvironmentForm.vueindex d99f08dec6..88816a23bf 100644--- a/frontend/src/components/EnvironmentForm/EnvironmentForm.vue+++ b/frontend/src/components/EnvironmentForm/EnvironmentForm.vue@@ -9,10 +9,6 @@</template><script lang="ts" setup>-import { useEventListener } from "@vueuse/core";-import { toRef } from "vue";-import { useI18n } from "vue-i18n";-import { onBeforeRouteLeave } from "vue-router";import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";import { hasFeature } from "@/store";import { VirtualRoleType } from "@/types";@@ -20,6 +16,10 @@ import type { Policy } from "@/types/proto/v1/org_policy_service";import { PolicyType } from "@/types/proto/v1/org_policy_service";import { PlanFeature } from "@/types/proto/v1/subscription_service";import type { Environment } from "@/types/v1/environment";+import { useEventListener } from "@vueuse/core";+import { toRef } from "vue";+import { useI18n } from "vue-i18n";+import { onBeforeRouteLeave } from "vue-router";import { FeatureModal } from "../FeatureGuard";import { provideEnvironmentFormContext } from "./context";@@ -96,10 +96,6 @@ useEmitteryEventListener(events, "create", (params) => {return;}}- if (!hasFeature(PlanFeature.FEATURE_ROLLOUT_POLICY)) {- missingFeature.value = PlanFeature.FEATURE_ROLLOUT_POLICY;- return;- }}emit("create", params);@@ -126,10 +122,6 @@ useEmitteryEventListener(events, "update-policy", (params) => {return;}}- if (!hasFeature(PlanFeature.FEATURE_ROLLOUT_POLICY)) {- missingFeature.value = PlanFeature.FEATURE_ROLLOUT_POLICY;- return;- }}}diff --git a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vueindex 4aef35407e..9c440dcb52 100644--- a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue+++ b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue@@ -5,7 +5,6 @@<h1 class="text-2xl font-bold">{{ title }}</h1>- <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") }}@@ -18,7 +17,7 @@<Switchv-model:value="state.enabled":text="true"- :disabled="!allowEdit || !hasAIFeature"+ :disabled="!allowEdit"@update:value="toggleAIEnabled"/><span class="font-medium">@@ -48,7 +47,7 @@style="width: 12rem"v-model:value="state.provider":options="providerOptions"- :disabled="!allowEdit || !hasAIFeature"+ :disabled="!allowEdit":consistent-menu-width="true"/></div>@@ -80,7 +79,7 @@<template #trigger><BBTextFieldv-model:value="state.apiKey"- :disabled="!allowEdit || !hasAIFeature"+ :disabled="!allowEdit":placeholder="$t('settings.general.workspace.ai-assistant.api-key.placeholder'@@ -112,7 +111,7 @@<BBTextFieldv-model:value="state.endpoint":required="true"- :disabled="!allowEdit || !hasAIFeature"+ :disabled="!allowEdit":placeholder="providerDefault.endpoint"/></template>@@ -138,7 +137,7 @@<BBTextFieldv-model:value="state.model":required="true"- :disabled="!allowEdit || !hasAIFeature"+ :disabled="!allowEdit"/></template><span class="text-sm text-gray-400 -translate-y-2">@@ -153,22 +152,19 @@</template><script lang="ts" setup>-import { NTooltip, NSelect } from "naive-ui";-import scrollIntoView from "scroll-into-view-if-needed";-import { computed, onMounted, reactive, ref, watchEffect, watch } from "vue";-import { useI18n } from "vue-i18n";import { BBTextField } from "@/bbkit";import LearnMoreLink from "@/components/LearnMoreLink.vue";import { Switch } from "@/components/v2";-import { hasFeature } from "@/store";import { useSettingV1Store } from "@/store/modules/v1/setting";import {AISetting,AISetting_Provider,Setting_SettingName,} from "@/types/proto/v1/setting_service";-import { PlanFeature } from "@/types/proto/v1/subscription_service";-import { FeatureBadge } from "../FeatureGuard";+import { NSelect, NTooltip } from "naive-ui";+import scrollIntoView from "scroll-into-view-if-needed";+import { computed, onMounted, reactive, ref, watch, watchEffect } from "vue";+import { useI18n } from "vue-i18n";interface LocalState {enabled: boolean;@@ -199,8 +195,6 @@ const aiSetting = computed(() => settingV1Store.getSettingByName(Setting_SettingName.AI)?.value?.aiSetting);-const hasAIFeature = computed(() => hasFeature(PlanFeature.FEATURE_NATURAL_LANGUAGE_TO_SQL));-const getInitialState = (): LocalState => {return {enabled: aiSetting.value?.enabled ?? false,diff --git a/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue b/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vueindex 97d8987065..3c5acb5a92 100644--- a/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue+++ b/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue@@ -49,7 +49,7 @@ import { computed, ref } from "vue";import { FeatureBadge } from "../FeatureGuard";const policyV1Store = usePolicyV1Store();-const hasAccessControlFeature = featureToRef(PlanFeature.FEATURE_IAM);+const hasQueryPolicyFeature = featureToRef(PlanFeature.FEATURE_QUERY_POLICY);const { policy: queryDataPolicy } = usePolicyByParentAndType(computed(() => ({@@ -61,7 +61,7 @@ const { policy: queryDataPolicy } = usePolicyByParentAndType(const allowEdit = computed(() =>hasWorkspacePermissionV2("bb.policies.update") &&- hasAccessControlFeature.value+ hasQueryPolicyFeature.value);const initialState = () => {diff --git a/frontend/src/components/GeneralSetting/RestrictIssueCreationConfigure.vue b/frontend/src/components/GeneralSetting/RestrictIssueCreationConfigure.vueindex 75557461ba..0204fab91d 100644--- a/frontend/src/components/GeneralSetting/RestrictIssueCreationConfigure.vue+++ b/frontend/src/components/GeneralSetting/RestrictIssueCreationConfigure.vue@@ -26,15 +26,13 @@<script setup lang="ts">import {- hasFeature,usePolicyByParentAndType,- usePolicyV1Store,+ usePolicyV1Store} from "@/store";import {PolicyResourceType,PolicyType,} from "@/types/proto/v1/org_policy_service";-import { PlanFeature } from "@/types/proto/v1/subscription_service";import { hasWorkspacePermissionV2 } from "@/utils";import { computed, ref, watch } from "vue";import { Switch } from "../v2";@@ -55,8 +53,7 @@ const policyV1Store = usePolicyV1Store();const allowEdit = computed(() => {return (props.allowEdit &&- hasWorkspacePermissionV2("bb.policies.update") &&- hasFeature(PlanFeature.FEATURE_IAM)+ hasWorkspacePermissionV2("bb.policies.update"));});diff --git a/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue b/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vueindex 0ab4a7c2b2..e5b0ce2251 100644--- a/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue+++ b/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue@@ -9,13 +9,6 @@{{ statementTitle }}</span><span v-if="isCreating" class="text-red-600">*</span>- <NButton- v-if="!isCreating && !hasFeature(PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW)"- size="tiny"- @click.prevent="state.showFeatureModal = true"- >- 🎈{{ $t("sql-review.unlock-full-feature") }}- </NButton></div></div>@@ -178,30 +171,15 @@/></div></BBModal>-- <FeatureModal- :open="state.showFeatureModal"- :feature="PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW"- @cancel="state.showFeatureModal = false"- /></template><script setup lang="ts">-import { useElementSize } from "@vueuse/core";-import { cloneDeep, head, isEmpty } from "lodash-es";-import { ExpandIcon } from "lucide-vue-next";-import { NButton, NTooltip, useDialog } from "naive-ui";-import { computed, reactive, ref, toRef, watch } from "vue";-import { useI18n } from "vue-i18n";-import { useRoute } from "vue-router";import { BBAttention, BBModal } from "@/bbkit";-import { FeatureModal } from "@/components/FeatureGuard";-import { PlanFeature } from "@/types/proto/v1/subscription_service";import { ErrorList } from "@/components/IssueV1/components/common";import {- useIssueContext,allowUserToEditStatementForTask,isTaskEditable,+ useIssueContext,} from "@/components/IssueV1/logic";import { MonacoEditor } from "@/components/MonacoEditor";import { extensionNameOfLanguage } from "@/components/MonacoEditor/utils";@@ -215,10 +193,9 @@ import SQLUploadButton from "@/components/misc/SQLUploadButton.vue";import { planServiceClient } from "@/grpcweb";import { emitWindowEvent } from "@/plugins";import {- hasFeature,pushNotification,- useSheetV1Store,useCurrentProjectV1,+ useSheetV1Store} from "@/store";import type { SQLDialect } from "@/types";import { dialectOfEngineV1 } from "@/types";@@ -228,10 +205,17 @@ import type { Advice } from "@/types/proto/v1/sql_service";import {flattenTaskV1List,getSheetStatement,+ getStatementSize,setSheetStatement,useInstanceV1EditorLanguage,- getStatementSize,} from "@/utils";+import { useElementSize } from "@vueuse/core";+import { cloneDeep, head, isEmpty } from "lodash-es";+import { ExpandIcon } from "lucide-vue-next";+import { NButton, NTooltip, useDialog } from "naive-ui";+import { computed, reactive, ref, toRef, watch } from "vue";+import { useI18n } from "vue-i18n";+import { useRoute } from "vue-router";import { useSQLAdviceMarkers } from "../useSQLAdviceMarkers";import EditorActionPopover from "./EditorActionPopover.vue";import { provideEditorContext } from "./context";diff --git a/frontend/src/components/IssueV1/components/StatementSection/SDLView/SDLView.vue b/frontend/src/components/IssueV1/components/StatementSection/SDLView/SDLView.vuedeleted file mode 100644index 815059362c..0000000000--- a/frontend/src/components/IssueV1/components/StatementSection/SDLView/SDLView.vue+++ /dev/null@@ -1,121 +0,0 @@-<template>- <div class="flex flex-col gap-y-2">- <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") }}- </NButton>- </div>- </div>-- <div class="w-full">- <div- v-if="sdlState.loading"- class="h-20 flex flex-col items-center justify-center"- >- <BBSpin />- </div>- <template v-else-if="sdlState.detail">- <NTabs v-model:value="state.tab" class="mb-1">- <NTab name="DIFF" :disabled="!!sdlState.detail.error">- <div class="flex items-center gap-x-1">- {{ $t("issue.sdl.schema-change") }}- <NTooltip :disabled="!!sdlState.detail.error">- <template #trigger>- <heroicons-outline:question-mark-circle class="w-4 h-4" />- </template>- <div class="whitespace-nowrap">- <span>{{ $t("issue.sdl.left-schema-may-change") }}</span>- </div>- </NTooltip>- </div>- </NTab>- <NTab name="STATEMENT" :disabled="!!sdlState.detail.error">- {{ $t("issue.sdl.generated-ddl-statements") }}- </NTab>- <NTab name="SCHEMA">- {{ $t("issue.sdl.full-schema") }}- </NTab>- </NTabs>-- <div class="relative min-h-[6rem]">- <DiffEditor- v-if="state.tab === 'DIFF'"- class="border rounded-[3px] overflow-clip"- :original="sdlState.detail.previousSDL"- :modified="sdlState.detail.prettyExpectedSDL"- :readonly="true"- :auto-height="{- alignment: 'modified',- min: 120,- max: 480,- }"- />- <MonacoEditor- v-if="state.tab === 'STATEMENT'"- class="w-full h-auto border rounded-[3px] overflow-clip"- data-label="bb-issue-sql-editor"- :content="sdlState.detail.diffDDL"- :readonly="true"- :auto-focus="false"- :auto-height="{ min: 120, max: 360 }"- />- <MonacoEditor- v-if="state.tab === 'SCHEMA'"- class="w-full h-auto border rounded-[3px] overflow-clip"- data-label="bb-issue-sql-editor"- :content="sdlState.detail.expectedSDL"- :readonly="true"- :auto-focus="false"- :auto-height="{ min: 120, max: 360 }"- :advices="markers"- />- </div>- </template>- </div>- </div>- <FeatureModal- :open="state.showFeatureModal"- :feature="PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW"- @cancel="state.showFeatureModal = false"- />-</template>--<script lang="ts" setup>-import { NTabs, NTab, NTooltip, NButton } from "naive-ui";-import { reactive } from "vue";-import { BBSpin } from "@/bbkit";-import { FeatureModal } from "@/components/FeatureGuard";-import { useIssueContext } from "@/components/IssueV1/logic";-import { DiffEditor, MonacoEditor } from "@/components/MonacoEditor";-import { hasFeature, pushNotification } from "@/store";-import { PlanFeature } from "@/types/proto/v1/subscription_service";-import { useSQLAdviceMarkers } from "../useSQLAdviceMarkers";-import { useSDLState } from "./useSDLState";--type TabView = "DIFF" | "STATEMENT" | "SCHEMA";--interface LocalState {- showFeatureModal: boolean;- tab: TabView;-}--const state = reactive<LocalState>({- showFeatureModal: false,- tab: "DIFF",-});--const { state: sdlState, events: sdlEvents } = useSDLState();-const context = useIssueContext();--const { markers } = useSQLAdviceMarkers(context, undefined);--sdlEvents.on("error", ({ message }) => {- state.tab = "SCHEMA";- pushNotification({- module: "bytebase",- style: "CRITICAL",- title: message,- });-});-</script>diff --git a/frontend/src/components/IssueV1/components/StatementSection/SDLView/index.ts b/frontend/src/components/IssueV1/components/StatementSection/SDLView/index.tsdeleted file mode 100644index b1e4ba40ed..0000000000--- a/frontend/src/components/IssueV1/components/StatementSection/SDLView/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import SDLView from "./SDLView.vue";--export default SDLView;diff --git a/frontend/src/components/IssueV1/components/StatementSection/SDLView/useSDLState.ts b/frontend/src/components/IssueV1/components/StatementSection/SDLView/useSDLState.tsdeleted file mode 100644index 17e29427bf..0000000000--- a/frontend/src/components/IssueV1/components/StatementSection/SDLView/useSDLState.ts+++ /dev/null@@ -1,192 +0,0 @@-import Emittery from "emittery";-import { computed, reactive, watch } from "vue";-import { sqlServiceClient } from "@/grpcweb";-import { useSilentRequest } from "@/plugins/silent-request";-import { useChangelogStore, useDatabaseV1Store } from "@/store";-import { ChangelogView } from "@/types/proto/v1/database_service";-import type { Task } from "@/types/proto/v1/rollout_service";-import { TaskRun_Status, Task_Status } from "@/types/proto/v1/rollout_service";-import { extractTaskUID } from "@/utils";-import { useIssueContext } from "../../../logic";-import { useTaskSheet } from "../useTaskSheet";--export type SDLDetail = {- error: string;- previousSDL: string;- prettyExpectedSDL: string;- expectedSDL: string;- diffDDL: string;-};--export type SDLState = {- task: Task;- loading: boolean;- detail: SDLDetail | undefined;-};--export type SDLEvents = Emittery<{- error: { message: string };-}>;--export const useSDLState = () => {- const { issue, selectedTask } = useIssueContext();- const { sheetStatement, sheetReady } = useTaskSheet();- const databaseStore = useDatabaseV1Store();- const events: SDLEvents = new Emittery();-- const emptyState = (task: Task): SDLState => {- return {- task,- loading: true,- detail: undefined,- };- };-- const map = reactive(new Map<string, SDLState>());-- const findLatestChangelogName = (task: Task) => {- if (task.status !== Task_Status.DONE) return undefined;- const taskRunList = issue.value.rolloutTaskRunList.filter((taskRun) => {- return extractTaskUID(taskRun.name) === extractTaskUID(task.name);- });- for (let i = taskRunList.length - 1; i >= 0; i--) {- const taskRun = taskRunList[i];- if (taskRun.status === TaskRun_Status.DONE) {- return taskRun.changelog;- }- }- return undefined;- };-- const changelogName = computed(() => {- const task = selectedTask.value;- return findLatestChangelogName(task);- });-- const fetchOngoingSDLDetail = async (- task: Task,- statement: string- ): Promise<SDLDetail | undefined> => {- if (!task.target) return undefined;- const database = await databaseStore.getOrFetchDatabaseByName(task.target);- const previousSDL = (- await databaseStore.fetchDatabaseSchema(- `${database.name}/schema`,- true // fetch SDL format- )- ).schema;- const expectedSDL = statement;-- const getSchemaDiff = async () => {- const { diff } = await databaseStore.diffSchema({- name: database.name,- schema: expectedSDL,- sdlFormat: true,- });- return diff ?? "";- };- const diffDDL = await useSilentRequest(getSchemaDiff);-- const { currentSchema, expectedSchema } = await sqlServiceClient.pretty(- {- engine: database.instanceResource.engine,- currentSchema: previousSDL ?? "",- expectedSchema: expectedSDL ?? "",- },- {- silent: true,- }- );-- if (task.status === Task_Status.DONE) {- throw new Error();- }-- return {- error: "",- previousSDL: currentSchema,- prettyExpectedSDL: expectedSchema,- expectedSDL,- diffDDL,- };- };-- const fetchSDLDetailFromChangelog = async (- task: Task,- changelogName: string | undefined- ): Promise<SDLDetail | undefined> => {- if (!changelogName) {- return undefined;- }- const changelog = await useChangelogStore().fetchChangelog({- name: changelogName,- sdlFormat: true,- view: ChangelogView.CHANGELOG_VIEW_FULL,- });- // The latestChangelogName might change during fetching the- // Changelog.- // Should give up the result.- const latestChangelogName = findLatestChangelogName(task);- if (changelog.name !== latestChangelogName) {- throw new Error();- }- return {- error: "",- previousSDL: changelog.prevSchema,- prettyExpectedSDL: changelog.schema,- expectedSDL: changelog.schema,- diffDDL: changelog.statement,- };- };-- watch(- [() => selectedTask.value.name, sheetStatement, sheetReady, changelogName],- async ([taskName, statement, sheetReady, changelogName]) => {- if (!sheetReady) return;-- const task = selectedTask.value;- if (!map.has(taskName)) {- map.set(taskName, emptyState(task));- }- const finish = (detail?: SDLState["detail"]) => {- const state = map.get(taskName);- if (!state) return;- state.loading = false;- state.detail = detail;- };- try {- if (task.status === Task_Status.DONE) {- const detail = await fetchSDLDetailFromChangelog(task, changelogName);- finish(detail);- } else {- const detail = await fetchOngoingSDLDetail(task, statement);- finish(detail);- }- } catch (error: any) {- // The task has been changed during the fetch- // The result is meaningless.- const message =- error.response?.data?.message ??- error.details ??- "Internal server error";-- events.emit("error", { message });- finish({- error: message,- diffDDL: "",- expectedSDL: statement,- previousSDL: "",- prettyExpectedSDL: "",- });- }- },- { immediate: true }- );-- const state = computed(() => {- const task = selectedTask.value as Task;- return map.get(task.name) ?? emptyState(task);- });-- return { state, events };-};diff --git a/frontend/src/components/IssueV1/components/StatementSection/StatementSection.vue b/frontend/src/components/IssueV1/components/StatementSection/StatementSection.vueindex 00ba7177e4..16d6033a68 100644--- a/frontend/src/components/IssueV1/components/StatementSection/StatementSection.vue+++ b/frontend/src/components/IssueV1/components/StatementSection/StatementSection.vue@@ -5,25 +5,21 @@ref="editorViewRef":advices="advices"/>- <SDLView v-if="viewMode === 'SDL'" /></div></template><script setup lang="ts">-import { useEventListener } from "@vueuse/core";-import { computed, nextTick, ref } from "vue";-import { useI18n } from "vue-i18n";-import { onBeforeRouteLeave } from "vue-router";-import { useRouter } from "vue-router";import { usePlanSQLCheckContext } from "@/components/Plan/components/SQLCheckSection/context";import { databaseForTask } from "@/components/Rollout/RolloutDetail";+import { useCurrentProjectV1 } from "@/store";import { TaskTypeListWithStatement } from "@/types";-import { Task_Type } from "@/types/proto/v1/rollout_service";import { isValidTaskName } from "@/utils";+import { useEventListener } from "@vueuse/core";+import { computed, nextTick, ref } from "vue";+import { useI18n } from "vue-i18n";+import { onBeforeRouteLeave, useRouter } from "vue-router";import { useIssueContext } from "../../logic";-import { useCurrentProjectV1 } from "@/store";import EditorView from "./EditorView";-import SDLView from "./SDLView";const { t } = useI18n();const router = useRouter();@@ -38,15 +34,12 @@ const advices = computed(() => {return resultMap.value[database.name]?.advices || [];});-type ViewMode = "NONE" | "EDITOR" | "SDL";+type ViewMode = "NONE" | "EDITOR";const viewMode = computed((): ViewMode => {if (isValidTaskName(selectedTask.value.name)) {const task = selectedTask.value;const { type } = task;- if (type === Task_Type.DATABASE_SCHEMA_UPDATE_SDL) {- return "SDL";- }if (TaskTypeListWithStatement.includes(type)) {return "EDITOR";}diff --git a/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue b/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vueindex a87dfcc46c..54885a5842 100644--- a/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue+++ b/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue@@ -10,13 +10,6 @@{{ statementTitle }}</span><span v-if="isCreating" class="text-red-600">*</span>- <NButton- v-if="!isCreating && !hasFeature(PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW)"- size="small"- @click.prevent="state.showFeatureModal = true"- >- 🎈{{ $t("sql-review.unlock-full-feature") }}- </NButton></div></div><div class="flex items-center justify-end gap-x-2">@@ -174,25 +167,10 @@/></div></BBModal>-- <FeatureModal- :open="state.showFeatureModal"- :feature="PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW"- @cancel="state.showFeatureModal = false"- /></template><script setup lang="ts">-import { useElementSize } from "@vueuse/core";-import { cloneDeep, head, isEmpty } from "lodash-es";-import { ExpandIcon } from "lucide-vue-next";-import { NButton, NTooltip, useDialog } from "naive-ui";-import { v1 as uuidv1 } from "uuid";-import { computed, reactive, ref, watch } from "vue";-import { useI18n } from "vue-i18n";import { BBAttention, BBModal } from "@/bbkit";-import { FeatureModal } from "@/components/FeatureGuard";-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";@@ -200,26 +178,32 @@ import {createEmptyLocalSheet,databaseEngineForSpec,databaseForSpec,+ usePlanContext,} from "@/components/Plan/logic";-import { usePlanContext } from "@/components/Plan/logic";import DownloadSheetButton from "@/components/Sheet/DownloadSheetButton.vue";import SQLUploadButton from "@/components/misc/SQLUploadButton.vue";import { planServiceClient } from "@/grpcweb";import {- hasFeature,pushNotification,useCurrentProjectV1,- useSheetV1Store,+ useSheetV1Store} from "@/store";import type { SQLDialect } from "@/types";import { dialectOfEngineV1 } from "@/types";import { Sheet } from "@/types/proto/v1/sheet_service";import {getSheetStatement,+ getStatementSize,setSheetStatement,useInstanceV1EditorLanguage,- getStatementSize,} from "@/utils";+import { useElementSize } from "@vueuse/core";+import { cloneDeep, head, isEmpty } from "lodash-es";+import { ExpandIcon } from "lucide-vue-next";+import { NButton, NTooltip, useDialog } from "naive-ui";+import { v1 as uuidv1 } from "uuid";+import { computed, reactive, ref, watch } from "vue";+import { useI18n } from "vue-i18n";import { usePlanSQLCheckContext } from "../../SQLCheckSection/context";import useSelectedSpec from "../../common/useSelectedSpec";import { useSQLAdviceMarkers } from "../useSQLAdviceMarkers";diff --git a/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vueindex 64f079a3fb..2e2626a08e 100644--- a/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue+++ b/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue@@ -35,7 +35,6 @@@click="state.showSchemaTemplateDrawer = true"><template #icon>- <FeatureBadge :feature="PlanFeature.FEATURE_SCHEMA_TEMPLATE" /><PlusIcon class="w-4 h-4" /></template>{{ $t("schema-editor.actions.add-from-template") }}@@ -140,26 +139,13 @@</div></DrawerContent></Drawer>-- <FeatureModal- :feature="PlanFeature.FEATURE_SCHEMA_TEMPLATE"- :open="state.showFeatureModal"- @cancel="state.showFeatureModal = false"- /></template><script lang="ts" setup>-import { cloneDeep, head, sumBy } from "lodash-es";-import { PlusIcon } from "lucide-vue-next";-import { NButton, NSelect, NTooltip } from "naive-ui";-import { computed, nextTick, reactive, watch } from "vue";-import { FeatureBadge, FeatureModal } from "@/components/FeatureGuard";import SchemaDiagram, { SchemaDiagramIcon } from "@/components/SchemaDiagram";import { Drawer, DrawerContent } from "@/components/v2";-import { hasFeature } from "@/store";import type { ComposedDatabase } from "@/types";import { Engine } from "@/types/proto/v1/common";-import { PlanFeature } from "@/types/proto/v1/subscription_service";import type {ColumnMetadata,DatabaseMetadata,@@ -168,6 +154,10 @@ import type {} from "@/types/proto/v1/database_service";import type { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";import TableTemplates from "@/views/SchemaTemplate/TableTemplates.vue";+import { cloneDeep, head, sumBy } from "lodash-es";+import { PlusIcon } from "lucide-vue-next";+import { NButton, NSelect, NTooltip } from "naive-ui";+import { computed, nextTick, reactive, watch } from "vue";import TableNameModal from "../Modals/TableNameModal.vue";import { useSchemaEditorContext } from "../context";import TableList from "./TableList";@@ -341,10 +331,6 @@ const tryEditColumn = async (const handleApplyTemplate = (template: SchemaTemplateSetting_TableTemplate) => {state.showSchemaTemplateDrawer = false;- if (!hasFeature(PlanFeature.FEATURE_SCHEMA_TEMPLATE)) {- state.showFeatureModal = true;- return;- }if (!template.table) {return;}diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vueindex 04c69275d7..c335d89452 100644--- a/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue+++ b/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue@@ -49,7 +49,6 @@><template #icon><PlusIcon class="w-4 h-auto mr-1 text-gray-400" />- <FeatureBadge :feature="PlanFeature.FEATURE_SCHEMA_TEMPLATE" /></template>{{ $t("schema-editor.actions.add-from-template") }}</NButton>@@ -183,41 +182,26 @@</div></DrawerContent></Drawer>- <FeatureModal- :feature="PlanFeature.FEATURE_SCHEMA_TEMPLATE"- :open="state.showFeatureModal"- @cancel="state.showFeatureModal = false"- /></template><script lang="ts" setup>-import { cloneDeep, head, pull } from "lodash-es";-import { PlusIcon } from "lucide-vue-next";-import { ArrowLeftIcon } from "lucide-vue-next";-import { NButton } from "naive-ui";-import { computed, reactive, ref } from "vue";-import { useI18n } from "vue-i18n";-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 { PlanFeature } from "@/types/proto/v1/subscription_service";+import { pushNotification } from "@/store/modules";import type { ComposedDatabase } from "@/types";import {DatabaseCatalog,SchemaCatalog,} from "@/types/proto/v1/database_catalog_service";-import {- DatabaseMetadata,- type ForeignKeyMetadata,- type SchemaMetadata,- type TableMetadata,-} from "@/types/proto/v1/database_service";import {ColumnMetadata,+ DatabaseMetadata,IndexMetadata,TablePartitionMetadata,TablePartitionMetadata_Type,+ type ForeignKeyMetadata,+ type SchemaMetadata,+ type TableMetadata,} from "@/types/proto/v1/database_service";import type { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";import {@@ -226,6 +210,11 @@ import {randomString,} from "@/utils";import FieldTemplates from "@/views/SchemaTemplate/FieldTemplates.vue";+import { cloneDeep, head, pull } from "lodash-es";+import { ArrowLeftIcon, PlusIcon } from "lucide-vue-next";+import { NButton } from "naive-ui";+import { computed, reactive, ref } from "vue";+import { useI18n } from "vue-i18n";import EditColumnForeignKeyModal from "../Modals/EditColumnForeignKeyModal.vue";import { useSchemaEditorContext } from "../context";import {@@ -413,10 +402,6 @@ const handleApplyColumnTemplate = (template: SchemaTemplateSetting_FieldTemplate) => {state.showSchemaTemplateDrawer = false;- if (!hasFeature(PlanFeature.FEATURE_SCHEMA_TEMPLATE)) {- state.showFeatureModal = true;- return;- }if (!template.column) {return;}diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableList/TableList.vue b/frontend/src/components/SchemaEditorLite/Panels/TableList/TableList.vueindex ae09c283f7..972a039efa 100644--- a/frontend/src/components/SchemaEditorLite/Panels/TableList/TableList.vue+++ b/frontend/src/components/SchemaEditorLite/Panels/TableList/TableList.vue@@ -38,26 +38,11 @@</div></DrawerContent></Drawer>-- <FeatureModal- :feature="PlanFeature.FEATURE_SCHEMA_TEMPLATE"- :open="state.showFeatureModal"- @cancel="state.showFeatureModal = false"- /></template><script lang="ts" setup>-import { useElementSize } from "@vueuse/core";-import { cloneDeep, pick } from "lodash-es";-import type { DataTableColumn, DataTableInst } from "naive-ui";-import { NCheckbox, NDataTable } from "naive-ui";-import { computed, h, reactive, ref } from "vue";-import { useI18n } from "vue-i18n";import ClassificationCell from "@/components/ColumnDataTable/ClassificationCell.vue";-import FeatureModal from "@/components/FeatureGuard/FeatureModal.vue";import { Drawer, DrawerContent, InlineInput } from "@/components/v2";-import { hasFeature } from "@/store";-import { PlanFeature } from "@/types/proto/v1/subscription_service";import type { ComposedDatabase } from "@/types";import {TableCatalog,@@ -70,9 +55,15 @@ import type {} from "@/types/proto/v1/database_service";import type { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";import TableTemplates from "@/views/SchemaTemplate/TableTemplates.vue";+import { useElementSize } from "@vueuse/core";+import { cloneDeep, pick } from "lodash-es";+import type { DataTableColumn, DataTableInst } from "naive-ui";+import { NCheckbox, NDataTable } from "naive-ui";+import { computed, h, reactive, ref } from "vue";+import { useI18n } from "vue-i18n";import { useSchemaEditorContext } from "../../context";import { markUUID } from "../common";-import { SelectionCell, NameCell, OperationCell } from "./components";+import { NameCell, OperationCell, SelectionCell } from "./components";const props = defineProps<{db: ComposedDatabase;@@ -376,10 +367,6 @@ const handleRestoreTable = (table: TableMetadata) => {const handleApplyTemplate = (template: SchemaTemplateSetting_TableTemplate) => {state.showSchemaTemplateDrawer = false;- if (!hasFeature(PlanFeature.FEATURE_SCHEMA_TEMPLATE)) {- state.showFeatureModal = true;- return;- }if (!template.table) {return;}diff --git a/frontend/src/components/SchemaTemplate/TableTemplateForm.vue b/frontend/src/components/SchemaTemplate/TableTemplateForm.vueindex f55d1cb400..78ff42d74c 100644--- a/frontend/src/components/SchemaTemplate/TableTemplateForm.vue+++ b/frontend/src/components/SchemaTemplate/TableTemplateForm.vue@@ -105,7 +105,6 @@@click="state.showFieldTemplateDrawer = true"><template #icon>- <FeatureBadge :feature="PlanFeature.FEATURE_SCHEMA_TEMPLATE" /><PlusIcon class="w-4 h-4 text-control-placeholder" /></template>{{ $t("schema-editor.actions.add-from-template") }}@@ -178,21 +177,14 @@</template><script lang="ts" setup>-import { isEqual, cloneDeep, pull } from "lodash-es";-import { PlusIcon, XIcon, PencilIcon } from "lucide-vue-next";-import type { SelectOption } from "naive-ui";-import { NButton, NInput } from "naive-ui";-import { computed, reactive, ref, toRef } from "vue";-import { useI18n } from "vue-i18n";-import FeatureBadge from "@/components/FeatureGuard/FeatureBadge.vue";import {TableColumnEditor,provideSchemaEditorContext,- upsertColumnPrimaryKey,- removeColumnPrimaryKey,removeColumnFromAllForeignKeys,- type EditTarget,+ removeColumnPrimaryKey,+ upsertColumnPrimaryKey,type EditStatus,+ type EditTarget,} from "@/components/SchemaEditorLite";import {Drawer,@@ -201,24 +193,30 @@ import {InstanceEngineRadioGrid,MiniActionButton,} from "@/components/v2";-import { useSettingV1Store, pushNotification } from "@/store";+import { pushNotification, useSettingV1Store } from "@/store";import { unknownProject } from "@/types";import { TableCatalog } from "@/types/proto/v1/database_catalog_service";import { ColumnMetadata } from "@/types/proto/v1/database_service";import {+ SchemaTemplateSetting,SchemaTemplateSetting_TableTemplate,+ Setting_SettingName,type SchemaTemplateSetting_FieldTemplate,} from "@/types/proto/v1/setting_service";-import { SchemaTemplateSetting, Setting_SettingName } from "@/types/proto/v1/setting_service";-import { PlanFeature } from "@/types/proto/v1/subscription_service";import { arraySwap, instanceV1AllowsReorderColumns } from "@/utils";import FieldTemplates from "@/views/SchemaTemplate/FieldTemplates.vue";+import { cloneDeep, isEqual, pull } from "lodash-es";+import { PencilIcon, PlusIcon, XIcon } from "lucide-vue-next";+import type { SelectOption } from "naive-ui";+import { NButton, NInput } from "naive-ui";+import { computed, reactive, ref, toRef } from "vue";+import { useI18n } from "vue-i18n";import ClassificationLevelBadge from "./ClassificationLevelBadge.vue";import SelectClassificationDrawer from "./SelectClassificationDrawer.vue";import {- engineList,categoryList,classificationConfig,+ engineList,mockMetadataFromTableTemplate,rebuildTableTemplateFromMetadata,} from "./utils";diff --git a/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue b/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vueindex d4f32b55db..b8500e1afd 100644--- a/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue+++ b/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue@@ -50,27 +50,14 @@</div></div></div>-- <FeatureModal- :feature="PlanFeature.FEATURE_COMPARE_AND_SYNC_SCHEMA"- :open="state.showFeatureModal"- :instance="database?.instanceResource"- @cancel="state.showFeatureModal = false"- /></template><script lang="tsx" setup>-import { head } from "lodash-es";-import type { SelectOption } from "naive-ui";-import { NSelect, NTag } from "naive-ui";-import { computed, reactive, ref, watch } from "vue";-import { useI18n } from "vue-i18n";-import { EnvironmentSelect, DatabaseSelect } from "@/components/v2";+import { DatabaseSelect, EnvironmentSelect } from "@/components/v2";import {- useDatabaseV1Store,- useSubscriptionV1Store,- useDBSchemaV1Store,useChangelogStore,+ useDBSchemaV1Store,+ useDatabaseV1Store} from "@/store";import {UNKNOWN_ID,@@ -83,14 +70,16 @@ import {Changelog_Type,changelog_TypeToJSON,} from "@/types/proto/v1/database_service";-import { PlanFeature } from "@/types/proto/v1/subscription_service";import {extractChangelogUID,isValidChangelogName,mockLatestChangelog,} from "@/utils/v1/changelog";-import { FeatureModal } from "../FeatureGuard";-import FeatureBadge from "../FeatureGuard/FeatureBadge.vue";+import { head } from "lodash-es";+import type { SelectOption } from "naive-ui";+import { NSelect, NTag } from "naive-ui";+import { computed, reactive, ref, watch } from "vue";+import { useI18n } from "vue-i18n";import HumanizeDate from "../misc/HumanizeDate.vue";import { ALLOWED_ENGINES, type ChangelogSourceSchema } from "./types";@@ -126,21 +115,8 @@ const databaseStore = useDatabaseV1Store();const dbSchemaStore = useDBSchemaV1Store();const changelogStore = useChangelogStore();-const database = computed(() => {- return isValidDatabaseName(state.databaseName)- ? databaseStore.getDatabaseByName(state.databaseName)- : undefined;-});-const isPreparingSchemaVersionOptions = ref(false);-const hasSyncSchemaFeature = computed(() => {- return useSubscriptionV1Store().hasInstanceFeature(- PlanFeature.FEATURE_COMPARE_AND_SYNC_SCHEMA,- database.value?.instanceResource- );-});-const handleEnvironmentSelect = async (name: string | undefined) => {if (name !== state.environmentName) {state.databaseName = undefined;@@ -207,15 +183,8 @@ const renderSchemaVersionLabel = (option: SelectOption) => {return "Latest version";}- const index = option.index as number;return (<div class="flex flex-row justify-start items-center truncate gap-1">- {index > 0 && (- <FeatureBadge- feature={PlanFeature.FEATURE_COMPARE_AND_SYNC_SCHEMA}- instance={database.value?.instanceResource}- />- )}<HumanizeDateclass="text-control-light"date={getDateForPbTimestamp(changelog.createTime)}@@ -266,13 +235,6 @@ const fallbackSchemaVersionOption = (value: string): SelectOption => {const handleSchemaVersionSelect = async (_: string, option: SelectOption) => {const changelog = option.changelog as Changelog;- const index = databaseChangelogList(state.databaseName as string).findIndex(- (c) => c.name === changelog.name- );- if (index > 0 && !hasSyncSchemaFeature.value) {- state.showFeatureModal = true;- return;- }state.changelogName = changelog.name;};diff --git a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vueindex 8575cbacb1..6c904a49e3 100644--- a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue+++ b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue@@ -100,23 +100,6 @@</template><script lang="ts" setup>-import { computedAsync } from "@vueuse/core";-import {- UnlinkIcon,- RefreshCcwIcon,- TagIcon,- PencilIcon,- PenSquareIcon,- ArrowRightLeftIcon,- DownloadIcon,- ChevronsDownIcon,- SquareStackIcon,-} from "lucide-vue-next";-import { NButton, NTooltip, useDialog, NScrollbar } from "naive-ui";-import type { VNode } from "vue";-import { computed, h, reactive } from "vue";-import { useI18n } from "vue-i18n";-import { useRouter } from "vue-router";import { BBAlert } from "@/bbkit";import SchemaEditorModal from "@/components/AlterSchemaPrepForm/SchemaEditorModal.vue";import EditEnvironmentDrawer from "@/components/EditEnvironmentDrawer.vue";@@ -126,12 +109,12 @@ import TransferOutDatabaseForm from "@/components/TransferOutDatabaseForm";import { Drawer } from "@/components/v2";import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";import {- useProjectV1Store,- useDatabaseV1Store,- useGracefulRequest,- useDBSchemaV1Store,pushNotification,useAppFeature,+ useDatabaseV1Store,+ useDBSchemaV1Store,+ useGracefulRequest,+ useProjectV1Store,} from "@/store";import type { ComposedDatabase } from "@/types";import { DEFAULT_PROJECT_NAME } from "@/types";@@ -140,15 +123,31 @@ import {UpdateDatabaseRequest,} from "@/types/proto/v1/database_service";import {- isArchivedDatabaseV1,- instanceV1HasAlterSchema,allowUsingSchemaEditor,- generateIssueTitle,- hasProjectPermissionV2,extractProjectResourceName,+ generateIssueTitle,hasPermissionToCreateChangeDatabaseIssue,hasPermissionToCreateDataExportIssue,+ hasProjectPermissionV2,+ instanceV1HasAlterSchema} from "@/utils";+import { computedAsync } from "@vueuse/core";+import {+ ArrowRightLeftIcon,+ ChevronsDownIcon,+ DownloadIcon,+ PencilIcon,+ PenSquareIcon,+ RefreshCcwIcon,+ SquareStackIcon,+ TagIcon,+ UnlinkIcon,+} from "lucide-vue-next";+import { NButton, NScrollbar, NTooltip, useDialog } from "naive-ui";+import type { VNode } from "vue";+import { computed, h, reactive } from "vue";+import { useI18n } from "vue-i18n";+import { useRouter } from "vue-router";interface DatabaseAction {icon: VNode;@@ -252,7 +251,6 @@ const allowChangeData = computed(() => {const allowTransferOutProject = computed(() => {return props.databases.every((db) =>- !isArchivedDatabaseV1(db) &&hasProjectPermissionV2(db.projectEntity, "bb.projects.update"));});diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 6b44c3dbc2..58756ecdef 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -880,12 +880,6 @@"closed": "closed","close": "Close"},- "sdl": {- "schema-change": "Schema change",- "generated-ddl-statements": "Generated DDL statements",- "full-schema": "Full schema",- "left-schema-may-change": "The schema on the left side may change before the issue is applied."- },"approval-flow": {"self": "Approval flow","tooltip": "The approvers will review and approve the issue in the order specified in the flow. The issue can only be applied after all steps in the flow have been approved. You can configure a custom approval flow for each risk.",@@ -2152,7 +2146,6 @@"delete": "Delete SQL review policy","input-then-press-enter": "Input the value then press enter to add","not-available-for-free": "Rule is not available for {plan}",- "unlock-full-feature": "Unlock 100+ SQL lint rules","search-by-name": "Search by name","attach-resource": {"no-linked-resources": "No attached resources",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 39414a0932..38d6b8dccd 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -880,12 +880,6 @@"closed": "cerrado","close": "Cerca"},- "sdl": {- "schema-change": "Cambio de esquema",- "generated-ddl-statements": "Declaraciones DDL generadas",- "full-schema": "Esquema completo",- "left-schema-may-change": "El esquema del lado izquierdo puede cambiar antes de que se aplique la incidencia."- },"approval-flow": {"self": "Flujo de aprobación","tooltip": "Los aprobadores revisarán y aprobarán el problema en el orden especificado en el flujo. \nLa emisión solo se puede aplicar después de que se hayan aprobado todos los pasos del flujo. \nPuede configurar un flujo de aprobación personalizado para cada riesgo.",@@ -2152,7 +2146,6 @@"delete": "Eliminar política de revisión SQL","input-then-press-enter": "Ingrese el valor y luego presione enter para agregar","not-available-for-free": "La regla no está disponible para {plan}",- "unlock-full-feature": "Desbloquear más de 100 reglas de validación de SQL","search-by-name": "Buscar por nombre","attach-resource": {"no-linked-resources": "Sin recursos adjuntos",diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex a08ae926bc..3535b426ce 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -880,12 +880,6 @@"closed": "閉まっている","close": "近い"},- "sdl": {- "schema-change": "スキーマの変更",- "generated-ddl-statements": "生成されたDDLステートメント",- "full-schema": "完全なスキーマ",- "left-schema-may-change": "左側のスキーマは、イシューが実行される前に変更される可能性があります。"- },"approval-flow": {"self": "承認の流れ","tooltip": "承認者は、承認フローで指定された順序でイシューを確認し、承認する必要があります。イシューは、承認フローのすべてのステップが承認された後にのみ実行できます。リスクレベルごとに承認をカスタマイズできます。",@@ -2152,7 +2146,6 @@"delete": "監査ポリシーの削除","input-then-press-enter": "入力後、Enterを押して追加します","not-available-for-free": "{plan}定期購入ではこのルールを使用できません",- "unlock-full-feature": "100 を超える SQL レビュー ルールのロックを解除する","search-by-name": "名前で検索","attach-resource": {"no-linked-resources": "リソースのバインドはありません",diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 21f1f451ed..2faa49d6a5 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -880,12 +880,6 @@"closed": "đã đóng","close": "Đóng"},- "sdl": {- "schema-change": "Thay đổi lược đồ",- "generated-ddl-statements": "Câu lệnh DDL được tạo",- "full-schema": "Lược đồ đầy đủ",- "left-schema-may-change": "Lược đồ ở bên trái có thể thay đổi trước khi vấn đề được áp dụng."- },"approval-flow": {"self": "Quy trình phê duyệt","tooltip": "Người phê duyệt sẽ xem xét và phê duyệt vấn đề theo thứ tự được chỉ định trong quy trình. Vấn đề chỉ có thể được áp dụng sau khi tất cả các bước trong quy trình đã được phê duyệt. Bạn có thể định cấu hình quy trình phê duyệt tùy chỉnh cho từng rủi ro.",@@ -2152,7 +2146,6 @@"delete": "Xóa chính sách đánh giá SQL","input-then-press-enter": "Nhập giá trị sau đó nhấn enter để thêm","not-available-for-free": "Quy tắc không khả dụng cho {plan}",- "unlock-full-feature": "Mở khóa hơn 100 quy tắc lint SQL","search-by-name": "Tìm kiếm theo tên","attach-resource": {"no-linked-resources": "Không có tài nguyên nào được đính kèm",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 325e63fc3c..3a58a6a421 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -880,12 +880,6 @@"closed": "关闭","close": "关闭"},- "sdl": {- "schema-change": "Schema 变化",- "generated-ddl-statements": "生成的 DDL 语句",- "full-schema": "完整 schema",- "left-schema-may-change": "左边的 schema 在工单执行前可能会发生变化。"- },"approval-flow": {"self": "审批流","tooltip": "审批人需要按审批流指定的顺序审核和审批工单。只有审批流中所有步骤都完成审批后工单才可以执行。您可以为每个风险级别自定义审批。",@@ -2152,7 +2146,6 @@"delete": "删除审核策略","input-then-press-enter": "输入后按下回车来添加","not-available-for-free": "{plan}订阅不能使用该规则",- "unlock-full-feature": "解锁 100+ SQL Review 规则","search-by-name": "按名称搜索","attach-resource": {"no-linked-resources": "没有绑定的资源",diff --git a/frontend/src/types/proto/v1/subscription_service.ts b/frontend/src/types/proto/v1/subscription_service.tsindex 2f3f1e0550..414f21e8d7 100644--- a/frontend/src/types/proto/v1/subscription_service.ts+++ b/frontend/src/types/proto/v1/subscription_service.ts@@ -107,6 +107,7 @@ export enum PlanFeature {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_QUERY_POLICY = "FEATURE_QUERY_POLICY",FEATURE_RESTRICT_COPYING_DATA = "FEATURE_RESTRICT_COPYING_DATA",/** FEATURE_IAM - Security & Compliance */FEATURE_IAM = "FEATURE_IAM",@@ -250,129 +251,132 @@ export function planFeatureFromJSON(object: any): PlanFeature {case "FEATURE_INSTANCE_READ_ONLY_CONNECTION":return PlanFeature.FEATURE_INSTANCE_READ_ONLY_CONNECTION;case 31:+ case "FEATURE_QUERY_POLICY":+ return PlanFeature.FEATURE_QUERY_POLICY;+ case 32:case "FEATURE_RESTRICT_COPYING_DATA":return PlanFeature.FEATURE_RESTRICT_COPYING_DATA;- case 32:+ case 33:case "FEATURE_IAM":return PlanFeature.FEATURE_IAM;- case 33:+ case 34:case "FEATURE_INSTANCE_SSL_CONNECTION":return PlanFeature.FEATURE_INSTANCE_SSL_CONNECTION;- case 34:+ case 35:case "FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL":return PlanFeature.FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL;- case 35:+ case 36:case "FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION":return PlanFeature.FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION;- case 36:+ case 37:case "FEATURE_GOOGLE_AND_GITHUB_SSO":return PlanFeature.FEATURE_GOOGLE_AND_GITHUB_SSO;- case 37:+ case 38:case "FEATURE_USER_GROUPS":return PlanFeature.FEATURE_USER_GROUPS;- case 38:+ case 39:case "FEATURE_DISALLOW_SELF_SERVICE_SIGNUP":return PlanFeature.FEATURE_DISALLOW_SELF_SERVICE_SIGNUP;- case 39:+ case 40:case "FEATURE_DATABASE_SECRET_VARIABLES":return PlanFeature.FEATURE_DATABASE_SECRET_VARIABLES;- case 40:+ case 41:case "FEATURE_QUERY_DATASOURCE_RESTRICTION":return PlanFeature.FEATURE_QUERY_DATASOURCE_RESTRICTION;- case 41:+ case 42:case "FEATURE_CUSTOM_INSTANCE_SYNC_TIME":return PlanFeature.FEATURE_CUSTOM_INSTANCE_SYNC_TIME;- case 42:+ case 43:case "FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT":return PlanFeature.FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT;- case 43:+ case 44:case "FEATURE_RISK_ASSESSMENT":return PlanFeature.FEATURE_RISK_ASSESSMENT;- case 44:+ case 45:case "FEATURE_APPROVAL_WORKFLOW":return PlanFeature.FEATURE_APPROVAL_WORKFLOW;- case 45:+ case 46:case "FEATURE_AUDIT_LOG":return PlanFeature.FEATURE_AUDIT_LOG;- case 46:+ case 47:case "FEATURE_ENTERPRISE_SSO":return PlanFeature.FEATURE_ENTERPRISE_SSO;- case 47:+ case 48:case "FEATURE_TWO_FA":return PlanFeature.FEATURE_TWO_FA;- case 48:+ case 49:case "FEATURE_PASSWORD_RESTRICTIONS":return PlanFeature.FEATURE_PASSWORD_RESTRICTIONS;- case 49:+ case 50:case "FEATURE_DISALLOW_PASSWORD_SIGNIN":return PlanFeature.FEATURE_DISALLOW_PASSWORD_SIGNIN;- case 50:+ case 51:case "FEATURE_CUSTOM_ROLES":return PlanFeature.FEATURE_CUSTOM_ROLES;- case 51:+ case 52:case "FEATURE_REQUEST_ROLE_WORKFLOW":return PlanFeature.FEATURE_REQUEST_ROLE_WORKFLOW;- case 52:+ case 53:case "FEATURE_DATA_MASKING":return PlanFeature.FEATURE_DATA_MASKING;- case 53:+ case 54:case "FEATURE_DATA_CLASSIFICATION":return PlanFeature.FEATURE_DATA_CLASSIFICATION;- case 54:+ case 55:case "FEATURE_SCIM":return PlanFeature.FEATURE_SCIM;- case 55:+ case 56:case "FEATURE_DIRECTORY_SYNC":return PlanFeature.FEATURE_DIRECTORY_SYNC;- case 56:+ case 57:case "FEATURE_SIGN_IN_FREQUENCY_CONTROL":return PlanFeature.FEATURE_SIGN_IN_FREQUENCY_CONTROL;- case 57:+ case 58:case "FEATURE_EXTERNAL_SECRET_MANAGER":return PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER;- case 58:+ case 59:case "FEATURE_USER_EMAIL_DOMAIN_RESTRICTION":return PlanFeature.FEATURE_USER_EMAIL_DOMAIN_RESTRICTION;- case 59:+ case 60:case "FEATURE_ENVIRONMENT_MANAGEMENT":return PlanFeature.FEATURE_ENVIRONMENT_MANAGEMENT;- case 60:+ case 61:case "FEATURE_IM_NOTIFICATIONS":return PlanFeature.FEATURE_IM_NOTIFICATIONS;- case 61:+ case 62:case "FEATURE_TERRAFORM_PROVIDER":return PlanFeature.FEATURE_TERRAFORM_PROVIDER;- case 62:+ case 63:case "FEATURE_DATABASE_GROUPS":return PlanFeature.FEATURE_DATABASE_GROUPS;- case 63:+ case 64:case "FEATURE_ENVIRONMENT_TIERS":return PlanFeature.FEATURE_ENVIRONMENT_TIERS;- case 64:+ case 65:case "FEATURE_DASHBOARD_ANNOUNCEMENT":return PlanFeature.FEATURE_DASHBOARD_ANNOUNCEMENT;- case 65:+ case 66:case "FEATURE_API_INTEGRATION_GUIDANCE":return PlanFeature.FEATURE_API_INTEGRATION_GUIDANCE;- case 66:+ case 67:case "FEATURE_CUSTOM_LOGO":return PlanFeature.FEATURE_CUSTOM_LOGO;- case 67:+ case 68:case "FEATURE_WATERMARK":return PlanFeature.FEATURE_WATERMARK;- case 68:+ case 69:case "FEATURE_ROADMAP_PRIORITIZATION":return PlanFeature.FEATURE_ROADMAP_PRIORITIZATION;- case 69:+ case 70:case "FEATURE_CUSTOM_MSA":return PlanFeature.FEATURE_CUSTOM_MSA;- case 70:+ case 71:case "FEATURE_COMMUNITY_SUPPORT":return PlanFeature.FEATURE_COMMUNITY_SUPPORT;- case 71:+ case 72:case "FEATURE_EMAIL_SUPPORT":return PlanFeature.FEATURE_EMAIL_SUPPORT;- case 72:+ case 73:case "FEATURE_DEDICATED_SUPPORT_WITH_SLA":return PlanFeature.FEATURE_DEDICATED_SUPPORT_WITH_SLA;case -1:@@ -446,6 +450,8 @@ export function planFeatureToJSON(object: PlanFeature): string {return "FEATURE_BATCH_QUERY";case PlanFeature.FEATURE_INSTANCE_READ_ONLY_CONNECTION:return "FEATURE_INSTANCE_READ_ONLY_CONNECTION";+ case PlanFeature.FEATURE_QUERY_POLICY:+ return "FEATURE_QUERY_POLICY";case PlanFeature.FEATURE_RESTRICT_COPYING_DATA:return "FEATURE_RESTRICT_COPYING_DATA";case PlanFeature.FEATURE_IAM:@@ -600,90 +606,92 @@ export function planFeatureToNumber(object: PlanFeature): number {return 29;case PlanFeature.FEATURE_INSTANCE_READ_ONLY_CONNECTION:return 30;- case PlanFeature.FEATURE_RESTRICT_COPYING_DATA:+ case PlanFeature.FEATURE_QUERY_POLICY:return 31;- case PlanFeature.FEATURE_IAM:+ case PlanFeature.FEATURE_RESTRICT_COPYING_DATA:return 32;- case PlanFeature.FEATURE_INSTANCE_SSL_CONNECTION:+ case PlanFeature.FEATURE_IAM:return 33;- case PlanFeature.FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL:+ case PlanFeature.FEATURE_INSTANCE_SSL_CONNECTION:return 34;- case PlanFeature.FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION:+ case PlanFeature.FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL:return 35;- case PlanFeature.FEATURE_GOOGLE_AND_GITHUB_SSO:+ case PlanFeature.FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION:return 36;- case PlanFeature.FEATURE_USER_GROUPS:+ case PlanFeature.FEATURE_GOOGLE_AND_GITHUB_SSO:return 37;- case PlanFeature.FEATURE_DISALLOW_SELF_SERVICE_SIGNUP:+ case PlanFeature.FEATURE_USER_GROUPS:return 38;- case PlanFeature.FEATURE_DATABASE_SECRET_VARIABLES:+ case PlanFeature.FEATURE_DISALLOW_SELF_SERVICE_SIGNUP:return 39;- case PlanFeature.FEATURE_QUERY_DATASOURCE_RESTRICTION:+ case PlanFeature.FEATURE_DATABASE_SECRET_VARIABLES:return 40;- case PlanFeature.FEATURE_CUSTOM_INSTANCE_SYNC_TIME:+ case PlanFeature.FEATURE_QUERY_DATASOURCE_RESTRICTION:return 41;- case PlanFeature.FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT:+ case PlanFeature.FEATURE_CUSTOM_INSTANCE_SYNC_TIME:return 42;- case PlanFeature.FEATURE_RISK_ASSESSMENT:+ case PlanFeature.FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT:return 43;- case PlanFeature.FEATURE_APPROVAL_WORKFLOW:+ case PlanFeature.FEATURE_RISK_ASSESSMENT:return 44;- case PlanFeature.FEATURE_AUDIT_LOG:+ case PlanFeature.FEATURE_APPROVAL_WORKFLOW:return 45;- case PlanFeature.FEATURE_ENTERPRISE_SSO:+ case PlanFeature.FEATURE_AUDIT_LOG:return 46;- case PlanFeature.FEATURE_TWO_FA:+ case PlanFeature.FEATURE_ENTERPRISE_SSO:return 47;- case PlanFeature.FEATURE_PASSWORD_RESTRICTIONS:+ case PlanFeature.FEATURE_TWO_FA:return 48;- case PlanFeature.FEATURE_DISALLOW_PASSWORD_SIGNIN:+ case PlanFeature.FEATURE_PASSWORD_RESTRICTIONS:return 49;- case PlanFeature.FEATURE_CUSTOM_ROLES:+ case PlanFeature.FEATURE_DISALLOW_PASSWORD_SIGNIN:return 50;- case PlanFeature.FEATURE_REQUEST_ROLE_WORKFLOW:+ case PlanFeature.FEATURE_CUSTOM_ROLES:return 51;- case PlanFeature.FEATURE_DATA_MASKING:+ case PlanFeature.FEATURE_REQUEST_ROLE_WORKFLOW:return 52;- case PlanFeature.FEATURE_DATA_CLASSIFICATION:+ case PlanFeature.FEATURE_DATA_MASKING:return 53;- case PlanFeature.FEATURE_SCIM:+ case PlanFeature.FEATURE_DATA_CLASSIFICATION:return 54;- case PlanFeature.FEATURE_DIRECTORY_SYNC:+ case PlanFeature.FEATURE_SCIM:return 55;- case PlanFeature.FEATURE_SIGN_IN_FREQUENCY_CONTROL:+ case PlanFeature.FEATURE_DIRECTORY_SYNC:return 56;- case PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER:+ case PlanFeature.FEATURE_SIGN_IN_FREQUENCY_CONTROL:return 57;- case PlanFeature.FEATURE_USER_EMAIL_DOMAIN_RESTRICTION:+ case PlanFeature.FEATURE_EXTERNAL_SECRET_MANAGER:return 58;- case PlanFeature.FEATURE_ENVIRONMENT_MANAGEMENT:+ case PlanFeature.FEATURE_USER_EMAIL_DOMAIN_RESTRICTION:return 59;- case PlanFeature.FEATURE_IM_NOTIFICATIONS:+ case PlanFeature.FEATURE_ENVIRONMENT_MANAGEMENT:return 60;- case PlanFeature.FEATURE_TERRAFORM_PROVIDER:+ case PlanFeature.FEATURE_IM_NOTIFICATIONS:return 61;- case PlanFeature.FEATURE_DATABASE_GROUPS:+ case PlanFeature.FEATURE_TERRAFORM_PROVIDER:return 62;- case PlanFeature.FEATURE_ENVIRONMENT_TIERS:+ case PlanFeature.FEATURE_DATABASE_GROUPS:return 63;- case PlanFeature.FEATURE_DASHBOARD_ANNOUNCEMENT:+ case PlanFeature.FEATURE_ENVIRONMENT_TIERS:return 64;- case PlanFeature.FEATURE_API_INTEGRATION_GUIDANCE:+ case PlanFeature.FEATURE_DASHBOARD_ANNOUNCEMENT:return 65;- case PlanFeature.FEATURE_CUSTOM_LOGO:+ case PlanFeature.FEATURE_API_INTEGRATION_GUIDANCE:return 66;- case PlanFeature.FEATURE_WATERMARK:+ case PlanFeature.FEATURE_CUSTOM_LOGO:return 67;- case PlanFeature.FEATURE_ROADMAP_PRIORITIZATION:+ case PlanFeature.FEATURE_WATERMARK:return 68;- case PlanFeature.FEATURE_CUSTOM_MSA:+ case PlanFeature.FEATURE_ROADMAP_PRIORITIZATION:return 69;- case PlanFeature.FEATURE_COMMUNITY_SUPPORT:+ case PlanFeature.FEATURE_CUSTOM_MSA:return 70;- case PlanFeature.FEATURE_EMAIL_SUPPORT:+ case PlanFeature.FEATURE_COMMUNITY_SUPPORT:return 71;- case PlanFeature.FEATURE_DEDICATED_SUPPORT_WITH_SLA:+ case PlanFeature.FEATURE_EMAIL_SUPPORT:return 72;+ case PlanFeature.FEATURE_DEDICATED_SUPPORT_WITH_SLA:+ return 73;case PlanFeature.UNRECOGNIZED:default:return -1;@@ -693,9 +701,6 @@ export function planFeatureToNumber(object: PlanFeature): number {export interface GetSubscriptionRequest {}-export interface GetFeatureMatrixRequest {-}-export interface UpdateSubscriptionRequest {patch: PatchSubscription | undefined;}@@ -715,22 +720,6 @@ export interface Subscription {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[];@@ -784,45 +773,6 @@ export const GetSubscriptionRequest: MessageFns<GetSubscriptionRequest> = {},};-function createBaseGetFeatureMatrixRequest(): GetFeatureMatrixRequest {- return {};-}--export const GetFeatureMatrixRequest: MessageFns<GetFeatureMatrixRequest> = {- encode(_: GetFeatureMatrixRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): GetFeatureMatrixRequest {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseGetFeatureMatrixRequest();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- toJSON(_: GetFeatureMatrixRequest): unknown {- const obj: any = {};- return obj;- },-- create(base?: DeepPartial<GetFeatureMatrixRequest>): GetFeatureMatrixRequest {- return GetFeatureMatrixRequest.fromPartial(base ?? {});- },- fromPartial(_: DeepPartial<GetFeatureMatrixRequest>): GetFeatureMatrixRequest {- const message = createBaseGetFeatureMatrixRequest();- return message;- },-};-function createBaseUpdateSubscriptionRequest(): UpdateSubscriptionRequest {return { patch: undefined };}@@ -1105,212 +1055,6 @@ export const Subscription: MessageFns<Subscription> = {},};-function createBaseFeatureMatrix(): FeatureMatrix {- return { features: [] };-}--export const FeatureMatrix: MessageFns<FeatureMatrix> = {- encode(message: FeatureMatrix, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- for (const v of message.features) {- Feature.encode(v!, writer.uint32(10).fork()).join();- }- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): FeatureMatrix {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseFeatureMatrix();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.features.push(Feature.decode(reader, reader.uint32()));- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- toJSON(message: FeatureMatrix): unknown {- const obj: any = {};- if (message.features?.length) {- obj.features = message.features.map((e) => Feature.toJSON(e));- }- return obj;- },-- create(base?: DeepPartial<FeatureMatrix>): FeatureMatrix {- return FeatureMatrix.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<FeatureMatrix>): FeatureMatrix {- const message = createBaseFeatureMatrix();- message.features = object.features?.map((e) => Feature.fromPartial(e)) || [];- return message;- },-};--function createBaseFeature(): Feature {- return { name: "", matrix: {} };-}--export const Feature: MessageFns<Feature> = {- encode(message: Feature, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.name !== "") {- writer.uint32(10).string(message.name);- }- Object.entries(message.matrix).forEach(([key, value]) => {- Feature_MatrixEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).join();- });- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): Feature {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseFeature();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.name = reader.string();- continue;- }- case 2: {- if (tag !== 18) {- break;- }-- const entry2 = Feature_MatrixEntry.decode(reader, reader.uint32());- if (entry2.value !== undefined) {- message.matrix[entry2.key] = entry2.value;- }- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- toJSON(message: Feature): unknown {- const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.matrix) {- const entries = Object.entries(message.matrix);- if (entries.length > 0) {- obj.matrix = {};- entries.forEach(([k, v]) => {- obj.matrix[k] = v;- });- }- }- return obj;- },-- create(base?: DeepPartial<Feature>): Feature {- return Feature.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<Feature>): Feature {- const message = createBaseFeature();- message.name = object.name ?? "";- message.matrix = Object.entries(object.matrix ?? {}).reduce<{ [key: string]: boolean }>((acc, [key, value]) => {- if (value !== undefined) {- acc[key] = globalThis.Boolean(value);- }- return acc;- }, {});- return message;- },-};--function createBaseFeature_MatrixEntry(): Feature_MatrixEntry {- return { key: "", value: false };-}--export const Feature_MatrixEntry: MessageFns<Feature_MatrixEntry> = {- encode(message: Feature_MatrixEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.key !== "") {- writer.uint32(10).string(message.key);- }- if (message.value !== false) {- writer.uint32(16).bool(message.value);- }- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): Feature_MatrixEntry {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseFeature_MatrixEntry();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.key = reader.string();- continue;- }- case 2: {- if (tag !== 16) {- break;- }-- message.value = reader.bool();- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- toJSON(message: Feature_MatrixEntry): unknown {- const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value !== false) {- obj.value = message.value;- }- return obj;- },-- create(base?: DeepPartial<Feature_MatrixEntry>): Feature_MatrixEntry {- return Feature_MatrixEntry.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<Feature_MatrixEntry>): Feature_MatrixEntry {- const message = createBaseFeature_MatrixEntry();- message.key = object.key ?? "";- message.value = object.value ?? false;- return message;- },-};-function createBasePlanConfig(): PlanConfig {return { plans: [], instanceFeatures: [] };}@@ -1524,20 +1268,6 @@ export const SubscriptionServiceDefinition = {},},},- getFeatureMatrix: {- name: "GetFeatureMatrix",- requestType: GetFeatureMatrixRequest,- requestStream: false,- responseType: FeatureMatrix,- responseStream: false,- options: {- _unknownFields: {- 8410: [new Uint8Array([0])],- 800000: [new Uint8Array([1])],- 578365826: [new Uint8Array([13, 18, 11, 47, 118, 49, 47, 102, 101, 97, 116, 117, 114, 101])],- },- },- },updateSubscription: {name: "UpdateSubscription",requestType: UpdateSubscriptionRequest,diff --git a/frontend/src/utils/v1/database.ts b/frontend/src/utils/v1/database.tsindex 4cd8c518e5..60f108b1b1 100644--- a/frontend/src/utils/v1/database.ts+++ b/frontend/src/utils/v1/database.ts@@ -1,14 +1,12 @@-import { checkQuerierPermission, hasFeature } from "@/store";-import { PlanFeature } from "@/types/proto/v1/subscription_service";+import { checkQuerierPermission } from "@/store";import {databaseNamePrefix,instanceNamePrefix,} from "@/store/modules/v1/common";-import { QueryPermissionQueryAny, UNKNOWN_ID } from "@/types";import type { ComposedDatabase, QueryPermission } from "@/types";+import { QueryPermissionQueryAny, UNKNOWN_ID } from "@/types";import {- hasPermissionToCreateChangeDatabaseIssue,- hasWorkspacePermissionV2,+ hasWorkspacePermissionV2} from "../iam";import { extractProjectResourceName } from "./project";@@ -44,26 +42,6 @@ export const extractDatabaseResourceName = (};};-// TODO(p0ny): remove-export const isArchivedDatabaseV1 = (_db: ComposedDatabase): boolean => {- return false;-};--// isDatabaseV1Alterable checks if database alterable for user.-export const isDatabaseV1Alterable = (database: ComposedDatabase): boolean => {- if (!hasFeature(PlanFeature.FEATURE_IAM)) {- // The current plan doesn't have access control feature.- // Fallback to true.- return true;- }-- if (hasPermissionToCreateChangeDatabaseIssue(database)) {- return true;- }-- return false;-};-// isDatabaseV1Queryable checks if database allowed to query in SQL Editor.export const isDatabaseV1Queryable = (database: ComposedDatabase,diff --git a/frontend/src/views/InstanceDashboard.vue b/frontend/src/views/InstanceDashboard.vueindex 66c28937ff..3582670814 100644--- a/frontend/src/views/InstanceDashboard.vue+++ b/frontend/src/views/InstanceDashboard.vue@@ -64,25 +64,13 @@</DrawerContent></InstanceForm></Drawer>-- <FeatureModal- :open="state.showFeatureModal"- :feature="PlanFeature.FEATURE_IAM"- @cancel="state.showFeatureModal = false"- /></template><script lang="tsx" setup>-import { PlusIcon } from "lucide-vue-next";-import { NButton } from "naive-ui";-import { computed, onMounted, reactive, ref } from "vue";-import { useI18n } from "vue-i18n";-import { useRouter } from "vue-router";import { BBAttention } from "@/bbkit";import AdvancedSearch from "@/components/AdvancedSearch";import type { ScopeOption } from "@/components/AdvancedSearch/types";import { useCommonSearchScopeOptions } from "@/components/AdvancedSearch/useCommonSearchScopeOptions";-import { FeatureModal } from "@/components/FeatureGuard";import {InstanceForm,Form as InstanceFormBody,@@ -105,8 +93,12 @@ 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 { PlanFeature } from "@/types/proto/v1/subscription_service";import { type SearchParams, hasWorkspacePermissionV2 } from "@/utils";+import { PlusIcon } from "lucide-vue-next";+import { NButton } from "naive-ui";+import { computed, onMounted, reactive, ref } from "vue";+import { useI18n } from "vue-i18n";+import { useRouter } from "vue-router";interface LocalState {params: SearchParams;diff --git a/frontend/src/views/ProfileDashboard.vue b/frontend/src/views/ProfileDashboard.vueindex 2cd6f2158d..b4a442a4ae 100644--- a/frontend/src/views/ProfileDashboard.vue+++ b/frontend/src/views/ProfileDashboard.vue@@ -89,7 +89,6 @@</NTag></div><router-link- v-if="!hasRBACFeature":to="'/setting/subscription'"class="normal-link">@@ -325,7 +324,6 @@ onUnmounted(() => {document.removeEventListener("keydown", keyboardHandler);});-const hasRBACFeature = featureToRef(PlanFeature.FEATURE_IAM);const has2FAFeature = featureToRef(PlanFeature.FEATURE_TWO_FA);const isMFAEnabled = computed(() => {diff --git a/frontend/src/views/SettingWorkspaceMembers.vue b/frontend/src/views/SettingWorkspaceMembers.vueindex 660ec3de51..91072c296c 100644--- a/frontend/src/views/SettingWorkspaceMembers.vue+++ b/frontend/src/views/SettingWorkspaceMembers.vue@@ -1,7 +1,5 @@<template><div class="w-full mx-auto space-y-4">- <FeatureAttention :feature="PlanFeature.FEATURE_IAM" />-<NoPermissionPlaceholderv-if="permissionStore.onlyWorkspaceMember"class="py-6"@@ -83,31 +81,29 @@</template><script setup lang="ts">-import { computedAsync } from "@vueuse/core";-import { NButton, NTabs, NTabPane, useDialog } from "naive-ui";-import { computed, reactive } from "vue";-import { useI18n } from "vue-i18n";-import { FeatureAttention } from "@/components/FeatureGuard";import EditMemberRoleDrawer from "@/components/Member/EditMemberRoleDrawer.vue";import MemberDataTable from "@/components/Member/MemberDataTable/index.vue";import MemberDataTableByRole from "@/components/Member/MemberDataTableByRole.vue";import type { MemberBinding } from "@/components/Member/types";import {- getMemberBindingsByRole,getMemberBindings,+ getMemberBindingsByRole,} from "@/components/Member/utils";import NoPermissionPlaceholder from "@/components/misc/NoPermissionPlaceholder.vue";import { SearchBox } from "@/components/v2";import {pushNotification,useCurrentUserV1,- useWorkspaceV1Store,usePermissionStore,+ useWorkspaceV1Store,} from "@/store";import { userBindingPrefix } from "@/types";import { User, UserType } from "@/types/proto/v1/user_service";-import { PlanFeature } from "@/types/proto/v1/subscription_service";import { hasWorkspacePermissionV2 } from "@/utils";+import { computedAsync } from "@vueuse/core";+import { NButton, NTabPane, NTabs, useDialog } from "naive-ui";+import { computed, reactive } from "vue";+import { useI18n } from "vue-i18n";interface LocalState {searchText: string;diff --git a/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue b/frontend/src/views/SettingWorkspaceSQLReviewCreate.vueindex 9edb5bb030..5ee54cae4e 100644--- a/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue+++ b/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue@@ -1,6 +1,5 @@<template><div class="space-y-4 h-full flex flex-col">- <FeatureAttention :feature="PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW" /><SQLReviewCreationclass="flex-1":selected-rule-list="[]"@@ -10,11 +9,9 @@</template><script lang="ts" setup>-import { computed, watchEffect } from "vue";-import { FeatureAttention } from "@/components/FeatureGuard";import { SQLReviewCreation } from "@/components/SQLReview";import { useSQLReviewStore } from "@/store";-import { PlanFeature } from "@/types/proto/v1/subscription_service";+import { computed, watchEffect } from "vue";const attachedResources = computed(() => {const url = new URL(window.location.href);diff --git a/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue b/frontend/src/views/SettingWorkspaceSQLReviewDetail.vueindex f79d70529e..9df9d2b221 100644--- a/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue+++ b/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue@@ -1,5 +1,4 @@<template>- <FeatureAttention class="mb-4" :feature="PlanFeature.FEATURE_PRE_DEPLOYMENT_SQL_REVIEW" /><SQLReviewCreationv-if="state.editMode"key="sql-review-creation"@@ -144,18 +143,6 @@</template><script lang="tsx" setup>-import { useTitle } from "@vueuse/core";-import { NButton } from "naive-ui";-import {- computed,- reactive,- watch,- watchEffect,- onMounted,- nextTick,-} from "vue";-import { useI18n } from "vue-i18n";-import { useRouter, useRoute } from "vue-router";import {BBAlert,BBAttention,@@ -163,9 +150,7 @@ import {BBButtonConfirm,BBTextField,} from "@/bbkit";-import { FeatureAttention } from "@/components/FeatureGuard";import { SQLReviewCreation } from "@/components/SQLReview";-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";@@ -179,14 +164,26 @@ import {} from "@/store";import type { RuleTemplateV2 } from "@/types";import {- unknown,- UNKNOWN_ID,+ convertRuleMapToPolicyRuleList,getRuleMapByEngine,ruleIsAvailableInSubscription,- convertRuleMapToPolicyRuleList,+ unknown,+ UNKNOWN_ID,} from "@/types";import type { Engine } from "@/types/proto/v1/common";import { hasWorkspacePermissionV2, sqlReviewNameFromSlug } from "@/utils";+import { useTitle } from "@vueuse/core";+import { NButton } from "naive-ui";+import {+ computed,+ nextTick,+ onMounted,+ reactive,+ watch,+ watchEffect,+} from "vue";+import { useI18n } from "vue-i18n";+import { useRoute, useRouter } from "vue-router";const props = defineProps<{sqlReviewPolicySlug: string;diff --git a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/TreeNode/DatabaseNode.vue b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/TreeNode/DatabaseNode.vueindex 3546fc7266..35c7849e7a 100644--- a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/TreeNode/DatabaseNode.vue+++ b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/TreeNode/DatabaseNode.vue@@ -36,12 +36,11 @@ import { LinkIcon } from "lucide-vue-next";import { NCheckbox } from "naive-ui";import { computed } from "vue";import { RichDatabaseName } from "@/components/v2";-import { hasFeature, useAppFeature, useSQLEditorTabStore } from "@/store";+import { useAppFeature, useSQLEditorTabStore } from "@/store";import type {SQLEditorTreeNode as TreeNode,SQLEditorTreeFactor as Factor,} from "@/types";-import { PlanFeature } from "@/types/proto/v1/subscription_service";import { isDatabaseV1Queryable } from "@/utils";import RequestQueryButton from "../../../EditorCommon/ResultView/RequestQueryButton.vue";@@ -77,9 +76,7 @@ const database = computed(const canQuery = computed(() => isDatabaseV1Queryable(database.value));const showRequestQueryButton = computed(() => {- // Developer self-helped request query is guarded by "Access Control" featurereturn (- 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.vueindex 942d79fbf1..c3b00f63fe 100644--- a/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue+++ b/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue@@ -91,7 +91,7 @@trigger="click"placement="bottom-end":show-arrow="false"- :disabled="!hasSharedSQLScriptFeature"+ :disabled="false"><template #trigger><NPopover placement="bottom" trigger="hover">@@ -111,7 +111,6 @@<template #default><div class="flex items-center gap-1"><span>{{ $t("common.share") }}</span>- <FeatureBadge :feature="PlanFeature.FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS" /></div></template></NPopover>@@ -146,25 +145,14 @@</template><script lang="ts" setup>+import { FeatureModal } from "@/components/FeatureGuard";import {- ChevronLeftIcon,- PlayIcon,- SaveIcon,- Share2Icon,-} from "lucide-vue-next";-import { NButtonGroup, NButton, NPopover, NTooltip } from "naive-ui";-import { storeToRefs } from "pinia";-import { computed, reactive } from "vue";-import { useI18n } from "vue-i18n";-import { FeatureBadge, FeatureModal } from "@/components/FeatureGuard";-import {- useUIStateStore,- featureToRef,- useSQLEditorTabStore,- useConnectionOfCurrentSQLEditorTab,- useWorkSheetStore,useAppFeature,+ useConnectionOfCurrentSQLEditorTab,useSQLEditorStore,+ useSQLEditorTabStore,+ useUIStateStore,+ useWorkSheetStore} from "@/store";import {DEFAULT_SQL_EDITOR_TAB_MODE,@@ -172,7 +160,17 @@ import {} from "@/types";import { Engine } from "@/types/proto/v1/common";import { PlanFeature } from "@/types/proto/v1/subscription_service";-import { keyboardShortcutStr, isWorksheetWritableV1 } from "@/utils";+import { isWorksheetWritableV1, keyboardShortcutStr } from "@/utils";+import {+ ChevronLeftIcon,+ PlayIcon,+ SaveIcon,+ Share2Icon,+} from "lucide-vue-next";+import { NButton, NButtonGroup, NPopover, NTooltip } from "naive-ui";+import { storeToRefs } from "pinia";+import { computed, reactive } from "vue";+import { useI18n } from "vue-i18n";import { useSQLEditorContext } from "../context";import AdminModeButton from "./AdminModeButton.vue";import ContainerChooser from "./ContainerChooser.vue";@@ -200,7 +198,6 @@ const tabStore = useSQLEditorTabStore();const uiStateStore = useUIStateStore();const { events } = useSQLEditorContext();const { resultRowsLimit } = storeToRefs(useSQLEditorStore());-const hasSharedSQLScriptFeature = featureToRef(PlanFeature.FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS);const disallowShareWorksheet = useAppFeature("bb.feature.sql-editor.disallow-share-worksheet");@@ -341,8 +338,5 @@ const handleClickSave = () => {};const handleShareButtonClick = () => {- if (!hasSharedSQLScriptFeature.value) {- state.requiredFeatureName = PlanFeature.FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS;- }};</script>diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vueindex 1e35e41062..783e652392 100644--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue@@ -115,37 +115,35 @@</template><script lang="ts" setup>-import { Info } from "lucide-vue-next";-import {- darkTheme,- NConfigProvider,- NTabs,- NTabPane,- NTooltip,-} from "naive-ui";-import { Status } from "nice-grpc-common";-import { computed, ref, toRef } from "vue";-import { useI18n } from "vue-i18n";import { darkThemeOverrides } from "@/../naive-ui.config";import { BBSpin } from "@/bbkit";import SyncDatabaseButton from "@/components/DatabaseDetail/SyncDatabaseButton.vue";import { parseStringToResource } from "@/components/GrantRequestPanel/DatabaseResourceForm/common";import { Drawer } from "@/components/v2";import {- hasFeature,useAppFeature,useConnectionOfCurrentSQLEditorTab,- usePolicyV1Store,+ usePolicyV1Store} from "@/store";import type {ComposedDatabase,+ DatabaseResource,SQLEditorQueryParams,SQLResultSetV1,- DatabaseResource,} from "@/types";import { PolicyType } from "@/types/proto/v1/org_policy_service";-import { PlanFeature } from "@/types/proto/v1/subscription_service";import { hasWorkspacePermissionV2 } from "@/utils";+import { Info } from "lucide-vue-next";+import {+ darkTheme,+ NConfigProvider,+ NTabPane,+ NTabs,+ NTooltip,+} from "naive-ui";+import { Status } from "nice-grpc-common";+import { computed, ref, toRef } from "vue";+import { useI18n } from "vue-i18n";import DetailPanel from "./DetailPanel";import EmptyView from "./EmptyView.vue";import ErrorView from "./ErrorView";@@ -211,9 +209,7 @@ const missingResource = computed((): DatabaseResource | undefined => {});const showRequestQueryButton = computed(() => {- // Developer self-helped request query is guarded by "Access Control" featurereturn (- 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.vueindex 1586f7ada7..65950e62b3 100644--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue@@ -176,49 +176,23 @@</template><script lang="ts" setup>-import type { ColumnDef } from "@tanstack/vue-table";-import {- getCoreRowModel,- getPaginationRowModel,- getSortedRowModel,- useVueTable,-} from "@tanstack/vue-table";-import { useDebounceFn, useLocalStorage } from "@vueuse/core";-import dayjs from "dayjs";-import { isEmpty } from "lodash-es";-import { ExternalLinkIcon } from "lucide-vue-next";-import { NFormItem } from "naive-ui";-import {- NButton,- NInput,- NSwitch,- NPagination,- NTooltip,- type SelectOption,- NSelect,-} from "naive-ui";-import { v4 as uuidv4 } from "uuid";-import { computed, reactive } from "vue";-import { useI18n } from "vue-i18n";-import { useRouter } from "vue-router";import { BBAttention } from "@/bbkit";import type {- ExportOption,DownloadContent,+ ExportOption,} from "@/components/DataExportButton.vue";import DataExportButton from "@/components/DataExportButton.vue";import DatabaseInfo from "@/components/DatabaseInfo.vue";import { DISMISS_PLACEHOLDER } from "@/plugins/ai/components/state";import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";import {- useSQLEditorTabStore,- featureToRef,- useConnectionOfCurrentSQLEditorTab,- useSQLEditorStore,useAppFeature,+ useConnectionOfCurrentSQLEditorTab,usePolicyByParentAndType,- useStorageStore,+ useSQLEditorStore,+ useSQLEditorTabStore,useSQLStore,+ useStorageStore} from "@/store";import type { ComposedDatabase, SQLEditorQueryParams } from "@/types";import {@@ -226,11 +200,9 @@ import {isValidDatabaseName,isValidInstanceName,} from "@/types";-import { ExportFormat } from "@/types/proto/v1/common";-import { Engine } from "@/types/proto/v1/common";+import { Engine, ExportFormat } from "@/types/proto/v1/common";import { PolicyType } from "@/types/proto/v1/org_policy_service";import { DatabaseChangeMode } from "@/types/proto/v1/setting_service";-import { PlanFeature } from "@/types/proto/v1/subscription_service";import type {QueryResult,QueryRow,@@ -246,6 +218,25 @@ import {instanceV1HasStructuredQueryResult,isNullOrUndefined,} from "@/utils";+import type { ColumnDef } from "@tanstack/vue-table";+import {+ getCoreRowModel,+ getPaginationRowModel,+ getSortedRowModel,+ useVueTable,+} from "@tanstack/vue-table";+import { useDebounceFn, useLocalStorage } from "@vueuse/core";+import dayjs from "dayjs";+import { isEmpty } from "lodash-es";+import { ExternalLinkIcon } from "lucide-vue-next";+import {+ NButton, NFormItem, NInput, NPagination, NSelect, NSwitch, NTooltip,+ type SelectOption+} from "naive-ui";+import { v4 as uuidv4 } from "uuid";+import { computed, reactive } from "vue";+import { useI18n } from "vue-i18n";+import { useRouter } from "vue-router";import DataBlock from "./DataBlock.vue";import DataTable from "./DataTable";import { provideSelectionContext } from "./DataTable/common/selection-logic";@@ -332,12 +323,6 @@ const allowToRequestExportData = computed(() => {return false;}- // The current plan doesn't have access control feature.- // Developers can not self-helped to request export.- if (!featureToRef(PlanFeature.FEATURE_IAM).value) {- return false;- }-// SQL Editor Mode has no issues// So we cannot self-helped to request export either.if (databaseChangeMode.value === DatabaseChangeMode.EDITOR) {diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 7ea1fef869..1a805bb3fe 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -496,24 +496,6 @@ paths:application/json:schema:$ref: '#/components/schemas/Status'- /v1/feature:- get:- tags:- - SubscriptionService- operationId: SubscriptionService_GetFeatureMatrix- responses:- "200":- description: OK- content:- application/json:- schema:- $ref: '#/components/schemas/FeatureMatrix'- default:- description: Default error response- content:- application/json:- schema:- $ref: '#/components/schemas/Status'/v1/groups:get:tags:@@ -9984,24 +9966,6 @@ components:This results from the macro `has(request.auth)`.description: A field selection expression. e.g. `request.auth`.- Feature:- type: object- properties:- name:- type: string- description: Name is the feature name.- matrix:- type: object- additionalProperties:- type: boolean- description: Matrix is the feature matrix for different plan. The key is the plan enum in string value.- FeatureMatrix:- type: object- properties:- features:- type: array- items:- $ref: '#/components/schemas/Feature'FieldMapping:type: objectproperties:diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 0b4f53df73..8f05768501 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -206,10 +206,6 @@- [IssueService](#bytebase-v1-IssueService)- [v1/subscription_service.proto](#v1_subscription_service-proto)- - [Feature](#bytebase-v1-Feature)- - [Feature.MatrixEntry](#bytebase-v1-Feature-MatrixEntry)- - [FeatureMatrix](#bytebase-v1-FeatureMatrix)- - [GetFeatureMatrixRequest](#bytebase-v1-GetFeatureMatrixRequest)- [GetSubscriptionRequest](#bytebase-v1-GetSubscriptionRequest)- [PatchSubscription](#bytebase-v1-PatchSubscription)- [PlanConfig](#bytebase-v1-PlanConfig)@@ -3924,63 +3920,6 @@ ANY means approving any node will proceed.-<a name="bytebase-v1-Feature"></a>--### Feature----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Name is the feature name. |-| matrix | [Feature.MatrixEntry](#bytebase-v1-Feature-MatrixEntry) | repeated | Matrix is the feature matrix for different plan. The key is the plan enum in string value. |-------<a name="bytebase-v1-Feature-MatrixEntry"></a>--### Feature.MatrixEntry----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [bool](#bool) | | |-------<a name="bytebase-v1-FeatureMatrix"></a>--### FeatureMatrix----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| features | [Feature](#bytebase-v1-Feature) | repeated | |-------<a name="bytebase-v1-GetFeatureMatrixRequest"></a>--### GetFeatureMatrixRequest-------<a name="bytebase-v1-GetSubscriptionRequest"></a>### GetSubscriptionRequest@@ -4117,48 +4056,49 @@ PlanFeature represents the available features in Bytebase| 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 & 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 & 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 | |+| FEATURE_QUERY_POLICY | 31 | |+| FEATURE_RESTRICT_COPYING_DATA | 32 | |+| FEATURE_IAM | 33 | Security & Compliance |+| 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 | Administration & Support |+| 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 | 73 | |@@ -4188,7 +4128,6 @@ PlanFeature represents the available features in Bytebase| Method Name | Request Type | Response Type | Description || ----------- | ------------ | ------------- | ------------|| GetSubscription | [GetSubscriptionRequest](#bytebase-v1-GetSubscriptionRequest) | [Subscription](#bytebase-v1-Subscription) | |-| GetFeatureMatrix | [GetFeatureMatrixRequest](#bytebase-v1-GetFeatureMatrixRequest) | [FeatureMatrix](#bytebase-v1-FeatureMatrix) | || UpdateSubscription | [UpdateSubscriptionRequest](#bytebase-v1-UpdateSubscriptionRequest) | [Subscription](#bytebase-v1-Subscription) | |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 2fd6ca59d5..6cbefee500 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -963,22 +963,6 @@<a href="#v1%2fsubscription_service.proto">v1/subscription_service.proto</a><ul>- <li>- <a href="#bytebase.v1.Feature"><span class="badge">M</span>Feature</a>- </li>-- <li>- <a href="#bytebase.v1.Feature.MatrixEntry"><span class="badge">M</span>Feature.MatrixEntry</a>- </li>-- <li>- <a href="#bytebase.v1.FeatureMatrix"><span class="badge">M</span>FeatureMatrix</a>- </li>-- <li>- <a href="#bytebase.v1.GetFeatureMatrixRequest"><span class="badge">M</span>GetFeatureMatrixRequest</a>- </li>-<li><a href="#bytebase.v1.GetSubscriptionRequest"><span class="badge">M</span>GetSubscriptionRequest</a></li>@@ -11820,99 +11804,6 @@ The access is based on approval flow.</p></td><p></p>- <h3 id="bytebase.v1.Feature">Feature</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Name is the feature name. </p></td>- </tr>-- <tr>- <td>matrix</td>- <td><a href="#bytebase.v1.Feature.MatrixEntry">Feature.MatrixEntry</a></td>- <td>repeated</td>- <td><p>Matrix is the feature matrix for different plan. The key is the plan enum in string value. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.Feature.MatrixEntry">Feature.MatrixEntry</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>key</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>value</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p> </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.FeatureMatrix">FeatureMatrix</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>features</td>- <td><a href="#bytebase.v1.Feature">Feature</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.GetFeatureMatrixRequest">GetFeatureMatrixRequest</h3>- <p></p>-----<h3 id="bytebase.v1.GetSubscriptionRequest">GetSubscriptionRequest</h3><p></p>@@ -12314,254 +12205,260 @@ The access is based on approval flow.</p></td></tr><tr>- <td>FEATURE_RESTRICT_COPYING_DATA</td>+ <td>FEATURE_QUERY_POLICY</td><td>31</td><td><p></p></td></tr><tr>- <td>FEATURE_IAM</td>+ <td>FEATURE_RESTRICT_COPYING_DATA</td><td>32</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>FEATURE_IAM</td>+ <td>33</td><td><p>Security & Compliance</p></td></tr><tr><td>FEATURE_INSTANCE_SSL_CONNECTION</td>- <td>33</td>+ <td>34</td><td><p></p></td></tr><tr><td>FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL</td>- <td>34</td>+ <td>35</td><td><p></p></td></tr><tr><td>FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION</td>- <td>35</td>+ <td>36</td><td><p></p></td></tr><tr><td>FEATURE_GOOGLE_AND_GITHUB_SSO</td>- <td>36</td>+ <td>37</td><td><p></p></td></tr><tr><td>FEATURE_USER_GROUPS</td>- <td>37</td>+ <td>38</td><td><p></p></td></tr><tr><td>FEATURE_DISALLOW_SELF_SERVICE_SIGNUP</td>- <td>38</td>+ <td>39</td><td><p></p></td></tr><tr><td>FEATURE_DATABASE_SECRET_VARIABLES</td>- <td>39</td>+ <td>40</td><td><p></p></td></tr><tr><td>FEATURE_QUERY_DATASOURCE_RESTRICTION</td>- <td>40</td>+ <td>41</td><td><p></p></td></tr><tr><td>FEATURE_CUSTOM_INSTANCE_SYNC_TIME</td>- <td>41</td>+ <td>42</td><td><p></p></td></tr><tr><td>FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT</td>- <td>42</td>+ <td>43</td><td><p></p></td></tr><tr><td>FEATURE_RISK_ASSESSMENT</td>- <td>43</td>+ <td>44</td><td><p></p></td></tr><tr><td>FEATURE_APPROVAL_WORKFLOW</td>- <td>44</td>+ <td>45</td><td><p></p></td></tr><tr><td>FEATURE_AUDIT_LOG</td>- <td>45</td>+ <td>46</td><td><p></p></td></tr><tr><td>FEATURE_ENTERPRISE_SSO</td>- <td>46</td>+ <td>47</td><td><p></p></td></tr><tr><td>FEATURE_TWO_FA</td>- <td>47</td>+ <td>48</td><td><p></p></td></tr><tr><td>FEATURE_PASSWORD_RESTRICTIONS</td>- <td>48</td>+ <td>49</td><td><p></p></td></tr><tr><td>FEATURE_DISALLOW_PASSWORD_SIGNIN</td>- <td>49</td>+ <td>50</td><td><p></p></td></tr><tr><td>FEATURE_CUSTOM_ROLES</td>- <td>50</td>+ <td>51</td><td><p></p></td></tr><tr><td>FEATURE_REQUEST_ROLE_WORKFLOW</td>- <td>51</td>+ <td>52</td><td><p></p></td></tr><tr><td>FEATURE_DATA_MASKING</td>- <td>52</td>+ <td>53</td><td><p></p></td></tr><tr><td>FEATURE_DATA_CLASSIFICATION</td>- <td>53</td>+ <td>54</td><td><p></p></td></tr><tr><td>FEATURE_SCIM</td>- <td>54</td>+ <td>55</td><td><p></p></td></tr><tr><td>FEATURE_DIRECTORY_SYNC</td>- <td>55</td>+ <td>56</td><td><p></p></td></tr><tr><td>FEATURE_SIGN_IN_FREQUENCY_CONTROL</td>- <td>56</td>+ <td>57</td><td><p></p></td></tr><tr><td>FEATURE_EXTERNAL_SECRET_MANAGER</td>- <td>57</td>+ <td>58</td><td><p></p></td></tr><tr><td>FEATURE_USER_EMAIL_DOMAIN_RESTRICTION</td>- <td>58</td>+ <td>59</td><td><p></p></td></tr><tr><td>FEATURE_ENVIRONMENT_MANAGEMENT</td>- <td>59</td>+ <td>60</td><td><p>Administration & Support</p></td></tr><tr><td>FEATURE_IM_NOTIFICATIONS</td>- <td>60</td>+ <td>61</td><td><p></p></td></tr><tr><td>FEATURE_TERRAFORM_PROVIDER</td>- <td>61</td>+ <td>62</td><td><p></p></td></tr><tr><td>FEATURE_DATABASE_GROUPS</td>- <td>62</td>+ <td>63</td><td><p></p></td></tr><tr><td>FEATURE_ENVIRONMENT_TIERS</td>- <td>63</td>+ <td>64</td><td><p></p></td></tr><tr><td>FEATURE_DASHBOARD_ANNOUNCEMENT</td>- <td>64</td>+ <td>65</td><td><p></p></td></tr><tr><td>FEATURE_API_INTEGRATION_GUIDANCE</td>- <td>65</td>+ <td>66</td><td><p></p></td></tr><tr><td>FEATURE_CUSTOM_LOGO</td>- <td>66</td>+ <td>67</td><td><p></p></td></tr><tr><td>FEATURE_WATERMARK</td>- <td>67</td>+ <td>68</td><td><p></p></td></tr><tr><td>FEATURE_ROADMAP_PRIORITIZATION</td>- <td>68</td>+ <td>69</td><td><p></p></td></tr><tr><td>FEATURE_CUSTOM_MSA</td>- <td>69</td>+ <td>70</td><td><p></p></td></tr><tr><td>FEATURE_COMMUNITY_SUPPORT</td>- <td>70</td>+ <td>71</td><td><p></p></td></tr><tr><td>FEATURE_EMAIL_SUPPORT</td>- <td>71</td>+ <td>72</td><td><p></p></td></tr><tr><td>FEATURE_DEDICATED_SUPPORT_WITH_SLA</td>- <td>72</td>+ <td>73</td><td><p></p></td></tr>@@ -12622,13 +12519,6 @@ The access is based on approval flow.</p></td><td><p></p></td></tr>- <tr>- <td>GetFeatureMatrix</td>- <td><a href="#bytebase.v1.GetFeatureMatrixRequest">GetFeatureMatrixRequest</a></td>- <td><a href="#bytebase.v1.FeatureMatrix">FeatureMatrix</a></td>- <td><p></p></td>- </tr>-<tr><td>UpdateSubscription</td><td><a href="#bytebase.v1.UpdateSubscriptionRequest">UpdateSubscriptionRequest</a></td>@@ -12666,16 +12556,6 @@ The access is based on approval flow.</p></td>- <tr>- <td>GetFeatureMatrix</td>- <td>GET</td>- <td>/v1/feature</td>- <td></td>- </tr>----<tr><td>UpdateSubscription</td><td>PATCH</td>diff --git a/proto/generated-go/v1/subscription_service.pb.go b/proto/generated-go/v1/subscription_service.pb.goindex 6839b91fa7..908193e0dc 100644--- a/proto/generated-go/v1/subscription_service.pb.go+++ b/proto/generated-go/v1/subscription_service.pb.go@@ -112,50 +112,51 @@ const (PlanFeature_FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION PlanFeature = 28PlanFeature_FEATURE_BATCH_QUERY PlanFeature = 29PlanFeature_FEATURE_INSTANCE_READ_ONLY_CONNECTION PlanFeature = 30- PlanFeature_FEATURE_RESTRICT_COPYING_DATA PlanFeature = 31+ PlanFeature_FEATURE_QUERY_POLICY PlanFeature = 31+ PlanFeature_FEATURE_RESTRICT_COPYING_DATA PlanFeature = 32// Security & Compliance- 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+ PlanFeature_FEATURE_IAM PlanFeature = 33+ PlanFeature_FEATURE_INSTANCE_SSL_CONNECTION PlanFeature = 34+ PlanFeature_FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL PlanFeature = 35+ PlanFeature_FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION PlanFeature = 36+ PlanFeature_FEATURE_GOOGLE_AND_GITHUB_SSO PlanFeature = 37+ PlanFeature_FEATURE_USER_GROUPS PlanFeature = 38+ PlanFeature_FEATURE_DISALLOW_SELF_SERVICE_SIGNUP PlanFeature = 39+ PlanFeature_FEATURE_DATABASE_SECRET_VARIABLES PlanFeature = 40+ PlanFeature_FEATURE_QUERY_DATASOURCE_RESTRICTION PlanFeature = 41+ PlanFeature_FEATURE_CUSTOM_INSTANCE_SYNC_TIME PlanFeature = 42+ PlanFeature_FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT PlanFeature = 43+ PlanFeature_FEATURE_RISK_ASSESSMENT PlanFeature = 44+ PlanFeature_FEATURE_APPROVAL_WORKFLOW PlanFeature = 45+ PlanFeature_FEATURE_AUDIT_LOG PlanFeature = 46+ PlanFeature_FEATURE_ENTERPRISE_SSO PlanFeature = 47+ PlanFeature_FEATURE_TWO_FA PlanFeature = 48+ PlanFeature_FEATURE_PASSWORD_RESTRICTIONS PlanFeature = 49+ PlanFeature_FEATURE_DISALLOW_PASSWORD_SIGNIN PlanFeature = 50+ PlanFeature_FEATURE_CUSTOM_ROLES PlanFeature = 51+ PlanFeature_FEATURE_REQUEST_ROLE_WORKFLOW PlanFeature = 52+ PlanFeature_FEATURE_DATA_MASKING PlanFeature = 53+ PlanFeature_FEATURE_DATA_CLASSIFICATION PlanFeature = 54+ PlanFeature_FEATURE_SCIM PlanFeature = 55+ PlanFeature_FEATURE_DIRECTORY_SYNC PlanFeature = 56+ PlanFeature_FEATURE_SIGN_IN_FREQUENCY_CONTROL PlanFeature = 57+ PlanFeature_FEATURE_EXTERNAL_SECRET_MANAGER PlanFeature = 58+ PlanFeature_FEATURE_USER_EMAIL_DOMAIN_RESTRICTION PlanFeature = 59// Administration & Support- 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+ PlanFeature_FEATURE_ENVIRONMENT_MANAGEMENT PlanFeature = 60+ PlanFeature_FEATURE_IM_NOTIFICATIONS PlanFeature = 61+ PlanFeature_FEATURE_TERRAFORM_PROVIDER PlanFeature = 62+ PlanFeature_FEATURE_DATABASE_GROUPS PlanFeature = 63+ PlanFeature_FEATURE_ENVIRONMENT_TIERS PlanFeature = 64+ PlanFeature_FEATURE_DASHBOARD_ANNOUNCEMENT PlanFeature = 65+ PlanFeature_FEATURE_API_INTEGRATION_GUIDANCE PlanFeature = 66+ PlanFeature_FEATURE_CUSTOM_LOGO PlanFeature = 67+ PlanFeature_FEATURE_WATERMARK PlanFeature = 68+ PlanFeature_FEATURE_ROADMAP_PRIORITIZATION PlanFeature = 69+ PlanFeature_FEATURE_CUSTOM_MSA PlanFeature = 70+ PlanFeature_FEATURE_COMMUNITY_SUPPORT PlanFeature = 71+ PlanFeature_FEATURE_EMAIL_SUPPORT PlanFeature = 72+ PlanFeature_FEATURE_DEDICATED_SUPPORT_WITH_SLA PlanFeature = 73)// Enum value maps for PlanFeature.@@ -192,48 +193,49 @@ var (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",+ 31: "FEATURE_QUERY_POLICY",+ 32: "FEATURE_RESTRICT_COPYING_DATA",+ 33: "FEATURE_IAM",+ 34: "FEATURE_INSTANCE_SSL_CONNECTION",+ 35: "FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL",+ 36: "FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION",+ 37: "FEATURE_GOOGLE_AND_GITHUB_SSO",+ 38: "FEATURE_USER_GROUPS",+ 39: "FEATURE_DISALLOW_SELF_SERVICE_SIGNUP",+ 40: "FEATURE_DATABASE_SECRET_VARIABLES",+ 41: "FEATURE_QUERY_DATASOURCE_RESTRICTION",+ 42: "FEATURE_CUSTOM_INSTANCE_SYNC_TIME",+ 43: "FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT",+ 44: "FEATURE_RISK_ASSESSMENT",+ 45: "FEATURE_APPROVAL_WORKFLOW",+ 46: "FEATURE_AUDIT_LOG",+ 47: "FEATURE_ENTERPRISE_SSO",+ 48: "FEATURE_TWO_FA",+ 49: "FEATURE_PASSWORD_RESTRICTIONS",+ 50: "FEATURE_DISALLOW_PASSWORD_SIGNIN",+ 51: "FEATURE_CUSTOM_ROLES",+ 52: "FEATURE_REQUEST_ROLE_WORKFLOW",+ 53: "FEATURE_DATA_MASKING",+ 54: "FEATURE_DATA_CLASSIFICATION",+ 55: "FEATURE_SCIM",+ 56: "FEATURE_DIRECTORY_SYNC",+ 57: "FEATURE_SIGN_IN_FREQUENCY_CONTROL",+ 58: "FEATURE_EXTERNAL_SECRET_MANAGER",+ 59: "FEATURE_USER_EMAIL_DOMAIN_RESTRICTION",+ 60: "FEATURE_ENVIRONMENT_MANAGEMENT",+ 61: "FEATURE_IM_NOTIFICATIONS",+ 62: "FEATURE_TERRAFORM_PROVIDER",+ 63: "FEATURE_DATABASE_GROUPS",+ 64: "FEATURE_ENVIRONMENT_TIERS",+ 65: "FEATURE_DASHBOARD_ANNOUNCEMENT",+ 66: "FEATURE_API_INTEGRATION_GUIDANCE",+ 67: "FEATURE_CUSTOM_LOGO",+ 68: "FEATURE_WATERMARK",+ 69: "FEATURE_ROADMAP_PRIORITIZATION",+ 70: "FEATURE_CUSTOM_MSA",+ 71: "FEATURE_COMMUNITY_SUPPORT",+ 72: "FEATURE_EMAIL_SUPPORT",+ 73: "FEATURE_DEDICATED_SUPPORT_WITH_SLA",}PlanFeature_value = map[string]int32{"FEATURE_UNSPECIFIED": 0,@@ -267,48 +269,49 @@ var ("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,+ "FEATURE_QUERY_POLICY": 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": 73,})@@ -375,42 +378,6 @@ func (*GetSubscriptionRequest) Descriptor() ([]byte, []int) {return file_v1_subscription_service_proto_rawDescGZIP(), []int{0}}-type GetFeatureMatrixRequest struct {- state protoimpl.MessageState `protogen:"open.v1"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *GetFeatureMatrixRequest) Reset() {- *x = GetFeatureMatrixRequest{}- mi := &file_v1_subscription_service_proto_msgTypes[1]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *GetFeatureMatrixRequest) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*GetFeatureMatrixRequest) ProtoMessage() {}--func (x *GetFeatureMatrixRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_subscription_service_proto_msgTypes[1]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use GetFeatureMatrixRequest.ProtoReflect.Descriptor instead.-func (*GetFeatureMatrixRequest) Descriptor() ([]byte, []int) {- return file_v1_subscription_service_proto_rawDescGZIP(), []int{1}-}-type UpdateSubscriptionRequest struct {state protoimpl.MessageState `protogen:"open.v1"`Patch *PatchSubscription `protobuf:"bytes,1,opt,name=patch,proto3" json:"patch,omitempty"`@@ -420,7 +387,7 @@ type UpdateSubscriptionRequest struct {func (x *UpdateSubscriptionRequest) Reset() {*x = UpdateSubscriptionRequest{}- mi := &file_v1_subscription_service_proto_msgTypes[2]+ mi := &file_v1_subscription_service_proto_msgTypes[1]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -432,7 +399,7 @@ func (x *UpdateSubscriptionRequest) String() string {func (*UpdateSubscriptionRequest) ProtoMessage() {}func (x *UpdateSubscriptionRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_subscription_service_proto_msgTypes[2]+ mi := &file_v1_subscription_service_proto_msgTypes[1]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -445,7 +412,7 @@ func (x *UpdateSubscriptionRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use UpdateSubscriptionRequest.ProtoReflect.Descriptor instead.func (*UpdateSubscriptionRequest) Descriptor() ([]byte, []int) {- return file_v1_subscription_service_proto_rawDescGZIP(), []int{2}+ return file_v1_subscription_service_proto_rawDescGZIP(), []int{1}}func (x *UpdateSubscriptionRequest) GetPatch() *PatchSubscription {@@ -464,7 +431,7 @@ type PatchSubscription struct {func (x *PatchSubscription) Reset() {*x = PatchSubscription{}- mi := &file_v1_subscription_service_proto_msgTypes[3]+ mi := &file_v1_subscription_service_proto_msgTypes[2]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -476,7 +443,7 @@ func (x *PatchSubscription) String() string {func (*PatchSubscription) ProtoMessage() {}func (x *PatchSubscription) ProtoReflect() protoreflect.Message {- mi := &file_v1_subscription_service_proto_msgTypes[3]+ mi := &file_v1_subscription_service_proto_msgTypes[2]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -489,7 +456,7 @@ func (x *PatchSubscription) ProtoReflect() protoreflect.Message {// Deprecated: Use PatchSubscription.ProtoReflect.Descriptor instead.func (*PatchSubscription) Descriptor() ([]byte, []int) {- return file_v1_subscription_service_proto_rawDescGZIP(), []int{3}+ return file_v1_subscription_service_proto_rawDescGZIP(), []int{2}}func (x *PatchSubscription) GetLicense() string {@@ -515,7 +482,7 @@ type Subscription struct {func (x *Subscription) Reset() {*x = Subscription{}- mi := &file_v1_subscription_service_proto_msgTypes[4]+ mi := &file_v1_subscription_service_proto_msgTypes[3]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -527,7 +494,7 @@ func (x *Subscription) String() string {func (*Subscription) ProtoMessage() {}func (x *Subscription) ProtoReflect() protoreflect.Message {- mi := &file_v1_subscription_service_proto_msgTypes[4]+ mi := &file_v1_subscription_service_proto_msgTypes[3]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -540,7 +507,7 @@ func (x *Subscription) ProtoReflect() protoreflect.Message {// Deprecated: Use Subscription.ProtoReflect.Descriptor instead.func (*Subscription) Descriptor() ([]byte, []int) {- return file_v1_subscription_service_proto_rawDescGZIP(), []int{4}+ return file_v1_subscription_service_proto_rawDescGZIP(), []int{3}}func (x *Subscription) GetSeatCount() int32 {@@ -599,104 +566,6 @@ func (x *Subscription) GetOrgName() string {return ""}-type FeatureMatrix struct {- state protoimpl.MessageState `protogen:"open.v1"`- Features []*Feature `protobuf:"bytes,1,rep,name=features,proto3" json:"features,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *FeatureMatrix) Reset() {- *x = FeatureMatrix{}- mi := &file_v1_subscription_service_proto_msgTypes[5]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *FeatureMatrix) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*FeatureMatrix) ProtoMessage() {}--func (x *FeatureMatrix) ProtoReflect() protoreflect.Message {- mi := &file_v1_subscription_service_proto_msgTypes[5]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use FeatureMatrix.ProtoReflect.Descriptor instead.-func (*FeatureMatrix) Descriptor() ([]byte, []int) {- return file_v1_subscription_service_proto_rawDescGZIP(), []int{5}-}--func (x *FeatureMatrix) GetFeatures() []*Feature {- if x != nil {- return x.Features- }- return nil-}--type Feature struct {- state protoimpl.MessageState `protogen:"open.v1"`- // Name is the feature name.- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`- // Matrix is the feature matrix for different plan. The key is the plan enum in string value.- Matrix map[string]bool `protobuf:"bytes,2,rep,name=matrix,proto3" json:"matrix,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *Feature) Reset() {- *x = Feature{}- mi := &file_v1_subscription_service_proto_msgTypes[6]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *Feature) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*Feature) ProtoMessage() {}--func (x *Feature) ProtoReflect() protoreflect.Message {- mi := &file_v1_subscription_service_proto_msgTypes[6]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use Feature.ProtoReflect.Descriptor instead.-func (*Feature) Descriptor() ([]byte, []int) {- return file_v1_subscription_service_proto_rawDescGZIP(), []int{6}-}--func (x *Feature) GetName() string {- if x != nil {- return x.Name- }- return ""-}--func (x *Feature) GetMatrix() map[string]bool {- if x != nil {- return x.Matrix- }- return nil-}-// PlanConfig represents the configuration for all plans loaded from plan.yamltype PlanConfig struct {state protoimpl.MessageState `protogen:"open.v1"`@@ -708,7 +577,7 @@ type PlanConfig struct {func (x *PlanConfig) Reset() {*x = PlanConfig{}- mi := &file_v1_subscription_service_proto_msgTypes[7]+ mi := &file_v1_subscription_service_proto_msgTypes[4]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -720,7 +589,7 @@ func (x *PlanConfig) String() string {func (*PlanConfig) ProtoMessage() {}func (x *PlanConfig) ProtoReflect() protoreflect.Message {- mi := &file_v1_subscription_service_proto_msgTypes[7]+ mi := &file_v1_subscription_service_proto_msgTypes[4]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -733,7 +602,7 @@ func (x *PlanConfig) ProtoReflect() protoreflect.Message {// Deprecated: Use PlanConfig.ProtoReflect.Descriptor instead.func (*PlanConfig) Descriptor() ([]byte, []int) {- return file_v1_subscription_service_proto_rawDescGZIP(), []int{7}+ return file_v1_subscription_service_proto_rawDescGZIP(), []int{4}}func (x *PlanConfig) GetPlans() []*PlanLimitConfig {@@ -763,7 +632,7 @@ type PlanLimitConfig struct {func (x *PlanLimitConfig) Reset() {*x = PlanLimitConfig{}- mi := &file_v1_subscription_service_proto_msgTypes[8]+ mi := &file_v1_subscription_service_proto_msgTypes[5]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -775,7 +644,7 @@ func (x *PlanLimitConfig) String() string {func (*PlanLimitConfig) ProtoMessage() {}func (x *PlanLimitConfig) ProtoReflect() protoreflect.Message {- mi := &file_v1_subscription_service_proto_msgTypes[8]+ mi := &file_v1_subscription_service_proto_msgTypes[5]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -788,7 +657,7 @@ func (x *PlanLimitConfig) ProtoReflect() protoreflect.Message {// Deprecated: Use PlanLimitConfig.ProtoReflect.Descriptor instead.func (*PlanLimitConfig) Descriptor() ([]byte, []int) {- return file_v1_subscription_service_proto_rawDescGZIP(), []int{8}+ return file_v1_subscription_service_proto_rawDescGZIP(), []int{5}}func (x *PlanLimitConfig) GetType() PlanType {@@ -824,8 +693,7 @@ var File_v1_subscription_service_proto protoreflect.FileDescriptorconst file_v1_subscription_service_proto_rawDesc = "" +"\n" +"\x1dv1/subscription_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\"\x18\n" +- "\x16GetSubscriptionRequest\"\x19\n" +- "\x17GetFeatureMatrixRequest\"Q\n" ++ "\x16GetSubscriptionRequest\"Q\n" +"\x19UpdateSubscriptionRequest\x124\n" +"\x05patch\x18\x01 \x01(\v2\x1e.bytebase.v1.PatchSubscriptionR\x05patch\"-\n" +"\x11PatchSubscription\x12\x18\n" +@@ -839,15 +707,7 @@ const file_v1_subscription_service_proto_rawDesc = "" +"\x04plan\x18\x05 \x01(\x0e2\x15.bytebase.v1.PlanTypeB\x04\xe2A\x01\x03R\x04plan\x12 \n" +"\btrialing\x18\x06 \x01(\bB\x04\xe2A\x01\x03R\btrialing\x12\x1b\n" +"\x06org_id\x18\a \x01(\tB\x04\xe2A\x01\x03R\x05orgId\x12\x1f\n" +- "\borg_name\x18\b \x01(\tB\x04\xe2A\x01\x03R\aorgName\"A\n" +- "\rFeatureMatrix\x120\n" +- "\bfeatures\x18\x01 \x03(\v2\x14.bytebase.v1.FeatureR\bfeatures\"\x92\x01\n" +- "\aFeature\x12\x12\n" +- "\x04name\x18\x01 \x01(\tR\x04name\x128\n" +- "\x06matrix\x18\x02 \x03(\v2 .bytebase.v1.Feature.MatrixEntryR\x06matrix\x1a9\n" +- "\vMatrixEntry\x12\x10\n" +- "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +- "\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\"\x87\x01\n" ++ "\borg_name\x18\b \x01(\tB\x04\xe2A\x01\x03R\aorgName\"\x87\x01\n" +"\n" +"PlanConfig\x122\n" +"\x05plans\x18\x01 \x03(\v2\x1c.bytebase.v1.PlanLimitConfigR\x05plans\x12E\n" +@@ -862,7 +722,7 @@ const file_v1_subscription_service_proto_rawDesc = "" +"\x04FREE\x10\x01\x12\b\n" +"\x04TEAM\x10\x02\x12\x0e\n" +"\n" +- "ENTERPRISE\x10\x03*\xaa\x13\n" ++ "ENTERPRISE\x10\x03*\xc4\x13\n" +"\vPlanFeature\x12\x17\n" +"\x13FEATURE_UNSPECIFIED\x10\x00\x12\x1b\n" +"\x17FEATURE_DATABASE_CHANGE\x10\x01\x12,\n" +@@ -895,52 +755,52 @@ const file_v1_subscription_service_proto_rawDesc = "" +"$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" ++ "%FEATURE_INSTANCE_READ_ONLY_CONNECTION\x10\x1e\x12\x18\n" ++ "\x14FEATURE_QUERY_POLICY\x10\x1f\x12!\n" ++ "\x1dFEATURE_RESTRICT_COPYING_DATA\x10 \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\x100\x12!\n" ++ "\x1dFEATURE_PASSWORD_RESTRICTIONS\x101\x12$\n" ++ " FEATURE_DISALLOW_PASSWORD_SIGNIN\x102\x12\x18\n" ++ "\x14FEATURE_CUSTOM_ROLES\x103\x12!\n" ++ "\x1dFEATURE_REQUEST_ROLE_WORKFLOW\x104\x12\x18\n" ++ "\x14FEATURE_DATA_MASKING\x105\x12\x1f\n" ++ "\x1bFEATURE_DATA_CLASSIFICATION\x106\x12\x10\n" ++ "\fFEATURE_SCIM\x107\x12\x1a\n" ++ "\x16FEATURE_DIRECTORY_SYNC\x108\x12%\n" ++ "!FEATURE_SIGN_IN_FREQUENCY_CONTROL\x109\x12#\n" ++ "\x1fFEATURE_EXTERNAL_SECRET_MANAGER\x10:\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\x10A\x12$\n" ++ " FEATURE_API_INTEGRATION_GUIDANCE\x10B\x12\x17\n" ++ "\x13FEATURE_CUSTOM_LOGO\x10C\x12\x15\n" ++ "\x11FEATURE_WATERMARK\x10D\x12\"\n" ++ "\x1eFEATURE_ROADMAP_PRIORITIZATION\x10E\x12\x16\n" ++ "\x12FEATURE_CUSTOM_MSA\x10F\x12\x1d\n" ++ "\x19FEATURE_COMMUNITY_SUPPORT\x10G\x12\x19\n" ++ "\x15FEATURE_EMAIL_SUPPORT\x10H\x12&\n" ++ "\"FEATURE_DEDICATED_SUPPORT_WITH_SLA\x10I2\xa3\x02\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" ++ "\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\x12\x97\x01\n" +"\x12UpdateSubscription\x12&.bytebase.v1.UpdateSubscriptionRequest\x1a\x19.bytebase.v1.Subscription\">\xdaA\x05patch\x8a\xea0\x0fbb.settings.set\x90\xea0\x01\x82\xd3\xe4\x93\x02\x19:\x05patch2\x10/v1/subscriptionB\x11Z\x0fgenerated-go/v1b\x06proto3"var (@@ -956,44 +816,36 @@ func file_v1_subscription_service_proto_rawDescGZIP() []byte {}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_msgTypes = make([]protoimpl.MessageInfo, 6)var file_v1_subscription_service_proto_goTypes = []any{(PlanType)(0), // 0: bytebase.v1.PlanType(PlanFeature)(0), // 1: bytebase.v1.PlanFeature(*GetSubscriptionRequest)(nil), // 2: bytebase.v1.GetSubscriptionRequest- (*GetFeatureMatrixRequest)(nil), // 3: bytebase.v1.GetFeatureMatrixRequest- (*UpdateSubscriptionRequest)(nil), // 4: bytebase.v1.UpdateSubscriptionRequest- (*PatchSubscription)(nil), // 5: bytebase.v1.PatchSubscription- (*Subscription)(nil), // 6: bytebase.v1.Subscription- (*FeatureMatrix)(nil), // 7: bytebase.v1.FeatureMatrix- (*Feature)(nil), // 8: bytebase.v1.Feature- (*PlanConfig)(nil), // 9: bytebase.v1.PlanConfig- (*PlanLimitConfig)(nil), // 10: bytebase.v1.PlanLimitConfig- nil, // 11: bytebase.v1.Feature.MatrixEntry- (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp+ (*UpdateSubscriptionRequest)(nil), // 3: bytebase.v1.UpdateSubscriptionRequest+ (*PatchSubscription)(nil), // 4: bytebase.v1.PatchSubscription+ (*Subscription)(nil), // 5: bytebase.v1.Subscription+ (*PlanConfig)(nil), // 6: bytebase.v1.PlanConfig+ (*PlanLimitConfig)(nil), // 7: bytebase.v1.PlanLimitConfig+ (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp}var file_v1_subscription_service_proto_depIdxs = []int32{- 5, // 0: bytebase.v1.UpdateSubscriptionRequest.patch:type_name -> bytebase.v1.PatchSubscription- 12, // 1: bytebase.v1.Subscription.expires_time:type_name -> google.protobuf.Timestamp- 12, // 2: bytebase.v1.Subscription.started_time:type_name -> google.protobuf.Timestamp+ 4, // 0: bytebase.v1.UpdateSubscriptionRequest.patch:type_name -> bytebase.v1.PatchSubscription+ 8, // 1: bytebase.v1.Subscription.expires_time:type_name -> google.protobuf.Timestamp+ 8, // 2: bytebase.v1.Subscription.started_time:type_name -> google.protobuf.Timestamp0, // 3: bytebase.v1.Subscription.plan:type_name -> bytebase.v1.PlanType- 8, // 4: bytebase.v1.FeatureMatrix.features:type_name -> bytebase.v1.Feature- 11, // 5: bytebase.v1.Feature.matrix:type_name -> bytebase.v1.Feature.MatrixEntry- 10, // 6: bytebase.v1.PlanConfig.plans:type_name -> bytebase.v1.PlanLimitConfig- 1, // 7: bytebase.v1.PlanConfig.instance_features:type_name -> bytebase.v1.PlanFeature- 0, // 8: bytebase.v1.PlanLimitConfig.type:type_name -> bytebase.v1.PlanType- 1, // 9: bytebase.v1.PlanLimitConfig.features:type_name -> bytebase.v1.PlanFeature- 2, // 10: bytebase.v1.SubscriptionService.GetSubscription:input_type -> bytebase.v1.GetSubscriptionRequest- 3, // 11: bytebase.v1.SubscriptionService.GetFeatureMatrix:input_type -> bytebase.v1.GetFeatureMatrixRequest- 4, // 12: bytebase.v1.SubscriptionService.UpdateSubscription:input_type -> bytebase.v1.UpdateSubscriptionRequest- 6, // 13: bytebase.v1.SubscriptionService.GetSubscription:output_type -> bytebase.v1.Subscription- 7, // 14: bytebase.v1.SubscriptionService.GetFeatureMatrix:output_type -> bytebase.v1.FeatureMatrix- 6, // 15: bytebase.v1.SubscriptionService.UpdateSubscription:output_type -> bytebase.v1.Subscription- 13, // [13:16] is the sub-list for method output_type- 10, // [10:13] is the sub-list for method input_type- 10, // [10:10] is the sub-list for extension type_name- 10, // [10:10] is the sub-list for extension extendee- 0, // [0:10] is the sub-list for field type_name+ 7, // 4: bytebase.v1.PlanConfig.plans:type_name -> bytebase.v1.PlanLimitConfig+ 1, // 5: bytebase.v1.PlanConfig.instance_features:type_name -> bytebase.v1.PlanFeature+ 0, // 6: bytebase.v1.PlanLimitConfig.type:type_name -> bytebase.v1.PlanType+ 1, // 7: bytebase.v1.PlanLimitConfig.features:type_name -> bytebase.v1.PlanFeature+ 2, // 8: bytebase.v1.SubscriptionService.GetSubscription:input_type -> bytebase.v1.GetSubscriptionRequest+ 3, // 9: bytebase.v1.SubscriptionService.UpdateSubscription:input_type -> bytebase.v1.UpdateSubscriptionRequest+ 5, // 10: bytebase.v1.SubscriptionService.GetSubscription:output_type -> bytebase.v1.Subscription+ 5, // 11: bytebase.v1.SubscriptionService.UpdateSubscription:output_type -> bytebase.v1.Subscription+ 10, // [10:12] is the sub-list for method output_type+ 8, // [8:10] is the sub-list for method input_type+ 8, // [8:8] is the sub-list for extension type_name+ 8, // [8:8] is the sub-list for extension extendee+ 0, // [0:8] is the sub-list for field type_name}func init() { file_v1_subscription_service_proto_init() }@@ -1008,7 +860,7 @@ func file_v1_subscription_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_subscription_service_proto_rawDesc), len(file_v1_subscription_service_proto_rawDesc)),NumEnums: 2,- NumMessages: 10,+ NumMessages: 6,NumExtensions: 0,NumServices: 1,},diff --git a/proto/generated-go/v1/subscription_service.pb.gw.go b/proto/generated-go/v1/subscription_service.pb.gw.goindex 00fb628fe4..3c473555ad 100644--- a/proto/generated-go/v1/subscription_service.pb.gw.go+++ b/proto/generated-go/v1/subscription_service.pb.gw.go@@ -54,25 +54,6 @@ func local_request_SubscriptionService_GetSubscription_0(ctx context.Context, mareturn msg, metadata, err}-func request_SubscriptionService_GetFeatureMatrix_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq GetFeatureMatrixRequest- metadata runtime.ServerMetadata- )- io.Copy(io.Discard, req.Body)- msg, err := client.GetFeatureMatrix(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err-}--func local_request_SubscriptionService_GetFeatureMatrix_0(ctx context.Context, marshaler runtime.Marshaler, server SubscriptionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq GetFeatureMatrixRequest- metadata runtime.ServerMetadata- )- msg, err := server.GetFeatureMatrix(ctx, &protoReq)- return msg, metadata, err-}-func request_SubscriptionService_UpdateSubscription_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {var (protoReq UpdateSubscriptionRequest@@ -123,26 +104,6 @@ func RegisterSubscriptionServiceHandlerServer(ctx context.Context, mux *runtime.}forward_SubscriptionService_GetSubscription_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})- mux.Handle(http.MethodGet, pattern_SubscriptionService_GetFeatureMatrix_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {- ctx, cancel := context.WithCancel(req.Context())- defer cancel()- var stream runtime.ServerTransportStream- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SubscriptionService/GetFeatureMatrix", runtime.WithHTTPPathPattern("/v1/feature"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_SubscriptionService_GetFeatureMatrix_0(annotatedContext, inboundMarshaler, server, req, pathParams)- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }- forward_SubscriptionService_GetFeatureMatrix_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })mux.Handle(http.MethodPatch, pattern_SubscriptionService_UpdateSubscription_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -220,23 +181,6 @@ func RegisterSubscriptionServiceHandlerClient(ctx context.Context, mux *runtime.}forward_SubscriptionService_GetSubscription_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})- mux.Handle(http.MethodGet, pattern_SubscriptionService_GetFeatureMatrix_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {- ctx, cancel := context.WithCancel(req.Context())- defer cancel()- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SubscriptionService/GetFeatureMatrix", runtime.WithHTTPPathPattern("/v1/feature"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_SubscriptionService_GetFeatureMatrix_0(annotatedContext, inboundMarshaler, client, req, pathParams)- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }- forward_SubscriptionService_GetFeatureMatrix_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })mux.Handle(http.MethodPatch, pattern_SubscriptionService_UpdateSubscription_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -259,12 +203,10 @@ func RegisterSubscriptionServiceHandlerClient(ctx context.Context, mux *runtime.var (pattern_SubscriptionService_GetSubscription_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "subscription"}, ""))- pattern_SubscriptionService_GetFeatureMatrix_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "feature"}, ""))pattern_SubscriptionService_UpdateSubscription_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "subscription"}, "")))var (forward_SubscriptionService_GetSubscription_0 = runtime.ForwardResponseMessage- forward_SubscriptionService_GetFeatureMatrix_0 = runtime.ForwardResponseMessageforward_SubscriptionService_UpdateSubscription_0 = runtime.ForwardResponseMessage)diff --git a/proto/generated-go/v1/subscription_service_grpc.pb.go b/proto/generated-go/v1/subscription_service_grpc.pb.goindex aa8048cf29..abfb0a0b6d 100644--- a/proto/generated-go/v1/subscription_service_grpc.pb.go+++ b/proto/generated-go/v1/subscription_service_grpc.pb.go@@ -20,7 +20,6 @@ const _ = grpc.SupportPackageIsVersion9const (SubscriptionService_GetSubscription_FullMethodName = "/bytebase.v1.SubscriptionService/GetSubscription"- SubscriptionService_GetFeatureMatrix_FullMethodName = "/bytebase.v1.SubscriptionService/GetFeatureMatrix"SubscriptionService_UpdateSubscription_FullMethodName = "/bytebase.v1.SubscriptionService/UpdateSubscription")@@ -29,7 +28,6 @@ const (// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.type SubscriptionServiceClient interface {GetSubscription(ctx context.Context, in *GetSubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error)- GetFeatureMatrix(ctx context.Context, in *GetFeatureMatrixRequest, opts ...grpc.CallOption) (*FeatureMatrix, error)UpdateSubscription(ctx context.Context, in *UpdateSubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error)}@@ -51,16 +49,6 @@ func (c *subscriptionServiceClient) GetSubscription(ctx context.Context, in *Getreturn out, nil}-func (c *subscriptionServiceClient) GetFeatureMatrix(ctx context.Context, in *GetFeatureMatrixRequest, opts ...grpc.CallOption) (*FeatureMatrix, error) {- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)- out := new(FeatureMatrix)- err := c.cc.Invoke(ctx, SubscriptionService_GetFeatureMatrix_FullMethodName, in, out, cOpts...)- if err != nil {- return nil, err- }- return out, nil-}-func (c *subscriptionServiceClient) UpdateSubscription(ctx context.Context, in *UpdateSubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error) {cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)out := new(Subscription)@@ -76,7 +64,6 @@ func (c *subscriptionServiceClient) UpdateSubscription(ctx context.Context, in *// for forward compatibility.type SubscriptionServiceServer interface {GetSubscription(context.Context, *GetSubscriptionRequest) (*Subscription, error)- GetFeatureMatrix(context.Context, *GetFeatureMatrixRequest) (*FeatureMatrix, error)UpdateSubscription(context.Context, *UpdateSubscriptionRequest) (*Subscription, error)mustEmbedUnimplementedSubscriptionServiceServer()}@@ -91,9 +78,6 @@ type UnimplementedSubscriptionServiceServer struct{}func (UnimplementedSubscriptionServiceServer) GetSubscription(context.Context, *GetSubscriptionRequest) (*Subscription, error) {return nil, status.Errorf(codes.Unimplemented, "method GetSubscription not implemented")}-func (UnimplementedSubscriptionServiceServer) GetFeatureMatrix(context.Context, *GetFeatureMatrixRequest) (*FeatureMatrix, error) {- return nil, status.Errorf(codes.Unimplemented, "method GetFeatureMatrix not implemented")-}func (UnimplementedSubscriptionServiceServer) UpdateSubscription(context.Context, *UpdateSubscriptionRequest) (*Subscription, error) {return nil, status.Errorf(codes.Unimplemented, "method UpdateSubscription not implemented")}@@ -136,24 +120,6 @@ func _SubscriptionService_GetSubscription_Handler(srv interface{}, ctx context.Creturn interceptor(ctx, in, info, handler)}-func _SubscriptionService_GetFeatureMatrix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(GetFeatureMatrixRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(SubscriptionServiceServer).GetFeatureMatrix(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: SubscriptionService_GetFeatureMatrix_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(SubscriptionServiceServer).GetFeatureMatrix(ctx, req.(*GetFeatureMatrixRequest))- }- return interceptor(ctx, in, info, handler)-}-func _SubscriptionService_UpdateSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {in := new(UpdateSubscriptionRequest)if err := dec(in); err != nil {@@ -183,10 +149,6 @@ var SubscriptionService_ServiceDesc = grpc.ServiceDesc{MethodName: "GetSubscription",Handler: _SubscriptionService_GetSubscription_Handler,},- {- MethodName: "GetFeatureMatrix",- Handler: _SubscriptionService_GetFeatureMatrix_Handler,- },{MethodName: "UpdateSubscription",Handler: _SubscriptionService_UpdateSubscription_Handler,diff --git a/proto/v1/v1/subscription_service.proto b/proto/v1/v1/subscription_service.protoindex 2cac998bfd..d546ef7b17 100644--- a/proto/v1/v1/subscription_service.proto+++ b/proto/v1/v1/subscription_service.proto@@ -17,12 +17,6 @@ service SubscriptionService {option (bytebase.v1.allow_without_credential) = true;}- rpc GetFeatureMatrix(GetFeatureMatrixRequest) returns (FeatureMatrix) {- option (google.api.http) = {get: "/v1/feature"};- option (google.api.method_signature) = "";- option (bytebase.v1.allow_without_credential) = true;- }-rpc UpdateSubscription(UpdateSubscriptionRequest) returns (Subscription) {option (google.api.http) = {patch: "/v1/subscription"@@ -36,8 +30,6 @@ service SubscriptionService {message GetSubscriptionRequest {}-message GetFeatureMatrixRequest {}-message UpdateSubscriptionRequest {PatchSubscription patch = 1;}@@ -74,18 +66,6 @@ message Subscription {string org_name = 8 [(google.api.field_behavior) = OUTPUT_ONLY];}-message FeatureMatrix {- repeated Feature features = 1;-}--message Feature {- // Name is the feature name.- string name = 1;-- // Matrix is the feature matrix for different plan. The key is the plan enum in string value.- map<string, bool> matrix = 2;-}-// PlanFeature represents the available features in Bytebaseenum PlanFeature {FEATURE_UNSPECIFIED = 0;@@ -123,52 +103,53 @@ enum PlanFeature {FEATURE_SQL_EDITOR_DDL_DML_RESTRICTION = 28;FEATURE_BATCH_QUERY = 29;FEATURE_INSTANCE_READ_ONLY_CONNECTION = 30;- FEATURE_RESTRICT_COPYING_DATA = 31;+ FEATURE_QUERY_POLICY = 31;+ FEATURE_RESTRICT_COPYING_DATA = 32;// 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;+ 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;// 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;+ 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 = 73;}// PlanConfig represents the configuration for all plans loaded from plan.yaml