Skip to content

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

feat: fe connect rpc: migrate subscription service (#16605)

p0nybc51b35ce583
diff --git a/frontend/src/components/BannersWrapper.vue b/frontend/src/components/BannersWrapper.vue
index 23950b780f..0ac57901cc 100644
--- a/frontend/src/components/BannersWrapper.vue
+++ b/frontend/src/components/BannersWrapper.vue
@@ -14,7 +14,7 @@ import {
useActuatorV1Store,
useSubscriptionV1Store,
} from "@/store";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import { isDev } from "@/utils";
import BannerAnnouncement from "@/views/BannerAnnouncement.vue";
import BannerDemo from "@/views/BannerDemo.vue";
diff --git a/frontend/src/components/ColumnDataTable/SemanticTypeCell.vue b/frontend/src/components/ColumnDataTable/SemanticTypeCell.vue
index 01725b5ff9..a496cb01a2 100644
--- a/frontend/src/components/ColumnDataTable/SemanticTypeCell.vue
+++ b/frontend/src/components/ColumnDataTable/SemanticTypeCell.vue
@@ -47,7 +47,7 @@ import { useSemanticType } from "@/components/SensitiveData/useSemanticType";
import { MiniActionButton } from "@/components/v2";
import { useSubscriptionV1Store } from "@/store";
import type { ComposedDatabase } from "@/types";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import FeatureModal from "../FeatureGuard/FeatureModal.vue";
import SemanticTypesDrawer from "../SensitiveData/components/SemanticTypesDrawer.vue";
diff --git a/frontend/src/components/ColumnDataTable/index.vue b/frontend/src/components/ColumnDataTable/index.vue
index 2ddb435311..31a4da3c0d 100644
--- a/frontend/src/components/ColumnDataTable/index.vue
+++ b/frontend/src/components/ColumnDataTable/index.vue
@@ -24,7 +24,7 @@ import {
} from "@/store";
import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import type {
ColumnMetadata,
TableMetadata,
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/Toolbar.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/Toolbar.vue
index debbab61d3..f1e93858f1 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/Toolbar.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/Toolbar.vue
@@ -13,7 +13,7 @@
<script lang="ts" setup>
import { NButton } from "naive-ui";
import { FeatureBadge } from "@/components/FeatureGuard";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { useCustomApprovalContext } from "../context";
import { emptyLocalApprovalRule } from "../logic";
diff --git a/frontend/src/components/Database/DatabaseSensitiveDataPanel.vue b/frontend/src/components/Database/DatabaseSensitiveDataPanel.vue
index e692440e97..53224ea06a 100644
--- a/frontend/src/components/Database/DatabaseSensitiveDataPanel.vue
+++ b/frontend/src/components/Database/DatabaseSensitiveDataPanel.vue
@@ -85,7 +85,7 @@ import { isCurrentColumnException } from "@/components/SensitiveData/utils";
import { SearchBox } from "@/components/v2";
import { featureToRef, usePolicyV1Store, useDatabaseCatalog } from "@/store";
import { type ComposedDatabase } from "@/types";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import {
ObjectSchema_Type,
type ObjectSchema,
diff --git a/frontend/src/components/DatabaseDetail/Settings/components/Secrets.vue b/frontend/src/components/DatabaseDetail/Settings/components/Secrets.vue
index 8e354b3356..e8b8485e92 100644
--- a/frontend/src/components/DatabaseDetail/Settings/components/Secrets.vue
+++ b/frontend/src/components/DatabaseDetail/Settings/components/Secrets.vue
@@ -186,7 +186,7 @@ import {
} from "@/store";
import { type ComposedDatabase } from "@/types";
import { Secret } from "@/types/proto/v1/database_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
export type Detail = {
secret: Secret;
diff --git a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
index f812e8ae64..716de9e2e7 100644
--- a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
+++ b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
@@ -113,7 +113,7 @@ import {
DisableCopyDataPolicy,
PolicyType,
} from "@/types/proto/v1/org_policy_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { hasWorkspacePermissionV2 } from "@/utils";
import { FeatureBadge } from "../FeatureGuard";
import { Switch } from "../v2";
diff --git a/frontend/src/components/EnvironmentForm/EnvironmentForm.vue b/frontend/src/components/EnvironmentForm/EnvironmentForm.vue
index 88816a23bf..60b4c19fcf 100644
--- a/frontend/src/components/EnvironmentForm/EnvironmentForm.vue
+++ b/frontend/src/components/EnvironmentForm/EnvironmentForm.vue
@@ -14,7 +14,7 @@ import { hasFeature } from "@/store";
import { VirtualRoleType } from "@/types";
import type { Policy } from "@/types/proto/v1/org_policy_service";
import { PolicyType } from "@/types/proto/v1/org_policy_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import type { Environment } from "@/types/v1/environment";
import { useEventListener } from "@vueuse/core";
import { toRef } from "vue";
diff --git a/frontend/src/components/EnvironmentForm/Form.vue b/frontend/src/components/EnvironmentForm/Form.vue
index 779d31d658..889f13959c 100644
--- a/frontend/src/components/EnvironmentForm/Form.vue
+++ b/frontend/src/components/EnvironmentForm/Form.vue
@@ -146,7 +146,7 @@ import {
pushNotification,
} from "@/store";
import { environmentNamePrefix } from "@/store/modules/v1/common";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { FeatureBadge } from "../FeatureGuard";
import SQLReviewForResource from "../SQLReview/components/SQLReviewForResource.vue";
import { ResourceIdField } from "../v2";
diff --git a/frontend/src/components/EnvironmentForm/context.ts b/frontend/src/components/EnvironmentForm/context.ts
index 0e9e9453e2..93626148c7 100644
--- a/frontend/src/components/EnvironmentForm/context.ts
+++ b/frontend/src/components/EnvironmentForm/context.ts
@@ -5,7 +5,7 @@ import type { InjectionKey, Ref } from "vue";
import { provide, inject, computed, ref, watch } from "vue";
import type { ResourceIdField } from "@/components/v2";
import { PolicyType, type Policy } from "@/types/proto/v1/org_policy_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import type { Environment } from "@/types/v1/environment";
import { hasWorkspacePermissionV2 } from "@/utils";
diff --git a/frontend/src/components/FeatureGuard/FeatureAttention.vue b/frontend/src/components/FeatureGuard/FeatureAttention.vue
index 6182357297..1aa5a40d1e 100644
--- a/frontend/src/components/FeatureGuard/FeatureAttention.vue
+++ b/frontend/src/components/FeatureGuard/FeatureAttention.vue
@@ -29,7 +29,7 @@ import type {
Instance,
InstanceResource,
} from "@/types/proto/v1/instance_service";
-import { PlanFeature, PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanFeature, PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import { autoSubscriptionRoute, hasWorkspacePermissionV2 } from "@/utils";
import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
@@ -125,7 +125,7 @@ const actionText = computed(() => {
return t("subscription.instance-assignment.assign-license");
});
-const featureKey = props.feature.split(".").join("-");
+const featureKey = PlanFeature[props.feature].split(".").join("-");
const descriptionText = computed(() => {
let description = props.description;
@@ -147,7 +147,7 @@ const descriptionText = computed(() => {
}
const trialText = t("subscription.required-plan-with-trial", {
requiredPlan: t(
- `subscription.plan.${requiredPlan.toLowerCase()}.title`
+ `subscription.plan.${PlanType[requiredPlan].toLowerCase()}.title`
),
startTrial: startTrial,
});
diff --git a/frontend/src/components/FeatureGuard/FeatureBadge.vue b/frontend/src/components/FeatureGuard/FeatureBadge.vue
index cd15db3388..10222bdb8f 100644
--- a/frontend/src/components/FeatureGuard/FeatureBadge.vue
+++ b/frontend/src/components/FeatureGuard/FeatureBadge.vue
@@ -41,7 +41,7 @@
$t("subscription.require-subscription", {
requiredPlan: $t(
`subscription.plan.${
- subscriptionStore.getMinimumRequiredPlan(feature).toLowerCase()
+ PlanType[subscriptionStore.getMinimumRequiredPlan(feature)].toLowerCase()
}.title`
),
})
@@ -64,7 +64,7 @@ import type {
Instance,
InstanceResource,
} from "@/types/proto/v1/instance_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature, PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import { autoSubscriptionRoute, hasWorkspacePermissionV2 } from "@/utils";
import InstanceAssignment from "../InstanceAssignment.vue";
diff --git a/frontend/src/components/FeatureGuard/FeatureModal.vue b/frontend/src/components/FeatureGuard/FeatureModal.vue
index 8a3db1d4cf..5dd61b97ab 100644
--- a/frontend/src/components/FeatureGuard/FeatureModal.vue
+++ b/frontend/src/components/FeatureGuard/FeatureModal.vue
@@ -35,7 +35,7 @@
<span class="font-bold text-accent">
{{
$t(
- `subscription.plan.${requiredPlan.toLowerCase()}.title`
+ `subscription.plan.${PlanType[requiredPlan].toLowerCase()}.title`
)
}}
</span>
@@ -108,7 +108,7 @@ import type {
import {
PlanFeature,
PlanType,
-} from "@/types/proto/v1/subscription_service";
+} from "@/types/proto-es/v1/subscription_service_pb";
import { autoSubscriptionRoute, hasWorkspacePermissionV2 } from "@/utils";
import { NButton } from "naive-ui";
import { computed, reactive } from "vue";
@@ -175,7 +175,7 @@ const requiredPlan = computed(() =>
);
const featureKey = computed(() => {
- return props.feature.split(".").join("-");
+ return PlanFeature[props.feature].split(".").join("-");
});
const trialSubscription = () => {
diff --git a/frontend/src/components/GeneralSetting/AccountSetting.vue b/frontend/src/components/GeneralSetting/AccountSetting.vue
index fbad6aeb38..3b46af81a6 100644
--- a/frontend/src/components/GeneralSetting/AccountSetting.vue
+++ b/frontend/src/components/GeneralSetting/AccountSetting.vue
@@ -123,7 +123,7 @@ import {
} from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
import { type WorkspaceProfileSetting } from "@/types/proto/v1/setting_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { isEqual } from "lodash-es";
import { TriangleAlertIcon } from "lucide-vue-next";
import { NDivider, NTooltip } from "naive-ui";
diff --git a/frontend/src/components/GeneralSetting/AnnouncementSetting.vue b/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
index bd6b8307bd..4fe9be17e7 100644
--- a/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
+++ b/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
@@ -107,7 +107,7 @@ import { featureToRef } from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
import { Announcement } from "@/types/proto/v1/setting_service";
import { Announcement_AlertLevel } from "@/types/proto/v1/setting_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { FeatureBadge } from "../FeatureGuard";
const props = defineProps<{
diff --git a/frontend/src/components/GeneralSetting/BrandingSetting.vue b/frontend/src/components/GeneralSetting/BrandingSetting.vue
index d959e9736c..5844df4798 100644
--- a/frontend/src/components/GeneralSetting/BrandingSetting.vue
+++ b/frontend/src/components/GeneralSetting/BrandingSetting.vue
@@ -68,7 +68,7 @@ import { featureToRef } from "@/store";
import { useActuatorV1Store } from "@/store/modules/v1/actuator";
import { useSettingV1Store } from "@/store/modules/v1/setting";
import { Setting_SettingName } from "@/types/proto/v1/setting_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { FeatureBadge, FeatureModal } from "../FeatureGuard";
import SingleFileSelector from "../SingleFileSelector.vue";
diff --git a/frontend/src/components/GeneralSetting/DomainRestrictionSetting.vue b/frontend/src/components/GeneralSetting/DomainRestrictionSetting.vue
index 215951139e..5149955fb4 100644
--- a/frontend/src/components/GeneralSetting/DomainRestrictionSetting.vue
+++ b/frontend/src/components/GeneralSetting/DomainRestrictionSetting.vue
@@ -55,7 +55,7 @@ import { NCheckbox, NInput } from "naive-ui";
import { computed, reactive } from "vue";
import { featureToRef } from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { FeatureBadge } from "../FeatureGuard";
const initialState = computed((): LocalState => {
diff --git a/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue b/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue
index 6ea3022f36..2763abbcb5 100644
--- a/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue
+++ b/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue
@@ -181,7 +181,7 @@ import { featureToRef } from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
import { Duration } from "@/types/proto/google/protobuf/duration";
import { PasswordRestrictionSetting, Setting_SettingName } from "@/types/proto/v1/setting_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { FeatureBadge, FeatureModal } from "../FeatureGuard";
const DEFAULT_MIN_LENGTH = 8;
diff --git a/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue b/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue
index d058461b1e..61286af812 100644
--- a/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue
+++ b/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue
@@ -42,7 +42,7 @@ import {
PolicyResourceType,
PolicyType,
} from "@/types/proto/v1/org_policy_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { hasWorkspacePermissionV2 } from "@/utils";
import { NInputNumber } from "naive-ui";
import { computed, ref } from "vue";
diff --git a/frontend/src/components/GeneralSetting/SecuritySetting.vue b/frontend/src/components/GeneralSetting/SecuritySetting.vue
index 46526ef72a..4c3916efc9 100644
--- a/frontend/src/components/GeneralSetting/SecuritySetting.vue
+++ b/frontend/src/components/GeneralSetting/SecuritySetting.vue
@@ -81,7 +81,7 @@ import {
PolicyType,
} from "@/types/proto/v1/org_policy_service";
import { Setting_SettingName } from "@/types/proto/v1/setting_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { FeatureBadge } from "../FeatureGuard";
import DomainRestrictionSetting from "./DomainRestrictionSetting.vue";
import MaximumRoleExpirationSetting from "./MaximumRoleExpirationSetting.vue";
diff --git a/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue b/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue
index 9c9e78b3eb..06b71a30ef 100644
--- a/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue
+++ b/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue
@@ -56,7 +56,7 @@ import { featureToRef } from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
import { defaultTokenDurationInHours } from "@/types";
import { Duration } from "@/types/proto/google/protobuf/duration";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { FeatureBadge, FeatureModal } from "../FeatureGuard";
const getInitialState = (): LocalState => {
diff --git a/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue b/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue
index cfbf4eb06e..0ea19fdbe1 100644
--- a/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue
+++ b/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue
@@ -48,7 +48,7 @@ import { computed, onMounted, reactive, watch } from "vue";
import { FeatureBadge, FeatureModal } from "@/components/FeatureGuard";
import { useProjectByName, hasFeature } from "@/store";
import type { DatabaseResource } from "@/types";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import DatabaseResourceSelector from "./DatabaseResourceSelector.vue";
interface LocalState {
diff --git a/frontend/src/components/IdentityProvider/IdentityProviderCreateWizard.vue b/frontend/src/components/IdentityProvider/IdentityProviderCreateWizard.vue
index 362a1a32ef..95b33cd87a 100644
--- a/frontend/src/components/IdentityProvider/IdentityProviderCreateWizard.vue
+++ b/frontend/src/components/IdentityProvider/IdentityProviderCreateWizard.vue
@@ -474,7 +474,7 @@ import {
OIDCIdentityProviderConfig,
LDAPIdentityProviderConfig,
} from "@/types/proto/v1/idp_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import type { OAuth2IdentityProviderTemplate } from "@/utils";
import { identityProviderTypeToString } from "@/utils";
import IdentityProviderExternalURL from "./IdentityProviderExternalURL.vue";
diff --git a/frontend/src/components/InstanceAssignment.vue b/frontend/src/components/InstanceAssignment.vue
index a5469de352..13ce7a6472 100644
--- a/frontend/src/components/InstanceAssignment.vue
+++ b/frontend/src/components/InstanceAssignment.vue
@@ -92,7 +92,7 @@ import {
import { environmentNamePrefix } from "@/store/modules/v1/common";
import { engineFromJSON } from "@/types/proto/v1/common";
import { Instance } from "@/types/proto/v1/instance_service";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import { type SearchParams, hasWorkspacePermissionV2 } from "@/utils";
import LearnMoreLink from "./LearnMoreLink.vue";
diff --git a/frontend/src/components/InstanceForm/Buttons.vue b/frontend/src/components/InstanceForm/Buttons.vue
index c9c2d41c88..be53442c01 100644
--- a/frontend/src/components/InstanceForm/Buttons.vue
+++ b/frontend/src/components/InstanceForm/Buttons.vue
@@ -62,7 +62,7 @@ import {
DataSourceType,
Instance,
} from "@/types/proto/v1/instance_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { defer, isValidSpannerHost } from "@/utils";
import { cloneDeep, isEqual } from "lodash-es";
import { NButton } from "naive-ui";
diff --git a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
index 9528020b26..3651e4317a 100644
--- a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
+++ b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
@@ -1019,7 +1019,7 @@ import {
KerberosConfig,
SASLConfig,
} from "@/types/proto/v1/instance_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { onlyAllowNumber } from "@/utils";
import type { EditDataSource } from "../common";
import { useInstanceFormContext } from "../context";
diff --git a/frontend/src/components/InstanceForm/Form.vue b/frontend/src/components/InstanceForm/Form.vue
index da2bda7745..d271c7cdb6 100644
--- a/frontend/src/components/InstanceForm/Form.vue
+++ b/frontend/src/components/InstanceForm/Form.vue
@@ -522,7 +522,7 @@ import type { Duration } from "@/types/proto/google/protobuf/duration";
import { Engine } from "@/types/proto/v1/common";
import { DataSource_AuthenticationType } from "@/types/proto/v1/instance_service";
import { DataSource_RedisType } from "@/types/proto/v1/instance_service";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import {
isDev,
extractInstanceResourceName,
diff --git a/frontend/src/components/InstanceForm/MaximumConnectionsInput.vue b/frontend/src/components/InstanceForm/MaximumConnectionsInput.vue
index 0605903d0f..397da2311b 100644
--- a/frontend/src/components/InstanceForm/MaximumConnectionsInput.vue
+++ b/frontend/src/components/InstanceForm/MaximumConnectionsInput.vue
@@ -63,7 +63,7 @@
import { NInputNumber, NRadio } from "naive-ui";
import { computed, reactive, watch } from "vue";
import { useSubscriptionV1Store } from "@/store";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { FeatureBadge } from "../FeatureGuard";
import { useInstanceFormContext } from "./context";
diff --git a/frontend/src/components/InstanceForm/common.ts b/frontend/src/components/InstanceForm/common.ts
index 5d20df810d..00e439d65e 100644
--- a/frontend/src/components/InstanceForm/common.ts
+++ b/frontend/src/components/InstanceForm/common.ts
@@ -9,7 +9,7 @@ import {
import { Engine, State } from "@/types/proto/v1/common";
import type { DataSource, Instance } from "@/types/proto/v1/instance_service";
import { DataSourceType } from "@/types/proto/v1/instance_service";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import { calcUpdateMask } from "@/utils";
export type BasicInfo = Omit<
diff --git a/frontend/src/components/InstanceForm/context.ts b/frontend/src/components/InstanceForm/context.ts
index 594bd5595d..650eb58917 100644
--- a/frontend/src/components/InstanceForm/context.ts
+++ b/frontend/src/components/InstanceForm/context.ts
@@ -21,7 +21,7 @@ import {
DataSource_AuthenticationType,
DataSource_RedisType,
} from "@/types/proto/v1/instance_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import {
extractInstanceResourceName,
hasWorkspacePermissionV2,
diff --git a/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue b/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue
index 323fdb9c2a..7c76597819 100644
--- a/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue
+++ b/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue
@@ -65,7 +65,7 @@
import { computed, ref } from "vue";
import { FeatureAttention } from "@/components/FeatureGuard";
import { useCurrentProjectV1 } from "@/store";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import type { Plan, Plan_Spec } from "@/types/proto/v1/plan_service";
import type { Task } from "@/types/proto/v1/rollout_service";
import { SQLCheckSection } from "../Plan/components";
diff --git a/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue b/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue
index bbc010087d..35347cc522 100644
--- a/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue
+++ b/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue
@@ -117,7 +117,7 @@ import { computedAsync } from "@vueuse/core";
import { computed, ref } from "vue";
import { FeatureAttention } from "@/components/FeatureGuard";
import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { displayRoleTitle } from "@/utils";
import { convertFromCELString } from "@/utils/issue/cel";
import { provideSidebarContext } from "../Plan/logic";
diff --git a/frontend/src/components/IssueV1/IssueDetailPage.vue b/frontend/src/components/IssueV1/IssueDetailPage.vue
index be781a87e5..b9ec70430e 100644
--- a/frontend/src/components/IssueV1/IssueDetailPage.vue
+++ b/frontend/src/components/IssueV1/IssueDetailPage.vue
@@ -70,7 +70,7 @@ import { FeatureAttention } from "@/components/FeatureGuard";
import { useCurrentProjectV1 } from "@/store";
import type { Plan, Plan_Spec } from "@/types/proto/v1/plan_service";
import { type Task } from "@/types/proto/v1/rollout_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { SQLCheckSection } from "../Plan/components";
import { providePlanSQLCheckContext } from "../Plan/components/SQLCheckSection";
import { provideSidebarContext } from "../Plan/logic";
diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue
index a8230657e2..9d6572b20b 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue
@@ -77,7 +77,7 @@ import { BBSpin } from "@/bbkit";
import FeatureBadge from "@/components/FeatureGuard/FeatureBadge.vue";
import { useIssueContext, useWrappedReviewStepsV1 } from "@/components/IssueV1";
import { useIssueV1Store } from "@/store";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import RiskLevelTag from "./RiskLevelTag.vue";
import Timeline from "./Timeline.vue";
diff --git a/frontend/src/components/ProfileDropdown.vue b/frontend/src/components/ProfileDropdown.vue
index 6d6b78d06d..9e64a98142 100644
--- a/frontend/src/components/ProfileDropdown.vue
+++ b/frontend/src/components/ProfileDropdown.vue
@@ -28,7 +28,7 @@ import {
useSubscriptionV1Store,
useUIStateStore,
} from "@/store";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import { hasWorkspacePermissionV2, isDev } from "@/utils";
import ProfilePreview from "./ProfilePreview.vue";
import UserAvatar from "./User/UserAvatar.vue";
diff --git a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
index 523c1db0a0..7a261f0421 100644
--- a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
+++ b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
@@ -96,7 +96,7 @@ import RequiredStar from "@/components/RequiredStar.vue";
import { RoleSelect } from "@/components/v2/Select";
import { PresetRoleType, type DatabaseResource } from "@/types";
import type { Binding } from "@/types/proto/v1/iam_policy";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { checkRoleContainsAnyPermission } from "@/utils";
import { buildConditionExpr } from "@/utils/issue/cel";
import { isUndefined } from "lodash-es";
diff --git a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue
index e8e0882900..ccfc3a2b81 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue
@@ -141,7 +141,7 @@ import type { ComposedProject, DatabaseResource } from "@/types";
import { PresetRoleType } from "@/types";
import { State } from "@/types/proto/v1/common";
import type { Binding } from "@/types/proto/v1/iam_policy";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { displayRoleTitle, checkRoleContainsAnyPermission } from "@/utils";
import { convertFromExpr, buildConditionExpr } from "@/utils/issue/cel";
import { getBindingIdentifier } from "../utils";
diff --git a/frontend/src/components/Role/Setting/RoleSetting.vue b/frontend/src/components/Role/Setting/RoleSetting.vue
index a72aae46a7..00f66771e6 100644
--- a/frontend/src/components/Role/Setting/RoleSetting.vue
+++ b/frontend/src/components/Role/Setting/RoleSetting.vue
@@ -65,7 +65,7 @@ import { FeatureBadge, FeatureModal } from "@/components/FeatureGuard";
import { featureToRef, useRoleStore } from "@/store";
import { PRESET_ROLES } from "@/types";
import { Role } from "@/types/proto/v1/role_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { hasWorkspacePermissionV2 } from "@/utils";
import { RoleDataTable, RolePanel } from "./components";
import { provideCustomRoleSettingContext } from "./context";
diff --git a/frontend/src/components/Role/Setting/components/RolePanel.vue b/frontend/src/components/Role/Setting/components/RolePanel.vue
index 165576a0c8..700c98d3ca 100644
--- a/frontend/src/components/Role/Setting/components/RolePanel.vue
+++ b/frontend/src/components/Role/Setting/components/RolePanel.vue
@@ -116,7 +116,7 @@ import { roleNamePrefix } from "@/store/modules/v1/common";
import type { ValidatedMessage } from "@/types";
import { PERMISSIONS } from "@/types";
import { Role } from "@/types/proto/v1/role_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { extractRoleResourceName } from "@/utils";
import { displayPermissionTitle } from "@/utils/permission";
import { useCustomRoleSettingContext } from "../context";
diff --git a/frontend/src/components/SQLReview/components/SQLRuleTable.vue b/frontend/src/components/SQLReview/components/SQLRuleTable.vue
index 62524b1829..eafb72370a 100644
--- a/frontend/src/components/SQLReview/components/SQLRuleTable.vue
+++ b/frontend/src/components/SQLReview/components/SQLRuleTable.vue
@@ -55,7 +55,7 @@
$t("sql-review.not-available-for-free", {
plan: $t(
`subscription.plan.${
- currentPlan.toLowerCase()
+ PlanType[currentPlan].toLowerCase()
}.title`
),
})
@@ -130,6 +130,7 @@ import type { DataTableColumn } from "naive-ui";
import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
import { useCurrentPlan } from "@/store";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import type { RuleTemplateV2 } from "@/types";
import {
getRuleLocalization,
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue
index 0943860f61..08543e1553 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue
@@ -67,7 +67,7 @@ import LabelEditorDrawer from "@/components/LabelEditorDrawer.vue";
import SemanticTypesDrawer from "@/components/SensitiveData/components/SemanticTypesDrawer.vue";
import { InlineInput } from "@/components/v2";
import { useSettingV1Store, hasFeature } from "@/store";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
import { ColumnCatalog } from "@/types/proto/v1/database_catalog_service";
diff --git a/frontend/src/components/SensitiveData/ClassificationView.vue b/frontend/src/components/SensitiveData/ClassificationView.vue
index 744718cc9e..7ccea8ed04 100644
--- a/frontend/src/components/SensitiveData/ClassificationView.vue
+++ b/frontend/src/components/SensitiveData/ClassificationView.vue
@@ -105,7 +105,7 @@ import {
DataClassificationSetting_DataClassificationConfig,
Setting_SettingName,
} from "@/types/proto/v1/setting_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { hasWorkspacePermissionV2 } from "@/utils";
import LearnMoreLink from "../LearnMoreLink.vue";
import ClassificationTree from "../SchemaTemplate/ClassificationTree.vue";
diff --git a/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue b/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue
index 660608db8b..45c8fb88e7 100644
--- a/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue
+++ b/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue
@@ -143,7 +143,7 @@ import {
PolicyResourceType,
MaskingRulePolicy_MaskingRule,
} from "@/types/proto/v1/org_policy_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import {
arraySwap,
hasWorkspacePermissionV2,
diff --git a/frontend/src/components/SensitiveData/GrantAccessForm.vue b/frontend/src/components/SensitiveData/GrantAccessForm.vue
index 2cb6453021..889b6b97a3 100644
--- a/frontend/src/components/SensitiveData/GrantAccessForm.vue
+++ b/frontend/src/components/SensitiveData/GrantAccessForm.vue
@@ -119,7 +119,7 @@ import {
MaskingExceptionPolicy_MaskingException_Action,
maskingExceptionPolicy_MaskingException_ActionToJSON,
} from "@/types/proto/v1/org_policy_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import type { SensitiveColumn } from "./types";
import {
getExpressionsForDatabaseResource,
diff --git a/frontend/src/components/SensitiveData/SemanticTypesView.vue b/frontend/src/components/SensitiveData/SemanticTypesView.vue
index 70c44daac8..3ab1ac2e5a 100644
--- a/frontend/src/components/SensitiveData/SemanticTypesView.vue
+++ b/frontend/src/components/SensitiveData/SemanticTypesView.vue
@@ -44,7 +44,7 @@ import { computed, reactive, onMounted } from "vue";
import { useI18n } from "vue-i18n";
import { featureToRef, pushNotification, useSettingV1Store } from "@/store";
import { SemanticTypeSetting_SemanticType, Setting_SettingName } from "@/types/proto/v1/setting_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { hasWorkspacePermissionV2 } from "@/utils";
import SemanticTemplateDrawer from "./components/SemanticTemplateDrawer.vue";
import type { SemanticItem } from "./components/SemanticTypesTable.vue";
diff --git a/frontend/src/components/TableDataTable.vue b/frontend/src/components/TableDataTable.vue
index bcbace25ac..e602156022 100644
--- a/frontend/src/components/TableDataTable.vue
+++ b/frontend/src/components/TableDataTable.vue
@@ -37,7 +37,7 @@ import {
import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
import type { TableMetadata } from "@/types/proto/v1/database_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { bytesToString, hasSchemaProperty } from "@/utils";
import type { DataTableColumn } from "naive-ui";
import { NDataTable } from "naive-ui";
diff --git a/frontend/src/components/TrialModal.vue b/frontend/src/components/TrialModal.vue
index 56d1f8a75a..a1caf31a30 100644
--- a/frontend/src/components/TrialModal.vue
+++ b/frontend/src/components/TrialModal.vue
@@ -16,11 +16,7 @@
<template #plan>
<span class="font-bold text-accent">
{{
- $t(
- `subscription.plan.${
- PlanType.ENTERPRISE.toLowerCase()
- }.title`
- )
+ $t(`subscription.plan.enterprise.title`)
}}
</span>
</template>
@@ -57,7 +53,6 @@ import { useLanguage } from "@/composables/useLanguage";
import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/router/dashboard/workspaceSetting";
import { useSubscriptionV1Store } from "@/store";
import { ENTERPRISE_INQUIRE_LINK } from "@/types";
-import { PlanType } from "@/types/proto/v1/subscription_service";
import { NButton } from "naive-ui";
import { reactive } from "vue";
import { useRouter } from "vue-router";
diff --git a/frontend/src/components/WorkspaceInstanceLicenseStats.vue b/frontend/src/components/WorkspaceInstanceLicenseStats.vue
index ab6970a8fd..93f086dd65 100644
--- a/frontend/src/components/WorkspaceInstanceLicenseStats.vue
+++ b/frontend/src/components/WorkspaceInstanceLicenseStats.vue
@@ -43,7 +43,7 @@ import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
import InstanceAssignment from "@/components/InstanceAssignment.vue";
import { useActuatorV1Store, useSubscriptionV1Store } from "@/store";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
interface LocalState {
showInstanceAssignmentDrawer: boolean;
diff --git a/frontend/src/components/misc/Version.vue b/frontend/src/components/misc/Version.vue
index e139315bd8..052759cf10 100644
--- a/frontend/src/components/misc/Version.vue
+++ b/frontend/src/components/misc/Version.vue
@@ -69,7 +69,7 @@ import {
useAppFeature,
useSubscriptionV1Store,
} from "@/store";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import { autoSubscriptionRoute, hasWorkspacePermissionV2 } from "@/utils";
import ReleaseRemindModal from "../ReleaseRemindModal.vue";
import TrialModal from "../TrialModal.vue";
diff --git a/frontend/src/components/misc/Watermark.vue b/frontend/src/components/misc/Watermark.vue
index 9062c3616e..c935f74d96 100644
--- a/frontend/src/components/misc/Watermark.vue
+++ b/frontend/src/components/misc/Watermark.vue
@@ -39,7 +39,7 @@ import { featureToRef, useCurrentUserV1, extractUserId, useActuatorV1Store } fro
import { useSettingV1Store } from "@/store/modules/v1/setting";
import { UNKNOWN_USER_NAME } from "@/types";
import { Setting_SettingName } from "@/types/proto/v1/setting_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
const GAP = 320;
const SIZE = 16;
diff --git a/frontend/src/components/v2/Model/DatabaseView.vue b/frontend/src/components/v2/Model/DatabaseView.vue
index 5d5df0a6c3..50209331a3 100644
--- a/frontend/src/components/v2/Model/DatabaseView.vue
+++ b/frontend/src/components/v2/Model/DatabaseView.vue
@@ -26,7 +26,7 @@
import { FeatureBadge } from "@/components/FeatureGuard";
import { DatabaseV1Name, EnvironmentV1Name } from "@/components/v2";
import { useDatabaseV1ByName } from "@/store";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { InstanceV1EngineIcon } from "./Instance";
const props = defineProps<{
diff --git a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue
index f14ef4b8ac..bf67d7dada 100644
--- a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue
+++ b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue
@@ -57,7 +57,7 @@ import {
pushNotification,
} from "@/store";
import type { ComposedInstance } from "@/types";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import { hasWorkspacePermissionV2 } from "@/utils";
interface Action {
diff --git a/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue b/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue
index 1f79220337..45a0b3cb71 100644
--- a/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue
+++ b/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue
@@ -17,7 +17,7 @@ import { NTooltip } from "naive-ui";
import { computed } from "vue";
import { featureToRef } from "@/store";
import type { Environment } from "@/types/v1/environment";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
const props = withDefaults(
defineProps<{
diff --git a/frontend/src/components/v2/Select/RoleSelect.vue b/frontend/src/components/v2/Select/RoleSelect.vue
index 48f2748bf8..bd105e76fa 100644
--- a/frontend/src/components/v2/Select/RoleSelect.vue
+++ b/frontend/src/components/v2/Select/RoleSelect.vue
@@ -32,7 +32,7 @@ import {
PRESET_ROLES,
PRESET_WORKSPACE_ROLES,
} from "@/types";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { displayRoleTitle } from "@/utils";
const props = withDefaults(
diff --git a/frontend/src/composables/useExecuteSQL.ts b/frontend/src/composables/useExecuteSQL.ts
index e4a0ac2fce..6fd398bf0e 100644
--- a/frontend/src/composables/useExecuteSQL.ts
+++ b/frontend/src/composables/useExecuteSQL.ts
@@ -28,7 +28,7 @@ import type {
QueryDataSourceType,
} from "@/types";
import { isValidDatabaseName } from "@/types";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { Engine } from "@/types/proto/v1/common";
import { DatabaseGroupView } from "@/types/proto/v1/database_group_service";
import {
diff --git a/frontend/src/grpcweb/index.ts b/frontend/src/grpcweb/index.ts
index abc9569180..8e2c2a0dd5 100644
--- a/frontend/src/grpcweb/index.ts
+++ b/frontend/src/grpcweb/index.ts
@@ -10,6 +10,7 @@ import {
import { ActuatorService } from "@/types/proto-es/v1/actuator_service_pb";
import { AuditLogService } from "@/types/proto-es/v1/audit_log_service_pb";
import { AuthService } from "@/types/proto-es/v1/auth_service_pb";
+import { SubscriptionService } from "@/types/proto-es/v1/subscription_service_pb";
import { CelServiceDefinition } from "@/types/proto/v1/cel_service";
import { ChangelistServiceDefinition } from "@/types/proto/v1/changelist_service";
import { DatabaseCatalogServiceDefinition } from "@/types/proto/v1/database_catalog_service";
@@ -32,7 +33,6 @@ import { RolloutServiceDefinition } from "@/types/proto/v1/rollout_service";
import { SettingServiceDefinition } from "@/types/proto/v1/setting_service";
import { SheetServiceDefinition } from "@/types/proto/v1/sheet_service";
import { SQLServiceDefinition } from "@/types/proto/v1/sql_service";
-import { SubscriptionServiceDefinition } from "@/types/proto/v1/subscription_service";
import { UserServiceDefinition } from "@/types/proto/v1/user_service";
import { WorksheetServiceDefinition } from "@/types/proto/v1/worksheet_service";
import { WorkspaceServiceDefinition } from "@/types/proto/v1/workspace_service";
@@ -170,11 +170,6 @@ export const celServiceClient = clientFactory.create(
channel
);
-export const subscriptionServiceClient = clientFactory.create(
- SubscriptionServiceDefinition,
- channel
-);
-
export const changelistServiceClient = clientFactory.create(
ChangelistServiceDefinition,
channel
@@ -238,3 +233,8 @@ export const auditLogServiceClientConnect = createClient(
AuditLogService,
transport
);
+
+export const subscriptionServiceClientConnect = createClient(
+ SubscriptionService,
+ transport
+);
diff --git a/frontend/src/grpcweb/methods.ts b/frontend/src/grpcweb/methods.ts
index 8c8413914e..83bede2101 100644
--- a/frontend/src/grpcweb/methods.ts
+++ b/frontend/src/grpcweb/methods.ts
@@ -1,74 +1,77 @@
-import { ActuatorServiceDefinition } from "@/types/proto/v1/actuator_service";
-import { AuditLogServiceDefinition } from "@/types/proto/v1/audit_log_service";
-import { AuthServiceDefinition } from "@/types/proto/v1/auth_service";
-import { CelServiceDefinition } from "@/types/proto/v1/cel_service";
-import { ChangelistServiceDefinition } from "@/types/proto/v1/changelist_service";
-import { DatabaseGroupServiceDefinition } from "@/types/proto/v1/database_group_service";
-import { DatabaseServiceDefinition } from "@/types/proto/v1/database_service";
-import { GroupServiceDefinition } from "@/types/proto/v1/group_service";
-import { IdentityProviderServiceDefinition } from "@/types/proto/v1/idp_service";
-import { InstanceServiceDefinition } from "@/types/proto/v1/instance_service";
-import { IssueServiceDefinition } from "@/types/proto/v1/issue_service";
-import { OrgPolicyServiceDefinition } from "@/types/proto/v1/org_policy_service";
-import { PlanServiceDefinition } from "@/types/proto/v1/plan_service";
-import { ProjectServiceDefinition } from "@/types/proto/v1/project_service";
-import { ReleaseServiceDefinition } from "@/types/proto/v1/release_service";
-import { ReviewConfigServiceDefinition } from "@/types/proto/v1/review_config_service";
-import { RiskServiceDefinition } from "@/types/proto/v1/risk_service";
-import { RoleServiceDefinition } from "@/types/proto/v1/role_service";
-import { RolloutServiceDefinition } from "@/types/proto/v1/rollout_service";
-import { SettingServiceDefinition } from "@/types/proto/v1/setting_service";
-import { SheetServiceDefinition } from "@/types/proto/v1/sheet_service";
-import { SQLServiceDefinition } from "@/types/proto/v1/sql_service";
-import { SubscriptionServiceDefinition } from "@/types/proto/v1/subscription_service";
-import { UserServiceDefinition } from "@/types/proto/v1/user_service";
-import { WorksheetServiceDefinition } from "@/types/proto/v1/worksheet_service";
-import { WorkspaceServiceDefinition } from "@/types/proto/v1/workspace_service";
-
-// The code of audit field in generated method options.
-// A workaround code for the outdated ts-proto version in buf community plugins.
-// This hack can be removed once the ts-proto version is upgraded.
-// TODO(steven): remove me later.
-const AUDIT_TAG_CODE = "800024";
+import { getOption } from '@bufbuild/protobuf';
+import { ActuatorService } from "@/types/proto-es/v1/actuator_service_pb";
+import { audit } from "@/types/proto-es/v1/annotation_pb";
+import { AuditLogService } from "@/types/proto-es/v1/audit_log_service_pb";
+import { AuthService } from "@/types/proto-es/v1/auth_service_pb";
+import { CelService } from "@/types/proto-es/v1/cel_service_pb";
+import { ChangelistService } from "@/types/proto-es/v1/changelist_service_pb";
+import { DatabaseCatalogService } from "@/types/proto-es/v1/database_catalog_service_pb";
+import { DatabaseGroupService } from "@/types/proto-es/v1/database_group_service_pb";
+import { DatabaseService } from "@/types/proto-es/v1/database_service_pb";
+import { GroupService } from "@/types/proto-es/v1/group_service_pb";
+import { IdentityProviderService } from "@/types/proto-es/v1/idp_service_pb";
+import { InstanceRoleService } from "@/types/proto-es/v1/instance_role_service_pb";
+import { InstanceService } from "@/types/proto-es/v1/instance_service_pb";
+import { IssueService } from "@/types/proto-es/v1/issue_service_pb";
+import { OrgPolicyService } from "@/types/proto-es/v1/org_policy_service_pb";
+import { PlanService } from "@/types/proto-es/v1/plan_service_pb";
+import { ProjectService } from "@/types/proto-es/v1/project_service_pb";
+import { ReleaseService } from "@/types/proto-es/v1/release_service_pb";
+import { RevisionService } from "@/types/proto-es/v1/revision_service_pb";
+import { ReviewConfigService } from "@/types/proto-es/v1/review_config_service_pb";
+import { RiskService } from "@/types/proto-es/v1/risk_service_pb";
+import { RoleService } from "@/types/proto-es/v1/role_service_pb";
+import { RolloutService } from "@/types/proto-es/v1/rollout_service_pb";
+import { SettingService } from "@/types/proto-es/v1/setting_service_pb";
+import { SheetService } from "@/types/proto-es/v1/sheet_service_pb";
+import { SQLService } from "@/types/proto-es/v1/sql_service_pb";
+import { SubscriptionService } from "@/types/proto-es/v1/subscription_service_pb";
+import { UserService } from "@/types/proto-es/v1/user_service_pb";
+import { WorksheetService } from "@/types/proto-es/v1/worksheet_service_pb";
+import { WorkspaceService } from "@/types/proto-es/v1/workspace_service_pb";
// The methods that have audit field in their options.
// Format: /bytebase.v1.ServiceName/MethodName
export const ALL_METHODS_WITH_AUDIT = [
- ActuatorServiceDefinition,
- AuditLogServiceDefinition,
- AuthServiceDefinition,
- CelServiceDefinition,
- ChangelistServiceDefinition,
- DatabaseGroupServiceDefinition,
- DatabaseServiceDefinition,
- GroupServiceDefinition,
- IdentityProviderServiceDefinition,
- InstanceServiceDefinition,
- IssueServiceDefinition,
- OrgPolicyServiceDefinition,
- PlanServiceDefinition,
- ProjectServiceDefinition,
- ReleaseServiceDefinition,
- ReviewConfigServiceDefinition,
- RiskServiceDefinition,
- RoleServiceDefinition,
- RolloutServiceDefinition,
- SettingServiceDefinition,
- SheetServiceDefinition,
- SQLServiceDefinition,
- SubscriptionServiceDefinition,
- UserServiceDefinition,
- WorksheetServiceDefinition,
- WorkspaceServiceDefinition,
+ ActuatorService,
+ AuditLogService,
+ AuthService,
+ CelService,
+ ChangelistService,
+ DatabaseCatalogService,
+ DatabaseGroupService,
+ DatabaseService,
+ GroupService,
+ IdentityProviderService,
+ InstanceRoleService,
+ InstanceService,
+ IssueService,
+ OrgPolicyService,
+ PlanService,
+ ProjectService,
+ ReleaseService,
+ RevisionService,
+ ReviewConfigService,
+ RiskService,
+ RoleService,
+ RolloutService,
+ SettingService,
+ SheetService,
+ SQLService,
+ SubscriptionService,
+ UserService,
+ WorksheetService,
+ WorkspaceService,
]
- .map((serviceDefinition) => {
+ .map((service) => {
const methods: string[] = [];
- for (const method of Object.values(serviceDefinition.methods)) {
- const fullName = serviceDefinition.fullName;
- if (method.options._unknownFields?.[AUDIT_TAG_CODE]?.length > 0) {
- methods.push(`/${fullName}/${method.name}`);
+ for (const method of service.methods) {
+ const auditOption = getOption(method, audit);
+ if (auditOption) {
+ methods.push(`/${service.typeName}/${method.name}`);
}
}
return methods;
})
- .flat();
+ .flat()
+ .sort();
\ No newline at end of file
diff --git a/frontend/src/layouts/BodyLayout.vue b/frontend/src/layouts/BodyLayout.vue
index 397e458008..003c67280e 100644
--- a/frontend/src/layouts/BodyLayout.vue
+++ b/frontend/src/layouts/BodyLayout.vue
@@ -141,7 +141,7 @@ import {
pushNotification,
} from "@/store";
import { PresetRoleType } from "@/types";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import DashboardHeader from "@/views/DashboardHeader.vue";
import Quickstart from "../components/Quickstart.vue";
import { provideBodyLayoutContext } from "./common";
diff --git a/frontend/src/layouts/ProjectV1Layout.vue b/frontend/src/layouts/ProjectV1Layout.vue
index 8f5ae6d0ad..825ba7cfc0 100644
--- a/frontend/src/layouts/ProjectV1Layout.vue
+++ b/frontend/src/layouts/ProjectV1Layout.vue
@@ -94,7 +94,7 @@ import {
UNKNOWN_PROJECT_NAME,
} from "@/types";
import { State } from "@/types/proto/v1/common";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { hasProjectPermissionV2 } from "@/utils";
import { useBodyLayoutContext } from "./common";
diff --git a/frontend/src/layouts/SplashLayout.vue b/frontend/src/layouts/SplashLayout.vue
index aa2f29988b..d2228e7edb 100644
--- a/frontend/src/layouts/SplashLayout.vue
+++ b/frontend/src/layouts/SplashLayout.vue
@@ -30,7 +30,7 @@ import { computed } from "vue";
import { useRouter } from "vue-router";
import { AUTH_SIGNUP_MODULE } from "@/router/auth";
import { useSubscriptionV1Store } from "@/store";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
const router = useRouter();
const subscriptionStore = useSubscriptionV1Store();
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts
index ff1212e89f..2511826843 100644
--- a/frontend/src/router/index.ts
+++ b/frontend/src/router/index.ts
@@ -12,7 +12,7 @@ import {
useInstanceV1Store,
useSQLEditorTabStore,
} from "@/store";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import authRoutes, {
AUTH_2FA_SETUP_MODULE,
AUTH_MFA_MODULE,
diff --git a/frontend/src/store/modules/sqlEditor/tab.ts b/frontend/src/store/modules/sqlEditor/tab.ts
index ebe025de89..c471e55540 100644
--- a/frontend/src/store/modules/sqlEditor/tab.ts
+++ b/frontend/src/store/modules/sqlEditor/tab.ts
@@ -12,7 +12,7 @@ import type {
} from "@/types";
import { DEFAULT_SQL_EDITOR_TAB_MODE, isValidDatabaseName } from "@/types";
import { DataSourceType } from "@/types/proto/v1/instance_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import {
WebStorageHelper,
defaultSQLEditorTab,
diff --git a/frontend/src/store/modules/v1/subscription.ts b/frontend/src/store/modules/v1/subscription.ts
index 5c30dfda4b..4770a483a7 100644
--- a/frontend/src/store/modules/v1/subscription.ts
+++ b/frontend/src/store/modules/v1/subscription.ts
@@ -2,12 +2,13 @@ import dayjs from "dayjs";
import { defineStore } from "pinia";
import type { Ref } from "vue";
import { computed } from "vue";
-import { subscriptionServiceClient } from "@/grpcweb";
+import { create } from "@bufbuild/protobuf";
+import { subscriptionServiceClientConnect } from "@/grpcweb";
import {
PLANS,
hasFeature as checkFeature,
hasInstanceFeature as checkInstanceFeature,
- getDateForPbTimestamp,
+ getDateForPbTimestampProtoEs,
getMinimumRequiredPlan,
instanceLimitFeature,
} from "@/types";
@@ -15,13 +16,13 @@ import type {
Instance,
InstanceResource,
} from "@/types/proto/v1/instance_service";
-import type { Subscription } from "@/types/proto/v1/subscription_service";
+import type { Subscription } from "@/types/proto-es/v1/subscription_service_pb";
import {
+ GetSubscriptionRequestSchema,
+ UpdateSubscriptionRequestSchema,
PlanFeature,
PlanType,
- planTypeFromJSON,
- planTypeToNumber,
-} from "@/types/proto/v1/subscription_service";
+} from "@/types/proto-es/v1/subscription_service_pb";
// The threshold of days before the license expiration date to show the warning.
// Default is 7 days.
@@ -85,7 +86,7 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {
if (!state.subscription) {
return PlanType.FREE;
}
- return planTypeFromJSON(state.subscription.plan);
+ return state.subscription.plan;
},
isFreePlan(): boolean {
return this.currentPlan == PlanType.FREE;
@@ -100,7 +101,7 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {
}
return dayjs(
- getDateForPbTimestamp(state.subscription.expiresTime)
+ getDateForPbTimestampProtoEs(state.subscription.expiresTime)
).format("YYYY/MM/DD HH:mm:ss");
},
isTrialing(state): boolean {
@@ -115,7 +116,7 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {
return false;
}
return dayjs(
- getDateForPbTimestamp(state.subscription.expiresTime)
+ getDateForPbTimestampProtoEs(state.subscription.expiresTime)
).isBefore(new Date());
},
daysBeforeExpire(state): number {
@@ -128,7 +129,7 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {
}
const expiresTime = dayjs(
- getDateForPbTimestamp(state.subscription.expiresTime)
+ getDateForPbTimestampProtoEs(state.subscription.expiresTime)
);
return Math.max(expiresTime.diff(new Date(), "day"), 0);
},
@@ -193,16 +194,15 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {
return this.hasFeature(feature) && !instance.activation;
},
currentPlanGTE(plan: PlanType): boolean {
- return planTypeToNumber(this.currentPlan) >= planTypeToNumber(plan);
+ return this.currentPlan >= plan;
},
getMinimumRequiredPlan(feature: PlanFeature): PlanType {
return getMinimumRequiredPlan(feature);
},
async fetchSubscription() {
try {
- const subscription = await subscriptionServiceClient.getSubscription(
- {}
- );
+ const request = create(GetSubscriptionRequestSchema, {});
+ const subscription = await subscriptionServiceClientConnect.getSubscription(request);
this.setSubscription(subscription);
return subscription;
} catch (e) {
@@ -210,9 +210,10 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {
}
},
async patchSubscription(license: string) {
- const subscription = await subscriptionServiceClient.updateSubscription({
+ const request = create(UpdateSubscriptionRequestSchema, {
license,
});
+ const subscription = await subscriptionServiceClientConnect.updateSubscription(request);
this.setSubscription(subscription);
return subscription;
},
diff --git a/frontend/src/types/plan.ts b/frontend/src/types/plan.ts
index c234d88f24..a94ace0d52 100644
--- a/frontend/src/types/plan.ts
+++ b/frontend/src/types/plan.ts
@@ -1,12 +1,16 @@
import {
PlanFeature,
PlanType,
- type PlanConfig,
type PlanLimitConfig
-} from "@/types/proto/v1/subscription_service";
+} from "@/types/proto-es/v1/subscription_service_pb";
import planData from "./plan.yaml";
-export const PLANS: PlanLimitConfig[] = planData.plans;
+// Convert YAML data to proper types
+export const PLANS: PlanLimitConfig[] = planData.plans.map((plan: any) => ({
+ ...plan,
+ type: PlanType[plan.type as keyof typeof PlanType],
+ features: plan.features.map((f: string) => PlanFeature[f as keyof typeof PlanFeature])
+}));
// Create a plan feature matrix from the YAML data
const planFeatureMatrix = new Map<PlanType, Set<PlanFeature>>();
@@ -17,8 +21,8 @@ export const instanceLimitFeature = new Set<PlanFeature>();
PLANS.forEach((plan) => {
planFeatureMatrix.set(plan.type, new Set(plan.features));
});
-(planData as PlanConfig).instanceFeatures.forEach((feature) => {
- instanceLimitFeature.add(feature);
+(planData as any).instanceFeatures.forEach((feature: string) => {
+ instanceLimitFeature.add(PlanFeature[feature as keyof typeof PlanFeature]);
});
// Helper function to check if a plan has a feature
diff --git a/frontend/src/types/sqlReview.ts b/frontend/src/types/sqlReview.ts
index 241c4fac01..014cfb3b7e 100644
--- a/frontend/src/types/sqlReview.ts
+++ b/frontend/src/types/sqlReview.ts
@@ -5,7 +5,7 @@ import {
SQLReviewRuleLevel,
sQLReviewRuleLevelFromJSON,
} from "@/types/proto/v1/org_policy_service";
-import type { PlanType } from "@/types/proto/v1/subscription_service";
+import type { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import sqlReviewSchema from "./sql-review-schema.yaml";
import sqlReviewDevTemplate from "./sql-review.dev.yaml";
import sqlReviewProdTemplate from "./sql-review.prod.yaml";
diff --git a/frontend/src/utils/v1/instance.ts b/frontend/src/utils/v1/instance.ts
index c17ba69108..19588a9c19 100644
--- a/frontend/src/utils/v1/instance.ts
+++ b/frontend/src/utils/v1/instance.ts
@@ -16,7 +16,7 @@ import {
DataSourceType,
type DataSource,
} from "@/types/proto/v1/instance_service";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
export function instanceV1Name(instance: Instance | InstanceResource) {
const store = useSubscriptionV1Store();
diff --git a/frontend/src/views/BannerAnnouncement.vue b/frontend/src/views/BannerAnnouncement.vue
index 09cb3c30fa..127eb2ae7a 100644
--- a/frontend/src/views/BannerAnnouncement.vue
+++ b/frontend/src/views/BannerAnnouncement.vue
@@ -21,7 +21,7 @@
import { computed } from "vue";
import { useSettingV1Store, hasFeature } from "@/store";
import { Announcement_AlertLevel } from "@/types/proto/v1/setting_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { urlfy } from "@/utils";
const settingV1Store = useSettingV1Store();
diff --git a/frontend/src/views/BannerSubscription.vue b/frontend/src/views/BannerSubscription.vue
index 7b3cb191de..cf14072647 100644
--- a/frontend/src/views/BannerSubscription.vue
+++ b/frontend/src/views/BannerSubscription.vue
@@ -30,7 +30,7 @@ import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/router/dashboard/workspaceSetting";
import { LICENSE_EXPIRATION_THRESHOLD, useSubscriptionV1Store } from "@/store";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
const { t } = useI18n();
const subscriptionStore = useSubscriptionV1Store();
diff --git a/frontend/src/views/BannerUpgradeSubscription.vue b/frontend/src/views/BannerUpgradeSubscription.vue
index d08e938b7d..fa7773c2d0 100644
--- a/frontend/src/views/BannerUpgradeSubscription.vue
+++ b/frontend/src/views/BannerUpgradeSubscription.vue
@@ -16,7 +16,7 @@
>{{
t("subscription.plan-features", {
plan: t(
- `subscription.plan.${neededPlan.toLowerCase()}.title`
+ `subscription.plan.${PlanType[neededPlan].toLowerCase()}.title`
),
})
}}</span
@@ -55,7 +55,9 @@
({{
$t(
`subscription.plan.${
- subscriptionStore.getMinimumRequiredPlan(feature as PlanFeature).toLowerCase()
+ PlanType[subscriptionStore.getMinimumRequiredPlan(
+ PlanFeature[feature as keyof typeof PlanFeature] ?? PlanFeature.FEATURE_UNSPECIFIED
+ )].toLowerCase()
}.title`
)
}})
@@ -74,10 +76,7 @@
import { BBModal } from "@/bbkit";
import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/router/dashboard/workspaceSetting";
import { useActuatorV1Store, useSubscriptionV1Store } from "@/store";
-import {
- PlanFeature, PlanType,
- planTypeToNumber
-} from "@/types/proto/v1/subscription_service";
+import { PlanFeature, PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import { NButton } from "naive-ui";
import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
@@ -98,8 +97,7 @@ const state = reactive<LocalState>({
const showBanner = computed(() => {
return (
unlicensedFeatures.value.length > 0 &&
- planTypeToNumber(neededPlan.value) >
- planTypeToNumber(subscriptionStore.currentPlan)
+ neededPlan.value > subscriptionStore.currentPlan
);
});
@@ -111,10 +109,9 @@ const neededPlan = computed(() => {
let plan = PlanType.FREE;
for (const feature of unlicensedFeatures.value) {
- const requiredPlan = subscriptionStore.getMinimumRequiredPlan(
- feature as PlanFeature
- );
- if (planTypeToNumber(requiredPlan) > planTypeToNumber(plan)) {
+ const featureEnum = PlanFeature[feature as keyof typeof PlanFeature] ?? PlanFeature.FEATURE_UNSPECIFIED;
+ const requiredPlan = subscriptionStore.getMinimumRequiredPlan(featureEnum);
+ if (requiredPlan > plan) {
plan = requiredPlan;
}
}
@@ -124,7 +121,7 @@ const neededPlan = computed(() => {
const currentPlan = computed(() => {
return t(
- `subscription.plan.${subscriptionStore.currentPlan.toLowerCase()}.title`
+ `subscription.plan.${PlanType[subscriptionStore.currentPlan].toLowerCase()}.title`
);
});
diff --git a/frontend/src/views/DashboardHeader.vue b/frontend/src/views/DashboardHeader.vue
index 6afc0f8c07..ee4d5b6d97 100644
--- a/frontend/src/views/DashboardHeader.vue
+++ b/frontend/src/views/DashboardHeader.vue
@@ -87,7 +87,7 @@ import {
} from "@/router/sqlEditor";
import { useRecentVisit } from "@/router/useRecentVisit";
import { useSubscriptionV1Store } from "@/store";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import {
extractDatabaseResourceName,
extractProjectResourceName,
diff --git a/frontend/src/views/ProfileDashboard.vue b/frontend/src/views/ProfileDashboard.vue
index d94eecb798..37ea3ff98c 100644
--- a/frontend/src/views/ProfileDashboard.vue
+++ b/frontend/src/views/ProfileDashboard.vue
@@ -257,7 +257,7 @@ import {
unknownUser,
} from "@/types";
import { State } from "@/types/proto/v1/common";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import {
UpdateUserRequest,
UserType,
diff --git a/frontend/src/views/SettingWorkspaceAuditLog.vue b/frontend/src/views/SettingWorkspaceAuditLog.vue
index 82862e1830..a44610fd8c 100644
--- a/frontend/src/views/SettingWorkspaceAuditLog.vue
+++ b/frontend/src/views/SettingWorkspaceAuditLog.vue
@@ -62,7 +62,7 @@ import { projectNamePrefix } from "@/store/modules/v1/common";
import { type SearchAuditLogsParams } from "@/types";
import type { AuditLog } from "@/types/proto-es/v1/audit_log_service_pb";
import { ExportFormat } from "@/types/proto-es/v1/common_pb";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { type SearchParams, extractProjectResourceName } from "@/utils";
interface LocalState {
diff --git a/frontend/src/views/SettingWorkspaceCustomApproval.vue b/frontend/src/views/SettingWorkspaceCustomApproval.vue
index 00e9146552..e1cf2d80f7 100644
--- a/frontend/src/views/SettingWorkspaceCustomApproval.vue
+++ b/frontend/src/views/SettingWorkspaceCustomApproval.vue
@@ -33,7 +33,7 @@ import {
useWorkspaceApprovalSettingStore,
useRiskStore,
} from "@/store";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
interface LocalState {
ready: boolean;
diff --git a/frontend/src/views/SettingWorkspaceDataClassification.vue b/frontend/src/views/SettingWorkspaceDataClassification.vue
index 5497b03a67..438595b160 100644
--- a/frontend/src/views/SettingWorkspaceDataClassification.vue
+++ b/frontend/src/views/SettingWorkspaceDataClassification.vue
@@ -12,7 +12,7 @@
import { FeatureAttention } from "@/components/FeatureGuard";
import { ClassificationView } from "@/components/SensitiveData";
import { featureToRef } from "@/store";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
const hasSensitiveDataFeature = featureToRef(PlanFeature.FEATURE_DATA_CLASSIFICATION);
</script>
diff --git a/frontend/src/views/SettingWorkspaceDataMasking.vue b/frontend/src/views/SettingWorkspaceDataMasking.vue
index 3632f4d793..9480fc4ae1 100644
--- a/frontend/src/views/SettingWorkspaceDataMasking.vue
+++ b/frontend/src/views/SettingWorkspaceDataMasking.vue
@@ -12,7 +12,7 @@
import { FeatureAttention } from "@/components/FeatureGuard";
import { GlobalMaskingRulesView } from "@/components/SensitiveData";
import { featureToRef } from "@/store";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
defineProps<{
embedded?: boolean;
diff --git a/frontend/src/views/SettingWorkspaceRiskCenter.vue b/frontend/src/views/SettingWorkspaceRiskCenter.vue
index f7877575c6..49b3c3f2f7 100644
--- a/frontend/src/views/SettingWorkspaceRiskCenter.vue
+++ b/frontend/src/views/SettingWorkspaceRiskCenter.vue
@@ -42,7 +42,7 @@ import {
import { provideRiskFilter } from "@/components/CustomApproval/Settings/components/common";
import { FeatureAttention, FeatureModal } from "@/components/FeatureGuard";
import { featureToRef, useRiskStore } from "@/store";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { hasWorkspacePermissionV2 } from "@/utils";
interface LocalState {
diff --git a/frontend/src/views/SettingWorkspaceSSO.vue b/frontend/src/views/SettingWorkspaceSSO.vue
index 0cfa7a5fec..88c1e9974d 100644
--- a/frontend/src/views/SettingWorkspaceSSO.vue
+++ b/frontend/src/views/SettingWorkspaceSSO.vue
@@ -61,7 +61,7 @@ import { WORKSPACE_ROUTE_IDENTITY_PROVIDER_DETAIL } from "@/router/dashboard/wor
import { featureToRef, getIdentityProviderResourceId } from "@/store";
import { useIdentityProviderStore } from "@/store/modules/idp";
import type { IdentityProvider } from "@/types/proto/v1/idp_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { hasWorkspacePermissionV2 } from "@/utils";
interface LocalState {
diff --git a/frontend/src/views/SettingWorkspaceSSODetail.vue b/frontend/src/views/SettingWorkspaceSSODetail.vue
index c587f87a4f..07779c72f0 100644
--- a/frontend/src/views/SettingWorkspaceSSODetail.vue
+++ b/frontend/src/views/SettingWorkspaceSSODetail.vue
@@ -40,7 +40,7 @@ import { IdentityProviderEditForm } from "@/components/IdentityProvider";
import { useIdentityProviderStore } from "@/store/modules/idp";
import { idpNamePrefix } from "@/store/modules/v1/common";
import type { IdentityProvider } from "@/types/proto/v1/idp_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
const props = defineProps<{
idpId?: string;
diff --git a/frontend/src/views/SettingWorkspaceSchemaTemplate.vue b/frontend/src/views/SettingWorkspaceSchemaTemplate.vue
index e49170e850..ff54c95594 100644
--- a/frontend/src/views/SettingWorkspaceSchemaTemplate.vue
+++ b/frontend/src/views/SettingWorkspaceSchemaTemplate.vue
@@ -39,7 +39,7 @@ import ColumnTypes from "@/views/SchemaTemplate/ColumnTypes.vue";
import FieldTemplates from "@/views/SchemaTemplate/FieldTemplates.vue";
import TableTemplates from "@/views/SchemaTemplate/TableTemplates.vue";
import { FeatureAttention } from "@/components/FeatureGuard";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
interface LocalState {
selectedTab: "FIELD_TEMPLATE" | "COLUMN_TYPE_RESTRICTION" | "TABLE_TEMPLATE";
diff --git a/frontend/src/views/SettingWorkspaceSemanticTypes.vue b/frontend/src/views/SettingWorkspaceSemanticTypes.vue
index 65c68f2bf4..26a58b84b9 100644
--- a/frontend/src/views/SettingWorkspaceSemanticTypes.vue
+++ b/frontend/src/views/SettingWorkspaceSemanticTypes.vue
@@ -8,5 +8,5 @@
<script lang="tsx" setup>
import { FeatureAttention } from "@/components/FeatureGuard";
import { SemanticTypesView } from "@/components/SensitiveData";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
</script>
diff --git a/frontend/src/views/SettingWorkspaceSubscription.vue b/frontend/src/views/SettingWorkspaceSubscription.vue
index 6c9425a0cc..02afbd76ba 100644
--- a/frontend/src/views/SettingWorkspaceSubscription.vue
+++ b/frontend/src/views/SettingWorkspaceSubscription.vue
@@ -172,7 +172,7 @@ import {
} from "@/store";
import { ENTERPRISE_INQUIRE_LINK } from "@/types";
import { Setting_SettingName } from "@/types/proto/v1/setting_service";
-import { PlanType } from "@/types/proto/v1/subscription_service";
+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
import { hasWorkspacePermissionV2 } from "@/utils";
interface LocalState {
diff --git a/frontend/src/views/SettingWorkspaceUsers.vue b/frontend/src/views/SettingWorkspaceUsers.vue
index 94b7580836..636227f0a6 100644
--- a/frontend/src/views/SettingWorkspaceUsers.vue
+++ b/frontend/src/views/SettingWorkspaceUsers.vue
@@ -209,7 +209,7 @@ import { groupNamePrefix } from "@/store/modules/v1/common";
import { State } from "@/types/proto/v1/common";
import type { Group } from "@/types/proto/v1/group_service";
import { WorkspaceProfileSetting } from "@/types/proto/v1/setting_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { type User } from "@/types/proto/v1/user_service";
import { hasWorkspacePermissionV2 } from "@/utils";
diff --git a/frontend/src/views/project/ProjectAuditLogDashboard.vue b/frontend/src/views/project/ProjectAuditLogDashboard.vue
index eecb4aa6c4..f325394441 100644
--- a/frontend/src/views/project/ProjectAuditLogDashboard.vue
+++ b/frontend/src/views/project/ProjectAuditLogDashboard.vue
@@ -58,7 +58,7 @@ import { featureToRef, useAuditLogStore, useUserStore } from "@/store";
import { type SearchAuditLogsParams } from "@/types";
import type { AuditLog } from "@/types/proto-es/v1/audit_log_service_pb";
import { ExportFormat } from "@/types/proto-es/v1/common_pb";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import type { SearchParams, SearchScope } from "@/utils";
interface LocalState {
diff --git a/frontend/src/views/project/ProjectDatabaseGroupDashboard.vue b/frontend/src/views/project/ProjectDatabaseGroupDashboard.vue
index 2207374cef..d47a424f6c 100644
--- a/frontend/src/views/project/ProjectDatabaseGroupDashboard.vue
+++ b/frontend/src/views/project/ProjectDatabaseGroupDashboard.vue
@@ -57,7 +57,7 @@ import {
import { SearchBox } from "@/components/v2";
import { PROJECT_V1_ROUTE_DATABASE_GROUPS_CREATE } from "@/router/dashboard/projectV1";
import { useProjectByName, hasFeature } from "@/store";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { projectNamePrefix } from "@/store/modules/v1/common";
import { hasProjectPermissionV2 } from "@/utils";
diff --git a/frontend/src/views/project/ProjectDatabaseGroupDetail.vue b/frontend/src/views/project/ProjectDatabaseGroupDetail.vue
index f54389de2a..252433334b 100644
--- a/frontend/src/views/project/ProjectDatabaseGroupDetail.vue
+++ b/frontend/src/views/project/ProjectDatabaseGroupDetail.vue
@@ -66,7 +66,7 @@ import {
projectNamePrefix,
} from "@/store/modules/v1/common";
import { DatabaseGroupView } from "@/types/proto/v1/database_group_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { hasPermissionToCreateChangeDatabaseIssueInProject } from "@/utils";
import { generateDatabaseGroupIssueRoute } from "@/utils/databaseGroup/issue";
diff --git a/frontend/src/views/project/ProjectMaskingExemption.vue b/frontend/src/views/project/ProjectMaskingExemption.vue
index 9b1db6eace..6aede5e2e8 100644
--- a/frontend/src/views/project/ProjectMaskingExemption.vue
+++ b/frontend/src/views/project/ProjectMaskingExemption.vue
@@ -79,7 +79,7 @@ import { type AccessUser } from "@/components/SensitiveData/types";
import { SearchBox, DatabaseSelect } from "@/components/v2";
import { PROJECT_V1_ROUTE_MASKING_EXEMPTION_CREATE } from "@/router/dashboard/projectV1";
import { useProjectByName, hasFeature } from "@/store";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { projectNamePrefix } from "@/store/modules/v1/common";
import { MaskingExceptionPolicy_MaskingException_Action as Action } from "@/types/proto/v1/org_policy_service";
import { hasProjectPermissionV2 } from "@/utils";
diff --git a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/BatchQueryDatabaseGroupSelector.vue b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/BatchQueryDatabaseGroupSelector.vue
index abccdf772d..e6d30f9da6 100644
--- a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/BatchQueryDatabaseGroupSelector.vue
+++ b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/BatchQueryDatabaseGroupSelector.vue
@@ -67,7 +67,7 @@ import {
useDBGroupListByProject,
} from "@/store/modules";
import { isValidDatabaseName } from "@/types";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
interface LocalState {
keyword: string;
diff --git a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue
index c01719236f..aabb427272 100644
--- a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue
+++ b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue
@@ -218,7 +218,7 @@ import {
} from "@/types";
import { engineFromJSON } from "@/types/proto/v1/common";
import { DataSourceType } from "@/types/proto/v1/instance_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import {
findAncestor,
isDescendantOf,
diff --git a/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue b/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue
index e6f0ad88ef..c8d57b8c39 100644
--- a/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue
@@ -166,7 +166,7 @@ import {
type SQLEditorQueryParams,
} from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { isWorksheetWritableV1, keyboardShortcutStr } from "@/utils";
import { useSQLEditorContext } from "../context";
import AdminModeButton from "./AdminModeButton.vue";
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataBlock.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataBlock.vue
index 961688d9fd..79d3ecbcb8 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataBlock.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataBlock.vue
@@ -60,7 +60,7 @@ import { computed, watch, ref } from "vue";
import { FeatureBadge } from "@/components/FeatureGuard";
import { useConnectionOfCurrentSQLEditorTab } from "@/store";
import type { QueryRow, RowValue } from "@/types/proto/v1/sql_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import TableCell from "./DataTable/TableCell.vue";
import SensitiveDataIcon from "./DataTable/common/SensitiveDataIcon.vue";
import { getColumnType } from "./DataTable/common/utils";
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vue
index dad2aeaa2d..e1c60dd426 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vue
@@ -141,7 +141,7 @@ import { computed, nextTick, onMounted, ref, watch } from "vue";
import { FeatureBadge } from "@/components/FeatureGuard";
import { useConnectionOfCurrentSQLEditorTab } from "@/store";
import { type QueryRow, type RowValue } from "@/types/proto/v1/sql_service";
-import { PlanFeature } from "@/types/proto/v1/subscription_service";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { useSQLResultViewContext } from "../context";
import TableCell from "./TableCell.vue";
import {