Skip to content

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

chore(frontend): fix types (#11328)

Liu Ji54f69cb1c5a2
diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js
index 237e327b12..91e992b113 100644
--- a/frontend/.eslintrc.js
+++ b/frontend/.eslintrc.js
@@ -26,6 +26,10 @@ module.exports = {
printWidth: 80,
},
],
+ "@typescript-eslint/consistent-type-imports": [
+ "error",
+ { fixStyle: "separate-type-imports", prefer: "type-imports" },
+ ],
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-unused-vars": [
"error",
diff --git a/frontend/naive-ui.config.ts b/frontend/naive-ui.config.ts
index 41e5495cdb..d200208318 100644
--- a/frontend/naive-ui.config.ts
+++ b/frontend/naive-ui.config.ts
@@ -1,9 +1,9 @@
import {
- GlobalThemeOverrides,
- zhCN,
+ type GlobalThemeOverrides,
+ type NLocale,
+ type NDateLocale,
dateZhCN,
- NLocale,
- NDateLocale,
+ zhCN,
} from "naive-ui";
import { computed } from "vue";
import { callCssVariable } from "@/utils";
diff --git a/frontend/src/AppRootContext.ts b/frontend/src/AppRootContext.ts
index a0e004a65c..9a4b65a825 100644
--- a/frontend/src/AppRootContext.ts
+++ b/frontend/src/AppRootContext.ts
@@ -1,4 +1,5 @@
-import { InjectionKey, inject, provide, Ref, ref } from "vue";
+import type { InjectionKey, Ref } from "vue";
+import { inject, provide, ref } from "vue";
import {
useDatabaseV1Store,
useInstanceV1Store,
diff --git a/frontend/src/NotificationContext.vue b/frontend/src/NotificationContext.vue
index 262a9e89e0..11af8e746e 100644
--- a/frontend/src/NotificationContext.vue
+++ b/frontend/src/NotificationContext.vue
@@ -6,7 +6,7 @@
import { useNotification } from "naive-ui";
import { watchEffect, h } from "vue";
import { useNotificationStore } from "@/store";
-import { BBNotificationStyle } from "@/types";
+import type { BBNotificationStyle } from "@/types";
const NOTIFICATION_DURATION = 6000;
const CRITICAL_NOTIFICATION_DURATION = 10000;
diff --git a/frontend/src/bbkit/BBAvatar.vue b/frontend/src/bbkit/BBAvatar.vue
index 75cb4e62fa..d471bdfed1 100644
--- a/frontend/src/bbkit/BBAvatar.vue
+++ b/frontend/src/bbkit/BBAvatar.vue
@@ -15,9 +15,10 @@
import isChinese from "is-chinese";
import { computed, withDefaults } from "vue";
import { SYSTEM_BOT_EMAIL } from "@/types";
-import { VueClass, callCssVariable } from "@/utils";
+import type { VueClass } from "@/utils";
+import { callCssVariable } from "@/utils";
import { hashCode } from "./BBUtil";
-import { BBAvatarSizeType } from "./types";
+import type { BBAvatarSizeType } from "./types";
const DEFAULT_BRANDING_COLOR = "#4f46e5";
diff --git a/frontend/src/bbkit/BBButtonConfirm.vue b/frontend/src/bbkit/BBButtonConfirm.vue
index 91ac4f63b5..48af8e9d41 100644
--- a/frontend/src/bbkit/BBButtonConfirm.vue
+++ b/frontend/src/bbkit/BBButtonConfirm.vue
@@ -65,7 +65,7 @@
<script lang="ts" setup>
import { reactive } from "vue";
import { useI18n } from "vue-i18n";
-import { BBButtonConfirmStyle } from "./types";
+import type { BBButtonConfirmStyle } from "./types";
const props = withDefaults(
defineProps<{
diff --git a/frontend/src/bbkit/BBDialog.vue b/frontend/src/bbkit/BBDialog.vue
index 2d6908c201..5a835ed6f5 100644
--- a/frontend/src/bbkit/BBDialog.vue
+++ b/frontend/src/bbkit/BBDialog.vue
@@ -25,8 +25,10 @@
</template>
<script lang="ts" setup>
-import { PropType, reactive } from "vue";
-import { Defer, defer } from "@/utils";
+import type { PropType } from "vue";
+import { reactive } from "vue";
+import type { Defer } from "@/utils";
+import { defer } from "@/utils";
const props = defineProps({
title: {
diff --git a/frontend/src/bbkit/BBGrid/BBGrid.vue b/frontend/src/bbkit/BBGrid/BBGrid.vue
index bfa336b47f..9d891ce756 100644
--- a/frontend/src/bbkit/BBGrid/BBGrid.vue
+++ b/frontend/src/bbkit/BBGrid/BBGrid.vue
@@ -88,8 +88,8 @@
<script lang="ts" setup>
import { computed } from "vue";
-import { VueClass } from "@/utils";
-import { BBGridColumn } from "../types";
+import type { VueClass } from "@/utils";
+import type { BBGridColumn } from "../types";
import { useResponsiveGridColumns } from "./useResponsiveGridColumns";
type DataType = any; // vue does not support generic typed components yet
diff --git a/frontend/src/bbkit/BBGrid/useResponsiveGridColumns.ts b/frontend/src/bbkit/BBGrid/useResponsiveGridColumns.ts
index 086e64ec70..113f989822 100644
--- a/frontend/src/bbkit/BBGrid/useResponsiveGridColumns.ts
+++ b/frontend/src/bbkit/BBGrid/useResponsiveGridColumns.ts
@@ -1,7 +1,7 @@
import { useStyleTag } from "@vueuse/core";
import { uniqueId } from "lodash-es";
import { computed, onUnmounted, unref } from "vue";
-import { MaybeRef } from "@/types";
+import type { MaybeRef } from "@/types";
const breakpoints = {
default: "0",
diff --git a/frontend/src/bbkit/BBModal.vue b/frontend/src/bbkit/BBModal.vue
index a5960e56a4..5e316ec7b6 100644
--- a/frontend/src/bbkit/BBModal.vue
+++ b/frontend/src/bbkit/BBModal.vue
@@ -41,7 +41,8 @@
<script lang="ts">
import { X } from "lucide-vue-next";
import { NModal } from "naive-ui";
-import { defineComponent, h, PropType, RenderFunction } from "vue";
+import type { PropType, RenderFunction } from "vue";
+import { defineComponent, h } from "vue";
import { useOverlayStack } from "@/components/misc/OverlayStackManager.vue";
import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";
import type { VueClass } from "@/utils";
diff --git a/frontend/src/bbkit/BBTable/BBTable.vue b/frontend/src/bbkit/BBTable/BBTable.vue
index bbd3c6ce2b..4673074600 100644
--- a/frontend/src/bbkit/BBTable/BBTable.vue
+++ b/frontend/src/bbkit/BBTable/BBTable.vue
@@ -115,7 +115,7 @@
<script lang="ts" setup>
import { computed, withDefaults } from "vue";
import type { VueClass } from "@/utils";
-import { BBTableColumn, BBTableSectionDataSource } from "../types";
+import type { BBTableColumn, BBTableSectionDataSource } from "../types";
type DataType = any; // vue does not support generic typed components yet
diff --git a/frontend/src/bbkit/types.ts b/frontend/src/bbkit/types.ts
index 6b49abb573..3f43b470e8 100644
--- a/frontend/src/bbkit/types.ts
+++ b/frontend/src/bbkit/types.ts
@@ -1,5 +1,5 @@
-import { VueClass } from "@/utils";
-import { ColumnWidth } from "./BBGrid";
+import type { VueClass } from "@/utils";
+import type { ColumnWidth } from "./BBGrid";
export type BBButtonType =
| "NORMAL"
diff --git a/frontend/src/components/ActivityTable/ActivityCommentLink.vue b/frontend/src/components/ActivityTable/ActivityCommentLink.vue
index 60cb7666ca..e73b5e4242 100644
--- a/frontend/src/components/ActivityTable/ActivityCommentLink.vue
+++ b/frontend/src/components/ActivityTable/ActivityCommentLink.vue
@@ -16,11 +16,13 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
-import { LogEntity, LogEntity_Action } from "@/types/proto/v1/logging_service";
-import { ActivityProjectRepositoryPushPayload } from "../../types";
+import type { PropType } from "vue";
+import { computed } from "vue";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
+import { LogEntity_Action } from "@/types/proto/v1/logging_service";
+import type { ActivityProjectRepositoryPushPayload } from "../../types";
import { issueSlug } from "../../utils/slug";
-import { Link } from "./types";
+import type { Link } from "./types";
const props = defineProps({
activity: {
diff --git a/frontend/src/components/ActivityTable/ActivityTable.vue b/frontend/src/components/ActivityTable/ActivityTable.vue
index 7b0120a20d..d6b1395b91 100644
--- a/frontend/src/components/ActivityTable/ActivityTable.vue
+++ b/frontend/src/components/ActivityTable/ActivityTable.vue
@@ -51,13 +51,15 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useUserStore } from "@/store";
import { activityName } from "@/types";
-import { LogEntity, LogEntity_Level } from "@/types/proto/v1/logging_service";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
+import { LogEntity_Level } from "@/types/proto/v1/logging_service";
import { extractUserResourceName } from "@/utils";
-import { BBTableColumn } from "../../bbkit/types";
+import type { BBTableColumn } from "../../bbkit/types";
defineProps({
activityList: {
diff --git a/frontend/src/components/ActivityTable/ActivityTypeLink.vue b/frontend/src/components/ActivityTable/ActivityTypeLink.vue
index 46a4a9bfcb..e8390210ce 100644
--- a/frontend/src/components/ActivityTable/ActivityTypeLink.vue
+++ b/frontend/src/components/ActivityTable/ActivityTypeLink.vue
@@ -16,8 +16,9 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
-import { LogEntity } from "@/types/proto/v1/logging_service";
+import type { PropType } from "vue";
+import { computed } from "vue";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
import { getLinkFromActivity } from "./utils";
const props = defineProps({
diff --git a/frontend/src/components/ActivityTable/utils.ts b/frontend/src/components/ActivityTable/utils.ts
index 765ce263f6..a336b118a0 100644
--- a/frontend/src/components/ActivityTable/utils.ts
+++ b/frontend/src/components/ActivityTable/utils.ts
@@ -1,14 +1,14 @@
import { head } from "lodash-es";
import { getIssueId } from "@/store/modules/v1/common";
-import {
+import type {
ActivityIssueCreatePayload,
ActivityProjectRepositoryPushPayload,
ActivityProjectDatabaseTransferPayload,
- UNKNOWN_ID,
- EMPTY_ID,
} from "@/types";
-import { LogEntity, LogEntity_Action } from "@/types/proto/v1/logging_service";
-import { Link } from "./types";
+import { UNKNOWN_ID, EMPTY_ID } from "@/types";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
+import { LogEntity_Action } from "@/types/proto/v1/logging_service";
+import type { Link } from "./types";
export const getLinkFromActivity = (activity: LogEntity): Link | undefined => {
switch (activity.action) {
diff --git a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
index 0b68c293bd..6d4b9b207c 100644
--- a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
@@ -317,7 +317,8 @@ import {
NInputGroupLabel,
NCheckbox,
} from "naive-ui";
-import { computed, reactive, PropType, ref, watch, watchEffect, h } from "vue";
+import type { PropType } from "vue";
+import { computed, reactive, ref, watch, watchEffect, h } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import FeatureBadge from "@/components/FeatureGuard/FeatureBadge.vue";
@@ -331,23 +332,21 @@ import {
useProjectV1Store,
useDBGroupStore,
} from "@/store";
-import {
+import type {
ComposedDatabase,
ComposedDatabaseGroup,
FeatureType,
- UNKNOWN_ID,
- DEFAULT_PROJECT_V1_NAME,
} from "@/types";
+import { UNKNOWN_ID, DEFAULT_PROJECT_V1_NAME } from "@/types";
import { State } from "@/types/proto/v1/common";
import { TenantMode } from "@/types/proto/v1/project_service";
+import type { SearchScopeId, SearchParams } from "@/utils";
import {
allowUsingSchemaEditorV1,
instanceV1HasAlterSchema,
filterDatabaseV1ByKeyword,
sortDatabaseV1List,
generateIssueName,
- SearchScopeId,
- SearchParams,
extractEnvironmentResourceName,
extractInstanceResourceName,
extractProjectResourceName,
diff --git a/frontend/src/components/AlterSchemaPrepForm/DatabaseGroupPrevEditorModal.vue b/frontend/src/components/AlterSchemaPrepForm/DatabaseGroupPrevEditorModal.vue
index 1463409403..85fbc636a5 100644
--- a/frontend/src/components/AlterSchemaPrepForm/DatabaseGroupPrevEditorModal.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/DatabaseGroupPrevEditorModal.vue
@@ -70,13 +70,14 @@
<script lang="ts" setup>
import { UploadIcon } from "lucide-vue-next";
import { NButton } from "naive-ui";
-import { computed, onMounted, PropType, reactive } from "vue";
+import type { PropType } from "vue";
+import { computed, onMounted, reactive } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { MonacoEditor } from "@/components/MonacoEditor";
import ActionConfirmModal from "@/components/SchemaEditorV1/Modals/ActionConfirmModal.vue";
import { useDBGroupStore, useNotificationStore } from "@/store";
-import { ComposedDatabaseGroup, ComposedSchemaGroup } from "@/types";
+import type { ComposedDatabaseGroup, ComposedSchemaGroup } from "@/types";
import { generateDatabaseGroupIssueRoute } from "@/utils/databaseGroup/issue";
const MAX_UPLOAD_FILE_SIZE_MB = 1;
diff --git a/frontend/src/components/AlterSchemaPrepForm/ProjectStandardView.vue b/frontend/src/components/AlterSchemaPrepForm/ProjectStandardView.vue
index 6536de3ee4..6415ad8d46 100644
--- a/frontend/src/components/AlterSchemaPrepForm/ProjectStandardView.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/ProjectStandardView.vue
@@ -117,10 +117,10 @@
import { NCollapse, NCollapseItem, NCheckbox } from "naive-ui";
import { reactive, computed, watch } from "vue";
import { EnvironmentV1Name, InstanceV1EngineIcon } from "@/components/v2";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { State } from "@/types/proto/v1/common";
-import { Environment } from "@/types/proto/v1/environment_service";
-import { Project } from "@/types/proto/v1/project_service";
+import type { Environment } from "@/types/proto/v1/environment_service";
+import type { Project } from "@/types/proto/v1/project_service";
import { instanceV1Name } from "@/utils";
interface LocalState {
diff --git a/frontend/src/components/AlterSchemaPrepForm/ProjectTenantView.vue b/frontend/src/components/AlterSchemaPrepForm/ProjectTenantView.vue
index e4f40da2ff..e721b3e7db 100644
--- a/frontend/src/components/AlterSchemaPrepForm/ProjectTenantView.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/ProjectTenantView.vue
@@ -54,8 +54,8 @@ import { computed } from "vue";
import { RouterLink } from "vue-router";
import { useDeploymentConfigV1ByProject } from "@/store";
import type { ComposedDatabase } from "@/types";
-import { Environment } from "@/types/proto/v1/environment_service";
-import { Project } from "@/types/proto/v1/project_service";
+import type { Environment } from "@/types/proto/v1/environment_service";
+import type { Project } from "@/types/proto/v1/project_service";
import { DeployDatabaseTable } from "../TenantDatabaseTable";
const props = defineProps<{
diff --git a/frontend/src/components/AlterSchemaPrepForm/SchemaEditorModal.vue b/frontend/src/components/AlterSchemaPrepForm/SchemaEditorModal.vue
index aab8d540be..abdeff9126 100644
--- a/frontend/src/components/AlterSchemaPrepForm/SchemaEditorModal.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/SchemaEditorModal.vue
@@ -130,7 +130,8 @@
import dayjs from "dayjs";
import { cloneDeep, head, uniq } from "lodash-es";
import { NTabs, NTabPane, useDialog } from "naive-ui";
-import { computed, onMounted, h, PropType, reactive, ref, watch } from "vue";
+import type { PropType } from "vue";
+import { computed, onMounted, h, reactive, ref, watch } from "vue";
import { I18nT, useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import ActionConfirmModal from "@/components/SchemaEditorV1/Modals/ActionConfirmModal.vue";
@@ -141,24 +142,21 @@ import {
useDatabaseV1Store,
useNotificationStore,
} from "@/store";
+import type { ComposedDatabase } from "@/types";
import {
- ComposedDatabase,
dialectOfEngineV1,
UNKNOWN_PROJECT_NAME,
unknownProject,
} from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import {
- DatabaseMetadata,
- DatabaseMetadataView,
-} from "@/types/proto/v1/database_service";
+import type { DatabaseMetadata } from "@/types/proto/v1/database_service";
+import { DatabaseMetadataView } from "@/types/proto/v1/database_service";
import { TenantMode } from "@/types/proto/v1/project_service";
import { TinyTimer, defer, extractProjectResourceName } from "@/utils";
import { MonacoEditor } from "../MonacoEditor";
import { provideSQLCheckContext } from "../SQLCheck";
+import type { EditTarget, GenerateDiffDDLResult } from "../SchemaEditorLite";
import SchemaEditorLite, {
- EditTarget,
- GenerateDiffDDLResult,
generateDiffDDL as generateSingleDiffDDL,
} from "../SchemaEditorLite";
import MaskSpinner from "../misc/MaskSpinner.vue";
diff --git a/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/SchemaEditorSQLCheckButton.vue b/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/SchemaEditorSQLCheckButton.vue
index 34046e0871..fe26fbf6dd 100644
--- a/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/SchemaEditorSQLCheckButton.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/SchemaEditorSQLCheckButton.vue
@@ -20,7 +20,7 @@
<script lang="ts" setup>
import { toRef } from "vue";
import { SQLCheckButton, SQLCheckSummary } from "@/components/SQLCheck";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { useSchemaEditorSQLCheck } from "./useSchemaEditorSQLCheck";
const props = defineProps<{
diff --git a/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/useSchemaEditorSQLCheck.ts b/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/useSchemaEditorSQLCheck.ts
index 6a56ad1917..9a568d761c 100644
--- a/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/useSchemaEditorSQLCheck.ts
+++ b/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/useSchemaEditorSQLCheck.ts
@@ -1,5 +1,6 @@
-import { Ref, computed } from "vue";
-import { ComposedDatabase } from "@/types";
+import type { Ref } from "vue";
+import { computed } from "vue";
+import type { ComposedDatabase } from "@/types";
export const useSchemaEditorSQLCheck = (params: {
databaseList: Ref<ComposedDatabase[]>;
diff --git a/frontend/src/components/AlterSchemaPrepForm/SchemalessDatabaseTable.vue b/frontend/src/components/AlterSchemaPrepForm/SchemalessDatabaseTable.vue
index 441305bba3..460b290e0f 100644
--- a/frontend/src/components/AlterSchemaPrepForm/SchemalessDatabaseTable.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/SchemalessDatabaseTable.vue
@@ -20,7 +20,7 @@
<script setup lang="ts">
import { NCheckbox } from "naive-ui";
import { ref } from "vue";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { DatabaseV1Table } from "../v2/";
defineProps<{
diff --git a/frontend/src/components/AlterSchemaPrepForm/SelectDatabaseGroupTable.vue b/frontend/src/components/AlterSchemaPrepForm/SelectDatabaseGroupTable.vue
index 484f2bf293..9ed3a2b8d1 100644
--- a/frontend/src/components/AlterSchemaPrepForm/SelectDatabaseGroupTable.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/SelectDatabaseGroupTable.vue
@@ -38,8 +38,8 @@
import { NRadio } from "naive-ui";
import { reactive, computed } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGridColumn } from "@/bbkit";
-import { ComposedDatabaseGroup } from "@/types";
+import type { BBGridColumn } from "@/bbkit";
+import type { ComposedDatabaseGroup } from "@/types";
interface LocalState {
selectedDatabaseGroupName?: string;
diff --git a/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue b/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue
index e1c2c71efc..6838566dd7 100644
--- a/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue
+++ b/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue
@@ -124,7 +124,7 @@
<script lang="ts" setup>
import { computed, reactive, watchEffect } from "vue";
import { useI18n } from "vue-i18n";
-import { BBTableSectionDataSource } from "@/bbkit/types";
+import type { BBTableSectionDataSource } from "@/bbkit/types";
import {
featureToRef,
useAnomalyV1List,
@@ -133,11 +133,10 @@ import {
useEnvironmentV1List,
useInstanceV1List,
} from "@/store";
-import { UNKNOWN_USER_NAME, ComposedProject } from "@/types";
-import {
- Anomaly,
- Anomaly_AnomalySeverity,
-} from "@/types/proto/v1/anomaly_service";
+import type { ComposedProject } from "@/types";
+import { UNKNOWN_USER_NAME } from "@/types";
+import type { Anomaly } from "@/types/proto/v1/anomaly_service";
+import { Anomaly_AnomalySeverity } from "@/types/proto/v1/anomaly_service";
import { databaseV1Url, sortDatabaseV1List, sortInstanceV1List } from "@/utils";
import AnomalyTable from "./AnomalyTable.vue";
diff --git a/frontend/src/components/AnomalyCenter/AnomalyTable.vue b/frontend/src/components/AnomalyCenter/AnomalyTable.vue
index d5161ef11e..8d7133ffba 100644
--- a/frontend/src/components/AnomalyCenter/AnomalyTable.vue
+++ b/frontend/src/components/AnomalyCenter/AnomalyTable.vue
@@ -76,14 +76,15 @@
</template>
<script lang="ts" setup>
-import { computed, PropType, reactive } from "vue";
+import type { PropType } from "vue";
+import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
-import { BBTableSectionDataSource } from "@/bbkit/types";
+import type { BBTableSectionDataSource } from "@/bbkit/types";
import { INSTANCE_ROUTE_DETAIL } from "@/router/dashboard/instance";
import { useDatabaseV1Store, useInstanceV1Store } from "@/store";
+import type { Anomaly } from "@/types/proto/v1/anomaly_service";
import {
- Anomaly,
Anomaly_AnomalyType,
Anomaly_AnomalySeverity,
} from "@/types/proto/v1/anomaly_service";
diff --git a/frontend/src/components/AuditLog/AuditLogTable.vue b/frontend/src/components/AuditLog/AuditLogTable.vue
index 4170ce985e..0110826bb1 100644
--- a/frontend/src/components/AuditLog/AuditLogTable.vue
+++ b/frontend/src/components/AuditLog/AuditLogTable.vue
@@ -57,11 +57,12 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { AuditActivityTypeI18nNameMap } from "@/types";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
import {
- LogEntity,
LogEntity_Level,
logEntity_LevelToJSON,
} from "@/types/proto/v1/logging_service";
diff --git a/frontend/src/components/AuditLog/TypeSelect.vue b/frontend/src/components/AuditLog/TypeSelect.vue
index c5a101ed79..91a8195465 100644
--- a/frontend/src/components/AuditLog/TypeSelect.vue
+++ b/frontend/src/components/AuditLog/TypeSelect.vue
@@ -12,11 +12,12 @@
</template>
<script lang="ts" setup>
-import { NSelect, SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NSelect } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { AuditActivityTypeI18nNameMap } from "@/types";
-import { LogEntity_Action } from "@/types/proto/v1/logging_service";
+import type { LogEntity_Action } from "@/types/proto/v1/logging_service";
defineProps<{
selected: LogEntity_Action[];
diff --git a/frontend/src/components/Branch/BranchBaseline.vue b/frontend/src/components/Branch/BranchBaseline.vue
index 54e1509b39..28757534a2 100644
--- a/frontend/src/components/Branch/BranchBaseline.vue
+++ b/frontend/src/components/Branch/BranchBaseline.vue
@@ -15,7 +15,7 @@
import { computed } from "vue";
import { RichDatabaseName } from "@/components/v2";
import { useDatabaseV1Store } from "@/store";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
const props = withDefaults(
defineProps<{
diff --git a/frontend/src/components/Branch/BranchCreateView.vue b/frontend/src/components/Branch/BranchCreateView.vue
index 525e86f9c7..d386ce559b 100644
--- a/frontend/src/components/Branch/BranchCreateView.vue
+++ b/frontend/src/components/Branch/BranchCreateView.vue
@@ -96,7 +96,8 @@ import {
useCurrentUserV1,
} from "@/store";
import { useBranchStore } from "@/store/modules/branch";
-import { UNKNOWN_ID, ComposedProject } from "@/types";
+import type { ComposedProject } from "@/types";
+import { UNKNOWN_ID } from "@/types";
import { Branch } from "@/types/proto/v1/branch_service";
import { DatabaseMetadataView } from "@/types/proto/v1/database_service";
import { hasProjectPermissionV2 } from "@/utils";
diff --git a/frontend/src/components/Branch/BranchDataTable/cells/BranchNameCell.vue b/frontend/src/components/Branch/BranchDataTable/cells/BranchNameCell.vue
index b935610ec3..0264ddd6dd 100644
--- a/frontend/src/components/Branch/BranchDataTable/cells/BranchNameCell.vue
+++ b/frontend/src/components/Branch/BranchDataTable/cells/BranchNameCell.vue
@@ -28,7 +28,7 @@ import {
projectNamePrefix,
} from "@/store/modules/v1/common";
import { useProjectBranchProtectionRules } from "@/store/modules/v1/projectProtectionRoles";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
import { wildcardToRegex } from "../../utils";
const props = defineProps<{
diff --git a/frontend/src/components/Branch/BranchDataTable/cells/BranchUpdatedCell.vue b/frontend/src/components/Branch/BranchDataTable/cells/BranchUpdatedCell.vue
index 99f8f78883..513455b885 100644
--- a/frontend/src/components/Branch/BranchDataTable/cells/BranchUpdatedCell.vue
+++ b/frontend/src/components/Branch/BranchDataTable/cells/BranchUpdatedCell.vue
@@ -15,8 +15,8 @@ import dayjs from "dayjs";
import { computed } from "vue";
import { useUserStore } from "@/store";
import { getUserEmailFromIdentifier } from "@/store/modules/v1/common";
-import { User } from "@/types/proto/v1/auth_service";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { User } from "@/types/proto/v1/auth_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
const props = defineProps<{
branch: Branch;
diff --git a/frontend/src/components/Branch/BranchDataTable/index.vue b/frontend/src/components/Branch/BranchDataTable/index.vue
index 79ad640250..55ac38bf92 100644
--- a/frontend/src/components/Branch/BranchDataTable/index.vue
+++ b/frontend/src/components/Branch/BranchDataTable/index.vue
@@ -13,11 +13,12 @@
</template>
<script lang="ts" setup>
-import { NDataTable, DataTableColumn } from "naive-ui";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
import { computed, h } from "vue";
import { useI18n } from "vue-i18n";
import BranchBaseline from "@/components/Branch/BranchBaseline.vue";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
import AsyncBranchNameCell from "./cells/AsyncBranchNameCell.vue";
import BranchNameCell from "./cells/BranchNameCell.vue";
import BranchUpdatedCell from "./cells/BranchUpdatedCell.vue";
diff --git a/frontend/src/components/Branch/BranchDetailView.vue b/frontend/src/components/Branch/BranchDetailView.vue
index 3937c385c3..533262462e 100644
--- a/frontend/src/components/Branch/BranchDetailView.vue
+++ b/frontend/src/components/Branch/BranchDetailView.vue
@@ -135,7 +135,8 @@ import dayjs from "dayjs";
import { cloneDeep } from "lodash-es";
import { NButton, NCheckbox, NDivider, NInput, useDialog } from "naive-ui";
import { Status } from "nice-grpc-common";
-import { CSSProperties, computed, nextTick, reactive, ref, watch } from "vue";
+import type { CSSProperties } from "vue";
+import { computed, nextTick, reactive, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import DatabaseInfo from "@/components/DatabaseInfo.vue";
@@ -157,7 +158,7 @@ import {
} from "@/store";
import { useBranchStore } from "@/store/modules/branch";
import { getProjectAndBranchId } from "@/store/modules/v1/common";
-import { ComposedProject, ProjectPermission } from "@/types";
+import type { ComposedProject, ProjectPermission } from "@/types";
import { Branch } from "@/types/proto/v1/branch_service";
import { DatabaseMetadata } from "@/types/proto/v1/database_service";
import {
diff --git a/frontend/src/components/Branch/BranchMergeView/BranchMergeView.vue b/frontend/src/components/Branch/BranchMergeView/BranchMergeView.vue
index 94c9eea037..f3d31a8247 100644
--- a/frontend/src/components/Branch/BranchMergeView/BranchMergeView.vue
+++ b/frontend/src/components/Branch/BranchMergeView/BranchMergeView.vue
@@ -63,14 +63,14 @@ import { useI18n } from "vue-i18n";
import MaskSpinner from "@/components/misc/MaskSpinner.vue";
import { branchServiceClient } from "@/grpcweb";
import { pushNotification, useBranchStore } from "@/store";
-import { ComposedProject } from "@/types";
+import type { ComposedProject } from "@/types";
import { Branch } from "@/types/proto/v1/branch_service";
import { extractGrpcErrorMessage, getErrorCode } from "@/utils/grpcweb";
import BranchComparison from "../common/BranchComparison.vue";
import MergeBranchButton from "./MergeBranchButton.vue";
import MergeBranchSelect from "./MergeBranchSelect.vue";
import MergeBranchValidationStateView from "./MergeBranchValidationStateView.vue";
-import { MergeBranchValidationState, PostMergeAction } from "./types";
+import type { MergeBranchValidationState, PostMergeAction } from "./types";
interface LocalState {
targetBranchName: string | null;
diff --git a/frontend/src/components/Branch/BranchMergeView/MergeBranchButton.vue b/frontend/src/components/Branch/BranchMergeView/MergeBranchButton.vue
index 9a448248ae..6315344e4b 100644
--- a/frontend/src/components/Branch/BranchMergeView/MergeBranchButton.vue
+++ b/frontend/src/components/Branch/BranchMergeView/MergeBranchButton.vue
@@ -14,14 +14,14 @@
</template>
<script setup lang="ts">
-import { ButtonProps } from "naive-ui";
+import type { ButtonProps } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import {
ContextMenuButton,
type ContextMenuButtonAction,
} from "@/components/v2";
-import { PostMergeAction } from "./types";
+import type { PostMergeAction } from "./types";
const props = defineProps<{
buttonProps?: ButtonProps;
diff --git a/frontend/src/components/Branch/BranchMergeView/MergeBranchSelect.vue b/frontend/src/components/Branch/BranchMergeView/MergeBranchSelect.vue
index 5f5636d266..553be4ec7f 100644
--- a/frontend/src/components/Branch/BranchMergeView/MergeBranchSelect.vue
+++ b/frontend/src/components/Branch/BranchMergeView/MergeBranchSelect.vue
@@ -27,8 +27,8 @@
<script setup lang="ts">
import { MoveLeftIcon } from "lucide-vue-next";
-import { ComposedProject } from "@/types";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { ComposedProject } from "@/types";
+import type { Branch } from "@/types/proto/v1/branch_service";
const props = defineProps<{
project: ComposedProject;
diff --git a/frontend/src/components/Branch/BranchMergeView/MergeBranchValidationStateView.vue b/frontend/src/components/Branch/BranchMergeView/MergeBranchValidationStateView.vue
index 5b7c5109b7..54811ce88a 100644
--- a/frontend/src/components/Branch/BranchMergeView/MergeBranchValidationStateView.vue
+++ b/frontend/src/components/Branch/BranchMergeView/MergeBranchValidationStateView.vue
@@ -43,9 +43,9 @@
import { CheckIcon, XCircleIcon } from "lucide-vue-next";
import { Status } from "nice-grpc-common";
import { PROJECT_V1_ROUTE_BRANCH_REBASE } from "@/router/dashboard/projectV1";
-import { ComposedProject } from "@/types";
-import { Branch } from "@/types/proto/v1/branch_service";
-import { MergeBranchValidationState } from "./types";
+import type { ComposedProject } from "@/types";
+import type { Branch } from "@/types/proto/v1/branch_service";
+import type { MergeBranchValidationState } from "./types";
defineProps<{
project: ComposedProject;
diff --git a/frontend/src/components/Branch/BranchMergeView/types.ts b/frontend/src/components/Branch/BranchMergeView/types.ts
index 0cf750f5ba..b267e3b784 100644
--- a/frontend/src/components/Branch/BranchMergeView/types.ts
+++ b/frontend/src/components/Branch/BranchMergeView/types.ts
@@ -1,5 +1,5 @@
-import { Status } from "nice-grpc-common";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Status } from "nice-grpc-common";
+import type { Branch } from "@/types/proto/v1/branch_service";
export type MergeBranchValidationState = {
status: Status;
diff --git a/frontend/src/components/Branch/BranchRebaseView/BranchRebaseView.vue b/frontend/src/components/Branch/BranchRebaseView/BranchRebaseView.vue
index ede68cf4f6..d9aaa7ba03 100644
--- a/frontend/src/components/Branch/BranchRebaseView/BranchRebaseView.vue
+++ b/frontend/src/components/Branch/BranchRebaseView/BranchRebaseView.vue
@@ -74,13 +74,14 @@ import { useRoute } from "vue-router";
import MaskSpinner from "@/components/misc/MaskSpinner.vue";
import { branchServiceClient } from "@/grpcweb";
import { pushNotification, useBranchStore, useDatabaseV1Store } from "@/store";
-import { ComposedProject, UNKNOWN_ID } from "@/types";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { ComposedProject } from "@/types";
+import { UNKNOWN_ID } from "@/types";
+import type { Branch } from "@/types/proto/v1/branch_service";
import { defer } from "@/utils";
import RebaseBranchSelect from "./RebaseBranchSelect.vue";
import RebaseBranchValidationStateView from "./RebaseBranchValidationStateView.vue";
import ResolveConflict from "./ResolveConflict.vue";
-import { RebaseBranchValidationState, RebaseSourceType } from "./types";
+import type { RebaseBranchValidationState, RebaseSourceType } from "./types";
interface LocalState {
currentStepIndex: number;
diff --git a/frontend/src/components/Branch/BranchRebaseView/RebaseBranchSelect.vue b/frontend/src/components/Branch/BranchRebaseView/RebaseBranchSelect.vue
index 20edf6619a..f7d6645e68 100644
--- a/frontend/src/components/Branch/BranchRebaseView/RebaseBranchSelect.vue
+++ b/frontend/src/components/Branch/BranchRebaseView/RebaseBranchSelect.vue
@@ -52,9 +52,9 @@ import { NRadioGroup } from "naive-ui";
import { computed, toRef } from "vue";
import { DatabaseSelect } from "@/components/v2";
import { useDatabaseInGroupFilter, useDatabaseV1Store } from "@/store";
-import { ComposedDatabase, ComposedProject } from "@/types";
-import { Branch } from "@/types/proto/v1/branch_service";
-import { RebaseSourceType } from "./types";
+import type { ComposedDatabase, ComposedProject } from "@/types";
+import type { Branch } from "@/types/proto/v1/branch_service";
+import type { RebaseSourceType } from "./types";
const props = defineProps<{
project: ComposedProject;
diff --git a/frontend/src/components/Branch/BranchRebaseView/RebaseBranchStep.vue b/frontend/src/components/Branch/BranchRebaseView/RebaseBranchStep.vue
index bdb287f987..6e5685e8a9 100644
--- a/frontend/src/components/Branch/BranchRebaseView/RebaseBranchStep.vue
+++ b/frontend/src/components/Branch/BranchRebaseView/RebaseBranchStep.vue
@@ -61,17 +61,17 @@
<script setup lang="ts">
import { computed, reactive, ref, watch } from "vue";
-import {
+import type {
LineHighlightOption,
LineHighlightOverviewRulerPosition,
- MonacoEditor,
} from "@/components/MonacoEditor";
+import { MonacoEditor } from "@/components/MonacoEditor";
import SchemaEditorLite from "@/components/SchemaEditorLite";
import { useDatabaseV1Store } from "@/store";
-import { ComposedProject } from "@/types";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { ComposedProject } from "@/types";
+import type { Branch } from "@/types/proto/v1/branch_service";
import { DatabaseMetadata } from "@/types/proto/v1/database_service";
-import { RebaseBranchValidationState } from "./types";
+import type { RebaseBranchValidationState } from "./types";
type TabValue = "schema-editor" | "raw-schema-text";
type LocalState = {
diff --git a/frontend/src/components/Branch/BranchRebaseView/RebaseBranchValidationStateView.vue b/frontend/src/components/Branch/BranchRebaseView/RebaseBranchValidationStateView.vue
index d524b28717..4049a1df3d 100644
--- a/frontend/src/components/Branch/BranchRebaseView/RebaseBranchValidationStateView.vue
+++ b/frontend/src/components/Branch/BranchRebaseView/RebaseBranchValidationStateView.vue
@@ -27,9 +27,9 @@
<script setup lang="ts">
import { CheckIcon, XCircleIcon } from "lucide-vue-next";
import { computed } from "vue";
-import { ComposedDatabase, ComposedProject } from "@/types";
-import { Branch } from "@/types/proto/v1/branch_service";
-import { RebaseBranchValidationState, RebaseSourceType } from "./types";
+import type { ComposedDatabase, ComposedProject } from "@/types";
+import type { Branch } from "@/types/proto/v1/branch_service";
+import type { RebaseBranchValidationState, RebaseSourceType } from "./types";
const props = defineProps<{
project: ComposedProject;
diff --git a/frontend/src/components/Branch/BranchRebaseView/ResolveConflict.vue b/frontend/src/components/Branch/BranchRebaseView/ResolveConflict.vue
index 8d067daff4..bffdb72919 100644
--- a/frontend/src/components/Branch/BranchRebaseView/ResolveConflict.vue
+++ b/frontend/src/components/Branch/BranchRebaseView/ResolveConflict.vue
@@ -12,13 +12,13 @@
<script setup lang="ts">
import { computed, reactive, watch } from "vue";
-import {
+import type {
LineHighlightOption,
LineHighlightOverviewRulerPosition,
- MonacoEditor,
} from "@/components/MonacoEditor";
-import { ComposedProject } from "@/types";
-import { RebaseBranchValidationState } from "./types";
+import { MonacoEditor } from "@/components/MonacoEditor";
+import type { ComposedProject } from "@/types";
+import type { RebaseBranchValidationState } from "./types";
type LocalState = {
editingSchema: string;
diff --git a/frontend/src/components/Branch/BranchRebaseView/SelectBranchStep.vue b/frontend/src/components/Branch/BranchRebaseView/SelectBranchStep.vue
index bf23360e22..fa1afe4812 100644
--- a/frontend/src/components/Branch/BranchRebaseView/SelectBranchStep.vue
+++ b/frontend/src/components/Branch/BranchRebaseView/SelectBranchStep.vue
@@ -123,10 +123,10 @@ import SchemaEditorLite from "@/components/SchemaEditorLite";
import MaskSpinner from "@/components/misc/MaskSpinner.vue";
import { DatabaseSelect } from "@/components/v2";
import { useDatabaseV1Store } from "@/store";
-import { ComposedDatabase, ComposedProject } from "@/types";
+import type { ComposedDatabase, ComposedProject } from "@/types";
import { Branch } from "@/types/proto/v1/branch_service";
import { DatabaseMetadata } from "@/types/proto/v1/database_service";
-import { RebaseBranchValidationState, RebaseSourceType } from "./types";
+import type { RebaseBranchValidationState, RebaseSourceType } from "./types";
type TabValue = "schema-editor" | "raw-schema-text";
diff --git a/frontend/src/components/Branch/BranchRebaseView/types.ts b/frontend/src/components/Branch/BranchRebaseView/types.ts
index 800760ceee..b4eb8557b7 100644
--- a/frontend/src/components/Branch/BranchRebaseView/types.ts
+++ b/frontend/src/components/Branch/BranchRebaseView/types.ts
@@ -1,4 +1,4 @@
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
export type RebaseSourceType = "BRANCH" | "DATABASE";
diff --git a/frontend/src/components/Branch/BranchRolloutView/BranchRolloutView.vue b/frontend/src/components/Branch/BranchRolloutView/BranchRolloutView.vue
index e4a9619552..f8de28299d 100644
--- a/frontend/src/components/Branch/BranchRolloutView/BranchRolloutView.vue
+++ b/frontend/src/components/Branch/BranchRolloutView/BranchRolloutView.vue
@@ -127,8 +127,8 @@ import { computed, reactive, ref, toRef, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { MonacoEditor } from "@/components/MonacoEditor";
+import type { RolloutObject } from "@/components/SchemaEditorLite";
import SchemaEditorLite, {
- RolloutObject,
generateDiffDDL,
} from "@/components/SchemaEditorLite";
import MaskSpinner from "@/components/misc/MaskSpinner.vue";
@@ -140,10 +140,11 @@ import {
useEnvironmentV1Store,
useSheetV1Store,
} from "@/store";
-import { ComposedDatabase, ComposedProject, UNKNOWN_ID } from "@/types";
+import type { ComposedDatabase, ComposedProject } from "@/types";
+import { UNKNOWN_ID } from "@/types";
import { Branch } from "@/types/proto/v1/branch_service";
import { DatabaseMetadata } from "@/types/proto/v1/database_service";
-import { Environment } from "@/types/proto/v1/environment_service";
+import type { Environment } from "@/types/proto/v1/environment_service";
import { Sheet, SheetPayload_Type } from "@/types/proto/v1/sheet_service";
import {
defer,
diff --git a/frontend/src/components/Branch/BranchRolloutView/useVirtualBranch.ts b/frontend/src/components/Branch/BranchRolloutView/useVirtualBranch.ts
index 8d4cf6e7e8..d5c9892a61 100644
--- a/frontend/src/components/Branch/BranchRolloutView/useVirtualBranch.ts
+++ b/frontend/src/components/Branch/BranchRolloutView/useVirtualBranch.ts
@@ -1,12 +1,10 @@
import { cloneDeep, uniqueId } from "lodash-es";
import { computed, reactive, ref, unref, watchEffect } from "vue";
import { useDBSchemaV1Store } from "@/store";
-import { ComposedDatabase, ComposedProject, MaybeRef } from "@/types";
+import type { ComposedDatabase, ComposedProject, MaybeRef } from "@/types";
import { Branch } from "@/types/proto/v1/branch_service";
-import {
- DatabaseMetadata,
- DatabaseMetadataView,
-} from "@/types/proto/v1/database_service";
+import type { DatabaseMetadata } from "@/types/proto/v1/database_service";
+import { DatabaseMetadataView } from "@/types/proto/v1/database_service";
import { filterDatabaseMetadata } from "@/utils";
/**
diff --git a/frontend/src/components/Branch/BranchSQLCheckButton.vue b/frontend/src/components/Branch/BranchSQLCheckButton.vue
index 89b6fa9d90..a5f6070730 100644
--- a/frontend/src/components/Branch/BranchSQLCheckButton.vue
+++ b/frontend/src/components/Branch/BranchSQLCheckButton.vue
@@ -23,7 +23,7 @@
import { computed } from "vue";
import { SQLCheckButton, SQLCheckSummary } from "@/components/SQLCheck";
import { useDatabaseV1Store } from "@/store";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
const props = defineProps<{
branch: Branch;
diff --git a/frontend/src/components/Branch/BranchSelector.vue b/frontend/src/components/Branch/BranchSelector.vue
index 6ada7e5480..c02b33428a 100644
--- a/frontend/src/components/Branch/BranchSelector.vue
+++ b/frontend/src/components/Branch/BranchSelector.vue
@@ -16,11 +16,13 @@
</template>
<script lang="ts" setup>
-import { NSelect, SelectOption, SelectRenderLabel } from "naive-ui";
+import type { SelectOption, SelectRenderLabel } from "naive-ui";
+import { NSelect } from "naive-ui";
import { computed, h } from "vue";
import { useDatabaseV1Store, useBranchListByProject } from "@/store";
-import { ComposedProject, UNKNOWN_ID } from "@/types";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { ComposedProject } from "@/types";
+import { UNKNOWN_ID } from "@/types";
+import type { Branch } from "@/types/proto/v1/branch_service";
import { InstanceV1EngineIcon } from "../v2";
interface BranchSelectOption extends SelectOption {
diff --git a/frontend/src/components/Branch/BranchTable.vue b/frontend/src/components/Branch/BranchTable.vue
index 03c9a96e6f..11d8f1b561 100644
--- a/frontend/src/components/Branch/BranchTable.vue
+++ b/frontend/src/components/Branch/BranchTable.vue
@@ -41,14 +41,14 @@ import dayjs from "dayjs";
import { NPerformantEllipsis } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGridColumn } from "@/bbkit";
+import type { BBGridColumn } from "@/bbkit";
import DatabaseInfo from "@/components/DatabaseInfo.vue";
import { useDatabaseV1Store, useProjectV1Store, useUserStore } from "@/store";
import {
getProjectAndBranchId,
projectNamePrefix,
} from "@/store/modules/v1/common";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
import { projectV1Name } from "@/utils";
const emit = defineEmits<{
diff --git a/frontend/src/components/Branch/SchemaDesignEditorLite.vue b/frontend/src/components/Branch/SchemaDesignEditorLite.vue
index bfc6660bff..d410974663 100644
--- a/frontend/src/components/Branch/SchemaDesignEditorLite.vue
+++ b/frontend/src/components/Branch/SchemaDesignEditorLite.vue
@@ -73,8 +73,8 @@ import { cloneDeep } from "lodash-es";
import { computed, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
import { pushNotification, useDatabaseV1Store } from "@/store";
-import { ComposedProject } from "@/types";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { ComposedProject } from "@/types";
+import type { Branch } from "@/types/proto/v1/branch_service";
import { DatabaseMetadata } from "@/types/proto/v1/database_service";
import { MonacoEditor } from "../MonacoEditor";
import SchemaEditorLite, { generateDiffDDL } from "../SchemaEditorLite";
diff --git a/frontend/src/components/Branch/common/BranchComparison.vue b/frontend/src/components/Branch/common/BranchComparison.vue
index f97d954ad5..62b7f379d2 100644
--- a/frontend/src/components/Branch/common/BranchComparison.vue
+++ b/frontend/src/components/Branch/common/BranchComparison.vue
@@ -62,7 +62,7 @@ import { computed, ref, watch } from "vue";
import { DiffEditor } from "@/components/MonacoEditor";
import SchemaEditorLite from "@/components/SchemaEditorLite";
import { useDatabaseV1Store } from "@/store";
-import { ComposedProject } from "@/types";
+import type { ComposedProject } from "@/types";
import { Branch } from "@/types/proto/v1/branch_service";
import { DatabaseMetadata } from "@/types/proto/v1/database_service";
diff --git a/frontend/src/components/Branch/common/BranchDetailViewer.vue b/frontend/src/components/Branch/common/BranchDetailViewer.vue
index b402359c62..7e11599a81 100644
--- a/frontend/src/components/Branch/common/BranchDetailViewer.vue
+++ b/frontend/src/components/Branch/common/BranchDetailViewer.vue
@@ -44,7 +44,7 @@
<script lang="ts" setup>
import { ref } from "vue";
import { MonacoEditor } from "@/components/MonacoEditor";
-import { ComposedProject } from "@/types";
+import type { ComposedProject } from "@/types";
import { Branch } from "@/types/proto/v1/branch_service";
type TabValue = "visualized-schema" | "schema-text";
diff --git a/frontend/src/components/Branch/utils.ts b/frontend/src/components/Branch/utils.ts
index b71272fcce..b9ab6e16c8 100644
--- a/frontend/src/components/Branch/utils.ts
+++ b/frontend/src/components/Branch/utils.ts
@@ -1,5 +1,5 @@
import { useCurrentUserV1 } from "@/store";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
export const generateForkedBranchName = (branch: Branch): string => {
const currentUser = useCurrentUserV1();
diff --git a/frontend/src/components/ChangeHistory/AffectedTableSelect.vue b/frontend/src/components/ChangeHistory/AffectedTableSelect.vue
index 056192f7df..b6ce61c453 100644
--- a/frontend/src/components/ChangeHistory/AffectedTableSelect.vue
+++ b/frontend/src/components/ChangeHistory/AffectedTableSelect.vue
@@ -8,10 +8,11 @@
<script setup lang="ts">
import { orderBy, uniqBy } from "lodash-es";
-import { SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
import { computed, h } from "vue";
-import { AffectedTable, EmptyAffectedTable } from "@/types";
-import { ChangeHistory } from "@/types/proto/v1/database_service";
+import type { AffectedTable } from "@/types";
+import { EmptyAffectedTable } from "@/types";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
import {
getAffectedTableDisplayName,
getAffectedTablesOfChangeHistory,
diff --git a/frontend/src/components/ChangeHistory/ChangeHistoryStatusIcon.vue b/frontend/src/components/ChangeHistory/ChangeHistoryStatusIcon.vue
index d85b1a0875..cf75cb9339 100644
--- a/frontend/src/components/ChangeHistory/ChangeHistoryStatusIcon.vue
+++ b/frontend/src/components/ChangeHistory/ChangeHistoryStatusIcon.vue
@@ -24,7 +24,7 @@
</template>
<script lang="ts" setup>
-import { PropType } from "vue";
+import type { PropType } from "vue";
import { ChangeHistory_Status } from "@/types/proto/v1/database_service";
const props = defineProps({
diff --git a/frontend/src/components/ChangeHistory/ChangeHistoryTable.vue b/frontend/src/components/ChangeHistory/ChangeHistoryTable.vue
index 7abfc0c44c..ed4514d169 100644
--- a/frontend/src/components/ChangeHistory/ChangeHistoryTable.vue
+++ b/frontend/src/components/ChangeHistory/ChangeHistoryTable.vue
@@ -128,14 +128,14 @@ import { NCheckbox } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
-import { BBTableSectionDataSource } from "@/bbkit/types";
+import type { BBTableSectionDataSource } from "@/bbkit/types";
import TextOverflowPopover from "@/components/misc/TextOverflowPopover.vue";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
import { useUserStore } from "@/store";
-import { ComposedDatabase } from "@/types";
-import { AffectedTable } from "@/types/changeHistory";
+import type { ComposedDatabase } from "@/types";
+import type { AffectedTable } from "@/types/changeHistory";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
import {
- ChangeHistory,
ChangeHistory_Status,
ChangeHistory_Type,
changeHistory_TypeToJSON,
diff --git a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue
index f2edb9b86c..4ccf22cee9 100644
--- a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue
+++ b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue
@@ -20,8 +20,8 @@
import { computed, onMounted, ref } from "vue";
import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";
import { useChangelistStore, useCurrentUserV1 } from "@/store";
-import { ComposedProject } from "@/types";
-import { Changelist } from "@/types/proto/v1/changelist_service";
+import type { ComposedProject } from "@/types";
+import type { Changelist } from "@/types/proto/v1/changelist_service";
import { hasProjectPermissionV2 } from "@/utils";
import ChangelistTable from "./ChangelistTable.vue";
import CreateChangelistPanel from "./CreateChangelistPanel.vue";
diff --git a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistTable.vue b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistTable.vue
index a6f7062db9..e47ae86a45 100644
--- a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistTable.vue
+++ b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistTable.vue
@@ -38,9 +38,10 @@ import { escape } from "lodash-es";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
-import { BBGrid, BBGridRow, BBGridColumn } from "@/bbkit";
+import type { BBGridRow, BBGridColumn } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
import { useUserStore } from "@/store";
-import { Changelist } from "@/types/proto/v1/changelist_service";
+import type { Changelist } from "@/types/proto/v1/changelist_service";
import {
extractUserResourceName,
getHighlightHTMLByRegExp,
diff --git a/frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vue b/frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vue
index 8f57e6064e..30c17cb87d 100644
--- a/frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vue
+++ b/frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vue
@@ -100,8 +100,9 @@ import {
useChangelistStore,
useProjectV1Store,
} from "@/store";
-import { ResourceId, UNKNOWN_ID, ValidatedMessage } from "@/types";
-import { ComposedProject } from "@/types";
+import type { ResourceId, ValidatedMessage } from "@/types";
+import { UNKNOWN_ID } from "@/types";
+import type { ComposedProject } from "@/types";
import { Changelist } from "@/types/proto/v1/changelist_service";
import { extractChangelistResourceName } from "@/utils";
import { getErrorCode } from "@/utils/grpcweb";
diff --git a/frontend/src/components/Changelist/ChangelistDashboard/context.ts b/frontend/src/components/Changelist/ChangelistDashboard/context.ts
index 3e5b89c82d..616a2dbe20 100644
--- a/frontend/src/components/Changelist/ChangelistDashboard/context.ts
+++ b/frontend/src/components/Changelist/ChangelistDashboard/context.ts
@@ -1,5 +1,6 @@
import Emittery from "emittery";
-import { InjectionKey, Ref, inject, provide, ref, watch } from "vue";
+import type { InjectionKey, Ref } from "vue";
+import { inject, provide, ref, watch } from "vue";
import { useRoute, useRouter } from "vue-router";
export type ChangelistDashboardFilter = {
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue
index 40ff85534f..6bdb3b85a5 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue
@@ -94,10 +94,8 @@ import {
useLocalSheetStore,
} from "@/store";
import { useBranchStore } from "@/store/modules/branch";
-import {
- Changelist_Change as Change,
- Changelist,
-} from "@/types/proto/v1/changelist_service";
+import type { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import { Changelist } from "@/types/proto/v1/changelist_service";
import {
getChangelistChangeSourceType,
getSheetStatement,
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/context.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/context.ts
index a7036d4a47..1eb3b3e610 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/context.ts
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/context.ts
@@ -1,7 +1,8 @@
import Emittery from "emittery";
-import { InjectionKey, Ref, inject, provide, ref } from "vue";
-import { Changelist_Change_Source as ChangeSource } from "@/types";
-import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import type { InjectionKey, Ref } from "vue";
+import { inject, provide, ref } from "vue";
+import type { Changelist_Change_Source as ChangeSource } from "@/types";
+import type { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
import { useChangelistDetailContext } from "../context";
import { emptyRawSQLChange } from "./utils";
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchChangeItem.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchChangeItem.vue
index d4214f23a1..040a3e0c38 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchChangeItem.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchChangeItem.vue
@@ -41,7 +41,7 @@ import { computed } from "vue";
import { RichDatabaseName } from "@/components/v2";
import { useDatabaseV1Store } from "@/store";
import { Branch } from "@/types/proto/v1/branch_service";
-import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import type { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
const props = defineProps<{
change: Change;
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchForm.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchForm.vue
index b95bf29a19..fa99859b8f 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchForm.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchForm.vue
@@ -54,7 +54,7 @@ import { DatabaseSelect } from "@/components/v2";
import { useDatabaseV1Store, useLocalSheetStore } from "@/store";
import { useBranchListByProject, useBranchStore } from "@/store/modules/branch";
import { UNKNOWN_ID } from "@/types";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
import { keyBy } from "@/utils";
import BranchDetailPanel from "../../BranchDetailPanel";
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vue
index b04c324258..e4aed750d7 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vue
@@ -57,11 +57,12 @@ import { escape } from "lodash-es";
import { NCheckbox } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGrid, BBGridColumn, BBGridRow } from "@/bbkit";
+import type { BBGridColumn, BBGridRow } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
import BranchBaseline from "@/components/Branch/BranchBaseline.vue";
import HumanizeDate from "@/components/misc/HumanizeDate.vue";
import { useUserStore } from "@/store";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
import { extractUserResourceName, getHighlightHTMLByRegExp } from "@/utils";
const props = defineProps<{
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryChangeItem.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryChangeItem.vue
index 4546a01a90..dfc3e3b9a3 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryChangeItem.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryChangeItem.vue
@@ -58,7 +58,7 @@ import { computed } from "vue";
import { RichDatabaseName } from "@/components/v2";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
import { useChangeHistoryStore, useDatabaseV1Store } from "@/store";
-import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import type { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
import { ChangeHistory } from "@/types/proto/v1/database_service";
import {
extractDatabaseResourceName,
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vue
index 10c8be26b1..c95f939d35 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vue
@@ -70,10 +70,11 @@ import {
useDatabaseV1Store,
} from "@/store";
import { UNKNOWN_ID } from "@/types";
-import { AffectedTable, EmptyAffectedTable } from "@/types/changeHistory";
-import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import type { AffectedTable } from "@/types/changeHistory";
+import { EmptyAffectedTable } from "@/types/changeHistory";
+import type { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
import {
- ChangeHistory,
ChangeHistory_Status,
ChangeHistory_Type,
} from "@/types/proto/v1/database_service";
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/ChangeHistoryTable.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/ChangeHistoryTable.vue
index 8ba5ba7ee9..b01013bc68 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/ChangeHistoryTable.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/ChangeHistoryTable.vue
@@ -60,8 +60,9 @@ import { escape } from "lodash-es";
import { NCheckbox } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGrid, BBGridRow, BBGridColumn } from "@/bbkit";
-import { ChangeHistory } from "@/types/proto/v1/database_service";
+import type { BBGridRow, BBGridColumn } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
import { getHighlightHTMLByRegExp } from "@/utils";
import { displaySemanticType } from "../utils";
import IssueUID from "./IssueUID.vue";
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/IssueUID.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/IssueUID.vue
index c3dc9e9e99..f6e5638223 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/IssueUID.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/IssueUID.vue
@@ -19,7 +19,7 @@
<script setup lang="ts">
import { computed } from "vue";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
-import { ChangeHistory } from "@/types/proto/v1/database_service";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
import { extractIssueUID, extractProjectResourceName } from "@/utils";
const props = defineProps<{
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/SQL.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/SQL.vue
index 79f792ba4b..3e80ac112e 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/SQL.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/SQL.vue
@@ -9,7 +9,7 @@
<script setup lang="ts">
import TextOverflowPopover from "@/components/misc/TextOverflowPopover.vue";
-import { ChangeHistory } from "@/types/proto/v1/database_service";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
defineProps<{
changeHistory: ChangeHistory;
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/Tables.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/Tables.vue
index 44736052a3..1e9547b083 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/Tables.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/Tables.vue
@@ -9,7 +9,7 @@
<script setup lang="ts">
import { computed } from "vue";
import TextOverflowPopover from "@/components/misc/TextOverflowPopover.vue";
-import { ChangeHistory } from "@/types/proto/v1/database_service";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
import {
getAffectedTableDisplayName,
getAffectedTablesOfChangeHistory,
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/utils.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/utils.ts
index 04595030f0..bed3106d97 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/utils.ts
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/utils.ts
@@ -1,9 +1,7 @@
import { orderBy, uniqBy } from "lodash-es";
import { EmptyAffectedTable } from "@/types/changeHistory";
-import {
- ChangeHistory,
- ChangeHistory_Type,
-} from "@/types/proto/v1/database_service";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
+import { ChangeHistory_Type } from "@/types/proto/v1/database_service";
import { getAffectedTablesOfChangeHistory } from "@/utils";
export const getAffectedTablesFromChangeHistoryList = (
diff --git a/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue b/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue
index 4a7e93619f..850f13df51 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue
@@ -93,7 +93,8 @@ import {
useEnvironmentV1List,
useSearchDatabaseV1List,
} from "@/store";
-import { ComposedDatabase, DEFAULT_PROJECT_V1_NAME } from "@/types";
+import type { ComposedDatabase } from "@/types";
+import { DEFAULT_PROJECT_V1_NAME } from "@/types";
import { State } from "@/types/proto/v1/common";
import {
extractProjectResourceName,
diff --git a/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchBaseline.vue b/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchBaseline.vue
index 75df945ff2..7086c38bf8 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchBaseline.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchBaseline.vue
@@ -14,7 +14,7 @@
import { computed } from "vue";
import DatabaseInfo from "@/components/DatabaseInfo.vue";
import { useDatabaseV1Store } from "@/store";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
const props = defineProps<{
branch: Branch;
diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ChangeTable.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ChangeTable.vue
index 37b166a133..1eed0d5b4b 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ChangeTable.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ChangeTable.vue
@@ -36,8 +36,9 @@
<script setup lang="ts">
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGrid, BBGridColumn, BBGridRow } from "@/bbkit";
-import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import type { BBGridColumn, BBGridRow } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
+import type { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
import DatabaseForChange from "./DatabaseForChange.vue";
import RemoveChangeButton from "./RemoveChangeButton.vue";
import ReorderButtons from "./ReorderButtons.vue";
diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vue
index 22e7b910ab..0dd933f389 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vue
@@ -13,7 +13,7 @@
import { asyncComputed } from "@vueuse/core";
import { RichDatabaseName } from "@/components/v2";
import { useDatabaseV1Store, useBranchStore } from "@/store";
-import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import type { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
import {
extractDatabaseResourceName,
isBranchChangeSource,
diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ReorderButtons.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ReorderButtons.vue
index 596dbd0af6..6a2da203ee 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ReorderButtons.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ReorderButtons.vue
@@ -24,7 +24,7 @@
<script lang="ts" setup>
import { NButton } from "naive-ui";
import { computed } from "vue";
-import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import type { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
const props = defineProps<{
changes: Change[];
diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/SQL.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/SQL.vue
index 56b7dda7ea..0819bf3b0c 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/SQL.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/SQL.vue
@@ -13,7 +13,7 @@
import { computed } from "vue";
import TextOverflowPopover from "@/components/misc/TextOverflowPopover.vue";
import { useSheetV1Store } from "@/store";
-import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import type { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
import { getSheetStatement } from "@/utils";
const props = defineProps<{
diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/Source.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/Source.vue
index 1033842135..54ea626311 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/Source.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/Source.vue
@@ -48,7 +48,7 @@ import { File, GitBranch, History } from "lucide-vue-next";
import { computed } from "vue";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
import { useChangeHistoryStore, useBranchStore } from "@/store";
-import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import type { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
import {
extractIssueUID,
extractProjectResourceName,
diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangelistDetail.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangelistDetail.vue
index af46398229..3d7d32a953 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/ChangelistDetail.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/ChangelistDetail.vue
@@ -47,10 +47,8 @@ import { useRoute } from "vue-router";
import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";
import { PROJECT_V1_ROUTE_CHANGELIST_DETAIL } from "@/router/dashboard/projectV1";
import { pushNotification, useChangelistStore } from "@/store";
-import {
- Changelist_Change as Change,
- Changelist,
-} from "@/types/proto/v1/changelist_service";
+import type { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import { Changelist } from "@/types/proto/v1/changelist_service";
import { getChangelistChangeSourceType } from "@/utils";
import AddChangePanel from "./AddChangePanel";
import ApplyToDatabasePanel from "./ApplyToDatabasePanel";
diff --git a/frontend/src/components/Changelist/ChangelistDetail/NavBar/TitleEditor.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/TitleEditor.vue
index 258fe086e2..836375fdfb 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/NavBar/TitleEditor.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/NavBar/TitleEditor.vue
@@ -19,7 +19,8 @@
<script setup lang="ts">
import { NInput } from "naive-ui";
-import { CSSProperties, computed, reactive, watch } from "vue";
+import type { CSSProperties } from "vue";
+import { computed, reactive, watch } from "vue";
import { useI18n } from "vue-i18n";
import { pushNotification, useChangelistStore } from "@/store";
import { Changelist } from "@/types/proto/v1/changelist_service";
diff --git a/frontend/src/components/Changelist/ChangelistDetail/NavBar/export.ts b/frontend/src/components/Changelist/ChangelistDetail/NavBar/export.ts
index dd91333a8b..96194b9cff 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/NavBar/export.ts
+++ b/frontend/src/components/Changelist/ChangelistDetail/NavBar/export.ts
@@ -1,9 +1,9 @@
-import JSZip from "jszip";
+import type JSZip from "jszip";
import { padStart } from "lodash-es";
import { useChangeHistoryStore, useSheetV1Store } from "@/store";
import { useBranchStore } from "@/store/modules/branch";
-import { Changelist_Change_Source as ChangeSource } from "@/types";
-import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import type { Changelist_Change_Source as ChangeSource } from "@/types";
+import type { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
import { ChangeHistoryView } from "@/types/proto/v1/database_service";
import {
escapeFilename,
diff --git a/frontend/src/components/Changelist/ChangelistDetail/common.ts b/frontend/src/components/Changelist/ChangelistDetail/common.ts
index 57277a37c6..7280c98ee8 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/common.ts
+++ b/frontend/src/components/Changelist/ChangelistDetail/common.ts
@@ -1,7 +1,7 @@
import dayjs from "@/plugins/dayjs";
import { useProjectV1Store } from "@/store";
import { projectNamePrefix } from "@/store/modules/v1/common";
-import { Changelist } from "@/types/proto/v1/changelist_service";
+import type { Changelist } from "@/types/proto/v1/changelist_service";
import { extractProjectResourceName } from "@/utils";
export const generateIssueName = (
diff --git a/frontend/src/components/Changelist/ChangelistDetail/context.ts b/frontend/src/components/Changelist/ChangelistDetail/context.ts
index 4cd8ad3618..3895d27a5d 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/context.ts
+++ b/frontend/src/components/Changelist/ChangelistDetail/context.ts
@@ -1,13 +1,6 @@
import Emittery from "emittery";
-import {
- InjectionKey,
- Ref,
- computed,
- inject,
- provide,
- ref,
- watchEffect,
-} from "vue";
+import type { InjectionKey, Ref } from "vue";
+import { computed, inject, provide, ref, watchEffect } from "vue";
import { useRoute } from "vue-router";
import {
useChangelistStore,
@@ -15,13 +8,9 @@ import {
useProjectV1Store,
} from "@/store";
import { projectNamePrefix } from "@/store/modules/v1/common";
-import {
- ComposedProject,
- unknownChangelist,
- unknownProject,
- ProjectPermission,
-} from "@/types";
-import {
+import type { ComposedProject, ProjectPermission } from "@/types";
+import { unknownChangelist, unknownProject } from "@/types";
+import type {
Changelist,
Changelist_Change as Change,
} from "@/types/proto/v1/changelist_service";
diff --git a/frontend/src/components/ColumnDataTable/LabelsCell.vue b/frontend/src/components/ColumnDataTable/LabelsCell.vue
index 069fd13d07..d0440a65ba 100644
--- a/frontend/src/components/ColumnDataTable/LabelsCell.vue
+++ b/frontend/src/components/ColumnDataTable/LabelsCell.vue
@@ -27,13 +27,15 @@ import { computed } from "vue";
import { reactive } from "vue";
import { useI18n } from "vue-i18n";
import { pushNotification, useDBSchemaV1Store } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
+import type {
+ ColumnMetadata,
+ TableMetadata,
+} from "@/types/proto/v1/database_service";
import {
ColumnConfig,
- ColumnMetadata,
SchemaConfig,
TableConfig,
- TableMetadata,
} from "@/types/proto/v1/database_service";
type LocalState = {
diff --git a/frontend/src/components/ColumnDataTable/MaskingLevelCell.vue b/frontend/src/components/ColumnDataTable/MaskingLevelCell.vue
index 8cab31149c..d7286eb40c 100644
--- a/frontend/src/components/ColumnDataTable/MaskingLevelCell.vue
+++ b/frontend/src/components/ColumnDataTable/MaskingLevelCell.vue
@@ -65,13 +65,13 @@ import { computed } from "vue";
import { reactive } from "vue";
import { useI18n } from "vue-i18n";
import { useSubscriptionV1Store } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { MaskingLevel, maskingLevelToJSON } from "@/types/proto/v1/common";
-import {
+import type {
ColumnMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
-import { MaskData } from "@/types/proto/v1/org_policy_service";
+import type { MaskData } from "@/types/proto/v1/org_policy_service";
import SensitiveColumnDrawer from "../SensitiveData/SensitiveColumnDrawer.vue";
type LocalState = {
diff --git a/frontend/src/components/ColumnDataTable/SemanticTypeCell.vue b/frontend/src/components/ColumnDataTable/SemanticTypeCell.vue
index 1b1f660c9e..e584bc2a55 100644
--- a/frontend/src/components/ColumnDataTable/SemanticTypeCell.vue
+++ b/frontend/src/components/ColumnDataTable/SemanticTypeCell.vue
@@ -44,13 +44,15 @@ import {
useSettingV1Store,
useSubscriptionV1Store,
} from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
+import type {
+ ColumnMetadata,
+ TableMetadata,
+} from "@/types/proto/v1/database_service";
import {
ColumnConfig,
- ColumnMetadata,
SchemaConfig,
TableConfig,
- TableMetadata,
} from "@/types/proto/v1/database_service";
type LocalState = {
diff --git a/frontend/src/components/ColumnDataTable/index.vue b/frontend/src/components/ColumnDataTable/index.vue
index 4c84416685..1c8dfd32f6 100644
--- a/frontend/src/components/ColumnDataTable/index.vue
+++ b/frontend/src/components/ColumnDataTable/index.vue
@@ -10,21 +10,23 @@
</template>
<script lang="ts" setup>
-import { DataTableColumn, NDataTable } from "naive-ui";
-import { computed, PropType } from "vue";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { h } from "vue";
import { useI18n } from "vue-i18n";
import { getColumnDefaultValuePlaceholder } from "@/components/SchemaEditorV1/utils/columnDefaultValue";
import ClassificationLevelBadge from "@/components/SchemaTemplate/ClassificationLevelBadge.vue";
import { useCurrentUserV1, useSubscriptionV1Store } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import {
+import type {
ColumnMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
-import { MaskData } from "@/types/proto/v1/org_policy_service";
-import { DataClassificationSetting_DataClassificationConfig } from "@/types/proto/v1/setting_service";
+import type { MaskData } from "@/types/proto/v1/org_policy_service";
+import type { DataClassificationSetting_DataClassificationConfig } from "@/types/proto/v1/setting_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import LabelsCell from "./LabelsCell.vue";
import MaskingLevelCell from "./MaskingLevelCell.vue";
diff --git a/frontend/src/components/CommonSidebar.vue b/frontend/src/components/CommonSidebar.vue
index beb8ccec31..118a49c143 100644
--- a/frontend/src/components/CommonSidebar.vue
+++ b/frontend/src/components/CommonSidebar.vue
@@ -75,7 +75,8 @@
<script setup lang="ts">
import { ChevronDown, ChevronRight } from "lucide-vue-next";
-import { computed, VNode, reactive, watch } from "vue";
+import type { VNode } from "vue";
+import { computed, reactive, watch } from "vue";
export interface SidebarItem {
title?: string;
diff --git a/frontend/src/components/CreateDataSourceExample.vue b/frontend/src/components/CreateDataSourceExample.vue
index 975c7da66a..78ad372fe8 100644
--- a/frontend/src/components/CreateDataSourceExample.vue
+++ b/frontend/src/components/CreateDataSourceExample.vue
@@ -143,7 +143,8 @@
</template>
<script lang="ts" setup>
-import { reactive, PropType, computed } from "vue";
+import type { PropType } from "vue";
+import { reactive, computed } from "vue";
import { useI18n } from "vue-i18n";
import { pushNotification } from "@/store";
import { languageOfEngineV1 } from "@/types";
diff --git a/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepButtonGroup.vue b/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepButtonGroup.vue
index 611e0c070b..5545c5dee5 100644
--- a/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepButtonGroup.vue
+++ b/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepButtonGroup.vue
@@ -14,7 +14,7 @@
</template>
<script setup lang="ts">
-import CreateDatabasePrepForm from "./CreateDatabasePrepForm.vue";
+import type CreateDatabasePrepForm from "./CreateDatabasePrepForm.vue";
defineProps<{
form?: InstanceType<typeof CreateDatabasePrepForm>;
diff --git a/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepForm.vue b/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepForm.vue
index c6c94f54f7..b70b0b7d8d 100644
--- a/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepForm.vue
+++ b/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepForm.vue
@@ -186,23 +186,20 @@ import {
useInstanceV1Store,
useProjectV1Store,
} from "@/store";
+import type { ComposedInstance } from "@/types";
import {
defaultCharsetOfEngineV1,
defaultCollationOfEngineV1,
UNKNOWN_ID,
- ComposedInstance,
unknownInstance,
} from "@/types";
import { INTERNAL_RDS_INSTANCE_USER_LIST } from "@/types/InstanceUser";
import { Engine } from "@/types/proto/v1/common";
-import { InstanceRole } from "@/types/proto/v1/instance_role_service";
+import type { InstanceRole } from "@/types/proto/v1/instance_role_service";
import { Issue, Issue_Type } from "@/types/proto/v1/issue_service";
import { TenantMode } from "@/types/proto/v1/project_service";
-import {
- Plan,
- Plan_CreateDatabaseConfig,
- Plan_Spec,
-} from "@/types/proto/v1/rollout_service";
+import type { Plan_CreateDatabaseConfig } from "@/types/proto/v1/rollout_service";
+import { Plan, Plan_Spec } from "@/types/proto/v1/rollout_service";
import {
extractProjectResourceName,
instanceV1HasCollationAndCharacterSet,
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/ExternalApprovalNodesPanel/NodeTable.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/ExternalApprovalNodesPanel/NodeTable.vue
index 2496ffc0fd..966d0020f1 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/ExternalApprovalNodesPanel/NodeTable.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/ExternalApprovalNodesPanel/NodeTable.vue
@@ -44,10 +44,8 @@ import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { BBGrid, type BBGridColumn } from "@/bbkit";
import { pushNotification, useSettingV1Store } from "@/store";
-import {
- ExternalApprovalSetting,
- ExternalApprovalSetting_Node,
-} from "@/types/proto/v1/setting_service";
+import type { ExternalApprovalSetting_Node } from "@/types/proto/v1/setting_service";
+import { ExternalApprovalSetting } from "@/types/proto/v1/setting_service";
import { SpinnerButton } from "../../common";
import { useCustomApprovalContext } from "../context";
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue
index fbbcd2f2d2..80d1bde7f8 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue
@@ -69,8 +69,9 @@ import { useI18n } from "vue-i18n";
import { BBGrid, type BBGridColumn } from "@/bbkit";
import SystemLabel from "@/components/SystemLabel.vue";
import { pushNotification, useWorkspaceApprovalSettingStore } from "@/store";
-import { LocalApprovalRule, SYSTEM_BOT_USER_NAME } from "@/types";
-import { ApprovalFlow } from "@/types/proto/store/approval";
+import type { LocalApprovalRule } from "@/types";
+import { SYSTEM_BOT_USER_NAME } from "@/types";
+import type { ApprovalFlow } from "@/types/proto/store/approval";
import { creatorOfRule } from "@/utils";
import { SpinnerButton } from "../../common";
import { StepsTable } from "../common";
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleDialog.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleDialog.vue
index 4054b1d721..982c8cf6ec 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleDialog.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleDialog.vue
@@ -28,7 +28,8 @@ import { computed, reactive, watch } from "vue";
import { useI18n } from "vue-i18n";
import { BBModal } from "@/bbkit";
import { pushNotification, useWorkspaceApprovalSettingStore } from "@/store";
-import { LocalApprovalRule, SYSTEM_BOT_USER_NAME } from "@/types";
+import type { LocalApprovalRule } from "@/types";
+import { SYSTEM_BOT_USER_NAME } from "@/types";
import { creatorOfRule, defer } from "@/utils";
import { useCustomApprovalContext } from "../context";
import RuleForm from "./RuleForm.vue";
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleForm.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleForm.vue
index f44b565999..f67032c345 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleForm.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleForm.vue
@@ -72,7 +72,8 @@
import { cloneDeep } from "lodash-es";
import { NInput } from "naive-ui";
import { computed, nextTick, onMounted, ref } from "vue";
-import { LocalApprovalRule, SYSTEM_BOT_USER_NAME } from "@/types";
+import type { LocalApprovalRule } from "@/types";
+import { SYSTEM_BOT_USER_NAME } from "@/types";
import { creatorOfRule } from "@/utils";
import { RequiredStar } from "../../common";
import { StepsTable } from "../common";
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleSelect.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleSelect.vue
index 54c65eec10..9f42194fc4 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleSelect.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleSelect.vue
@@ -31,11 +31,12 @@
<script lang="ts" setup>
import { omit } from "lodash-es";
-import { NButton, type SelectProps, SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NButton, type SelectProps } from "naive-ui";
import { computed, useAttrs } from "vue";
import { useI18n } from "vue-i18n";
import { useWorkspaceApprovalSettingStore } from "@/store";
-import { VueClass, VueStyle } from "@/utils";
+import type { VueClass, VueStyle } from "@/utils";
import { SpinnerSelect } from "../../common";
import { useCustomApprovalContext } from "../context";
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RulesSection.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RulesSection.vue
index 87cc307f3a..55d3e3a742 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RulesSection.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RulesSection.vue
@@ -37,12 +37,9 @@ import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { BBGrid, type BBGridColumn } from "@/bbkit";
import { pushNotification, useWorkspaceApprovalSettingStore } from "@/store";
-import {
- DEFAULT_RISK_LEVEL,
- ParsedApprovalRule,
- PresetRiskLevelList,
-} from "@/types";
-import { Risk_Source } from "@/types/proto/v1/risk_service";
+import type { ParsedApprovalRule } from "@/types";
+import { DEFAULT_RISK_LEVEL, PresetRiskLevelList } from "@/types";
+import type { Risk_Source } from "@/types/proto/v1/risk_service";
import { levelText, sourceText, useRiskFilter } from "../../common";
import { useCustomApprovalContext } from "../context";
import RuleSelect from "./RuleSelect.vue";
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/types.ts b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/types.ts
index 127f49153c..7a7375558b 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/types.ts
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/types.ts
@@ -1,6 +1,6 @@
-import { Expr } from "@/types/proto/google/api/expr/v1alpha1/syntax";
-import { Risk_Source } from "@/types/proto/v1/risk_service";
-import { WorkspaceApprovalSetting_Rule as ApprovalRule } from "@/types/proto/v1/setting_service";
+import type { Expr } from "@/types/proto/google/api/expr/v1alpha1/syntax";
+import type { Risk_Source } from "@/types/proto/v1/risk_service";
+import type { WorkspaceApprovalSetting_Rule as ApprovalRule } from "@/types/proto/v1/setting_service";
export type ParsedApprovalRule = {
source: Risk_Source;
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/RoleSelect.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/RoleSelect.vue
index d8b1dbbd02..6495845f23 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/RoleSelect.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/RoleSelect.vue
@@ -16,8 +16,8 @@ import { storeToRefs } from "pinia";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRoleStore, useSettingV1Store } from "@/store";
+import type { ApprovalNode } from "@/types/proto/v1/issue_service";
import {
- ApprovalNode,
ApprovalNode_GroupValue,
ApprovalNode_Type,
} from "@/types/proto/v1/issue_service";
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vue
index 0cfb98223a..e077c48474 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vue
@@ -66,8 +66,8 @@ import { NButton } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { BBGrid, type BBGridColumn } from "@/bbkit";
+import type { ApprovalFlow } from "@/types/proto/v1/issue_service";
import {
- ApprovalFlow,
ApprovalNode_GroupValue,
ApprovalNode_Type,
ApprovalStep,
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/context.ts b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/context.ts
index df5ffd3570..d552922adb 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/context.ts
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/context.ts
@@ -1,6 +1,6 @@
import { inject, provide, type InjectionKey, type Ref } from "vue";
import type { LocalApprovalRule } from "@/types";
-import { ExternalApprovalSetting_Node } from "@/types/proto/store/setting";
+import type { ExternalApprovalSetting_Node } from "@/types/proto/store/setting";
export const TabValueList = ["rules", "flows", "external-approval"] as const;
export type TabValue = (typeof TabValueList)[number];
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/utils.ts b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/utils.ts
index 3d49de401e..77fffab656 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/utils.ts
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/utils.ts
@@ -1,7 +1,7 @@
import { v4 as uuidv4 } from "uuid";
import { useCurrentUserV1 } from "@/store";
import { userNamePrefix } from "@/store/modules/v1/common";
-import { LocalApprovalRule } from "@/types";
+import type { LocalApprovalRule } from "@/types";
import { ApprovalTemplate } from "@/types/proto/v1/issue_service";
export const emptyLocalApprovalRule = (): LocalApprovalRule => {
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/validate.ts b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/validate.ts
index 36d2a552f2..c0ae6abbe1 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/validate.ts
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/validate.ts
@@ -1,9 +1,11 @@
-import {
+import type {
ApprovalFlow,
+ ApprovalTemplate,
+} from "@/types/proto/v1/issue_service";
+import {
ApprovalNode_GroupValue,
ApprovalNode_Type,
ApprovalStep_Type,
- ApprovalTemplate,
} from "@/types/proto/v1/issue_service";
const validateApprovalFlow = (flow: ApprovalFlow) => {
diff --git a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskDialog.vue b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskDialog.vue
index 16bc23d5f8..c02432f935 100644
--- a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskDialog.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskDialog.vue
@@ -27,7 +27,7 @@ import { useDialog } from "naive-ui";
import { computed, reactive, watch } from "vue";
import { useI18n } from "vue-i18n";
import { pushNotification, useRiskStore } from "@/store";
-import { Risk } from "@/types/proto/v1/risk_service";
+import type { Risk } from "@/types/proto/v1/risk_service";
import { defer } from "@/utils";
import { useRiskCenterContext } from "../context";
import RiskForm from "./RiskForm.vue";
diff --git a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskLevelSelect.vue b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskLevelSelect.vue
index 577c42f659..9c52b08341 100644
--- a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskLevelSelect.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskLevelSelect.vue
@@ -11,7 +11,8 @@
</template>
<script lang="ts" setup>
-import { NSelect, SelectOption, type SelectProps } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NSelect, type SelectProps } from "naive-ui";
import { computed } from "vue";
import { PresetRiskLevelList } from "@/types";
import { levelText } from "../../common";
diff --git a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskSourceSelect.vue b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskSourceSelect.vue
index 3da364b14d..4ef7bb7d4b 100644
--- a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskSourceSelect.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskSourceSelect.vue
@@ -11,10 +11,11 @@
</template>
<script lang="ts" setup>
-import { NSelect, SelectOption, type SelectProps } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NSelect, type SelectProps } from "naive-ui";
import { computed } from "vue";
import { SupportedSourceList } from "@/types";
-import { Risk_Source } from "@/types/proto/v1/risk_service";
+import type { Risk_Source } from "@/types/proto/v1/risk_service";
import { sourceText } from "../../common";
import { useRiskCenterContext } from "../context";
diff --git a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RuleTemplateTable.vue b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RuleTemplateTable.vue
index ec6de2ce16..a8aae5fa89 100644
--- a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RuleTemplateTable.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RuleTemplateTable.vue
@@ -46,10 +46,12 @@ import { NButton, useDialog } from "naive-ui";
import { computed, ref } from "vue";
import { useI18n } from "vue-i18n";
import { BBGrid, type BBGridColumn } from "@/bbkit";
-import { buildCELExpr, ConditionGroupExpr } from "@/plugins/cel";
+import type { ConditionGroupExpr } from "@/plugins/cel";
+import { buildCELExpr } from "@/plugins/cel";
import { ParsedExpr } from "@/types/proto/google/api/expr/v1alpha1/syntax";
import { Expr } from "@/types/proto/google/type/expr";
-import { Risk, Risk_Source } from "@/types/proto/v1/risk_service";
+import type { Risk } from "@/types/proto/v1/risk_service";
+import { Risk_Source } from "@/types/proto/v1/risk_service";
import { batchConvertParsedExprToCELString, defer } from "@/utils";
import { useRiskCenterContext } from "../context";
import ViewTemplate from "./ViewTemplate.vue";
diff --git a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/template.ts b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/template.ts
index 9897b1fa6f..95c5027a9a 100644
--- a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/template.ts
+++ b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/template.ts
@@ -1,6 +1,7 @@
import { first, last } from "lodash-es";
import { computed } from "vue";
-import { ConditionGroupExpr, wrapAsGroup } from "@/plugins/cel";
+import type { ConditionGroupExpr } from "@/plugins/cel";
+import { wrapAsGroup } from "@/plugins/cel";
import { t, te } from "@/plugins/i18n";
import { useEnvironmentV1List } from "@/store";
import { PresetRiskLevel } from "@/types";
diff --git a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskSection.vue b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskSection.vue
index 4d1477212b..cee1b5852c 100644
--- a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskSection.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskSection.vue
@@ -13,7 +13,7 @@
</template>
<script lang="ts" setup>
-import { Risk, Risk_Source } from "@/types/proto/v1/risk_service";
+import type { Risk, Risk_Source } from "@/types/proto/v1/risk_service";
import { sourceText } from "../common";
import RiskTable from "./RiskTable.vue";
diff --git a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskTable.vue b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskTable.vue
index 7ff1a8317e..6f509234a8 100644
--- a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskTable.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskTable.vue
@@ -45,7 +45,7 @@ import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { BBGrid, type BBGridColumn } from "@/bbkit";
import { pushNotification, useCurrentUserV1, useRiskStore } from "@/store";
-import { Risk } from "@/types/proto/v1/risk_service";
+import type { Risk } from "@/types/proto/v1/risk_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import { SpinnerButton, SpinnerSwitch, levelText } from "../common";
import { useRiskCenterContext } from "./context";
diff --git a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/context.ts b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/context.ts
index 43c94ce2cd..c2a04f8d80 100644
--- a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/context.ts
+++ b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/context.ts
@@ -1,5 +1,5 @@
import { inject, provide, type InjectionKey, type Ref } from "vue";
-import { Risk } from "@/types/proto/v1/risk_service";
+import type { Risk } from "@/types/proto/v1/risk_service";
export type DialogContext = {
mode: "EDIT" | "CREATE";
diff --git a/frontend/src/components/CustomApproval/Settings/components/common/SpinnerButton.vue b/frontend/src/components/CustomApproval/Settings/components/common/SpinnerButton.vue
index 4a64e315a6..7fbb421921 100644
--- a/frontend/src/components/CustomApproval/Settings/components/common/SpinnerButton.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/common/SpinnerButton.vue
@@ -29,7 +29,7 @@ defineComponent({
<script lang="ts" setup>
import { computed, ref, useAttrs } from "vue";
import { omit } from "lodash-es";
-import { VueClass } from "@/utils";
+import type { VueClass } from "@/utils";
import {
type ButtonProps,
type PopconfirmProps,
diff --git a/frontend/src/components/CustomApproval/Settings/components/common/utils.ts b/frontend/src/components/CustomApproval/Settings/components/common/utils.ts
index 901c3c9f50..afc0f3a686 100644
--- a/frontend/src/components/CustomApproval/Settings/components/common/utils.ts
+++ b/frontend/src/components/CustomApproval/Settings/components/common/utils.ts
@@ -9,11 +9,8 @@ import {
SupportedSourceList,
DEFAULT_PROJECT_V1_NAME,
} from "@/types";
-import {
- Risk,
- Risk_Source,
- risk_SourceToJSON,
-} from "@/types/proto/v1/risk_service";
+import type { Risk } from "@/types/proto/v1/risk_service";
+import { Risk_Source, risk_SourceToJSON } from "@/types/proto/v1/risk_service";
import {
extractEnvironmentResourceName,
extractProjectResourceName,
diff --git a/frontend/src/components/DBExtensionDataTable.vue b/frontend/src/components/DBExtensionDataTable.vue
index 109cc7fda7..20138a9773 100644
--- a/frontend/src/components/DBExtensionDataTable.vue
+++ b/frontend/src/components/DBExtensionDataTable.vue
@@ -10,10 +10,12 @@
</template>
<script lang="ts" setup>
-import { DataTableColumn, NDataTable } from "naive-ui";
-import { computed, PropType } from "vue";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { ExtensionMetadata } from "@/types/proto/v1/database_service";
+import type { ExtensionMetadata } from "@/types/proto/v1/database_service";
defineProps({
dbExtensionList: {
diff --git a/frontend/src/components/DataExportButton.vue b/frontend/src/components/DataExportButton.vue
index e9b4766479..cec425a77c 100644
--- a/frontend/src/components/DataExportButton.vue
+++ b/frontend/src/components/DataExportButton.vue
@@ -111,9 +111,8 @@
<script lang="ts" setup>
import { asyncComputed } from "@vueuse/core";
import dayjs from "dayjs";
+import type { FormInst, FormRules } from "naive-ui";
import {
- FormInst,
- FormRules,
NButton,
NDropdown,
NForm,
diff --git a/frontend/src/components/DataSourceSelect.vue b/frontend/src/components/DataSourceSelect.vue
index 4506fb1f75..9a283fd7a3 100644
--- a/frontend/src/components/DataSourceSelect.vue
+++ b/frontend/src/components/DataSourceSelect.vue
@@ -36,8 +36,9 @@
</template>
<script lang="ts">
-import { defineComponent, PropType, reactive } from "vue";
-import { Database } from "../types";
+import type { PropType } from "vue";
+import { defineComponent, reactive } from "vue";
+import type { Database } from "../types";
interface LocalState {
selectedId?: number;
diff --git a/frontend/src/components/Database/DatabaseChangeHistoryPanel.vue b/frontend/src/components/Database/DatabaseChangeHistoryPanel.vue
index f9ea778c66..972d968aad 100644
--- a/frontend/src/components/Database/DatabaseChangeHistoryPanel.vue
+++ b/frontend/src/components/Database/DatabaseChangeHistoryPanel.vue
@@ -107,7 +107,7 @@ import { NCheckbox } from "naive-ui";
import { computed, onBeforeMount, reactive, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
-import { BBTableSectionDataSource } from "@/bbkit/types";
+import type { BBTableSectionDataSource } from "@/bbkit/types";
import {
AffectedTableSelect,
ChangeHistoryTable,
@@ -116,10 +116,12 @@ import { useDatabaseDetailContext } from "@/components/Database/context";
import { TooltipButton } from "@/components/v2";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
import { useChangeHistoryStore, useDBSchemaV1Store } from "@/store";
-import { ComposedDatabase, DEFAULT_PROJECT_V1_NAME } from "@/types";
-import { AffectedTable, EmptyAffectedTable } from "@/types/changeHistory";
+import type { ComposedDatabase } from "@/types";
+import { DEFAULT_PROJECT_V1_NAME } from "@/types";
+import type { AffectedTable } from "@/types/changeHistory";
+import { EmptyAffectedTable } from "@/types/changeHistory";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
import {
- ChangeHistory,
ChangeHistory_Status,
ChangeHistory_Type,
ChangeHistoryView,
diff --git a/frontend/src/components/Database/DatabaseOverviewPanel.vue b/frontend/src/components/Database/DatabaseOverviewPanel.vue
index 37f9a05454..feefce8f20 100644
--- a/frontend/src/components/Database/DatabaseOverviewPanel.vue
+++ b/frontend/src/components/Database/DatabaseOverviewPanel.vue
@@ -188,9 +188,10 @@
<script lang="ts" setup>
import { head } from "lodash-es";
import { NSelect } from "naive-ui";
-import { computed, reactive, watch, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed, reactive, watch } from "vue";
import { useRoute, useRouter } from "vue-router";
-import { BBTableSectionDataSource } from "@/bbkit/types";
+import type { BBTableSectionDataSource } from "@/bbkit/types";
import AnomalyTable from "@/components/AnomalyCenter/AnomalyTable.vue";
import DBExtensionDataTable from "@/components/DBExtensionDataTable.vue";
import { useDatabaseDetailContext } from "@/components/Database/context";
@@ -201,8 +202,8 @@ import TableDataTable from "@/components/TableDataTable.vue";
import TaskTable from "@/components/TaskTable.vue";
import ViewDataTable from "@/components/ViewDataTable.vue";
import { useDBSchemaV1Store } from "@/store";
-import { ComposedDatabase, DataSource } from "@/types";
-import { Anomaly } from "@/types/proto/v1/anomaly_service";
+import type { ComposedDatabase, DataSource } from "@/types";
+import type { Anomaly } from "@/types/proto/v1/anomaly_service";
import { Engine, State } from "@/types/proto/v1/common";
import { DatabaseMetadataView } from "@/types/proto/v1/database_service";
diff --git a/frontend/src/components/Database/DatabaseSlowQueryPanel.vue b/frontend/src/components/Database/DatabaseSlowQueryPanel.vue
index a059881c6d..973912afb5 100644
--- a/frontend/src/components/Database/DatabaseSlowQueryPanel.vue
+++ b/frontend/src/components/Database/DatabaseSlowQueryPanel.vue
@@ -14,8 +14,8 @@
import { computed } from "vue";
import { SlowQueryPanel } from "@/components/SlowQuery";
import type { ComposedDatabase } from "@/types";
+import type { SearchScope } from "@/utils";
import {
- SearchScope,
extractEnvironmentResourceName,
extractInstanceResourceName,
} from "@/utils";
diff --git a/frontend/src/components/Database/context.ts b/frontend/src/components/Database/context.ts
index f334d164ee..9a0947be57 100644
--- a/frontend/src/components/Database/context.ts
+++ b/frontend/src/components/Database/context.ts
@@ -1,14 +1,12 @@
-import { InjectionKey, Ref, computed, inject, provide } from "vue";
+import type { InjectionKey, Ref } from "vue";
+import { computed, inject, provide } from "vue";
import { useDatabaseV1Store, useCurrentUserV1 } from "@/store";
import {
databaseNamePrefix,
instanceNamePrefix,
} from "@/store/modules/v1/common";
-import {
- ComposedDatabase,
- ProjectPermission,
- DEFAULT_PROJECT_V1_NAME,
-} from "@/types";
+import type { ComposedDatabase, ProjectPermission } from "@/types";
+import { DEFAULT_PROJECT_V1_NAME } from "@/types";
import {
hasProjectPermissionV2,
instanceV1HasAlterSchema,
diff --git a/frontend/src/components/DatabaseBackupCreateForm.vue b/frontend/src/components/DatabaseBackupCreateForm.vue
index 0916030569..68d8e52e95 100644
--- a/frontend/src/components/DatabaseBackupCreateForm.vue
+++ b/frontend/src/components/DatabaseBackupCreateForm.vue
@@ -38,8 +38,9 @@ import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";
import { isEmpty } from "lodash-es";
import slug from "slug";
-import { computed, PropType, reactive } from "vue";
-import { ComposedDatabase } from "../types";
+import type { PropType } from "vue";
+import { computed, reactive } from "vue";
+import type { ComposedDatabase } from "../types";
dayjs.extend(utc);
diff --git a/frontend/src/components/DatabaseDetail/ChangeHistoryBrief.vue b/frontend/src/components/DatabaseDetail/ChangeHistoryBrief.vue
index f4e6d33e58..58b9dcd6d7 100644
--- a/frontend/src/components/DatabaseDetail/ChangeHistoryBrief.vue
+++ b/frontend/src/components/DatabaseDetail/ChangeHistoryBrief.vue
@@ -86,11 +86,12 @@
<script lang="ts" setup>
import dayjs from "dayjs";
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
import { useUserStore } from "@/store";
-import { ComposedDatabase } from "@/types";
-import { ChangeHistory } from "@/types/proto/v1/database_service";
+import type { ComposedDatabase } from "@/types";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
import {
extractUserResourceName,
extractIssueUID,
diff --git a/frontend/src/components/DatabaseDetail/SQLEditorButtonV1.vue b/frontend/src/components/DatabaseDetail/SQLEditorButtonV1.vue
index fec41041cc..fd025e5c8f 100644
--- a/frontend/src/components/DatabaseDetail/SQLEditorButtonV1.vue
+++ b/frontend/src/components/DatabaseDetail/SQLEditorButtonV1.vue
@@ -34,13 +34,10 @@ import { useRouter } from "vue-router";
import RequestQueryPanel from "@/components/Issue/panel/RequestQueryPanel/index.vue";
import { SQL_EDITOR_DATABASE_MODULE } from "@/router/sqlEditor";
import { useCurrentUserV1, usePageMode, useSQLEditorTreeStore } from "@/store";
+import type { ComposedDatabase } from "@/types";
+import { DEFAULT_PROJECT_V1_NAME, defaultProject } from "@/types";
+import type { VueClass } from "@/utils";
import {
- ComposedDatabase,
- DEFAULT_PROJECT_V1_NAME,
- defaultProject,
-} from "@/types";
-import {
- VueClass,
hasProjectPermissionV2,
extractProjectResourceName,
extractInstanceResourceName,
diff --git a/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue b/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue
index 622f9e3f3f..04904c995a 100644
--- a/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue
+++ b/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue
@@ -83,11 +83,8 @@ import { Status } from "nice-grpc-web";
import { computed, onMounted, reactive, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import ExprEditor from "@/components/ExprEditor";
-import {
- ConditionGroupExpr,
- emptySimpleExpr,
- wrapAsGroup,
-} from "@/plugins/cel";
+import type { ConditionGroupExpr } from "@/plugins/cel";
+import { emptySimpleExpr, wrapAsGroup } from "@/plugins/cel";
import { useDBGroupStore, useSubscriptionV1Store } from "@/store";
import {
databaseGroupNamePrefix,
@@ -96,7 +93,7 @@ import {
schemaGroupNamePrefix,
} from "@/store/modules/v1/common";
import { projectNamePrefix } from "@/store/modules/v1/common";
-import {
+import type {
ComposedSchemaGroupTable,
ComposedDatabase,
ComposedDatabaseGroup,
@@ -104,14 +101,18 @@ import {
ResourceId,
ValidatedMessage,
} from "@/types";
-import { DatabaseGroup, SchemaGroup } from "@/types/proto/v1/project_service";
+import type {
+ DatabaseGroup,
+ SchemaGroup,
+} from "@/types/proto/v1/project_service";
import { convertCELStringToExpr } from "@/utils/databaseGroup/cel";
import { getErrorCode } from "@/utils/grpcweb";
import { EnvironmentSelect, ProjectSelect, ResourceIdField } from "../v2";
import DatabaseGroupSelect from "./DatabaseGroupSelect.vue";
import MatchedDatabaseView from "./MatchedDatabaseView.vue";
import MatchedTableView from "./MatchedTableView.vue";
-import { FactorList, ResourceType } from "./utils";
+import type { ResourceType } from "./utils";
+import { FactorList } from "./utils";
const props = defineProps<{
project: ComposedProject;
diff --git a/frontend/src/components/DatabaseGroup/DatabaseGroupPanel.vue b/frontend/src/components/DatabaseGroup/DatabaseGroupPanel.vue
index 2bc8b394dc..dc4648f64e 100644
--- a/frontend/src/components/DatabaseGroup/DatabaseGroupPanel.vue
+++ b/frontend/src/components/DatabaseGroup/DatabaseGroupPanel.vue
@@ -39,7 +39,7 @@
<script lang="ts" setup>
import { NButton, useDialog } from "naive-ui";
-import { ClientError } from "nice-grpc-common";
+import type { ClientError } from "nice-grpc-common";
import { computed, onMounted, ref } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
@@ -66,7 +66,10 @@ import type {
} from "@/types";
import { ParsedExpr } from "@/types/proto/google/api/expr/v1alpha1/syntax";
import { Expr } from "@/types/proto/google/type/expr";
-import { DatabaseGroup, SchemaGroup } from "@/types/proto/v1/project_service";
+import type {
+ DatabaseGroup,
+ SchemaGroup,
+} from "@/types/proto/v1/project_service";
import { batchConvertParsedExprToCELString } from "@/utils";
import { buildDatabaseGroupExpr } from "@/utils/databaseGroup/cel";
import DatabaseGroupForm from "./DatabaseGroupForm.vue";
diff --git a/frontend/src/components/DatabaseGroup/DatabaseGroupSelect.vue b/frontend/src/components/DatabaseGroup/DatabaseGroupSelect.vue
index a6863f2062..bde2c6165a 100644
--- a/frontend/src/components/DatabaseGroup/DatabaseGroupSelect.vue
+++ b/frontend/src/components/DatabaseGroup/DatabaseGroupSelect.vue
@@ -10,10 +10,10 @@
<script lang="ts" setup>
import { head } from "lodash-es";
-import { SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
import { computed, reactive, watch } from "vue";
import { useDBGroupStore } from "@/store";
-import { DatabaseGroup } from "@/types/proto/v1/project_service";
+import type { DatabaseGroup } from "@/types/proto/v1/project_service";
interface LocalState {
selectedDatabaseGroup?: string;
diff --git a/frontend/src/components/DatabaseGroup/DatabaseGroupTable.vue b/frontend/src/components/DatabaseGroup/DatabaseGroupTable.vue
index 1eedeb0c1d..570f804977 100644
--- a/frontend/src/components/DatabaseGroup/DatabaseGroupTable.vue
+++ b/frontend/src/components/DatabaseGroup/DatabaseGroupTable.vue
@@ -26,10 +26,10 @@
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
-import { BBGridColumn } from "@/bbkit";
+import type { BBGridColumn } from "@/bbkit";
import { PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL } from "@/router/dashboard/projectV1";
-import { ComposedDatabaseGroup } from "@/types";
-import { DatabaseGroup } from "@/types/proto/v1/project_service";
+import type { ComposedDatabaseGroup } from "@/types";
+import type { DatabaseGroup } from "@/types/proto/v1/project_service";
const props = defineProps<{
rowClickable?: boolean;
diff --git a/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue b/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue
index 969c3d82c5..b03470c455 100644
--- a/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue
+++ b/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue
@@ -102,7 +102,7 @@
<script lang="ts" setup>
import { NEllipsis } from "naive-ui";
import { reactive } from "vue";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { InstanceV1EngineIcon } from "../v2";
interface LocalState {
diff --git a/frontend/src/components/DatabaseGroup/MatchedTableView.vue b/frontend/src/components/DatabaseGroup/MatchedTableView.vue
index 5f78519d0f..da97f1f720 100644
--- a/frontend/src/components/DatabaseGroup/MatchedTableView.vue
+++ b/frontend/src/components/DatabaseGroup/MatchedTableView.vue
@@ -69,7 +69,7 @@
<script lang="ts" setup>
import { reactive } from "vue";
-import { ComposedSchemaGroupTable } from "@/types";
+import type { ComposedSchemaGroupTable } from "@/types";
import { DatabaseView } from "../v2";
interface LocalState {
diff --git a/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue b/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue
index cf5bab2020..5bc2af40ae 100644
--- a/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue
+++ b/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue
@@ -29,8 +29,8 @@
import { cloneDeep } from "lodash-es";
import { computed, onMounted, reactive } from "vue";
import { useDBGroupStore, hasFeature } from "@/store";
-import { ComposedProject } from "@/types";
-import { DatabaseGroup } from "@/types/proto/v1/project_service";
+import type { ComposedProject } from "@/types";
+import type { DatabaseGroup } from "@/types/proto/v1/project_service";
import DatabaseGroupPanel from "./DatabaseGroupPanel.vue";
import DatabaseGroupTable from "./DatabaseGroupTable.vue";
diff --git a/frontend/src/components/DatabaseGroup/SchemaGroupTable.vue b/frontend/src/components/DatabaseGroup/SchemaGroupTable.vue
index 6ab9694fae..df4969f061 100644
--- a/frontend/src/components/DatabaseGroup/SchemaGroupTable.vue
+++ b/frontend/src/components/DatabaseGroup/SchemaGroupTable.vue
@@ -24,11 +24,11 @@
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
-import { BBGridColumn } from "@/bbkit";
+import type { BBGridColumn } from "@/bbkit";
import { PROJECT_V1_ROUTE_DATABASE_GROUP_TABLE_GROUP_DETAIL } from "@/router/dashboard/projectV1";
import { getProjectNameAndDatabaseGroupNameAndSchemaGroupName } from "@/store/modules/v1/common";
-import { ComposedSchemaGroup } from "@/types";
-import { SchemaGroup } from "@/types/proto/v1/project_service";
+import type { ComposedSchemaGroup } from "@/types";
+import type { SchemaGroup } from "@/types/proto/v1/project_service";
defineProps<{
schemaGroupList: SchemaGroup[];
diff --git a/frontend/src/components/DatabaseGroup/utils.ts b/frontend/src/components/DatabaseGroup/utils.ts
index ca53719ed6..4197aa937b 100644
--- a/frontend/src/components/DatabaseGroup/utils.ts
+++ b/frontend/src/components/DatabaseGroup/utils.ts
@@ -1,4 +1,4 @@
-import { Factor } from "@/plugins/cel";
+import type { Factor } from "@/plugins/cel";
export type ResourceType = "DATABASE_GROUP" | "SCHEMA_GROUP";
diff --git a/frontend/src/components/DatabaseInfo.vue b/frontend/src/components/DatabaseInfo.vue
index df8714f648..b651f9bf18 100644
--- a/frontend/src/components/DatabaseInfo.vue
+++ b/frontend/src/components/DatabaseInfo.vue
@@ -52,7 +52,7 @@
<script lang="ts" setup>
import { SQLEditorButtonV1 } from "@/components/DatabaseDetail";
import { DatabaseV1Name, InstanceV1Name } from "@/components/v2";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
withDefaults(
defineProps<{
diff --git a/frontend/src/components/DebugLog/DebugLogTable.vue b/frontend/src/components/DebugLog/DebugLogTable.vue
index 2feaeca103..ae54b23d4d 100644
--- a/frontend/src/components/DebugLog/DebugLogTable.vue
+++ b/frontend/src/components/DebugLog/DebugLogTable.vue
@@ -49,9 +49,10 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { DebugLog } from "@/types/proto/v1/actuator_service";
+import type { DebugLog } from "@/types/proto/v1/actuator_service";
import EllipsisText from "../EllipsisText.vue";
defineProps({
diff --git a/frontend/src/components/DeploymentConfigTool/DeploymentConfigTool.vue b/frontend/src/components/DeploymentConfigTool/DeploymentConfigTool.vue
index 0a7eda59fd..34c8f579a7 100644
--- a/frontend/src/components/DeploymentConfigTool/DeploymentConfigTool.vue
+++ b/frontend/src/components/DeploymentConfigTool/DeploymentConfigTool.vue
@@ -19,9 +19,13 @@
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
-import { defineComponent, PropType } from "vue";
-import { ComposedDatabase } from "@/types";
-import { Schedule, ScheduleDeployment } from "@/types/proto/v1/project_service";
+import type { PropType } from "vue";
+import { defineComponent } from "vue";
+import type { ComposedDatabase } from "@/types";
+import type {
+ Schedule,
+ ScheduleDeployment,
+} from "@/types/proto/v1/project_service";
import DeploymentStage from "./DeploymentStage.vue";
export default defineComponent({
diff --git a/frontend/src/components/DeploymentConfigTool/DeploymentMatrix.vue b/frontend/src/components/DeploymentConfigTool/DeploymentMatrix.vue
index da4f089966..21ecb395a9 100644
--- a/frontend/src/components/DeploymentConfigTool/DeploymentMatrix.vue
+++ b/frontend/src/components/DeploymentConfigTool/DeploymentMatrix.vue
@@ -48,9 +48,9 @@
<script lang="ts" setup>
import { NInputGroup, NInputGroupLabel } from "naive-ui";
import { computed, reactive } from "vue";
-import { ComposedDatabase } from "@/types";
-import { Environment } from "@/types/proto/v1/environment_service";
-import { DeploymentConfig } from "@/types/proto/v1/project_service";
+import type { ComposedDatabase } from "@/types";
+import type { Environment } from "@/types/proto/v1/environment_service";
+import type { DeploymentConfig } from "@/types/proto/v1/project_service";
import { filterDatabaseV1ByKeyword } from "@/utils";
import { DeployDatabaseTable } from "../TenantDatabaseTable";
import { SearchBox } from "../v2";
diff --git a/frontend/src/components/DeploymentConfigTool/DeploymentStage.vue b/frontend/src/components/DeploymentConfigTool/DeploymentStage.vue
index f878820d8b..7ef8af265c 100644
--- a/frontend/src/components/DeploymentConfigTool/DeploymentStage.vue
+++ b/frontend/src/components/DeploymentConfigTool/DeploymentStage.vue
@@ -65,13 +65,14 @@
import { head, without } from "lodash-es";
import { XIcon } from "lucide-vue-next";
import { NButton, NInput } from "naive-ui";
-import { computed, PropType } from "vue";
-import { ComposedDatabase } from "@/types";
-import {
+import type { PropType } from "vue";
+import { computed } from "vue";
+import type { ComposedDatabase } from "@/types";
+import type {
LabelSelectorRequirement,
- OperatorType,
ScheduleDeployment,
} from "@/types/proto/v1/project_service";
+import { OperatorType } from "@/types/proto/v1/project_service";
import { getAvailableDeploymentConfigMatchSelectorKeyList } from "@/utils";
import SelectorItemV2 from "./SelectorItemV2.vue";
diff --git a/frontend/src/components/DeploymentConfigTool/ResponsiveTags.vue b/frontend/src/components/DeploymentConfigTool/ResponsiveTags.vue
index 3b977ab921..8eb3c28ab9 100644
--- a/frontend/src/components/DeploymentConfigTool/ResponsiveTags.vue
+++ b/frontend/src/components/DeploymentConfigTool/ResponsiveTags.vue
@@ -11,12 +11,12 @@
<script lang="ts">
import { useResizeObserver, useWindowSize } from "@vueuse/core";
+import type { PropType } from "vue";
import {
computed,
defineComponent,
nextTick,
onMounted,
- PropType,
ref,
watch,
} from "vue";
diff --git a/frontend/src/components/DeploymentConfigTool/SelectorItemV2.vue b/frontend/src/components/DeploymentConfigTool/SelectorItemV2.vue
index 310f3e9549..bb070aaa78 100644
--- a/frontend/src/components/DeploymentConfigTool/SelectorItemV2.vue
+++ b/frontend/src/components/DeploymentConfigTool/SelectorItemV2.vue
@@ -37,14 +37,14 @@
<script lang="ts" setup>
/* eslint-disable vue/no-mutating-props */
import { TrashIcon } from "lucide-vue-next";
-import { NInputGroup, NSelect, SelectOption, SelectProps } from "naive-ui";
-import { computed, CSSProperties, PropType, watch } from "vue";
+import type { SelectOption, SelectProps } from "naive-ui";
+import { NInputGroup, NSelect } from "naive-ui";
+import type { CSSProperties, PropType } from "vue";
+import { computed, watch } from "vue";
import { useI18n } from "vue-i18n";
-import { ComposedDatabase } from "@/types";
-import {
- LabelSelectorRequirement,
- OperatorType,
-} from "@/types/proto/v1/project_service";
+import type { ComposedDatabase } from "@/types";
+import type { LabelSelectorRequirement } from "@/types/proto/v1/project_service";
+import { OperatorType } from "@/types/proto/v1/project_service";
import {
displayDeploymentMatchSelectorKey,
getAvailableDeploymentConfigMatchSelectorKeyList,
diff --git a/frontend/src/components/Environment/ProductionEnvironmentIcon.vue b/frontend/src/components/Environment/ProductionEnvironmentIcon.vue
index f794ab4120..aa1997dc2f 100644
--- a/frontend/src/components/Environment/ProductionEnvironmentIcon.vue
+++ b/frontend/src/components/Environment/ProductionEnvironmentIcon.vue
@@ -20,9 +20,10 @@
</template>
<script lang="ts">
-import { computed, defineComponent, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed, defineComponent } from "vue";
import { featureToRef } from "@/store";
-import { Environment } from "@/types";
+import type { Environment } from "@/types";
export default defineComponent({
name: "ProductionEnvironmentIcon",
diff --git a/frontend/src/components/EnvironmentForm.vue b/frontend/src/components/EnvironmentForm.vue
index 542179dfae..7ccc36da5b 100644
--- a/frontend/src/components/EnvironmentForm.vue
+++ b/frontend/src/components/EnvironmentForm.vue
@@ -224,7 +224,8 @@ import { useEventListener } from "@vueuse/core";
import { cloneDeep, isEqual, isEmpty } from "lodash-es";
import { NButton, NCheckbox, NInput } from "naive-ui";
import { Status } from "nice-grpc-common";
-import { computed, reactive, PropType, watch, ref, onMounted } from "vue";
+import type { PropType } from "vue";
+import { computed, reactive, watch, ref, onMounted } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter, onBeforeRouteLeave } from "vue-router";
import { DrawerContent, Switch } from "@/components/v2";
@@ -251,12 +252,10 @@ import type {
WorkspacePermission,
} from "@/types";
import { State } from "@/types/proto/v1/common";
+import type { Environment } from "@/types/proto/v1/environment_service";
+import { EnvironmentTier } from "@/types/proto/v1/environment_service";
+import type { Policy } from "@/types/proto/v1/org_policy_service";
import {
- Environment,
- EnvironmentTier,
-} from "@/types/proto/v1/environment_service";
-import {
- Policy,
PolicyType,
PolicyResourceType,
} from "@/types/proto/v1/org_policy_service";
diff --git a/frontend/src/components/EnvironmentForm/RolloutPolicyConfig.vue b/frontend/src/components/EnvironmentForm/RolloutPolicyConfig.vue
index 90987ba61c..a1090ac64b 100644
--- a/frontend/src/components/EnvironmentForm/RolloutPolicyConfig.vue
+++ b/frontend/src/components/EnvironmentForm/RolloutPolicyConfig.vue
@@ -154,8 +154,9 @@ import { NCheckbox, NRadio } from "naive-ui";
import { ref, watch } from "vue";
import { computed } from "vue";
import { PresetRoleType, VirtualRoleType } from "@/types";
-import { Policy, RolloutPolicy } from "@/types/proto/v1/org_policy_service";
-import { Role } from "@/types/proto/v1/role_service";
+import type { Policy } from "@/types/proto/v1/org_policy_service";
+import { RolloutPolicy } from "@/types/proto/v1/org_policy_service";
+import type { Role } from "@/types/proto/v1/role_service";
import FeatureBadge from "../FeatureGuard/FeatureBadge.vue";
const props = defineProps<{
diff --git a/frontend/src/components/ExprEditor/components/FactorSelect.vue b/frontend/src/components/ExprEditor/components/FactorSelect.vue
index c3e20005df..7a130d174a 100644
--- a/frontend/src/components/ExprEditor/components/FactorSelect.vue
+++ b/frontend/src/components/ExprEditor/components/FactorSelect.vue
@@ -11,7 +11,7 @@
<script lang="ts" setup>
/* eslint-disable vue/no-mutating-props */
-import { SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
import { computed, watch } from "vue";
import { type ConditionExpr } from "@/plugins/cel";
import { useExprEditorContext } from "../context";
diff --git a/frontend/src/components/ExprEditor/components/OperatorSelect.vue b/frontend/src/components/ExprEditor/components/OperatorSelect.vue
index 3e7f0f6a83..88c5fb13eb 100644
--- a/frontend/src/components/ExprEditor/components/OperatorSelect.vue
+++ b/frontend/src/components/ExprEditor/components/OperatorSelect.vue
@@ -12,7 +12,7 @@
<script lang="ts" setup>
/* eslint-disable vue/no-mutating-props */
-import { SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
import { computed, watch } from "vue";
import {
type Operator,
diff --git a/frontend/src/components/ExprEditor/components/common.ts b/frontend/src/components/ExprEditor/components/common.ts
index c5e2cf7d37..c21416282e 100644
--- a/frontend/src/components/ExprEditor/components/common.ts
+++ b/frontend/src/components/ExprEditor/components/common.ts
@@ -1,6 +1,6 @@
import { type Ref, computed } from "vue";
+import type { ConditionExpr } from "@/plugins/cel";
import {
- ConditionExpr,
getOperatorListByFactor as getRawOperatorListByFactor,
type Factor,
type Operator,
diff --git a/frontend/src/components/ExternalTableDataTable.vue b/frontend/src/components/ExternalTableDataTable.vue
index 23dfd78913..fcd1f0e924 100644
--- a/frontend/src/components/ExternalTableDataTable.vue
+++ b/frontend/src/components/ExternalTableDataTable.vue
@@ -19,11 +19,13 @@
</template>
<script lang="ts" setup>
-import { DataTableColumn, NDataTable } from "naive-ui";
-import { computed, PropType, reactive } from "vue";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
+import type { PropType } from "vue";
+import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
-import { ComposedDatabase } from "@/types";
-import { ExternalTableMetadata } from "@/types/proto/v1/database_service";
+import type { ComposedDatabase } from "@/types";
+import type { ExternalTableMetadata } from "@/types/proto/v1/database_service";
type LocalState = {
selectedTableName?: string;
diff --git a/frontend/src/components/FeatureGuard/FeatureAttention.vue b/frontend/src/components/FeatureGuard/FeatureAttention.vue
index 3ac9e9c070..835f3a6738 100644
--- a/frontend/src/components/FeatureGuard/FeatureAttention.vue
+++ b/frontend/src/components/FeatureGuard/FeatureAttention.vue
@@ -20,18 +20,16 @@
</template>
<script lang="ts" setup>
-import { reactive, PropType, computed } from "vue";
+import type { PropType } from "vue";
+import { reactive, computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { useLanguage } from "@/composables/useLanguage";
import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/router/dashboard/workspaceSetting";
import { useSubscriptionV1Store, useCurrentUserV1 } from "@/store";
-import {
- FeatureType,
- planTypeToString,
- ENTERPRISE_INQUIRE_LINK,
-} from "@/types";
-import { Instance } from "@/types/proto/v1/instance_service";
+import type { FeatureType } from "@/types";
+import { planTypeToString, ENTERPRISE_INQUIRE_LINK } from "@/types";
+import type { Instance } from "@/types/proto/v1/instance_service";
import { hasWorkspacePermissionV2 } from "@/utils";
interface LocalState {
diff --git a/frontend/src/components/FeatureGuard/FeatureAttentionForInstanceLicense.vue b/frontend/src/components/FeatureGuard/FeatureAttentionForInstanceLicense.vue
index 66a4b778d2..7f6f66859b 100644
--- a/frontend/src/components/FeatureGuard/FeatureAttentionForInstanceLicense.vue
+++ b/frontend/src/components/FeatureGuard/FeatureAttentionForInstanceLicense.vue
@@ -31,7 +31,8 @@ import {
useCurrentUserV1,
useInstanceV1List,
} from "@/store";
-import { FeatureType, instanceLimitFeature } from "@/types";
+import type { FeatureType } from "@/types";
+import { instanceLimitFeature } from "@/types";
import { PlanType } from "@/types/proto/v1/subscription_service";
import { hasWorkspacePermissionV2 } from "@/utils";
diff --git a/frontend/src/components/FeatureGuard/FeatureBadge.vue b/frontend/src/components/FeatureGuard/FeatureBadge.vue
index 0c0f42c0fd..8764fa9fae 100644
--- a/frontend/src/components/FeatureGuard/FeatureBadge.vue
+++ b/frontend/src/components/FeatureGuard/FeatureBadge.vue
@@ -51,10 +51,12 @@
<script lang="ts" setup>
import { NTooltip } from "naive-ui";
-import { reactive, PropType, computed } from "vue";
+import type { PropType } from "vue";
+import { reactive, computed } from "vue";
import { useSubscriptionV1Store, useCurrentUserV1 } from "@/store";
-import { FeatureType, planTypeToString } from "@/types";
-import { Instance } from "@/types/proto/v1/instance_service";
+import type { FeatureType } from "@/types";
+import { planTypeToString } from "@/types";
+import type { Instance } from "@/types/proto/v1/instance_service";
import { hasWorkspacePermissionV2 } from "@/utils";
interface LocalState {
diff --git a/frontend/src/components/FeatureGuard/FeatureBadgeForInstanceLicense.vue b/frontend/src/components/FeatureGuard/FeatureBadgeForInstanceLicense.vue
index 53f442c5d4..121826ace4 100644
--- a/frontend/src/components/FeatureGuard/FeatureBadgeForInstanceLicense.vue
+++ b/frontend/src/components/FeatureGuard/FeatureBadgeForInstanceLicense.vue
@@ -33,10 +33,11 @@
<script lang="ts" setup>
import { NTooltip } from "naive-ui";
-import { reactive, PropType, computed } from "vue";
+import type { PropType } from "vue";
+import { reactive, computed } from "vue";
import { useSubscriptionV1Store, useCurrentUserV1 } from "@/store";
-import { FeatureType } from "@/types";
-import { Instance } from "@/types/proto/v1/instance_service";
+import type { FeatureType } from "@/types";
+import type { Instance } from "@/types/proto/v1/instance_service";
import { hasWorkspacePermissionV2 } from "@/utils";
interface LocalState {
diff --git a/frontend/src/components/FeatureGuard/FeatureModal.vue b/frontend/src/components/FeatureGuard/FeatureModal.vue
index eb43e2f91f..293cd19ccb 100644
--- a/frontend/src/components/FeatureGuard/FeatureModal.vue
+++ b/frontend/src/components/FeatureGuard/FeatureModal.vue
@@ -115,18 +115,16 @@
</template>
<script lang="ts" setup>
-import { PropType, computed, reactive } from "vue";
+import type { PropType } from "vue";
+import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { useLanguage } from "@/composables/useLanguage";
import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/router/dashboard/workspaceSetting";
import { useSubscriptionV1Store, useCurrentUserV1 } from "@/store";
-import {
- FeatureType,
- planTypeToString,
- ENTERPRISE_INQUIRE_LINK,
-} from "@/types";
-import { Instance } from "@/types/proto/v1/instance_service";
+import type { FeatureType } from "@/types";
+import { planTypeToString, ENTERPRISE_INQUIRE_LINK } from "@/types";
+import type { Instance } from "@/types/proto/v1/instance_service";
import { PlanType } from "@/types/proto/v1/subscription_service";
import { hasWorkspacePermissionV2 } from "@/utils";
diff --git a/frontend/src/components/FunctionDataTable.vue b/frontend/src/components/FunctionDataTable.vue
index 65dda7b643..fed434dab9 100644
--- a/frontend/src/components/FunctionDataTable.vue
+++ b/frontend/src/components/FunctionDataTable.vue
@@ -10,12 +10,14 @@
</template>
<script lang="ts" setup>
-import { DataTableColumn, NDataTable } from "naive-ui";
-import { computed, PropType } from "vue";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { FunctionMetadata } from "@/types/proto/v1/database_service";
+import type { FunctionMetadata } from "@/types/proto/v1/database_service";
const props = defineProps({
database: {
diff --git a/frontend/src/components/GeneralSetting/AnnouncementSetting.vue b/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
index 036af7c81d..a28050f665 100644
--- a/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
+++ b/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
@@ -121,10 +121,8 @@ import { useI18n } from "vue-i18n";
import { AnnouncementLevelSelect } from "@/components/v2";
import { pushNotification, featureToRef } from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
-import {
- Announcement,
- Announcement_AlertLevel,
-} from "@/types/proto/v1/setting_service";
+import type { Announcement } from "@/types/proto/v1/setting_service";
+import { Announcement_AlertLevel } from "@/types/proto/v1/setting_service";
interface LocalState {
announcement: Announcement;
diff --git a/frontend/src/components/GeneralSetting/SecuritySetting.vue b/frontend/src/components/GeneralSetting/SecuritySetting.vue
index 4d9af75936..531a1cc47c 100644
--- a/frontend/src/components/GeneralSetting/SecuritySetting.vue
+++ b/frontend/src/components/GeneralSetting/SecuritySetting.vue
@@ -135,7 +135,7 @@ import {
usePolicyV1Store,
} from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
-import { FeatureType } from "@/types";
+import type { FeatureType } from "@/types";
import {
PolicyResourceType,
PolicyType,
diff --git a/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue b/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue
index 37bd59b7c3..f34c93fabd 100644
--- a/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue
+++ b/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue
@@ -55,7 +55,8 @@ import { computed, reactive, watch } from "vue";
import { useI18n } from "vue-i18n";
import { featureToRef, pushNotification } from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
-import { FeatureType, defaultTokenDurationInHours } from "@/types";
+import type { FeatureType } from "@/types";
+import { defaultTokenDurationInHours } from "@/types";
import { Duration } from "@/types/proto/google/protobuf/duration";
const getInitialState = (): LocalState => {
diff --git a/frontend/src/components/Icon/EngineIcon.vue b/frontend/src/components/Icon/EngineIcon.vue
index 9a70322c54..0548076e71 100644
--- a/frontend/src/components/Icon/EngineIcon.vue
+++ b/frontend/src/components/Icon/EngineIcon.vue
@@ -5,7 +5,7 @@
<script lang="ts" setup>
import { computed } from "vue";
import { EngineIconPath } from "@/components/InstanceForm/constants";
-import { Engine } from "@/types/proto/v1/common";
+import type { Engine } from "@/types/proto/v1/common";
const props = defineProps<{
engine: Engine;
diff --git a/frontend/src/components/IdentityProviderCreateForm.vue b/frontend/src/components/IdentityProviderCreateForm.vue
index 22999a1d57..11881eeff1 100644
--- a/frontend/src/components/IdentityProviderCreateForm.vue
+++ b/frontend/src/components/IdentityProviderCreateForm.vue
@@ -808,7 +808,8 @@ import {
NTooltip,
NInputNumber,
} from "naive-ui";
-import { ClientError, Status } from "nice-grpc-common";
+import type { ClientError } from "nice-grpc-common";
+import { Status } from "nice-grpc-common";
import { computed, reactive, ref, onMounted, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
@@ -825,7 +826,11 @@ import {
getIdentityProviderResourceId,
idpNamePrefix,
} from "@/store/modules/v1/common";
-import { OAuthWindowEventPayload, ResourceId, ValidatedMessage } from "@/types";
+import type {
+ OAuthWindowEventPayload,
+ ResourceId,
+ ValidatedMessage,
+} from "@/types";
import { State } from "@/types/proto/v1/common";
import {
FieldMapping,
@@ -837,8 +842,8 @@ import {
OIDCIdentityProviderConfig,
LDAPIdentityProviderConfig,
} from "@/types/proto/v1/idp_service";
+import type { IdentityProviderTemplate } from "@/utils";
import {
- IdentityProviderTemplate,
hasWorkspacePermissionV2,
identityProviderTemplateList,
identityProviderTypeToString,
diff --git a/frontend/src/components/IdentityProviderTable.vue b/frontend/src/components/IdentityProviderTable.vue
index 538140aed5..8a475770a1 100644
--- a/frontend/src/components/IdentityProviderTable.vue
+++ b/frontend/src/components/IdentityProviderTable.vue
@@ -29,7 +29,7 @@ import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { WORKSPACE_ROUTE_SSO_DETAIL } from "@/router/dashboard/workspaceRoutes";
-import { IdentityProvider } from "@/types/proto/v1/idp_service";
+import type { IdentityProvider } from "@/types/proto/v1/idp_service";
const props = defineProps<{
identityProviderList: IdentityProvider[];
diff --git a/frontend/src/components/IndexTable.vue b/frontend/src/components/IndexTable.vue
index e406e9600b..cf562346d0 100644
--- a/frontend/src/components/IndexTable.vue
+++ b/frontend/src/components/IndexTable.vue
@@ -49,12 +49,13 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { BBTableSectionDataSource } from "@/bbkit/types";
-import { ComposedDatabase } from "@/types";
+import type { BBTableSectionDataSource } from "@/bbkit/types";
+import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { IndexMetadata } from "@/types/proto/v1/database_service";
+import type { IndexMetadata } from "@/types/proto/v1/database_service";
const props = defineProps({
database: {
diff --git a/frontend/src/components/InputWithTemplate/InputWithTemplate.vue b/frontend/src/components/InputWithTemplate/InputWithTemplate.vue
index ef8cc56f5a..d5664f03ab 100644
--- a/frontend/src/components/InputWithTemplate/InputWithTemplate.vue
+++ b/frontend/src/components/InputWithTemplate/InputWithTemplate.vue
@@ -59,17 +59,11 @@
</template>
<script lang="ts" setup>
-import {
- reactive,
- watch,
- watchEffect,
- ref,
- PropType,
- onUnmounted,
- onMounted,
-} from "vue";
+import type { PropType } from "vue";
+import { reactive, watch, watchEffect, ref, onUnmounted, onMounted } from "vue";
import AutoWidthInput from "./AutoWidthInput.vue";
-import { Template, TemplateInput, InputType } from "./types";
+import type { Template, TemplateInput } from "./types";
+import { InputType } from "./types";
import { getTemplateInputs, templateInputsToString, KEY_EVENT } from "./utils";
interface LocalState {
diff --git a/frontend/src/components/InputWithTemplate/utils.ts b/frontend/src/components/InputWithTemplate/utils.ts
index 26de315274..642022ca39 100644
--- a/frontend/src/components/InputWithTemplate/utils.ts
+++ b/frontend/src/components/InputWithTemplate/utils.ts
@@ -1,4 +1,5 @@
-import { Template, TemplateInput, InputType } from "./types";
+import type { Template, TemplateInput } from "./types";
+import { InputType } from "./types";
const TEMPLATE_BRACKET_LEFT = "{{";
const TEMPLATE_BRACKET_RIGHT = "}}";
diff --git a/frontend/src/components/Instance/InstanceArchiveRestoreButton.vue b/frontend/src/components/Instance/InstanceArchiveRestoreButton.vue
index 1e7f96f79c..ac77d50e63 100644
--- a/frontend/src/components/Instance/InstanceArchiveRestoreButton.vue
+++ b/frontend/src/components/Instance/InstanceArchiveRestoreButton.vue
@@ -59,7 +59,7 @@ import {
pushNotification,
useSubscriptionV1Store,
} from "@/store";
-import { ComposedInstance } from "@/types";
+import type { ComposedInstance } from "@/types";
import { State } from "@/types/proto/v1/common";
import { hasWorkspacePermissionV2 } from "@/utils";
diff --git a/frontend/src/components/InstanceAssignment.vue b/frontend/src/components/InstanceAssignment.vue
index 7fa984d796..db353d089b 100644
--- a/frontend/src/components/InstanceAssignment.vue
+++ b/frontend/src/components/InstanceAssignment.vue
@@ -127,7 +127,8 @@ import { NCheckbox } from "naive-ui";
import { storeToRefs } from "pinia";
import { reactive, computed, watchEffect } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGrid, BBGridColumn } from "@/bbkit";
+import type { BBGridColumn } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
import EllipsisText from "@/components/EllipsisText.vue";
import { EnvironmentV1Name, InstanceV1EngineIcon } from "@/components/v2";
import { Drawer, DrawerContent } from "@/components/v2";
@@ -139,7 +140,7 @@ import {
useDatabaseV1Store,
useCurrentUserV1,
} from "@/store";
-import { ComposedInstance } from "@/types";
+import type { ComposedInstance } from "@/types";
import {
instanceV1Name,
hostPortOfInstanceV1,
diff --git a/frontend/src/components/InstanceEngineIcon.vue b/frontend/src/components/InstanceEngineIcon.vue
index d4b6b64b95..b6ed57adf9 100644
--- a/frontend/src/components/InstanceEngineIcon.vue
+++ b/frontend/src/components/InstanceEngineIcon.vue
@@ -17,7 +17,7 @@
<script lang="ts" setup>
import { NTooltip } from "naive-ui";
import { engineFromJSON } from "@/types/proto/v1/common";
-import { Instance } from "../types";
+import type { Instance } from "../types";
defineProps<{
instance: Instance;
diff --git a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
index 0110eed4a2..992cbcaf52 100644
--- a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
+++ b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
@@ -462,10 +462,10 @@ MIIEvQ...
import { NButton, NRadioGroup, NRadio, NCheckbox, NInput } from "naive-ui";
import { watch, reactive, computed } from "vue";
import { useI18n } from "vue-i18n";
-import { DataSourceOptions } from "@/types/dataSource";
+import type { DataSourceOptions } from "@/types/dataSource";
import { Engine } from "@/types/proto/v1/common";
+import type { DataSource } from "@/types/proto/v1/instance_service";
import {
- DataSource,
DataSourceType,
DataSourceExternalSecret,
DataSourceExternalSecret_AuthType,
@@ -473,7 +473,7 @@ import {
DataSourceExternalSecret_AppRoleAuthOption_SecretType,
} from "@/types/proto/v1/instance_service";
import { onlyAllowNumber, isDev } from "@/utils";
-import { EditDataSource } from "../common";
+import type { EditDataSource } from "../common";
import { useInstanceFormContext } from "../context";
import { useInstanceSpecs } from "../specs";
import SpannerCredentialInput from "./SpannerCredentialInput.vue";
diff --git a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceTabs.vue b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceTabs.vue
index 82dec8ddfa..d787c2edc5 100644
--- a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceTabs.vue
+++ b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceTabs.vue
@@ -48,13 +48,14 @@
<script setup lang="ts">
import { pullAt } from "lodash-es";
-import { NTabs, NTab, TabsInst, NButton } from "naive-ui";
+import type { TabsInst } from "naive-ui";
+import { NTabs, NTab, NButton } from "naive-ui";
import { nextTick, ref, watch } from "vue";
import { BBButtonConfirm } from "@/bbkit";
import { useCurrentUserV1, useInstanceV1Store } from "@/store";
-import { WorkspacePermission } from "@/types";
+import type { WorkspacePermission } from "@/types";
import { hasWorkspacePermissionV2 } from "@/utils";
-import { EditDataSource } from "../common";
+import type { EditDataSource } from "../common";
import { useInstanceFormContext } from "../context";
defineEmits<{
diff --git a/frontend/src/components/InstanceForm/DataSourceSection/SshConnectionForm.vue b/frontend/src/components/InstanceForm/DataSourceSection/SshConnectionForm.vue
index a5a1e6f770..08b2c9e95a 100644
--- a/frontend/src/components/InstanceForm/DataSourceSection/SshConnectionForm.vue
+++ b/frontend/src/components/InstanceForm/DataSourceSection/SshConnectionForm.vue
@@ -91,11 +91,12 @@
<script lang="ts" setup>
import { cloneDeep } from "lodash-es";
import { NInput, NRadio } from "naive-ui";
-import { PropType, reactive, computed, watch } from "vue";
+import type { PropType } from "vue";
+import { reactive, computed, watch } from "vue";
import { useI18n } from "vue-i18n";
import DroppableTextarea from "@/components/misc/DroppableTextarea.vue";
import { useSubscriptionV1Store } from "@/store";
-import { Instance } from "@/types/proto/v1/instance_service";
+import type { Instance } from "@/types/proto/v1/instance_service";
import { onlyAllowNumber } from "@/utils";
const SshTypes = ["NONE", "TUNNEL", "TUNNEL+PK"] as const;
diff --git a/frontend/src/components/InstanceForm/DataSourceSection/SslCertificateForm.vue b/frontend/src/components/InstanceForm/DataSourceSection/SslCertificateForm.vue
index 6454008415..0d608195ac 100644
--- a/frontend/src/components/InstanceForm/DataSourceSection/SslCertificateForm.vue
+++ b/frontend/src/components/InstanceForm/DataSourceSection/SslCertificateForm.vue
@@ -65,7 +65,7 @@ import { reactive, watch } from "vue";
import { useI18n } from "vue-i18n";
import DroppableTextarea from "@/components/misc/DroppableTextarea.vue";
import { Engine } from "@/types/proto/v1/common";
-import { DataSource } from "@/types/proto/v1/instance_service";
+import type { DataSource } from "@/types/proto/v1/instance_service";
type SslType = "NONE" | "CA" | "CA+KEY+CERT";
diff --git a/frontend/src/components/InstanceForm/InstanceForm.vue b/frontend/src/components/InstanceForm/InstanceForm.vue
index b65191e055..b0f80d7412 100644
--- a/frontend/src/components/InstanceForm/InstanceForm.vue
+++ b/frontend/src/components/InstanceForm/InstanceForm.vue
@@ -334,15 +334,8 @@
import { cloneDeep, isEqual, omit } from "lodash-es";
import { NButton, NInput, NSwitch } from "naive-ui";
import { Status } from "nice-grpc-common";
-import {
- computed,
- reactive,
- PropType,
- ref,
- watch,
- onMounted,
- toRef,
-} from "vue";
+import type { PropType } from "vue";
+import { computed, reactive, ref, watch, onMounted, toRef } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { InstanceArchiveRestoreButton } from "@/components/Instance";
@@ -365,19 +358,13 @@ import {
useCurrentUserV1,
} from "@/store";
import { instanceNamePrefix } from "@/store/modules/v1/common";
-import {
- UNKNOWN_ID,
- ResourceId,
- ValidatedMessage,
- unknownEnvironment,
- ComposedInstance,
-} from "@/types";
-import { Duration } from "@/types/proto/google/protobuf/duration";
+import type { ResourceId, ValidatedMessage, ComposedInstance } from "@/types";
+import { UNKNOWN_ID, unknownEnvironment } from "@/types";
+import type { Duration } from "@/types/proto/google/protobuf/duration";
import { Engine } from "@/types/proto/v1/common";
+import type { DataSource, Instance } from "@/types/proto/v1/instance_service";
import {
- DataSource,
DataSourceType,
- Instance,
InstanceOptions,
} from "@/types/proto/v1/instance_service";
import { PlanType } from "@/types/proto/v1/subscription_service";
@@ -394,11 +381,8 @@ import DataSourceSection from "./DataSourceSection/DataSourceSection.vue";
import OracleSyncModeInput from "./OracleSyncModeInput.vue";
import ScanIntervalInput from "./ScanIntervalInput.vue";
import SpannerHostInput from "./SpannerHostInput.vue";
-import {
- EditDataSource,
- extractBasicInfo,
- extractDataSourceEditState,
-} from "./common";
+import type { EditDataSource } from "./common";
+import { extractBasicInfo, extractDataSourceEditState } from "./common";
import {
MongoDBConnectionStringSchemaList,
SnowflakeExtraLinkPlaceHolder,
diff --git a/frontend/src/components/InstanceForm/common.ts b/frontend/src/components/InstanceForm/common.ts
index c18411df8e..82647c6d91 100644
--- a/frontend/src/components/InstanceForm/common.ts
+++ b/frontend/src/components/InstanceForm/common.ts
@@ -8,10 +8,9 @@ import {
UNKNOWN_INSTANCE_NAME,
} from "@/types";
import { Engine, State } from "@/types/proto/v1/common";
+import type { DataSource, Instance } from "@/types/proto/v1/instance_service";
import {
- DataSource,
DataSourceType,
- Instance,
InstanceOptions,
} from "@/types/proto/v1/instance_service";
import { PlanType } from "@/types/proto/v1/subscription_service";
diff --git a/frontend/src/components/InstanceForm/context.ts b/frontend/src/components/InstanceForm/context.ts
index eb819e6dda..02082b8493 100644
--- a/frontend/src/components/InstanceForm/context.ts
+++ b/frontend/src/components/InstanceForm/context.ts
@@ -1,3 +1,4 @@
+import type { ComputedRef } from "vue";
import {
type InjectionKey,
type Ref,
@@ -5,19 +6,14 @@ import {
inject,
computed,
ref,
- ComputedRef,
} from "vue";
import { useCurrentUserV1, useSubscriptionV1Store } from "@/store";
import { State } from "@/types/proto/v1/common";
-import { DataSourceType, Instance } from "@/types/proto/v1/instance_service";
+import type { Instance } from "@/types/proto/v1/instance_service";
+import { DataSourceType } from "@/types/proto/v1/instance_service";
import { hasWorkspacePermissionV2 } from "@/utils";
-import {
- BasicInfo,
- DataSourceEditState,
- EditDataSource,
- extractBasicInfo,
- extractDataSourceEditState,
-} from "./common";
+import type { BasicInfo, DataSourceEditState, EditDataSource } from "./common";
+import { extractBasicInfo, extractDataSourceEditState } from "./common";
export type InstanceFormContext = {
instance: Ref<Instance | undefined>;
diff --git a/frontend/src/components/InstanceForm/specs.ts b/frontend/src/components/InstanceForm/specs.ts
index 8d2bf47b4d..e5ae956722 100644
--- a/frontend/src/components/InstanceForm/specs.ts
+++ b/frontend/src/components/InstanceForm/specs.ts
@@ -3,7 +3,8 @@ import { Engine } from "@/types/proto/v1/common";
import { DataSourceType } from "@/types/proto/v1/instance_service";
import { instanceV1HasSSH, instanceV1HasSSL } from "@/utils";
import { defaultPortForEngine } from "./constants";
-import { InstanceFormContext, useInstanceFormContext } from "./context";
+import type { InstanceFormContext } from "./context";
+import { useInstanceFormContext } from "./context";
export const useInstanceSpecs = (
context: InstanceFormContext | undefined = undefined
diff --git a/frontend/src/components/InstanceRoleSelect.vue b/frontend/src/components/InstanceRoleSelect.vue
index b4e5b44cf1..88b8d8cca6 100644
--- a/frontend/src/components/InstanceRoleSelect.vue
+++ b/frontend/src/components/InstanceRoleSelect.vue
@@ -13,11 +13,12 @@
</template>
<script lang="ts" setup>
-import { SelectOption } from "naive-ui";
-import { PropType, computed, ref, watch } from "vue";
+import type { SelectOption } from "naive-ui";
+import type { PropType } from "vue";
+import { computed, ref, watch } from "vue";
import { useInstanceV1Store } from "@/store";
import { UNKNOWN_ID } from "@/types";
-import { InstanceRole } from "@/types/proto/v1/instance_role_service";
+import type { InstanceRole } from "@/types/proto/v1/instance_role_service";
interface InstanceRoleSelectOption extends SelectOption {
value: string;
diff --git a/frontend/src/components/InstanceUserTable.vue b/frontend/src/components/InstanceUserTable.vue
index 0dcd6f62c5..10dc663683 100644
--- a/frontend/src/components/InstanceUserTable.vue
+++ b/frontend/src/components/InstanceUserTable.vue
@@ -19,9 +19,10 @@
</template>
<script lang="ts">
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { InstanceUser } from "../types/InstanceUser";
+import type { InstanceUser } from "../types/InstanceUser";
export default {
name: "InstanceUserTable",
diff --git a/frontend/src/components/Issue/activity/ActionCreator.vue b/frontend/src/components/Issue/activity/ActionCreator.vue
index e7d4d52b71..407ba3f797 100644
--- a/frontend/src/components/Issue/activity/ActionCreator.vue
+++ b/frontend/src/components/Issue/activity/ActionCreator.vue
@@ -18,7 +18,7 @@
import { computed } from "vue";
import { useUserStore } from "@/store";
import { SYSTEM_BOT_EMAIL } from "@/types";
-import { LogEntity } from "@/types/proto/v1/logging_service";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
import { extractUserResourceName } from "@/utils";
const props = defineProps<{
diff --git a/frontend/src/components/Issue/activity/ActionIcon.vue b/frontend/src/components/Issue/activity/ActionIcon.vue
index d3a204e25f..a7b3575d90 100644
--- a/frontend/src/components/Issue/activity/ActionIcon.vue
+++ b/frontend/src/components/Issue/activity/ActionIcon.vue
@@ -107,13 +107,14 @@ import { computed } from "vue";
import { SkipIcon } from "@/components/Icon";
import PrincipalAvatar from "@/components/PrincipalAvatar.vue";
import { useUserStore } from "@/store";
-import {
+import type {
ActivityIssueCommentCreatePayload,
ActivityStageStatusUpdatePayload,
ActivityTaskStatusUpdatePayload,
- SYSTEM_BOT_EMAIL,
} from "@/types";
-import { LogEntity, LogEntity_Action } from "@/types/proto/v1/logging_service";
+import { SYSTEM_BOT_EMAIL } from "@/types";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
+import { LogEntity_Action } from "@/types/proto/v1/logging_service";
import { extractUserResourceName } from "@/utils";
type ActionIconType =
diff --git a/frontend/src/components/Issue/activity/ActionSentence.vue b/frontend/src/components/Issue/activity/ActionSentence.vue
index 1df517b2e6..d446391d2a 100644
--- a/frontend/src/components/Issue/activity/ActionSentence.vue
+++ b/frontend/src/components/Issue/activity/ActionSentence.vue
@@ -4,11 +4,12 @@
<script lang="ts" setup>
import dayjs from "dayjs";
-import { defineComponent, h, PropType, watch } from "vue";
+import type { PropType } from "vue";
+import { defineComponent, h, watch } from "vue";
import { Translation, useI18n } from "vue-i18n";
import TextOverflowPopover from "@/components/misc/TextOverflowPopover.vue";
import { useSheetV1Store, useSheetStatementByUID } from "@/store";
-import {
+import type {
ActivityIssueCommentCreatePayload,
ActivityStageStatusUpdatePayload,
ActivityTaskEarliestAllowedTimeUpdatePayload,
@@ -16,11 +17,10 @@ import {
ActivityTaskStatementUpdatePayload,
ActivityTaskStatusUpdatePayload,
Issue,
- SYSTEM_BOT_EMAIL,
- UNKNOWN_ID,
- empty,
} from "@/types";
-import { LogEntity, LogEntity_Action } from "@/types/proto/v1/logging_service";
+import { SYSTEM_BOT_EMAIL, UNKNOWN_ID, empty } from "@/types";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
+import { LogEntity_Action } from "@/types/proto/v1/logging_service";
import {
findStageById,
findTaskById,
diff --git a/frontend/src/components/Issue/activity/ActivityAction.vue b/frontend/src/components/Issue/activity/ActivityAction.vue
index 79a8df7509..c7ca92f5fa 100644
--- a/frontend/src/components/Issue/activity/ActivityAction.vue
+++ b/frontend/src/components/Issue/activity/ActivityAction.vue
@@ -66,12 +66,10 @@
</template>
<script lang="ts" setup>
-import {
- Issue,
- ActivityTaskFileCommitPayload,
- SYSTEM_BOT_EMAIL,
-} from "@/types";
-import { LogEntity, LogEntity_Action } from "@/types/proto/v1/logging_service";
+import type { Issue, ActivityTaskFileCommitPayload } from "@/types";
+import { SYSTEM_BOT_EMAIL } from "@/types";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
+import { LogEntity_Action } from "@/types/proto/v1/logging_service";
import { extractUserResourceName } from "@/utils";
import ActionCreator from "./ActionCreator.vue";
import ActionSentence from "./ActionSentence.vue";
diff --git a/frontend/src/components/Issue/activity/ActivityItem.vue b/frontend/src/components/Issue/activity/ActivityItem.vue
index 7a2c881191..a6527dee92 100644
--- a/frontend/src/components/Issue/activity/ActivityItem.vue
+++ b/frontend/src/components/Issue/activity/ActivityItem.vue
@@ -29,11 +29,11 @@
</template>
<script lang="ts" setup>
-import { Issue } from "@/types";
-import { LogEntity } from "@/types/proto/v1/logging_service";
+import type { Issue } from "@/types";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
import ActionIcon from "./ActionIcon.vue";
import ActivityAction from "./ActivityAction.vue";
-import { DistinctActivity } from "./common";
+import type { DistinctActivity } from "./common";
defineProps<{
issue: Issue;
diff --git a/frontend/src/components/Issue/activity/StageName.vue b/frontend/src/components/Issue/activity/StageName.vue
index 6e5fb165ab..9c5bb89444 100644
--- a/frontend/src/components/Issue/activity/StageName.vue
+++ b/frontend/src/components/Issue/activity/StageName.vue
@@ -5,7 +5,7 @@
</template>
<script lang="ts" setup>
-import { Issue, Stage } from "@/types";
+import type { Issue, Stage } from "@/types";
defineProps<{
issue: Issue;
diff --git a/frontend/src/components/Issue/activity/TaskName.vue b/frontend/src/components/Issue/activity/TaskName.vue
index f8b16a8dcd..abc2fd3e55 100644
--- a/frontend/src/components/Issue/activity/TaskName.vue
+++ b/frontend/src/components/Issue/activity/TaskName.vue
@@ -20,7 +20,7 @@
<script lang="ts" setup>
import scrollIntoView from "scroll-into-view-if-needed";
import { computed } from "vue";
-import { Issue, Task } from "@/types";
+import type { Issue, Task } from "@/types";
const props = defineProps<{
issue: Issue;
diff --git a/frontend/src/components/Issue/activity/common.ts b/frontend/src/components/Issue/activity/common.ts
index 37177fbe05..31f508cf16 100644
--- a/frontend/src/components/Issue/activity/common.ts
+++ b/frontend/src/components/Issue/activity/common.ts
@@ -1,4 +1,4 @@
-import { LogEntity } from "@/types/proto/v1/logging_service";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
export type DistinctActivity = {
activity: LogEntity;
diff --git a/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/DatabaseResourceSelector.vue b/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/DatabaseResourceSelector.vue
index afc9f729d2..9cebc3ad16 100644
--- a/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/DatabaseResourceSelector.vue
+++ b/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/DatabaseResourceSelector.vue
@@ -22,25 +22,18 @@
<script setup lang="ts">
import { orderBy } from "lodash-es";
-import {
- NTransfer,
- TransferRenderSourceList,
- NTree,
- TreeOption,
-} from "naive-ui";
+import type { TransferRenderSourceList, TreeOption } from "naive-ui";
+import { NTransfer, NTree } from "naive-ui";
import { computed, h, ref, watch } from "vue";
import {
useDatabaseV1Store,
useDBSchemaV1Store,
useProjectV1Store,
} from "@/store";
-import { DatabaseResource } from "@/types";
+import type { DatabaseResource } from "@/types";
import Label from "./Label.vue";
-import {
- flattenTreeOptions,
- mapTreeOptions,
- DatabaseTreeOption,
-} from "./common";
+import type { DatabaseTreeOption } from "./common";
+import { flattenTreeOptions, mapTreeOptions } from "./common";
const props = defineProps<{
projectId: string;
diff --git a/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/Label.vue b/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/Label.vue
index d74e7190ed..97e7a5e7eb 100644
--- a/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/Label.vue
+++ b/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/Label.vue
@@ -25,7 +25,7 @@ import SchemaIcon from "~icons/heroicons-outline/view-columns";
import { EnvironmentV1Name, InstanceV1Name } from "@/components/v2";
import { useDatabaseV1Store } from "@/store";
import { getHighlightHTMLByRegExp } from "@/utils";
-import { DatabaseTreeOption } from "./common";
+import type { DatabaseTreeOption } from "./common";
const props = defineProps<{
option: DatabaseTreeOption;
diff --git a/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/common.ts b/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/common.ts
index 9c5db39c67..cad36f0bd0 100644
--- a/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/common.ts
+++ b/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/common.ts
@@ -1,7 +1,7 @@
import { flatten } from "lodash-es";
-import { TransferOption, TreeOption } from "naive-ui";
+import type { TransferOption, TreeOption } from "naive-ui";
import { useDBSchemaV1Store } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { hasSchemaProperty } from "@/utils";
export interface DatabaseTreeOption<L = "database" | "schema" | "table">
diff --git a/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/index.vue b/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/index.vue
index a0d09d233f..a967a53061 100644
--- a/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/index.vue
+++ b/frontend/src/components/Issue/panel/RequestExportPanel/ExportResourceForm/index.vue
@@ -51,12 +51,8 @@ import { NRadioGroup, NRadio, NTooltip } from "naive-ui";
import { computed, onMounted, reactive, watch } from "vue";
import { MonacoEditor } from "@/components/MonacoEditor";
import { useDatabaseV1Store, useProjectV1Store } from "@/store";
-import {
- DatabaseResource,
- SQLDialect,
- UNKNOWN_ID,
- dialectOfEngineV1,
-} from "@/types";
+import type { DatabaseResource, SQLDialect } from "@/types";
+import { UNKNOWN_ID, dialectOfEngineV1 } from "@/types";
import { Engine } from "@/types/proto/v1/common";
import { stringifyDatabaseResources } from "@/utils/issue/cel";
import DatabaseResourceSelector from "./DatabaseResourceSelector.vue";
diff --git a/frontend/src/components/Issue/panel/RequestExportPanel/index.vue b/frontend/src/components/Issue/panel/RequestExportPanel/index.vue
index a8d8f3a2d7..8714c81423 100644
--- a/frontend/src/components/Issue/panel/RequestExportPanel/index.vue
+++ b/frontend/src/components/Issue/panel/RequestExportPanel/index.vue
@@ -152,14 +152,12 @@ import {
useProjectV1Store,
pushNotification,
} from "@/store";
+import type { DatabaseResource, SQLDialect, ComposedProject } from "@/types";
import {
- DatabaseResource,
- SQLDialect,
SYSTEM_BOT_EMAIL,
UNKNOWN_ID,
dialectOfEngineV1,
PresetRoleType,
- ComposedProject,
} from "@/types";
import { Duration } from "@/types/proto/google/protobuf/duration";
import { Expr } from "@/types/proto/google/type/expr";
diff --git a/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/DatabaseResourceSelector.vue b/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/DatabaseResourceSelector.vue
index 20246647bd..81c3a07173 100644
--- a/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/DatabaseResourceSelector.vue
+++ b/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/DatabaseResourceSelector.vue
@@ -22,25 +22,18 @@
<script setup lang="ts">
import { orderBy } from "lodash-es";
-import {
- NTransfer,
- TransferRenderSourceList,
- NTree,
- TreeOption,
-} from "naive-ui";
+import type { TransferRenderSourceList, TreeOption } from "naive-ui";
+import { NTransfer, NTree } from "naive-ui";
import { computed, h, ref, watch } from "vue";
import {
useDatabaseV1Store,
useDBSchemaV1Store,
useProjectV1Store,
} from "@/store";
-import { DatabaseResource } from "@/types";
+import type { DatabaseResource } from "@/types";
import Label from "./Label.vue";
-import {
- flattenTreeOptions,
- mapTreeOptions,
- DatabaseTreeOption,
-} from "./common";
+import type { DatabaseTreeOption } from "./common";
+import { flattenTreeOptions, mapTreeOptions } from "./common";
const props = defineProps<{
projectId: string;
diff --git a/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/Label.vue b/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/Label.vue
index d74e7190ed..97e7a5e7eb 100644
--- a/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/Label.vue
+++ b/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/Label.vue
@@ -25,7 +25,7 @@ import SchemaIcon from "~icons/heroicons-outline/view-columns";
import { EnvironmentV1Name, InstanceV1Name } from "@/components/v2";
import { useDatabaseV1Store } from "@/store";
import { getHighlightHTMLByRegExp } from "@/utils";
-import { DatabaseTreeOption } from "./common";
+import type { DatabaseTreeOption } from "./common";
const props = defineProps<{
option: DatabaseTreeOption;
diff --git a/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/common.ts b/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/common.ts
index 542bea8761..03b4b15740 100644
--- a/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/common.ts
+++ b/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/common.ts
@@ -1,7 +1,7 @@
import { flatten } from "lodash-es";
-import { TransferOption, TreeOption } from "naive-ui";
+import type { TransferOption, TreeOption } from "naive-ui";
import { useDBSchemaV1Store } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { hasSchemaProperty } from "@/utils";
export interface DatabaseTreeOption<L = "database" | "schema" | "table">
diff --git a/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/index.vue b/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/index.vue
index f6c111fbaf..dba38b8300 100644
--- a/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/index.vue
+++ b/frontend/src/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/index.vue
@@ -38,7 +38,7 @@
import { NRadioGroup, NRadio, NTooltip } from "naive-ui";
import { computed, onMounted, reactive, watch } from "vue";
import { useProjectV1Store } from "@/store";
-import { DatabaseResource } from "@/types";
+import type { DatabaseResource } from "@/types";
import { stringifyDatabaseResources } from "@/utils/issue/cel";
import DatabaseResourceSelector from "./DatabaseResourceSelector.vue";
diff --git a/frontend/src/components/Issue/panel/RequestQueryPanel/index.vue b/frontend/src/components/Issue/panel/RequestQueryPanel/index.vue
index ac750aede6..2e73a8a3ce 100644
--- a/frontend/src/components/Issue/panel/RequestQueryPanel/index.vue
+++ b/frontend/src/components/Issue/panel/RequestQueryPanel/index.vue
@@ -95,13 +95,8 @@ import {
useDatabaseV1Store,
useProjectV1Store,
} from "@/store";
-import {
- ComposedDatabase,
- DatabaseResource,
- SYSTEM_BOT_EMAIL,
- UNKNOWN_ID,
- PresetRoleType,
-} from "@/types";
+import type { ComposedDatabase, DatabaseResource } from "@/types";
+import { SYSTEM_BOT_EMAIL, UNKNOWN_ID, PresetRoleType } from "@/types";
import { Duration } from "@/types/proto/google/protobuf/duration";
import { Expr } from "@/types/proto/google/type/expr";
import { Issue, Issue_Type } from "@/types/proto/v1/issue_service";
diff --git a/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue b/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue
index ce8512061e..775f71f325 100644
--- a/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue
+++ b/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue
@@ -78,9 +78,8 @@ import {
GrantRequestExporterForm,
GrantRequestQuerierForm,
} from "./components";
+import type { IssueReviewAction, IssueStatusAction } from "./logic";
import {
- IssueReviewAction,
- IssueStatusAction,
provideIssueSidebarContext,
useIssueContext,
usePollIssue,
diff --git a/frontend/src/components/IssueV1/IssueDetailPage.vue b/frontend/src/components/IssueV1/IssueDetailPage.vue
index ff2a616351..1c0ab7b981 100644
--- a/frontend/src/components/IssueV1/IssueDetailPage.vue
+++ b/frontend/src/components/IssueV1/IssueDetailPage.vue
@@ -75,7 +75,7 @@
<script setup lang="ts">
import { ref } from "vue";
-import { Task } from "@/types/proto/v1/rollout_service";
+import type { Task } from "@/types/proto/v1/rollout_service";
import { provideSQLCheckContext } from "../SQLCheck";
import { Drawer } from "../v2";
import {
@@ -93,10 +93,12 @@ import {
IssueStatusActionPanel,
TaskRolloutActionPanel,
} from "./components";
-import {
+import type {
IssueReviewAction,
IssueStatusAction,
TaskRolloutAction,
+} from "./logic";
+import {
provideIssueSidebarContext,
useIssueContext,
usePollIssue,
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionCreator.vue b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionCreator.vue
index 063bfa3b6e..9019795fbb 100644
--- a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionCreator.vue
+++ b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionCreator.vue
@@ -21,7 +21,7 @@ import { computed } from "vue";
import SystemBotTag from "@/components/misc/SystemBotTag.vue";
import { usePageMode, useUserStore } from "@/store";
import { SYSTEM_BOT_EMAIL } from "@/types";
-import { LogEntity } from "@/types/proto/v1/logging_service";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
import { extractUserResourceName } from "@/utils";
const props = defineProps<{
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionIcon.vue b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionIcon.vue
index e9ca93a793..ea34152f06 100644
--- a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionIcon.vue
+++ b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionIcon.vue
@@ -103,14 +103,15 @@ import { computed } from "vue";
import { SkipIcon } from "@/components/Icon";
import PrincipalAvatar from "@/components/PrincipalAvatar.vue";
import { useUserStore } from "@/store";
-import {
+import type {
ActivityIssueCommentCreatePayload,
ActivityPipelineTaskRunStatusUpdatePayload,
ActivityStageStatusUpdatePayload,
ActivityTaskStatusUpdatePayload,
- SYSTEM_BOT_EMAIL,
} from "@/types";
-import { LogEntity, LogEntity_Action } from "@/types/proto/v1/logging_service";
+import { SYSTEM_BOT_EMAIL } from "@/types";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
+import { LogEntity_Action } from "@/types/proto/v1/logging_service";
import { extractUserResourceName } from "@/utils";
type ActionIconType =
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionSentence.vue b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionSentence.vue
index d4311667e9..2e6e657786 100644
--- a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionSentence.vue
+++ b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionSentence.vue
@@ -6,7 +6,7 @@
import dayjs from "dayjs";
import { defineComponent, h } from "vue";
import { Translation, useI18n } from "vue-i18n";
-import {
+import type {
ActivityIssueCommentCreatePayload,
ActivityPipelineTaskRunStatusUpdatePayload,
ActivityStageStatusUpdatePayload,
@@ -16,10 +16,10 @@ import {
ActivityTaskStatusUpdatePayload,
ActivityTaskPriorBackup,
ComposedIssue,
- SYSTEM_BOT_EMAIL,
- UNKNOWN_ID,
} from "@/types";
-import { LogEntity, LogEntity_Action } from "@/types/proto/v1/logging_service";
+import { SYSTEM_BOT_EMAIL, UNKNOWN_ID } from "@/types";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
+import { LogEntity_Action } from "@/types/proto/v1/logging_service";
import {
findStageByUID,
findTaskByUID,
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActivityAction.vue b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActivityAction.vue
index 7c19fdf945..2040994086 100644
--- a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActivityAction.vue
+++ b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActivityAction.vue
@@ -66,12 +66,10 @@
</template>
<script lang="ts" setup>
-import {
- ComposedIssue,
- ActivityTaskFileCommitPayload,
- SYSTEM_BOT_EMAIL,
-} from "@/types";
-import { LogEntity, LogEntity_Action } from "@/types/proto/v1/logging_service";
+import type { ComposedIssue, ActivityTaskFileCommitPayload } from "@/types";
+import { SYSTEM_BOT_EMAIL } from "@/types";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
+import { LogEntity_Action } from "@/types/proto/v1/logging_service";
import { extractUserResourceName } from "@/utils";
import ActionCreator from "./ActionCreator.vue";
import ActionSentence from "./ActionSentence.vue";
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActivityItem.vue b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActivityItem.vue
index 64edf8a063..43ac8cde9e 100644
--- a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActivityItem.vue
+++ b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActivityItem.vue
@@ -32,11 +32,11 @@
</template>
<script lang="ts" setup>
-import { ComposedIssue } from "@/types";
+import type { ComposedIssue } from "@/types";
import { LogEntity } from "@/types/proto/v1/logging_service";
import ActionIcon from "./ActionIcon.vue";
import ActivityAction from "./ActivityAction.vue";
-import { DistinctActivity } from "./common";
+import type { DistinctActivity } from "./common";
defineProps<{
issue: ComposedIssue;
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Activity/StageName.vue b/frontend/src/components/IssueV1/components/ActivitySection/Activity/StageName.vue
index ba2b08b530..622e8f05fa 100644
--- a/frontend/src/components/IssueV1/components/ActivitySection/Activity/StageName.vue
+++ b/frontend/src/components/IssueV1/components/ActivitySection/Activity/StageName.vue
@@ -5,8 +5,8 @@
</template>
<script lang="ts" setup>
-import { ComposedIssue } from "@/types";
-import { Stage } from "@/types/proto/v1/rollout_service";
+import type { ComposedIssue } from "@/types";
+import type { Stage } from "@/types/proto/v1/rollout_service";
defineProps<{
issue: ComposedIssue;
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Activity/TaskName.vue b/frontend/src/components/IssueV1/components/ActivitySection/Activity/TaskName.vue
index 17179d0099..1cfe461753 100644
--- a/frontend/src/components/IssueV1/components/ActivitySection/Activity/TaskName.vue
+++ b/frontend/src/components/IssueV1/components/ActivitySection/Activity/TaskName.vue
@@ -22,8 +22,8 @@ import scrollIntoView from "scroll-into-view-if-needed";
import { computed } from "vue";
import { stageForTask } from "@/components/IssueV1/logic";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
-import { ComposedIssue } from "@/types";
-import { Task } from "@/types/proto/v1/rollout_service";
+import type { ComposedIssue } from "@/types";
+import type { Task } from "@/types/proto/v1/rollout_service";
import {
extractProjectResourceName,
extractSchemaVersionFromTask,
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Activity/common.ts b/frontend/src/components/IssueV1/components/ActivitySection/Activity/common.ts
index 04253a4a6f..62fd233ea8 100644
--- a/frontend/src/components/IssueV1/components/ActivitySection/Activity/common.ts
+++ b/frontend/src/components/IssueV1/components/ActivitySection/Activity/common.ts
@@ -3,7 +3,8 @@ import type {
ActivityTaskStatementUpdatePayload,
ActivityTaskStatusUpdatePayload,
} from "@/types";
-import { LogEntity, LogEntity_Action } from "@/types/proto/v1/logging_service";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
+import { LogEntity_Action } from "@/types/proto/v1/logging_service";
export type DistinctActivity = {
activity: LogEntity;
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/ActivityList.vue b/frontend/src/components/IssueV1/components/ActivitySection/ActivityList.vue
index a15244be7c..7b4de605e3 100644
--- a/frontend/src/components/IssueV1/components/ActivitySection/ActivityList.vue
+++ b/frontend/src/components/IssueV1/components/ActivitySection/ActivityList.vue
@@ -113,14 +113,15 @@ import MarkdownEditor from "@/components/MarkdownEditor";
import { IssueBuiltinFieldId } from "@/plugins";
import { useActivityV1Store, useCurrentUserV1, useIssueV1Store } from "@/store";
import { getLogId } from "@/store/modules/v1/common";
-import { ActivityIssueFieldUpdatePayload, UNKNOWN_PROJECT_NAME } from "@/types";
-import type { ComposedIssue } from "@/types";
-import { LogEntity, LogEntity_Action } from "@/types/proto/v1/logging_service";
+import { UNKNOWN_PROJECT_NAME } from "@/types";
+import type { ComposedIssue, ActivityIssueFieldUpdatePayload } from "@/types";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
+import { LogEntity_Action } from "@/types/proto/v1/logging_service";
import { extractUserResourceName, hasProjectPermissionV2 } from "@/utils";
import { doSubscribeIssue, useIssueContext } from "../../logic";
+import type { DistinctActivity } from "./Activity";
import {
ActivityItem,
- DistinctActivity,
isSimilarActivity,
isUserEditableActivity,
} from "./Activity";
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Subscribers/SubscriberList.vue b/frontend/src/components/IssueV1/components/ActivitySection/Subscribers/SubscriberList.vue
index 26f71602e0..a40448aa5c 100644
--- a/frontend/src/components/IssueV1/components/ActivitySection/Subscribers/SubscriberList.vue
+++ b/frontend/src/components/IssueV1/components/ActivitySection/Subscribers/SubscriberList.vue
@@ -40,19 +40,15 @@
</template>
<script setup lang="ts">
-import {
- NButton,
- NPopselect,
- NInput,
- SelectOption,
- SelectGroupOption,
-} from "naive-ui";
+import type { SelectOption, SelectGroupOption } from "naive-ui";
+import { NButton, NPopselect, NInput } from "naive-ui";
import { computed, h, nextTick, ref } from "vue";
import { updateIssueSubscribers, useIssueContext } from "@/components/IssueV1";
import UserAvatar from "@/components/User/UserAvatar.vue";
import { useUserStore } from "@/store";
import { unknownUser } from "@/types";
-import { User, UserType } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
+import { UserType } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
import { extractUserResourceName } from "@/utils";
import SubscriberListItem from "./SubscriberListItem.vue";
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Subscribers/SubscriberListItem.vue b/frontend/src/components/IssueV1/components/ActivitySection/Subscribers/SubscriberListItem.vue
index c2cab18d89..9ad0ddf955 100644
--- a/frontend/src/components/IssueV1/components/ActivitySection/Subscribers/SubscriberListItem.vue
+++ b/frontend/src/components/IssueV1/components/ActivitySection/Subscribers/SubscriberListItem.vue
@@ -10,7 +10,7 @@
<script setup lang="ts">
import UserAvatar from "@/components/User/UserAvatar.vue";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
defineProps<{
user: User;
diff --git a/frontend/src/components/IssueV1/components/BatchIssueActionsV1.vue b/frontend/src/components/IssueV1/components/BatchIssueActionsV1.vue
index 6c74a1cfc0..4dbba1f8d2 100644
--- a/frontend/src/components/IssueV1/components/BatchIssueActionsV1.vue
+++ b/frontend/src/components/IssueV1/components/BatchIssueActionsV1.vue
@@ -65,14 +65,15 @@
</template>
<script lang="ts" setup>
-import { computed, PropType, reactive, ref } from "vue";
+import type { PropType } from "vue";
+import { computed, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
import { TooltipButton } from "@/components/v2";
import { refreshIssueList } from "@/store";
import type { ComposedIssue } from "@/types";
+import type { IssueStatusAction } from "../logic";
import {
getApplicableIssueStatusActionList,
- IssueStatusAction,
issueStatusActionDisplayName,
} from "../logic";
import { BatchIssueStatusActionPanel } from "./Panel";
diff --git a/frontend/src/components/IssueV1/components/CurrentApproverV1.vue b/frontend/src/components/IssueV1/components/CurrentApproverV1.vue
index 9d4c9af650..4c426785e6 100644
--- a/frontend/src/components/IssueV1/components/CurrentApproverV1.vue
+++ b/frontend/src/components/IssueV1/components/CurrentApproverV1.vue
@@ -43,7 +43,7 @@ import {
useWrappedReviewStepsV1,
} from "@/components/IssueV1";
import { useCurrentUserV1 } from "@/store";
-import { ComposedIssue } from "@/types";
+import type { ComposedIssue } from "@/types";
import { IssueStatus } from "@/types/proto/v1/issue_service";
const props = defineProps<{
diff --git a/frontend/src/components/IssueV1/components/GrantRequest/DatabaseResourceTable.vue b/frontend/src/components/IssueV1/components/GrantRequest/DatabaseResourceTable.vue
index ebd71a1ea5..a1c49aa866 100644
--- a/frontend/src/components/IssueV1/components/GrantRequest/DatabaseResourceTable.vue
+++ b/frontend/src/components/IssueV1/components/GrantRequest/DatabaseResourceTable.vue
@@ -33,11 +33,11 @@
import { computed } from "vue";
import { watch } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGridColumn } from "@/bbkit";
+import type { BBGridColumn } from "@/bbkit";
import { EnvironmentV1Name, InstanceV1Name } from "@/components/v2";
import { useDatabaseV1Store } from "@/store";
-import { DatabaseResource } from "@/types";
-import { DatabaseGroup } from "@/types/proto/v1/project_service";
+import type { DatabaseResource } from "@/types";
+import type { DatabaseGroup } from "@/types/proto/v1/project_service";
const props = defineProps<{
databaseResourceList: DatabaseResource[];
diff --git a/frontend/src/components/IssueV1/components/GrantRequest/GrantRequestExporterForm.vue b/frontend/src/components/IssueV1/components/GrantRequest/GrantRequestExporterForm.vue
index b0b6cbfa64..e59c87e384 100644
--- a/frontend/src/components/IssueV1/components/GrantRequest/GrantRequestExporterForm.vue
+++ b/frontend/src/components/IssueV1/components/GrantRequest/GrantRequestExporterForm.vue
@@ -59,7 +59,8 @@
import dayjs from "dayjs";
import { computed, onMounted, reactive, ref } from "vue";
import { MonacoEditor } from "@/components/MonacoEditor";
-import { DatabaseResource, PresetRoleType } from "@/types";
+import type { DatabaseResource } from "@/types";
+import { PresetRoleType } from "@/types";
import { convertFromCELString } from "@/utils/issue/cel";
import { useIssueContext } from "../../logic";
import DatabaseResourceTable from "./DatabaseResourceTable.vue";
diff --git a/frontend/src/components/IssueV1/components/GrantRequest/GrantRequestQuerierForm.vue b/frontend/src/components/IssueV1/components/GrantRequest/GrantRequestQuerierForm.vue
index 5949792921..e093f1594d 100644
--- a/frontend/src/components/IssueV1/components/GrantRequest/GrantRequestQuerierForm.vue
+++ b/frontend/src/components/IssueV1/components/GrantRequest/GrantRequestQuerierForm.vue
@@ -33,7 +33,8 @@
<script lang="ts" setup>
import dayjs from "dayjs";
import { onMounted, reactive } from "vue";
-import { DatabaseResource, PresetRoleType } from "@/types";
+import type { DatabaseResource } from "@/types";
+import { PresetRoleType } from "@/types";
import { convertFromCELString } from "@/utils/issue/cel";
import { useIssueContext } from "../../logic";
import DatabaseResourceTable from "./DatabaseResourceTable.vue";
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/IssueStatusActionButtonGroup/ExtraActionDropdownItem.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/IssueStatusActionButtonGroup/ExtraActionDropdownItem.vue
index bce632e5e0..476dfb4b94 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/IssueStatusActionButtonGroup/ExtraActionDropdownItem.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/IssueStatusActionButtonGroup/ExtraActionDropdownItem.vue
@@ -13,13 +13,13 @@
import { NTooltip } from "naive-ui";
import { computed } from "vue";
import { ErrorList } from "@/components/IssueV1/components/common";
+import type { IssueStatusAction } from "@/components/IssueV1/logic";
import {
- IssueStatusAction,
allowUserToApplyIssueStatusAction,
useIssueContext,
} from "@/components/IssueV1/logic";
import { useCurrentUserV1 } from "@/store";
-import { ExtraActionOption } from "../types";
+import type { ExtraActionOption } from "../types";
const props = defineProps<{
option: ExtraActionOption;
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/IssueStatusActionButtonGroup/IssueStatusActionButton.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/IssueStatusActionButtonGroup/IssueStatusActionButton.vue
index 515bfa9632..78b083db38 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/IssueStatusActionButtonGroup/IssueStatusActionButton.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/IssueStatusActionButtonGroup/IssueStatusActionButton.vue
@@ -22,8 +22,8 @@
import { NTooltip, NButton } from "naive-ui";
import { computed } from "vue";
import { ErrorList } from "@/components/IssueV1/components/common";
+import type { IssueStatusAction } from "@/components/IssueV1/logic";
import {
- IssueStatusAction,
allowUserToApplyIssueStatusAction,
issueStatusActionButtonProps,
issueStatusActionDisplayName,
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/IssueStatusActionButtonGroup/IssueStatusActionButtonGroup.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/IssueStatusActionButtonGroup/IssueStatusActionButtonGroup.vue
index 25c0b04cea..bac0f2bca4 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/IssueStatusActionButtonGroup/IssueStatusActionButtonGroup.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/IssueStatusActionButtonGroup/IssueStatusActionButtonGroup.vue
@@ -38,19 +38,23 @@
</template>
<script setup lang="ts">
-import { NButton, NDropdown, DropdownOption } from "naive-ui";
-import { VNode, computed, h } from "vue";
+import type { DropdownOption } from "naive-ui";
+import { NButton, NDropdown } from "naive-ui";
+import type { VNode } from "vue";
+import { computed, h } from "vue";
import { DropdownItemWithErrorList } from "@/components/IssueV1/components/common";
-import {
+import type {
IssueStatusAction,
TaskRolloutAction,
+} from "@/components/IssueV1/logic";
+import {
allowUserToApplyIssueStatusAction,
issueStatusActionDisplayName,
useIssueContext,
} from "@/components/IssueV1/logic";
import { useCurrentUserV1 } from "@/store";
-import { Task } from "@/types/proto/v1/rollout_service";
-import { ExtraActionOption } from "../types";
+import type { Task } from "@/types/proto/v1/rollout_service";
+import type { ExtraActionOption } from "../types";
import IssueStatusActionButton from "./IssueStatusActionButton.vue";
const props = defineProps<{
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/types.ts b/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/types.ts
index 23cf1c3f42..b4cca57ed4 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/types.ts
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/common/types.ts
@@ -1,10 +1,10 @@
-import { DropdownOption } from "naive-ui";
-import {
+import type { DropdownOption } from "naive-ui";
+import type {
IssueStatusAction,
TaskRolloutAction,
} from "@/components/IssueV1/logic";
-import { ComposedIssue } from "@/types";
-import { Task } from "@/types/proto/v1/rollout_service";
+import type { ComposedIssue } from "@/types";
+import type { Task } from "@/types/proto/v1/rollout_service";
export type ExtraAction<T extends "ISSUE" | "TASK" | "TASK-BATCH"> = {
type: T;
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue
index 9f8fc9cf4a..1d509301a2 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue
@@ -47,10 +47,11 @@ import { issueServiceClient, rolloutServiceClient } from "@/grpcweb";
import { emitWindowEvent } from "@/plugins";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
import { useCurrentUserV1, useDatabaseV1Store, useSheetV1Store } from "@/store";
-import { ComposedIssue, dialectOfEngineV1, languageOfEngineV1 } from "@/types";
+import type { ComposedIssue } from "@/types";
+import { dialectOfEngineV1, languageOfEngineV1 } from "@/types";
import { Issue } from "@/types/proto/v1/issue_service";
-import { Plan_ChangeDatabaseConfig } from "@/types/proto/v1/rollout_service";
-import { Sheet } from "@/types/proto/v1/sheet_service";
+import type { Plan_ChangeDatabaseConfig } from "@/types/proto/v1/rollout_service";
+import type { Sheet } from "@/types/proto/v1/sheet_service";
import {
extractDeploymentConfigName,
extractProjectResourceName,
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/IssueReviewButtonGroup.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/IssueReviewButtonGroup.vue
index 767f6d211f..0bb3833690 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/IssueReviewButtonGroup.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/IssueReviewButtonGroup.vue
@@ -22,8 +22,8 @@
<script lang="ts" setup>
import { computed } from "vue";
import { useI18n } from "vue-i18n";
+import type { IssueReviewAction } from "@/components/IssueV1";
import {
- IssueReviewAction,
getApplicableIssueStatusActionList,
getApplicableStageRolloutActionList,
getApplicableTaskRolloutActionList,
@@ -37,7 +37,8 @@ import {
Issue_Approver_Status,
} from "@/types/proto/v1/issue_service";
import { extractUserResourceName } from "@/utils";
-import { ExtraActionOption, IssueStatusActionButtonGroup } from "../common";
+import type { ExtraActionOption } from "../common";
+import { IssueStatusActionButtonGroup } from "../common";
import ReviewActionButton from "./ReviewActionButton.vue";
const { t } = useI18n();
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/ReviewActionButton.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/ReviewActionButton.vue
index 02bbec3715..abde325e33 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/ReviewActionButton.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/ReviewActionButton.vue
@@ -21,15 +21,16 @@
import { NButton, NTooltip } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
+import type { IssueReviewAction } from "@/components/IssueV1/logic";
import {
- IssueReviewAction,
issueReviewActionDisplayName,
issueReviewActionButtonProps,
allowUserToApplyReviewAction,
useIssueContext,
displayReviewRoleTitle,
} from "@/components/IssueV1/logic";
-import ErrorList, { ErrorItem } from "@/components/misc/ErrorList.vue";
+import type { ErrorItem } from "@/components/misc/ErrorList.vue";
+import ErrorList from "@/components/misc/ErrorList.vue";
import { useCurrentUserV1 } from "@/store";
const props = defineProps<{
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/CombinedRolloutButtonGroup.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/CombinedRolloutButtonGroup.vue
index 93882c6288..ca98fc1cd8 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/CombinedRolloutButtonGroup.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/CombinedRolloutButtonGroup.vue
@@ -37,9 +37,9 @@
import { asyncComputed } from "@vueuse/core";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
+import type { TaskRolloutAction } from "@/components/IssueV1/logic";
import {
PrimaryTaskRolloutActionList,
- TaskRolloutAction,
allowUserToApplyTaskRolloutAction,
getApplicableIssueStatusActionList,
getApplicableStageRolloutActionList,
@@ -47,10 +47,11 @@ import {
useIssueContext,
} from "@/components/IssueV1/logic";
import { useCurrentUserV1 } from "@/store";
-import { Task } from "@/types/proto/v1/rollout_service";
-import { ExtraActionOption, IssueStatusActionButtonGroup } from "../common";
+import type { Task } from "@/types/proto/v1/rollout_service";
+import type { ExtraActionOption } from "../common";
+import { IssueStatusActionButtonGroup } from "../common";
import RolloutActionButtonGroup from "./RolloutActionButtonGroup.vue";
-import { RolloutAction } from "./common";
+import type { RolloutAction } from "./common";
const { t } = useI18n();
const currentUser = useCurrentUserV1();
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/RolloutActionButton.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/RolloutActionButton.vue
index e349b5a523..ad97b1b538 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/RolloutActionButton.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/RolloutActionButton.vue
@@ -19,19 +19,22 @@
import { asyncComputed } from "@vueuse/core";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import {
+import type {
StageRolloutAction,
TaskRolloutAction,
+} from "@/components/IssueV1/logic";
+import {
allowUserToApplyTaskRolloutAction,
taskRolloutActionButtonProps,
taskRolloutActionDisplayName,
useIssueContext,
} from "@/components/IssueV1/logic";
-import ErrorList, { ErrorItem } from "@/components/misc/ErrorList.vue";
+import type { ErrorItem } from "@/components/misc/ErrorList.vue";
+import ErrorList from "@/components/misc/ErrorList.vue";
import { ContextMenuButton } from "@/components/v2";
import { useCurrentUserV1, useUserStore } from "@/store";
import { displayRoleTitle, extractUserResourceName } from "@/utils";
-import { RolloutAction, RolloutButtonAction } from "./common";
+import type { RolloutAction, RolloutButtonAction } from "./common";
const props = defineProps<{
action: TaskRolloutAction;
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/RolloutActionButtonGroup.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/RolloutActionButtonGroup.vue
index 1178cf6075..8ac03bde97 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/RolloutActionButtonGroup.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/RolloutActionButtonGroup.vue
@@ -11,12 +11,12 @@
</template>
<script lang="ts" setup>
-import {
+import type {
StageRolloutAction,
TaskRolloutAction,
} from "@/components/IssueV1/logic";
import RolloutActionButton from "./RolloutActionButton.vue";
-import { RolloutAction } from "./common";
+import type { RolloutAction } from "./common";
defineProps<{
taskRolloutActionList: TaskRolloutAction[];
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/common.ts b/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/common.ts
index f18d16f35e..f1e4594d7c 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/common.ts
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/rollout/common.ts
@@ -1,8 +1,8 @@
-import {
+import type {
StageRolloutAction,
TaskRolloutAction,
} from "@/components/IssueV1/logic";
-import { ContextMenuButtonAction } from "@/components/v2";
+import type { ContextMenuButtonAction } from "@/components/v2";
export type RolloutAction<T = "TASK" | "STAGE"> = {
target: T;
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Title.vue b/frontend/src/components/IssueV1/components/HeaderSection/Title.vue
index f7f11f9a74..be3cb1f39c 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Title.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Title.vue
@@ -18,7 +18,8 @@
<script setup lang="ts">
import { NInput } from "naive-ui";
-import { CSSProperties, computed, reactive, watch } from "vue";
+import type { CSSProperties } from "vue";
+import { computed, reactive, watch } from "vue";
import { useI18n } from "vue-i18n";
import { issueServiceClient } from "@/grpcweb";
import { emitWindowEvent } from "@/plugins";
diff --git a/frontend/src/components/IssueV1/components/IssueSearch/AdvancedSearchBox.vue b/frontend/src/components/IssueV1/components/IssueSearch/AdvancedSearchBox.vue
index 3647f30291..96d9701b8a 100644
--- a/frontend/src/components/IssueV1/components/IssueSearch/AdvancedSearchBox.vue
+++ b/frontend/src/components/IssueV1/components/IssueSearch/AdvancedSearchBox.vue
@@ -87,7 +87,8 @@ import { cloneDeep, last } from "lodash-es";
import { FilterIcon } from "lucide-vue-next";
import { XIcon } from "lucide-vue-next";
import { matchSorter } from "match-sorter";
-import { InputInst, NInput } from "naive-ui";
+import type { InputInst } from "naive-ui";
+import { NInput } from "naive-ui";
import scrollIntoView from "scroll-into-view-if-needed";
import { zindexable as vZindexable } from "vdirs";
import {
@@ -99,10 +100,8 @@ import {
computed,
nextTick,
} from "vue";
+import type { SearchParams, SearchScope, SearchScopeId } from "@/utils";
import {
- SearchParams,
- SearchScope,
- SearchScopeId,
emptySearchParams,
getValueFromSearchParams,
minmax,
diff --git a/frontend/src/components/IssueV1/components/IssueSearch/IssueSearch.vue b/frontend/src/components/IssueV1/components/IssueSearch/IssueSearch.vue
index df15cda383..d233723119 100644
--- a/frontend/src/components/IssueV1/components/IssueSearch/IssueSearch.vue
+++ b/frontend/src/components/IssueV1/components/IssueSearch/IssueSearch.vue
@@ -46,13 +46,8 @@
<script lang="ts" setup>
import { ref, computed } from "vue";
-import {
- SearchParams,
- SearchScope,
- SearchScopeId,
- UIIssueFilterScopeIdList,
- SearchScopeIdList,
-} from "@/utils";
+import type { SearchParams, SearchScope, SearchScopeId } from "@/utils";
+import { UIIssueFilterScopeIdList, SearchScopeIdList } from "@/utils";
import AdvancedSearchBox from "./AdvancedSearchBox.vue";
import Status from "./Status.vue";
import TimeRange from "./TimeRange.vue";
diff --git a/frontend/src/components/IssueV1/components/IssueSearch/ScopeMenu.vue b/frontend/src/components/IssueV1/components/IssueSearch/ScopeMenu.vue
index e137a39978..811294bbff 100644
--- a/frontend/src/components/IssueV1/components/IssueSearch/ScopeMenu.vue
+++ b/frontend/src/components/IssueV1/components/IssueSearch/ScopeMenu.vue
@@ -38,8 +38,8 @@
import { useElementBounding, useWindowSize } from "@vueuse/core";
import { computed, nextTick, ref, watch } from "vue";
import { VirtualList } from "vueuc";
-import { SearchParams, SearchScopeId } from "@/utils";
-import { ScopeOption } from "./useSearchScopeOptions";
+import type { SearchParams, SearchScopeId } from "@/utils";
+import type { ScopeOption } from "./useSearchScopeOptions";
type ListItem = {
item: ScopeOption;
diff --git a/frontend/src/components/IssueV1/components/IssueSearch/ScopeTags.vue b/frontend/src/components/IssueV1/components/IssueSearch/ScopeTags.vue
index 5981e28127..c48fc3e2a0 100644
--- a/frontend/src/components/IssueV1/components/IssueSearch/ScopeTags.vue
+++ b/frontend/src/components/IssueV1/components/IssueSearch/ScopeTags.vue
@@ -19,16 +19,13 @@
</template>
<script setup lang="ts">
import dayjs from "dayjs";
-import { NTag, TagProps } from "naive-ui";
+import type { TagProps } from "naive-ui";
+import { NTag } from "naive-ui";
import { computed, h } from "vue";
import { useI18n } from "vue-i18n";
import { UNKNOWN_ID } from "@/types";
-import {
- SearchParams,
- SearchScope,
- SearchScopeId,
- callCssVariable,
-} from "@/utils";
+import type { SearchParams, SearchScope, SearchScopeId } from "@/utils";
+import { callCssVariable } from "@/utils";
const props = defineProps<{
params: SearchParams;
diff --git a/frontend/src/components/IssueV1/components/IssueSearch/Status.vue b/frontend/src/components/IssueV1/components/IssueSearch/Status.vue
index a1a895b6de..a191ff825a 100644
--- a/frontend/src/components/IssueV1/components/IssueSearch/Status.vue
+++ b/frontend/src/components/IssueV1/components/IssueSearch/Status.vue
@@ -10,13 +10,10 @@
<script lang="ts" setup>
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { TabFilter, TabFilterItem } from "@/components/v2";
-import {
- SearchParams,
- SemanticIssueStatus,
- getSemanticIssueStatusFromSearchParams,
- upsertScope,
-} from "@/utils";
+import type { TabFilterItem } from "@/components/v2";
+import { TabFilter } from "@/components/v2";
+import type { SearchParams, SemanticIssueStatus } from "@/utils";
+import { getSemanticIssueStatusFromSearchParams, upsertScope } from "@/utils";
const props = defineProps<{
params: SearchParams;
diff --git a/frontend/src/components/IssueV1/components/IssueSearch/TimeRange.vue b/frontend/src/components/IssueV1/components/IssueSearch/TimeRange.vue
index c0cb60b2c8..9679362670 100644
--- a/frontend/src/components/IssueV1/components/IssueSearch/TimeRange.vue
+++ b/frontend/src/components/IssueV1/components/IssueSearch/TimeRange.vue
@@ -16,7 +16,8 @@
import dayjs from "dayjs";
import { NDatePicker } from "naive-ui";
import { computed } from "vue";
-import { SearchParams, getTsRangeFromSearchParams, upsertScope } from "@/utils";
+import type { SearchParams } from "@/utils";
+import { getTsRangeFromSearchParams, upsertScope } from "@/utils";
const props = defineProps<{
params: SearchParams;
diff --git a/frontend/src/components/IssueV1/components/IssueSearch/ValueMenu.vue b/frontend/src/components/IssueV1/components/IssueSearch/ValueMenu.vue
index b3fa6261e1..94b83c32ec 100644
--- a/frontend/src/components/IssueV1/components/IssueSearch/ValueMenu.vue
+++ b/frontend/src/components/IssueV1/components/IssueSearch/ValueMenu.vue
@@ -60,8 +60,8 @@ import {
import { NEmpty } from "naive-ui";
import { computed, nextTick, ref, watch } from "vue";
import { VirtualList } from "vueuc";
-import { SearchParams } from "@/utils";
-import { ScopeOption, ValueOption } from "./useSearchScopeOptions";
+import type { SearchParams } from "@/utils";
+import type { ScopeOption, ValueOption } from "./useSearchScopeOptions";
type ListItem = {
item: ValueOption;
diff --git a/frontend/src/components/IssueV1/components/IssueSearch/useSearchScopeOptions.ts b/frontend/src/components/IssueV1/components/IssueSearch/useSearchScopeOptions.ts
index 4a5ef9fe12..5ff0c1197c 100644
--- a/frontend/src/components/IssueV1/components/IssueSearch/useSearchScopeOptions.ts
+++ b/frontend/src/components/IssueV1/components/IssueSearch/useSearchScopeOptions.ts
@@ -1,5 +1,6 @@
import { orderBy } from "lodash-es";
-import { Ref, RenderFunction, VNode, computed, h, ref } from "vue";
+import type { Ref, RenderFunction, VNode } from "vue";
+import { computed, h, ref } from "vue";
import { useI18n } from "vue-i18n";
import BBAvatar from "@/bbkit/BBAvatar.vue";
import GitIcon from "@/components/GitIcon.vue";
@@ -23,9 +24,8 @@ import {
import { SYSTEM_BOT_EMAIL, UNKNOWN_ID } from "@/types";
import { engineToJSON } from "@/types/proto/v1/common";
import { Workflow } from "@/types/proto/v1/project_service";
+import type { SearchParams, SearchScopeId } from "@/utils";
import {
- SearchParams,
- SearchScopeId,
environmentV1Name,
extractEnvironmentResourceName,
extractInstanceResourceName,
diff --git a/frontend/src/components/IssueV1/components/IssueStatusIcon.vue b/frontend/src/components/IssueV1/components/IssueStatusIcon.vue
index f0059bcc00..5925bb5b34 100644
--- a/frontend/src/components/IssueV1/components/IssueStatusIcon.vue
+++ b/frontend/src/components/IssueV1/components/IssueStatusIcon.vue
@@ -52,8 +52,9 @@
<script lang="ts" setup>
import { NTooltip } from "naive-ui";
-import { PropType, computed } from "vue";
-import { ComposedIssue } from "@/types";
+import type { PropType } from "vue";
+import { computed } from "vue";
+import type { ComposedIssue } from "@/types";
import { IssueStatus } from "@/types/proto/v1/issue_service";
import { Task_Status } from "@/types/proto/v1/rollout_service";
import { isUnfinishedResolvedTask as checkUnfinishedResolvedTask } from "../logic";
diff --git a/frontend/src/components/IssueV1/components/IssueStatusIconWithTaskSummary.vue b/frontend/src/components/IssueV1/components/IssueStatusIconWithTaskSummary.vue
index b955392f32..918f8a4939 100644
--- a/frontend/src/components/IssueV1/components/IssueStatusIconWithTaskSummary.vue
+++ b/frontend/src/components/IssueV1/components/IssueStatusIconWithTaskSummary.vue
@@ -21,7 +21,7 @@
import { NTooltip } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { ComposedIssue } from "@/types";
+import type { ComposedIssue } from "@/types";
import { IssueStatus } from "@/types/proto/v1/issue_service";
import IssueStatusIcon from "./IssueStatusIcon.vue";
diff --git a/frontend/src/components/IssueV1/components/IssueTableV1.vue b/frontend/src/components/IssueV1/components/IssueTableV1.vue
index e862c73e44..989433b6e9 100644
--- a/frontend/src/components/IssueV1/components/IssueTableV1.vue
+++ b/frontend/src/components/IssueV1/components/IssueTableV1.vue
@@ -39,7 +39,8 @@
<script lang="ts" setup>
import { useElementSize } from "@vueuse/core";
-import { NPerformantEllipsis, DataTableColumn, NDataTable } from "naive-ui";
+import type { DataTableColumn } from "naive-ui";
+import { NPerformantEllipsis, NDataTable } from "naive-ui";
import { reactive, computed, watch, ref, h } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
diff --git a/frontend/src/components/IssueV1/components/PagedIssueTableV1.vue b/frontend/src/components/IssueV1/components/PagedIssueTableV1.vue
index 31855d474c..9b4453528e 100644
--- a/frontend/src/components/IssueV1/components/PagedIssueTableV1.vue
+++ b/frontend/src/components/IssueV1/components/PagedIssueTableV1.vue
@@ -31,15 +31,13 @@
<script lang="ts" setup>
import { useSessionStorage } from "@vueuse/core";
import { isEqual } from "lodash-es";
-import { computed, PropType, reactive, watch } from "vue";
-import {
- ListIssueParams,
- useIsLoggedIn,
- useIssueV1Store,
- useRefreshIssueList,
-} from "@/store";
-import { IssueFilter, ComposedIssue } from "@/types";
-import { applyUIIssueFilter, UIIssueFilter } from "@/utils";
+import type { PropType } from "vue";
+import { computed, reactive, watch } from "vue";
+import type { ListIssueParams } from "@/store";
+import { useIsLoggedIn, useIssueV1Store, useRefreshIssueList } from "@/store";
+import type { IssueFilter, ComposedIssue } from "@/types";
+import type { UIIssueFilter } from "@/utils";
+import { applyUIIssueFilter } from "@/utils";
type LocalState = {
loading: boolean;
diff --git a/frontend/src/components/IssueV1/components/Panel/BatchIssueStatusActionPanel.vue b/frontend/src/components/IssueV1/components/Panel/BatchIssueStatusActionPanel.vue
index 7eeb3e7aff..39c87e1dab 100644
--- a/frontend/src/components/IssueV1/components/Panel/BatchIssueStatusActionPanel.vue
+++ b/frontend/src/components/IssueV1/components/Panel/BatchIssueStatusActionPanel.vue
@@ -61,15 +61,15 @@
<script setup lang="ts">
import { computed, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
+import type { IssueStatusAction } from "@/components/IssueV1/logic";
import {
- IssueStatusAction,
issueStatusActionButtonProps,
issueStatusActionDisplayName,
IssueStatusActionToIssueStatusMap,
} from "@/components/IssueV1/logic";
import { issueServiceClient } from "@/grpcweb";
import { pushNotification } from "@/store";
-import { ComposedIssue } from "@/types";
+import type { ComposedIssue } from "@/types";
import CommonDrawer from "./CommonDrawer.vue";
type LocalState = {
diff --git a/frontend/src/components/IssueV1/components/Panel/IssueReviewActionPanel.vue b/frontend/src/components/IssueV1/components/Panel/IssueReviewActionPanel.vue
index 488451d0b3..592ad1e751 100644
--- a/frontend/src/components/IssueV1/components/Panel/IssueReviewActionPanel.vue
+++ b/frontend/src/components/IssueV1/components/Panel/IssueReviewActionPanel.vue
@@ -89,9 +89,9 @@
import { NButton, NCheckbox, NInput, NTooltip } from "naive-ui";
import { computed, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
+import type { IssueReviewAction } from "@/components/IssueV1/logic";
import {
useIssueContext,
- IssueReviewAction,
targetReviewStatusForReviewAction,
issueReviewActionButtonProps,
issueReviewActionDisplayName,
diff --git a/frontend/src/components/IssueV1/components/Panel/IssueStatusActionPanel.vue b/frontend/src/components/IssueV1/components/Panel/IssueStatusActionPanel.vue
index 6febad4d89..371195f708 100644
--- a/frontend/src/components/IssueV1/components/Panel/IssueStatusActionPanel.vue
+++ b/frontend/src/components/IssueV1/components/Panel/IssueStatusActionPanel.vue
@@ -84,8 +84,8 @@
import { NCheckbox } from "naive-ui";
import { computed, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
+import type { IssueStatusAction } from "@/components/IssueV1/logic";
import {
- IssueStatusAction,
useIssueContext,
issueStatusActionButtonProps,
issueStatusActionDisplayName,
diff --git a/frontend/src/components/IssueV1/components/Panel/RolloutTaskDatabaseName.vue b/frontend/src/components/IssueV1/components/Panel/RolloutTaskDatabaseName.vue
index b82b530685..42f20637f2 100644
--- a/frontend/src/components/IssueV1/components/Panel/RolloutTaskDatabaseName.vue
+++ b/frontend/src/components/IssueV1/components/Panel/RolloutTaskDatabaseName.vue
@@ -18,7 +18,7 @@
<script setup lang="ts">
import { NPerformantEllipsis } from "naive-ui";
import { computed } from "vue";
-import { Task } from "@/types/proto/v1/rollout_service";
+import type { Task } from "@/types/proto/v1/rollout_service";
import { databaseForTask, useIssueContext } from "../../logic";
const props = defineProps<{
diff --git a/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue b/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue
index 78517e5857..d64bba0481 100644
--- a/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue
+++ b/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue
@@ -129,8 +129,8 @@ import { NButton, NCheckbox, NInput, NScrollbar, NTooltip } from "naive-ui";
import { computed, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
import { PlanCheckBar } from "@/components/IssueV1/components/PlanCheckSection";
+import type { TaskRolloutAction } from "@/components/IssueV1/logic";
import {
- TaskRolloutAction,
planCheckRunListForTask,
planCheckRunSummaryForCheckRunList,
semanticTaskType,
@@ -143,11 +143,8 @@ import {
} from "@/components/IssueV1/logic";
import { rolloutServiceClient } from "@/grpcweb";
import { pushNotification } from "@/store";
-import {
- Task,
- TaskRun,
- TaskRun_Status,
-} from "@/types/proto/v1/rollout_service";
+import type { Task, TaskRun } from "@/types/proto/v1/rollout_service";
+import { TaskRun_Status } from "@/types/proto/v1/rollout_service";
import { ErrorList } from "../common";
import CommonDrawer from "./CommonDrawer.vue";
import RolloutTaskDatabaseName from "./RolloutTaskDatabaseName.vue";
diff --git a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadge.vue b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadge.vue
index c36efd6c6f..a0329b94a1 100644
--- a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadge.vue
+++ b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadge.vue
@@ -46,8 +46,8 @@ import { maxBy } from "lodash-es";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { planCheckRunResultStatus } from "@/components/IssueV1/logic";
+import type { PlanCheckRun } from "@/types/proto/v1/rollout_service";
import {
- PlanCheckRun,
PlanCheckRun_Result_Status,
PlanCheckRun_Status,
PlanCheckRun_Type,
diff --git a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue
index d802ffda39..d8d85f91e8 100644
--- a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue
+++ b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue
@@ -15,10 +15,8 @@
<script lang="ts" setup>
import { orderBy } from "lodash-es";
import { computed } from "vue";
-import {
- PlanCheckRun,
- PlanCheckRun_Type,
-} from "@/types/proto/v1/rollout_service";
+import type { PlanCheckRun } from "@/types/proto/v1/rollout_service";
+import { PlanCheckRun_Type } from "@/types/proto/v1/rollout_service";
import { groupBy } from "@/utils/collections";
import PlanCheckBadge from "./PlanCheckBadge.vue";
diff --git a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBar.vue b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBar.vue
index ff61c51c36..235fde1f66 100644
--- a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBar.vue
+++ b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBar.vue
@@ -37,12 +37,12 @@ import {
useIssueContext,
} from "@/components/IssueV1/logic";
import { rolloutServiceClient } from "@/grpcweb";
-import {
+import type {
PlanCheckRun,
PlanCheckRun_Type,
Task,
} from "@/types/proto/v1/rollout_service";
-import { VueClass } from "@/utils";
+import type { VueClass } from "@/utils";
import PlanCheckBadgeBar from "./PlanCheckBadgeBar.vue";
import PlanCheckPanel from "./PlanCheckPanel.vue";
import PlanCheckRunButton from "./PlanCheckRunButton.vue";
diff --git a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue
index 00d762c5ef..0c0adc914f 100644
--- a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue
+++ b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue
@@ -100,20 +100,20 @@ import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { SQLRuleEditDialog } from "@/components/SQLReview/components";
-import { PayloadValueType } from "@/components/SQLReview/components/RuleConfigComponents";
+import type { PayloadValueType } from "@/components/SQLReview/components/RuleConfigComponents";
import { WORKSPACE_ROUTE_SQL_REVIEW } from "@/router/dashboard/workspaceRoutes";
import { useReviewPolicyByEnvironmentName } from "@/store";
+import type { RuleTemplate } from "@/types";
import {
GeneralErrorCode,
- RuleTemplate,
SQLReviewPolicyErrorCode,
UNKNOWN_ENVIRONMENT_NAME,
findRuleTemplate,
getRuleLocalization,
ruleTemplateMap,
} from "@/types";
+import type { PlanCheckRun } from "@/types/proto/v1/rollout_service";
import {
- PlanCheckRun,
PlanCheckRun_Result,
PlanCheckRun_Result_Status,
PlanCheckRun_Status,
diff --git a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckPanel.vue b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckPanel.vue
index b3770180de..9c2ee8df98 100644
--- a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckPanel.vue
+++ b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckPanel.vue
@@ -35,8 +35,9 @@ import { first, orderBy } from "lodash-es";
import { computed, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import { databaseForTask, useIssueContext } from "@/components/IssueV1/logic";
-import { TabFilter, TabFilterItem } from "@/components/v2";
-import {
+import type { TabFilterItem } from "@/components/v2";
+import { TabFilter } from "@/components/v2";
+import type {
PlanCheckRun,
PlanCheckRun_Type,
Task,
diff --git a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckRunButton.vue b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckRunButton.vue
index 675e3c6cb7..d24bd8c71a 100644
--- a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckRunButton.vue
+++ b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckRunButton.vue
@@ -29,11 +29,12 @@ import {
planCheckRunListForTask,
useIssueContext,
} from "@/components/IssueV1/logic";
-import { ContextMenuButton, ContextMenuButtonAction } from "@/components/v2";
+import type { ContextMenuButtonAction } from "@/components/v2";
+import { ContextMenuButton } from "@/components/v2";
import { IssueStatus } from "@/types/proto/v1/issue_service";
+import type { Task } from "@/types/proto/v1/rollout_service";
import {
PlanCheckRun_Status,
- Task,
Task_Status,
} from "@/types/proto/v1/rollout_service";
diff --git a/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckBadge.vue b/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckBadge.vue
index 60a2458e23..a7ecb1b8cb 100644
--- a/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckBadge.vue
+++ b/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckBadge.vue
@@ -43,7 +43,8 @@
<script setup lang="ts">
import { computed, ref } from "vue";
import { SQLCheckPanel } from "@/components/SQLCheck";
-import { Advice, Advice_Status } from "@/types/proto/v1/sql_service";
+import type { Advice } from "@/types/proto/v1/sql_service";
+import { Advice_Status } from "@/types/proto/v1/sql_service";
import { databaseForTask, useIssueContext } from "../../logic";
import OnlineMigrationAdviceExtra from "./OnlineMigrationAdviceExtra.vue";
diff --git a/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckSection.vue b/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckSection.vue
index 953ea62aed..d35ddc8435 100644
--- a/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckSection.vue
+++ b/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckSection.vue
@@ -44,7 +44,7 @@ import { SQLCheckButton } from "@/components/SQLCheck";
import { TaskTypeListWithStatement } from "@/types";
import { Task_Type } from "@/types/proto/v1/rollout_service";
import { CheckRequest_ChangeType } from "@/types/proto/v1/sql_service";
-import { Defer } from "@/utils/util";
+import type { Defer } from "@/utils/util";
import { isGhostEnabledForTask } from "../Sidebar/GhostSection/common";
import OnlineMigrationAdviceExtra from "./OnlineMigrationAdviceExtra.vue";
import SQLCheckBadge from "./SQLCheckBadge.vue";
diff --git a/frontend/src/components/IssueV1/components/Sidebar/Assignee/Assignee.vue b/frontend/src/components/IssueV1/components/Sidebar/Assignee/Assignee.vue
index 3574293207..b7877b83ea 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/Assignee/Assignee.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/Assignee/Assignee.vue
@@ -41,7 +41,8 @@
<script setup lang="ts">
import { asyncComputed } from "@vueuse/core";
-import { NTooltip, SelectGroupOption } from "naive-ui";
+import type { SelectGroupOption } from "naive-ui";
+import { NTooltip } from "naive-ui";
import { computed, ref } from "vue";
import { useI18n } from "vue-i18n";
import {
@@ -49,7 +50,8 @@ import {
useIssueContext,
useWrappedReviewStepsV1,
} from "@/components/IssueV1/logic";
-import ErrorList, { ErrorItem } from "@/components/misc/ErrorList.vue";
+import type { ErrorItem } from "@/components/misc/ErrorList.vue";
+import ErrorList from "@/components/misc/ErrorList.vue";
import { UserSelect } from "@/components/v2";
import { issueServiceClient } from "@/grpcweb";
import { emitWindowEvent } from "@/plugins";
@@ -66,7 +68,7 @@ import {
UNKNOWN_ID,
unknownUser,
} from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
import { Issue } from "@/types/proto/v1/issue_service";
import {
extractUserResourceName,
diff --git a/frontend/src/components/IssueV1/components/Sidebar/GhostSection/FlagsForm/FlagsForm.vue b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/FlagsForm/FlagsForm.vue
index 413b9165f1..a4b4a172be 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/GhostSection/FlagsForm/FlagsForm.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/FlagsForm/FlagsForm.vue
@@ -51,7 +51,8 @@
import { NInput } from "naive-ui";
import { onlyAllowNumber } from "@/utils";
import BoolFlag from "./BoolFlag.vue";
-import { GhostParameter, SupportedGhostParameters } from "./constants";
+import type { GhostParameter } from "./constants";
+import { SupportedGhostParameters } from "./constants";
const props = defineProps<{
flags: Record<string, string>;
diff --git a/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostFlagsPanel.vue b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostFlagsPanel.vue
index f8f1eb608d..22f4b4a6b7 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostFlagsPanel.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostFlagsPanel.vue
@@ -91,7 +91,8 @@ import ErrorList from "@/components/misc/ErrorList.vue";
import { Drawer, DrawerContent, RichDatabaseName } from "@/components/v2";
import { rolloutServiceClient } from "@/grpcweb";
import { pushNotification } from "@/store";
-import { Plan_Spec, Task_Type } from "@/types/proto/v1/rollout_service";
+import type { Plan_Spec } from "@/types/proto/v1/rollout_service";
+import { Task_Type } from "@/types/proto/v1/rollout_service";
import FlagsForm from "./FlagsForm";
import { allowChangeTaskGhostFlags, useIssueGhostContext } from "./common";
diff --git a/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostSwitch.vue b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostSwitch.vue
index 3c29e06f75..f58f09fa6e 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostSwitch.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostSwitch.vue
@@ -33,10 +33,8 @@ import { NSwitch, NTooltip } from "naive-ui";
import { computed, ref } from "vue";
import { useI18n } from "vue-i18n";
import { specForTask, useIssueContext } from "@/components/IssueV1/logic";
-import {
- ErrorItem,
- default as ErrorList,
-} from "@/components/misc/ErrorList.vue";
+import type { ErrorItem } from "@/components/misc/ErrorList.vue";
+import { default as ErrorList } from "@/components/misc/ErrorList.vue";
import { hasFeature, useCurrentUserV1 } from "@/store";
import { Engine } from "@/types/proto/v1/common";
import {
diff --git a/frontend/src/components/IssueV1/components/Sidebar/GhostSection/common.ts b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/common.ts
index 76fcde0b49..eec6f6a252 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/GhostSection/common.ts
+++ b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/common.ts
@@ -1,5 +1,6 @@
import { uniqBy } from "lodash-es";
-import { InjectionKey, Ref, computed, inject, provide, ref } from "vue";
+import type { InjectionKey, Ref } from "vue";
+import { computed, inject, provide, ref } from "vue";
import { useI18n } from "vue-i18n";
import {
databaseForTask,
@@ -10,13 +11,12 @@ import {
useIssueContext,
} from "@/components/IssueV1/logic";
import { useCurrentUserV1, useSubscriptionV1Store } from "@/store";
-import { ComposedDatabase, ComposedIssue } from "@/types";
+import type { ComposedDatabase, ComposedIssue } from "@/types";
import { Engine } from "@/types/proto/v1/common";
import { IssueStatus } from "@/types/proto/v1/issue_service";
+import type { Plan_Spec, Task } from "@/types/proto/v1/rollout_service";
import {
Plan_ChangeDatabaseConfig_Type,
- Plan_Spec,
- Task,
Task_Status,
Task_Type,
task_StatusToJSON,
diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Approver.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Approver.vue
index 607695ba7f..c0d371a789 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Approver.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Approver.vue
@@ -20,7 +20,8 @@
<script setup lang="ts">
import { NPerformantEllipsis } from "naive-ui";
import { useCurrentUserV1 } from "@/store";
-import { SYSTEM_BOT_USER_NAME, WrappedReviewStep } from "@/types";
+import type { WrappedReviewStep } from "@/types";
+import { SYSTEM_BOT_USER_NAME } from "@/types";
const currentUser = useCurrentUserV1();
diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Candidates.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Candidates.vue
index 6fdf5a02d1..1bc3e8857e 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Candidates.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Candidates.vue
@@ -31,7 +31,7 @@
import { computed } from "vue";
import PrincipalAvatar from "@/components/PrincipalAvatar.vue";
import { useCurrentUserV1 } from "@/store";
-import { WrappedReviewStep } from "@/types";
+import type { WrappedReviewStep } from "@/types";
const props = defineProps<{
step: WrappedReviewStep;
diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Timeline.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Timeline.vue
index c80520b12e..17ef609e55 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Timeline.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/Timeline.vue
@@ -80,9 +80,9 @@ import {
NPopover,
NPerformantEllipsis,
} from "naive-ui";
-import { WrappedReviewStep } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
-import { ApprovalStep } from "@/types/proto/v1/issue_service";
+import type { WrappedReviewStep } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
+import type { ApprovalStep } from "@/types/proto/v1/issue_service";
import { approvalNodeText } from "@/utils";
import Approver from "./Approver.vue";
import Candidates from "./Candidates.vue";
diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/TimelineIcon.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/TimelineIcon.vue
index d97776d0eb..e3e1a6423e 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/TimelineIcon.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/TimelineIcon.vue
@@ -26,7 +26,7 @@
<script setup lang="ts">
import { computed } from "vue";
-import { WrappedReviewStep } from "@/types";
+import type { WrappedReviewStep } from "@/types";
const props = defineProps<{
step: WrappedReviewStep;
diff --git a/frontend/src/components/IssueV1/components/Sidebar/RollbackFromTips.vue b/frontend/src/components/IssueV1/components/Sidebar/RollbackFromTips.vue
index abf0a4f056..ee0bee284e 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/RollbackFromTips.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/RollbackFromTips.vue
@@ -22,7 +22,8 @@ import { computedAsync } from "@vueuse/core";
import { computed } from "vue";
import { useRoute } from "vue-router";
import { experimentalFetchIssueByUID } from "@/store";
-import { RollbackDetail, UNKNOWN_ID, unknownIssue, unknownTask } from "@/types";
+import type { RollbackDetail } from "@/types";
+import { UNKNOWN_ID, unknownIssue, unknownTask } from "@/types";
import { Task_Type } from "@/types/proto/v1/rollout_service";
import {
buildIssueV1LinkWithTask,
diff --git a/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/RollbackStatus.vue b/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/RollbackStatus.vue
index 519d83e29e..13772d05a4 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/RollbackStatus.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/RollbackStatus.vue
@@ -82,12 +82,11 @@ import { databaseForTask, useIssueContext } from "@/components/IssueV1";
import LearnMoreLink from "@/components/LearnMoreLink.vue";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
import { useActivityV1Store, useSheetV1Store } from "@/store";
-import {
+import type {
ActivityIssueCommentCreatePayload,
TaskRollbackBy,
- UNKNOWN_ID,
- unknownIssue,
} from "@/types";
+import { UNKNOWN_ID, unknownIssue } from "@/types";
import { LogEntity_Action } from "@/types/proto/v1/logging_service";
import { Task_DatabaseDataUpdate_RollbackSqlStatus as RollbackSqlStatus } from "@/types/proto/v1/rollout_service";
import { extractProjectResourceName, extractSheetUID } from "@/utils";
diff --git a/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/common.ts b/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/common.ts
index b57d64f256..4c9326030c 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/common.ts
+++ b/frontend/src/components/IssueV1/components/Sidebar/RollbackSection/common.ts
@@ -14,9 +14,11 @@ import {
useIssueV1Store,
pushNotification,
} from "@/store";
-import { ComposedIssue, UNKNOWN_ID } from "@/types";
+import type { ComposedIssue } from "@/types";
+import { UNKNOWN_ID } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { Task, Task_Status, Task_Type } from "@/types/proto/v1/rollout_service";
+import type { Task } from "@/types/proto/v1/rollout_service";
+import { Task_Status, Task_Type } from "@/types/proto/v1/rollout_service";
import {
extractUserResourceName,
flattenTaskV1List,
diff --git a/frontend/src/components/IssueV1/components/Sidebar/VCSInfo.vue b/frontend/src/components/IssueV1/components/Sidebar/VCSInfo.vue
index ce8715430a..2aec41ac82 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/VCSInfo.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/VCSInfo.vue
@@ -46,7 +46,8 @@
import { head } from "lodash-es";
import { computed } from "vue";
import HumanizeDate from "@/components/misc/HumanizeDate.vue";
-import { PushEvent, VcsType } from "@/types/proto/v1/vcs";
+import type { PushEvent } from "@/types/proto/v1/vcs";
+import { VcsType } from "@/types/proto/v1/vcs";
import { useIssueContext } from "../../logic";
import { useActiveTaskSheet } from "./useActiveTaskSheet";
diff --git a/frontend/src/components/IssueV1/components/StageSection/StageCard.vue b/frontend/src/components/IssueV1/components/StageSection/StageCard.vue
index efaeb4ec14..766931e0da 100644
--- a/frontend/src/components/IssueV1/components/StageSection/StageCard.vue
+++ b/frontend/src/components/IssueV1/components/StageSection/StageCard.vue
@@ -76,9 +76,9 @@ import {
useIssueContext,
} from "@/components/IssueV1/logic";
import { EMPTY_TASK_NAME } from "@/types";
+import type { Stage } from "@/types/proto/v1/rollout_service";
import {
PlanCheckRun_Result_Status,
- Stage,
task_StatusToJSON,
} from "@/types/proto/v1/rollout_service";
import { activeTaskInStageV1 } from "@/utils";
diff --git a/frontend/src/components/IssueV1/components/StageSection/StageInfo/StageSelect.vue b/frontend/src/components/IssueV1/components/StageSection/StageInfo/StageSelect.vue
index abedc263af..8147061b7c 100644
--- a/frontend/src/components/IssueV1/components/StageSection/StageInfo/StageSelect.vue
+++ b/frontend/src/components/IssueV1/components/StageSection/StageInfo/StageSelect.vue
@@ -15,11 +15,12 @@
<script setup lang="ts">
import { first } from "lodash-es";
-import { NSelect, SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NSelect } from "naive-ui";
import { computed, h } from "vue";
import { useI18n } from "vue-i18n";
import { EMPTY_TASK_NAME } from "@/types";
-import { Stage } from "@/types/proto/v1/rollout_service";
+import type { Stage } from "@/types/proto/v1/rollout_service";
import { activeTaskInStageV1 } from "@/utils";
import { useIssueContext } from "../../../logic";
diff --git a/frontend/src/components/IssueV1/components/StageSection/StageSummary.vue b/frontend/src/components/IssueV1/components/StageSection/StageSummary.vue
index fb1f8adbe3..99d6ea9496 100644
--- a/frontend/src/components/IssueV1/components/StageSection/StageSummary.vue
+++ b/frontend/src/components/IssueV1/components/StageSection/StageSummary.vue
@@ -10,7 +10,8 @@
<script lang="ts" setup>
import { computed } from "vue";
-import { Stage, Task_Status } from "@/types/proto/v1/rollout_service";
+import type { Stage } from "@/types/proto/v1/rollout_service";
+import { Task_Status } from "@/types/proto/v1/rollout_service";
const props = defineProps<{
stage: Stage;
diff --git a/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue b/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue
index 95e04ffd49..af1957dd01 100644
--- a/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue
+++ b/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue
@@ -242,13 +242,11 @@ import {
useCurrentUserV1,
useSheetV1Store,
} from "@/store";
-import {
- SQLDialect,
- TaskTypeListWithStatement,
- dialectOfEngineV1,
-} from "@/types";
+import type { SQLDialect } from "@/types";
+import { TaskTypeListWithStatement, dialectOfEngineV1 } from "@/types";
import { TenantMode } from "@/types/proto/v1/project_service";
-import { Plan_Spec, Task, Task_Type } from "@/types/proto/v1/rollout_service";
+import type { Plan_Spec, Task } from "@/types/proto/v1/rollout_service";
+import { Task_Type } from "@/types/proto/v1/rollout_service";
import {
defer,
flattenTaskV1List,
@@ -261,7 +259,8 @@ import {
import { readFileAsync } from "@/utils";
import { useSQLAdviceMarkers } from "../useSQLAdviceMarkers";
import FormatOnSaveCheckbox from "./FormatOnSaveCheckbox.vue";
-import { EditState, useTempEditState } from "./useTempEditState";
+import type { EditState } from "./useTempEditState";
+import { useTempEditState } from "./useTempEditState";
type LocalState = EditState & {
showFeatureModal: boolean;
diff --git a/frontend/src/components/IssueV1/components/StatementSection/EditorView/FormatOnSaveCheckbox.vue b/frontend/src/components/IssueV1/components/StatementSection/EditorView/FormatOnSaveCheckbox.vue
index 604b53bc40..93b53a4160 100644
--- a/frontend/src/components/IssueV1/components/StatementSection/EditorView/FormatOnSaveCheckbox.vue
+++ b/frontend/src/components/IssueV1/components/StatementSection/EditorView/FormatOnSaveCheckbox.vue
@@ -12,7 +12,7 @@
<script setup lang="ts">
import { NCheckbox } from "naive-ui";
import { computed } from "vue";
-import { Language } from "@/types";
+import type { Language } from "@/types";
const props = defineProps<{
language: Language;
diff --git a/frontend/src/components/IssueV1/components/StatementSection/SDLView/useSDLState.ts b/frontend/src/components/IssueV1/components/StatementSection/SDLView/useSDLState.ts
index 902069d8e7..b8f64931aa 100644
--- a/frontend/src/components/IssueV1/components/StatementSection/SDLView/useSDLState.ts
+++ b/frontend/src/components/IssueV1/components/StatementSection/SDLView/useSDLState.ts
@@ -4,11 +4,8 @@ import { sqlServiceClient } from "@/grpcweb";
import { useSilentRequest } from "@/plugins/silent-request";
import { useChangeHistoryStore, useDatabaseV1Store } from "@/store";
import { ChangeHistoryView } from "@/types/proto/v1/database_service";
-import {
- Task,
- TaskRun_Status,
- Task_Status,
-} from "@/types/proto/v1/rollout_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";
diff --git a/frontend/src/components/IssueV1/components/StatementSection/useSQLAdviceMarkers.ts b/frontend/src/components/IssueV1/components/StatementSection/useSQLAdviceMarkers.ts
index 717b7ba59f..86ddce7fb3 100644
--- a/frontend/src/components/IssueV1/components/StatementSection/useSQLAdviceMarkers.ts
+++ b/frontend/src/components/IssueV1/components/StatementSection/useSQLAdviceMarkers.ts
@@ -1,8 +1,8 @@
import { maxBy } from "lodash-es";
import { computed } from "vue";
import type { AdviceOption } from "@/components/MonacoEditor";
+import type { PlanCheckRun } from "@/types/proto/v1/rollout_service";
import {
- PlanCheckRun,
PlanCheckRun_Result_Status,
PlanCheckRun_Type,
} from "@/types/proto/v1/rollout_service";
diff --git a/frontend/src/components/IssueV1/components/TaskListSection/TaskCard.vue b/frontend/src/components/IssueV1/components/TaskListSection/TaskCard.vue
index da66e650f2..ec594b3905 100644
--- a/frontend/src/components/IssueV1/components/TaskListSection/TaskCard.vue
+++ b/frontend/src/components/IssueV1/components/TaskListSection/TaskCard.vue
@@ -58,11 +58,8 @@ import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { InstanceV1Name } from "@/components/v2";
import { TenantMode, Workflow } from "@/types/proto/v1/project_service";
-import {
- Task,
- Task_Type,
- task_StatusToJSON,
-} from "@/types/proto/v1/rollout_service";
+import type { Task } from "@/types/proto/v1/rollout_service";
+import { Task_Type, task_StatusToJSON } from "@/types/proto/v1/rollout_service";
import { extractSchemaVersionFromTask } from "@/utils";
import { databaseForTask, isTaskFinished, useIssueContext } from "../../logic";
import TaskStatusIcon from "../TaskStatusIcon.vue";
diff --git a/frontend/src/components/IssueV1/components/TaskListSection/TaskExtraActionsButton.vue b/frontend/src/components/IssueV1/components/TaskListSection/TaskExtraActionsButton.vue
index 00724cc845..43ef9fcabb 100644
--- a/frontend/src/components/IssueV1/components/TaskListSection/TaskExtraActionsButton.vue
+++ b/frontend/src/components/IssueV1/components/TaskListSection/TaskExtraActionsButton.vue
@@ -21,17 +21,19 @@
<script setup lang="ts">
import { asyncComputed } from "@vueuse/core";
-import { DropdownOption, NDropdown, NButton } from "naive-ui";
-import { VNode, computed, h } from "vue";
+import type { DropdownOption } from "naive-ui";
+import { NDropdown, NButton } from "naive-ui";
+import type { VNode } from "vue";
+import { computed, h } from "vue";
import { useI18n } from "vue-i18n";
+import type { TaskRolloutAction } from "@/components/IssueV1/logic";
import {
- TaskRolloutAction,
allowUserToApplyTaskRolloutAction,
getApplicableTaskRolloutActionList,
useIssueContext,
} from "@/components/IssueV1/logic";
import { useCurrentUserV1 } from "@/store";
-import { Task } from "@/types/proto/v1/rollout_service";
+import type { Task } from "@/types/proto/v1/rollout_service";
import { DropdownItemWithErrorList } from "../common";
type ExtraTaskRolloutActionDropdownOption = DropdownOption & {
diff --git a/frontend/src/components/IssueV1/components/TaskListSection/TaskProgress.vue b/frontend/src/components/IssueV1/components/TaskListSection/TaskProgress.vue
index 5fa31feaf2..8f34da4904 100644
--- a/frontend/src/components/IssueV1/components/TaskListSection/TaskProgress.vue
+++ b/frontend/src/components/IssueV1/components/TaskListSection/TaskProgress.vue
@@ -20,7 +20,8 @@
<script setup lang="ts">
import { NProgress } from "naive-ui";
import { computed } from "vue";
-import { Task, Task_Status } from "@/types/proto/v1/rollout_service";
+import type { Task } from "@/types/proto/v1/rollout_service";
+import { Task_Status } from "@/types/proto/v1/rollout_service";
defineProps<{
task: Task;
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunComment.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunComment.vue
index 8012a54c34..5ca342dc65 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunComment.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunComment.vue
@@ -27,8 +27,8 @@
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { unknownTask, isPostgresFamily } from "@/types";
+import type { TaskRun } from "@/types/proto/v1/rollout_service";
import {
- TaskRun,
TaskRun_ExecutionStatus,
TaskRun_Status,
Task_Type,
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue
index 91cc7670d0..cd8797a347 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue
@@ -29,14 +29,12 @@
<script lang="ts" setup>
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGrid, BBGridColumn, BBGridRow } from "@/bbkit";
+import type { BBGridColumn, BBGridRow } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
import HumanizeDate from "@/components/misc/HumanizeDate.vue";
import { Duration } from "@/types/proto/google/protobuf/duration";
-import {
- Task,
- TaskRun,
- TaskRun_Status,
-} from "@/types/proto/v1/rollout_service";
+import type { Task, TaskRun } from "@/types/proto/v1/rollout_service";
+import { TaskRun_Status } from "@/types/proto/v1/rollout_service";
import TaskRunComment from "./TaskRunComment.vue";
import TaskRunStatusIcon from "./TaskRunStatusIcon.vue";
diff --git a/frontend/src/components/IssueV1/components/TaskStatusIcon.vue b/frontend/src/components/IssueV1/components/TaskStatusIcon.vue
index 138b41e91f..bd8ca4af8a 100644
--- a/frontend/src/components/IssueV1/components/TaskStatusIcon.vue
+++ b/frontend/src/components/IssueV1/components/TaskStatusIcon.vue
@@ -68,9 +68,9 @@
<script lang="ts" setup>
import { computed } from "vue";
import { SkipIcon } from "@/components/Icon";
+import type { Task } from "@/types/proto/v1/rollout_service";
import {
PlanCheckRun_Result_Status,
- Task,
Task_Status,
} from "@/types/proto/v1/rollout_service";
import { planCheckStatusForTask, useIssueContext } from "../logic";
diff --git a/frontend/src/components/IssueV1/logic/action/issue.ts b/frontend/src/components/IssueV1/logic/action/issue.ts
index 24b4a9bd1a..121b6cdcfe 100644
--- a/frontend/src/components/IssueV1/logic/action/issue.ts
+++ b/frontend/src/components/IssueV1/logic/action/issue.ts
@@ -1,7 +1,7 @@
-import { ButtonProps } from "naive-ui";
+import type { ButtonProps } from "naive-ui";
import { t } from "@/plugins/i18n";
-import { ComposedIssue } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { ComposedIssue } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
import { IssueStatus } from "@/types/proto/v1/issue_service";
import {
extractUserResourceName,
diff --git a/frontend/src/components/IssueV1/logic/action/review.ts b/frontend/src/components/IssueV1/logic/action/review.ts
index ccd7112a91..6f17b15a69 100644
--- a/frontend/src/components/IssueV1/logic/action/review.ts
+++ b/frontend/src/components/IssueV1/logic/action/review.ts
@@ -1,14 +1,14 @@
-import { ButtonProps } from "naive-ui";
+import type { ButtonProps } from "naive-ui";
import { t } from "@/plugins/i18n";
import { candidatesOfApprovalStepV1 } from "@/store";
-import { ComposedIssue } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { ComposedIssue } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
import {
IssueStatus,
Issue_Approver_Status,
} from "@/types/proto/v1/issue_service";
import { extractUserResourceName } from "@/utils";
-import { ReviewContext } from "../context";
+import type { ReviewContext } from "../context";
export type IssueReviewAction = "APPROVE" | "SEND_BACK" | "RE_REQUEST";
diff --git a/frontend/src/components/IssueV1/logic/action/stage.ts b/frontend/src/components/IssueV1/logic/action/stage.ts
index 0cbb08ec64..453d01eed4 100644
--- a/frontend/src/components/IssueV1/logic/action/stage.ts
+++ b/frontend/src/components/IssueV1/logic/action/stage.ts
@@ -1,7 +1,8 @@
-import { ComposedIssue } from "@/types";
+import type { ComposedIssue } from "@/types";
import { IssueStatus } from "@/types/proto/v1/issue_service";
-import { Stage, Task } from "@/types/proto/v1/rollout_service";
-import { getApplicableTaskRolloutActionList, TaskRolloutAction } from "./task";
+import type { Stage, Task } from "@/types/proto/v1/rollout_service";
+import type { TaskRolloutAction } from "./task";
+import { getApplicableTaskRolloutActionList } from "./task";
export type StageRolloutAction = Extract<
TaskRolloutAction,
diff --git a/frontend/src/components/IssueV1/logic/action/task.ts b/frontend/src/components/IssueV1/logic/action/task.ts
index 396edfece0..ab4ca2065e 100644
--- a/frontend/src/components/IssueV1/logic/action/task.ts
+++ b/frontend/src/components/IssueV1/logic/action/task.ts
@@ -1,9 +1,11 @@
-import { ButtonProps } from "naive-ui";
+import type { ButtonProps } from "naive-ui";
import { t } from "@/plugins/i18n";
-import { ComposedIssue, PresetRoleType } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { ComposedIssue } from "@/types";
+import { PresetRoleType } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
import { IssueStatus } from "@/types/proto/v1/issue_service";
-import { Task, Task_Status, Task_Type } from "@/types/proto/v1/rollout_service";
+import type { Task } from "@/types/proto/v1/rollout_service";
+import { Task_Status, Task_Type } from "@/types/proto/v1/rollout_service";
export type TaskRolloutAction =
| "ROLLOUT" // NOT_STARTED -> PENDING
diff --git a/frontend/src/components/IssueV1/logic/assignee.ts b/frontend/src/components/IssueV1/logic/assignee.ts
index 655c23ea81..6209200eb0 100644
--- a/frontend/src/components/IssueV1/logic/assignee.ts
+++ b/frontend/src/components/IssueV1/logic/assignee.ts
@@ -1,5 +1,5 @@
-import { ComposedIssue } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { ComposedIssue } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
import { IssueStatus } from "@/types/proto/v1/issue_service";
import { extractUserResourceName, hasProjectPermissionV2 } from "@/utils";
diff --git a/frontend/src/components/IssueV1/logic/base.ts b/frontend/src/components/IssueV1/logic/base.ts
index 9f2b28332e..0bdbb77471 100644
--- a/frontend/src/components/IssueV1/logic/base.ts
+++ b/frontend/src/components/IssueV1/logic/base.ts
@@ -7,7 +7,8 @@ import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
import { useUIStateStore } from "@/store";
import { emptyStage, emptyTask, TaskTypeListWithStatement } from "@/types";
import { TenantMode } from "@/types/proto/v1/project_service";
-import { Stage, Task, Task_Type } from "@/types/proto/v1/rollout_service";
+import type { Stage, Task } from "@/types/proto/v1/rollout_service";
+import { Task_Type } from "@/types/proto/v1/rollout_service";
import {
activeStageInRollout,
activeTaskInRollout,
@@ -18,7 +19,7 @@ import {
stageV1Slug,
taskV1Slug,
} from "@/utils";
-import { IssueContext, IssueEvents, IssuePhase } from "./context";
+import type { IssueContext, IssueEvents, IssuePhase } from "./context";
import { releaserCandidatesForIssue } from "./releaser";
import { extractReviewContext } from "./review";
import { stageForTask } from "./utils";
diff --git a/frontend/src/components/IssueV1/logic/common.ts b/frontend/src/components/IssueV1/logic/common.ts
index 52a3b3f956..14beed7c88 100644
--- a/frontend/src/components/IssueV1/logic/common.ts
+++ b/frontend/src/components/IssueV1/logic/common.ts
@@ -1,5 +1,6 @@
-import { RouteLocation } from "vue-router";
-import { RollbackDetail, UNKNOWN_ID } from "@/types";
+import type { RouteLocation } from "vue-router";
+import type { RollbackDetail } from "@/types";
+import { UNKNOWN_ID } from "@/types";
// Try to find out the relationship between databaseId and rollback issue/task
// Id from the URL query.
diff --git a/frontend/src/components/IssueV1/logic/context.ts b/frontend/src/components/IssueV1/logic/context.ts
index 44fe91e156..8a1de84336 100644
--- a/frontend/src/components/IssueV1/logic/context.ts
+++ b/frontend/src/components/IssueV1/logic/context.ts
@@ -1,12 +1,13 @@
-import Emittery from "emittery";
-import { useDialog } from "naive-ui";
+import type Emittery from "emittery";
+import type { useDialog } from "naive-ui";
import { v4 as uuidv4 } from "uuid";
-import { InjectionKey, Ref, inject, provide } from "vue";
-import { ComposedIssue, ReviewFlow } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
-import { Issue_Approver_Status } from "@/types/proto/v1/issue_service";
-import { Stage, Task } from "@/types/proto/v1/rollout_service";
-import {
+import type { InjectionKey, Ref } from "vue";
+import { inject, provide } from "vue";
+import type { ComposedIssue, ReviewFlow } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
+import type { Issue_Approver_Status } from "@/types/proto/v1/issue_service";
+import type { Stage, Task } from "@/types/proto/v1/rollout_service";
+import type {
IssueReviewAction,
IssueStatusAction,
TaskRolloutAction,
diff --git a/frontend/src/components/IssueV1/logic/initialize/create.ts b/frontend/src/components/IssueV1/logic/initialize/create.ts
index 0598f668ba..deddad86dc 100644
--- a/frontend/src/components/IssueV1/logic/initialize/create.ts
+++ b/frontend/src/components/IssueV1/logic/initialize/create.ts
@@ -2,7 +2,7 @@ import { cloneDeep, groupBy, orderBy } from "lodash-es";
import { v4 as uuidv4 } from "uuid";
import { reactive } from "vue";
import { rolloutServiceClient } from "@/grpcweb";
-import { TemplateType } from "@/plugins";
+import type { TemplateType } from "@/plugins";
import {
useBranchStore,
useChangelistStore,
@@ -12,14 +12,11 @@ import {
useProjectV1Store,
useSheetV1Store,
} from "@/store";
-import {
- ComposedProject,
- emptyIssue,
- TaskTypeListWithStatement,
- UNKNOWN_ID,
-} from "@/types";
+import type { ComposedProject } from "@/types";
+import { emptyIssue, TaskTypeListWithStatement, UNKNOWN_ID } from "@/types";
import { DatabaseConfig } from "@/types/proto/v1/database_service";
import { IssueStatus, Issue_Type } from "@/types/proto/v1/issue_service";
+import type { Stage } from "@/types/proto/v1/rollout_service";
import {
Plan,
Plan_ChangeDatabaseConfig,
@@ -27,7 +24,6 @@ import {
Plan_Spec,
Plan_Step,
Rollout,
- Stage,
Task_Type,
} from "@/types/proto/v1/rollout_service";
import { SheetPayload } from "@/types/proto/v1/sheet_service";
diff --git a/frontend/src/components/IssueV1/logic/initialize/index.ts b/frontend/src/components/IssueV1/logic/initialize/index.ts
index 040ab26269..3b1ef4deb5 100644
--- a/frontend/src/components/IssueV1/logic/initialize/index.ts
+++ b/frontend/src/components/IssueV1/logic/initialize/index.ts
@@ -1,12 +1,10 @@
-import { computed, MaybeRef, ref, unref, watch } from "vue";
-import {
- useRoute,
- useRouter,
- _RouteLocationBase,
- LocationQuery,
-} from "vue-router";
+import type { MaybeRef } from "vue";
+import { computed, ref, unref, watch } from "vue";
+import type { LocationQuery } from "vue-router";
+import { useRoute, useRouter } from "vue-router";
import { experimentalFetchIssueByUID } from "@/store";
-import { ComposedIssue, emptyIssue, EMPTY_ID, UNKNOWN_ID } from "@/types";
+import type { ComposedIssue } from "@/types";
+import { emptyIssue, EMPTY_ID, UNKNOWN_ID } from "@/types";
import { uidFromSlug } from "@/utils";
import { createIssueSkeleton } from "./create";
diff --git a/frontend/src/components/IssueV1/logic/plan-check.ts b/frontend/src/components/IssueV1/logic/plan-check.ts
index 830ee9bad1..a3f1640263 100644
--- a/frontend/src/components/IssueV1/logic/plan-check.ts
+++ b/frontend/src/components/IssueV1/logic/plan-check.ts
@@ -1,12 +1,14 @@
import { maxBy } from "lodash-es";
-import { ComposedIssue } from "@/types";
-import {
+import type { ComposedIssue } from "@/types";
+import type {
PlanCheckRun,
+ Plan_Spec,
+ Task,
+} from "@/types/proto/v1/rollout_service";
+import {
PlanCheckRun_Result_Status,
PlanCheckRun_Status,
PlanCheckRun_Type,
- Plan_Spec,
- Task,
Task_Status,
} from "@/types/proto/v1/rollout_service";
import { databaseForTask, sheetNameForSpec, specForTask } from ".";
diff --git a/frontend/src/components/IssueV1/logic/plan.ts b/frontend/src/components/IssueV1/logic/plan.ts
index 664d7609c1..9553425a12 100644
--- a/frontend/src/components/IssueV1/logic/plan.ts
+++ b/frontend/src/components/IssueV1/logic/plan.ts
@@ -1,4 +1,4 @@
-import { Plan_Spec } from "@/types/proto/v1/rollout_service";
+import type { Plan_Spec } from "@/types/proto/v1/rollout_service";
/**
*
diff --git a/frontend/src/components/IssueV1/logic/releaser.ts b/frontend/src/components/IssueV1/logic/releaser.ts
index 4b3119e247..3a48e833e6 100644
--- a/frontend/src/components/IssueV1/logic/releaser.ts
+++ b/frontend/src/components/IssueV1/logic/releaser.ts
@@ -1,7 +1,7 @@
import { uniqBy } from "lodash-es";
import { useUserStore } from "@/store";
-import { ComposedIssue } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { ComposedIssue } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
import { extractUserResourceName, memberListInProjectV1 } from "@/utils";
export const releaserCandidatesForIssue = (issue: ComposedIssue) => {
diff --git a/frontend/src/components/IssueV1/logic/review.ts b/frontend/src/components/IssueV1/logic/review.ts
index 9b3fa43ea5..ac844e2250 100644
--- a/frontend/src/components/IssueV1/logic/review.ts
+++ b/frontend/src/components/IssueV1/logic/review.ts
@@ -6,23 +6,21 @@ import {
useSettingV1Store,
useUserStore,
} from "@/store";
-import {
+import type {
ReviewFlow,
- emptyFlow,
MaybeRef,
ComposedIssue,
WrappedReviewStep,
- PresetRoleType,
} from "@/types";
+import { emptyFlow, PresetRoleType } from "@/types";
+import type { ApprovalNode, Issue } from "@/types/proto/v1/issue_service";
import {
- ApprovalNode,
ApprovalNode_GroupValue,
ApprovalNode_Type,
- Issue,
Issue_Approver_Status,
} from "@/types/proto/v1/issue_service";
import { displayRoleTitle, extractUserResourceName } from "@/utils";
-import { ReviewContext } from "./context";
+import type { ReviewContext } from "./context";
export const extractReviewContext = (issue: MaybeRef<Issue>): ReviewContext => {
const ready = computed(() => {
diff --git a/frontend/src/components/IssueV1/logic/rollout.ts b/frontend/src/components/IssueV1/logic/rollout.ts
index 0d1119ed30..fd1c19db93 100644
--- a/frontend/src/components/IssueV1/logic/rollout.ts
+++ b/frontend/src/components/IssueV1/logic/rollout.ts
@@ -1,10 +1,10 @@
import { t } from "@/plugins/i18n";
-import { ComposedIssue } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { ComposedIssue } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
import { IssueStatus, Issue_Type } from "@/types/proto/v1/issue_service";
import { TenantMode } from "@/types/proto/v1/project_service";
+import type { Task } from "@/types/proto/v1/rollout_service";
import {
- Task,
Task_Status,
task_StatusToJSON,
Task_Type,
diff --git a/frontend/src/components/IssueV1/logic/sidebar.ts b/frontend/src/components/IssueV1/logic/sidebar.ts
index 592d9f8cc4..219acb44ea 100644
--- a/frontend/src/components/IssueV1/logic/sidebar.ts
+++ b/frontend/src/components/IssueV1/logic/sidebar.ts
@@ -1,5 +1,6 @@
import { useElementSize } from "@vueuse/core";
-import { InjectionKey, Ref, computed, inject, provide, ref } from "vue";
+import type { InjectionKey, Ref } from "vue";
+import { computed, inject, provide, ref } from "vue";
export type SidebarMode = "NONE" | "DESKTOP" | "MOBILE";
diff --git a/frontend/src/components/IssueV1/logic/subscriber.ts b/frontend/src/components/IssueV1/logic/subscriber.ts
index 831732486b..002bd91263 100644
--- a/frontend/src/components/IssueV1/logic/subscriber.ts
+++ b/frontend/src/components/IssueV1/logic/subscriber.ts
@@ -2,7 +2,7 @@ import { pull } from "lodash-es";
import { issueServiceClient } from "@/grpcweb";
import { t } from "@/plugins/i18n";
import { pushNotification } from "@/store";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
import { Issue } from "@/types/proto/v1/issue_service";
export const updateIssueSubscribers = async (
diff --git a/frontend/src/components/IssueV1/logic/task-run.ts b/frontend/src/components/IssueV1/logic/task-run.ts
index 976d0fd6c1..b8038c8992 100644
--- a/frontend/src/components/IssueV1/logic/task-run.ts
+++ b/frontend/src/components/IssueV1/logic/task-run.ts
@@ -1,6 +1,6 @@
import { first, orderBy } from "lodash-es";
-import { ComposedIssue } from "@/types";
-import { Task } from "@/types/proto/v1/rollout_service";
+import type { ComposedIssue } from "@/types";
+import type { Task } from "@/types/proto/v1/rollout_service";
import { extractTaskUID } from "@/utils";
export const taskRunListForTask = (issue: ComposedIssue, task: Task) => {
diff --git a/frontend/src/components/IssueV1/logic/transition.ts b/frontend/src/components/IssueV1/logic/transition.ts
index bb3c453633..e1dae9ddea 100644
--- a/frontend/src/components/IssueV1/logic/transition.ts
+++ b/frontend/src/components/IssueV1/logic/transition.ts
@@ -1,16 +1,15 @@
import { useCurrentUserV1 } from "@/store";
-import {
+import type {
ComposedIssue,
IssueStatusTransitionType,
- ISSUE_STATUS_TRANSITION_LIST,
IssueStatusTransition,
} from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import { ISSUE_STATUS_TRANSITION_LIST } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
import { IssueStatus } from "@/types/proto/v1/issue_service";
import { Task_Status } from "@/types/proto/v1/rollout_service";
+import type { StageStatusTransition, TaskStatusTransition } from "@/utils";
import {
- StageStatusTransition,
- TaskStatusTransition,
isDatabaseRelatedIssue,
flattenTaskV1List,
isGrantRequestIssue,
diff --git a/frontend/src/components/IssueV1/logic/utils.ts b/frontend/src/components/IssueV1/logic/utils.ts
index 7e6ab53830..2d780ba0aa 100644
--- a/frontend/src/components/IssueV1/logic/utils.ts
+++ b/frontend/src/components/IssueV1/logic/utils.ts
@@ -6,28 +6,20 @@ import {
useDatabaseV1Store,
useInstanceV1Store,
} from "@/store";
-import {
- ComposedIssue,
- ComposedProject,
- unknownDatabase,
- UNKNOWN_ID,
-} from "@/types";
+import type { ComposedIssue, ComposedProject } from "@/types";
+import { unknownDatabase, UNKNOWN_ID } from "@/types";
import { State } from "@/types/proto/v1/common";
import { InstanceResource } from "@/types/proto/v1/instance_service";
import { IssueStatus } from "@/types/proto/v1/issue_service";
-import {
- Plan,
- Task,
- Task_Status,
- Task_Type,
-} from "@/types/proto/v1/rollout_service";
+import type { Plan, Task } from "@/types/proto/v1/rollout_service";
+import { Task_Status, Task_Type } from "@/types/proto/v1/rollout_service";
import {
defer,
extractDatabaseResourceName,
flattenSpecList,
flattenTaskV1List,
} from "@/utils";
-import { IssueContext } from "./context";
+import type { IssueContext } from "./context";
export const databaseForTask = (issue: ComposedIssue, task: Task) => {
if (task.type === Task_Type.DATABASE_CREATE) {
diff --git a/frontend/src/components/KBar/RenderResults.vue b/frontend/src/components/KBar/RenderResults.vue
index 11639c19ec..c5437d7df2 100644
--- a/frontend/src/components/KBar/RenderResults.vue
+++ b/frontend/src/components/KBar/RenderResults.vue
@@ -35,12 +35,8 @@
</template>
<script lang="ts">
-import {
- useKBarMatches,
- KBarResults,
- ActionImpl,
- useKBarState,
-} from "@bytebase/vue-kbar";
+import type { ActionImpl } from "@bytebase/vue-kbar";
+import { useKBarMatches, KBarResults, useKBarState } from "@bytebase/vue-kbar";
import { defineComponent } from "vue";
export default defineComponent({
diff --git a/frontend/src/components/KBar/useDatabaseActions.ts b/frontend/src/components/KBar/useDatabaseActions.ts
index 5613253c1d..11aede659c 100644
--- a/frontend/src/components/KBar/useDatabaseActions.ts
+++ b/frontend/src/components/KBar/useDatabaseActions.ts
@@ -1,4 +1,5 @@
-import { Action, defineAction, useRegisterActions } from "@bytebase/vue-kbar";
+import type { Action } from "@bytebase/vue-kbar";
+import { defineAction, useRegisterActions } from "@bytebase/vue-kbar";
import { computed, unref } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
@@ -7,12 +8,8 @@ import {
useDatabaseV1Store,
useEnvironmentV1List,
} from "@/store";
-import {
- ComposedDatabase,
- ComposedProject,
- DEFAULT_PROJECT_V1_NAME,
- MaybeRef,
-} from "@/types";
+import type { ComposedDatabase, ComposedProject, MaybeRef } from "@/types";
+import { DEFAULT_PROJECT_V1_NAME } from "@/types";
import { State } from "@/types/proto/v1/common";
import {
groupBy,
diff --git a/frontend/src/components/KBar/useProjectActions.ts b/frontend/src/components/KBar/useProjectActions.ts
index c67a3ccb26..30abc936b1 100644
--- a/frontend/src/components/KBar/useProjectActions.ts
+++ b/frontend/src/components/KBar/useProjectActions.ts
@@ -1,4 +1,5 @@
-import { Action, defineAction, useRegisterActions } from "@bytebase/vue-kbar";
+import type { Action } from "@bytebase/vue-kbar";
+import { defineAction, useRegisterActions } from "@bytebase/vue-kbar";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
diff --git a/frontend/src/components/KBar/utils.ts b/frontend/src/components/KBar/utils.ts
index 2f94fa1d23..6914504071 100644
--- a/frontend/src/components/KBar/utils.ts
+++ b/frontend/src/components/KBar/utils.ts
@@ -1,4 +1,4 @@
-import { Action, CompareFn } from "@bytebase/vue-kbar";
+import type { Action, CompareFn } from "@bytebase/vue-kbar";
import { findLastIndex } from "lodash-es";
const MAX_RANKING = Infinity;
diff --git a/frontend/src/components/Label/LabelEditorRow.vue b/frontend/src/components/Label/LabelEditorRow.vue
index 8b3a42f2b0..165931fb11 100644
--- a/frontend/src/components/Label/LabelEditorRow.vue
+++ b/frontend/src/components/Label/LabelEditorRow.vue
@@ -54,7 +54,7 @@
import { NButton, NInput } from "naive-ui";
import { computed } from "vue";
import ErrorList from "../misc/ErrorList.vue";
-import { Label } from "./types";
+import type { Label } from "./types";
const props = defineProps<{
kv: Label;
diff --git a/frontend/src/components/Label/LabelListEditor.vue b/frontend/src/components/Label/LabelListEditor.vue
index 51732e16e0..dac6496804 100644
--- a/frontend/src/components/Label/LabelListEditor.vue
+++ b/frontend/src/components/Label/LabelListEditor.vue
@@ -35,7 +35,7 @@ import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { MAX_LABEL_VALUE_LENGTH, isVirtualLabelKey } from "@/utils";
import LabelEditorRow from "./LabelEditorRow.vue";
-import { Label } from "./types";
+import type { Label } from "./types";
const props = defineProps<{
kvList: Label[];
diff --git a/frontend/src/components/LabelEditorDrawer.vue b/frontend/src/components/LabelEditorDrawer.vue
index 1c35a7f658..cd9a9cd71a 100644
--- a/frontend/src/components/LabelEditorDrawer.vue
+++ b/frontend/src/components/LabelEditorDrawer.vue
@@ -39,7 +39,7 @@ import { isEqual, cloneDeep } from "lodash-es";
import { computed, reactive, watch, ref } from "vue";
import { useI18n } from "vue-i18n";
import { LabelListEditor } from "@/components/Label";
-import { Label } from "@/components/Label/types";
+import type { Label } from "@/components/Label/types";
import { Drawer, DrawerContent } from "@/components/v2";
import { convertKVListToLabels } from "@/utils";
diff --git a/frontend/src/components/LearnMoreLink.vue b/frontend/src/components/LearnMoreLink.vue
index b4890c45a5..b2a8b9578e 100644
--- a/frontend/src/components/LearnMoreLink.vue
+++ b/frontend/src/components/LearnMoreLink.vue
@@ -12,7 +12,7 @@
<script lang="ts" setup>
import { ExternalLinkIcon } from "lucide-vue-next";
-import { PropType } from "vue";
+import type { PropType } from "vue";
defineProps({
url: {
diff --git a/frontend/src/components/MarkdownEditor/MarkdownEditor.vue b/frontend/src/components/MarkdownEditor/MarkdownEditor.vue
index 9cacae059c..119af0bbde 100644
--- a/frontend/src/components/MarkdownEditor/MarkdownEditor.vue
+++ b/frontend/src/components/MarkdownEditor/MarkdownEditor.vue
@@ -106,7 +106,7 @@
<script lang="ts" setup>
import { nextTick, ref, reactive, watch, toRef } from "vue";
import { useI18n } from "vue-i18n";
-import { ComposedIssue, ComposedProject } from "@/types";
+import type { ComposedIssue, ComposedProject } from "@/types";
import { Task_Status } from "@/types/proto/v1/rollout_service";
import {
activeTaskInRollout,
diff --git a/frontend/src/components/MarkdownEditor/useRenderMarkdown.ts b/frontend/src/components/MarkdownEditor/useRenderMarkdown.ts
index a0582c6000..3dd14b02fc 100644
--- a/frontend/src/components/MarkdownEditor/useRenderMarkdown.ts
+++ b/frontend/src/components/MarkdownEditor/useRenderMarkdown.ts
@@ -1,13 +1,11 @@
import { useEventListener } from "@vueuse/core";
import { v1 as uuidv1 } from "uuid";
-import { Ref, computed, ref, unref, watchEffect } from "vue";
+import type { Ref } from "vue";
+import { computed, ref, unref, watchEffect } from "vue";
import { useI18n } from "vue-i18n";
-import { ComposedProject, MaybeRef } from "@/types";
-import {
- ExtractPromiseType,
- extractProjectResourceName,
- minmax,
-} from "@/utils";
+import type { ComposedProject, MaybeRef } from "@/types";
+import type { ExtractPromiseType } from "@/utils";
+import { extractProjectResourceName, minmax } from "@/utils";
export type UseRenderMarkdownOptions = {
minHeight: number;
diff --git a/frontend/src/components/MonacoEditor/composables/useAutoComplete.ts b/frontend/src/components/MonacoEditor/composables/useAutoComplete.ts
index 52c8f84a62..98d6578ba8 100644
--- a/frontend/src/components/MonacoEditor/composables/useAutoComplete.ts
+++ b/frontend/src/components/MonacoEditor/composables/useAutoComplete.ts
@@ -1,5 +1,6 @@
import type monaco from "monaco-editor";
-import { Ref, computed, watch } from "vue";
+import type { Ref } from "vue";
+import { computed, watch } from "vue";
import { UNKNOWN_ID } from "@/types";
import {
extractDatabaseResourceName,
diff --git a/frontend/src/components/MonacoEditor/composables/useAutoHeight.ts b/frontend/src/components/MonacoEditor/composables/useAutoHeight.ts
index fa5600ef01..46b64bc213 100644
--- a/frontend/src/components/MonacoEditor/composables/useAutoHeight.ts
+++ b/frontend/src/components/MonacoEditor/composables/useAutoHeight.ts
@@ -1,5 +1,6 @@
import type monaco from "monaco-editor";
-import { Ref, unref, watch } from "vue";
+import type { Ref } from "vue";
+import { unref, watch } from "vue";
import type { MaybeRef } from "@/types";
import { minmax } from "@/utils";
import type { MonacoModule } from "../types";
diff --git a/frontend/src/components/MonacoEditor/composables/useFormatContent.ts b/frontend/src/components/MonacoEditor/composables/useFormatContent.ts
index d12cc03945..54f940cff9 100644
--- a/frontend/src/components/MonacoEditor/composables/useFormatContent.ts
+++ b/frontend/src/components/MonacoEditor/composables/useFormatContent.ts
@@ -1,5 +1,6 @@
import type monaco from "monaco-editor";
-import { Ref, watchEffect } from "vue";
+import type { Ref } from "vue";
+import { watchEffect } from "vue";
import type { SQLDialect } from "@/types";
import type { MonacoModule } from "../types";
import { formatEditorContent } from "../utils";
diff --git a/frontend/src/components/MonacoEditor/composables/useModel.ts b/frontend/src/components/MonacoEditor/composables/useModel.ts
index 9ff1b288ed..2eb2c2ddee 100644
--- a/frontend/src/components/MonacoEditor/composables/useModel.ts
+++ b/frontend/src/components/MonacoEditor/composables/useModel.ts
@@ -1,5 +1,6 @@
import type monaco from "monaco-editor";
-import { Ref, watch } from "vue";
+import type { Ref } from "vue";
+import { watch } from "vue";
import type { MonacoModule } from "../types";
// Store ViewState (e.g., selection and scroll position) for each TextModel
diff --git a/frontend/src/components/MonacoEditor/composables/useOptions.ts b/frontend/src/components/MonacoEditor/composables/useOptions.ts
index 7e6414be3b..e8a8e9e8fd 100644
--- a/frontend/src/components/MonacoEditor/composables/useOptions.ts
+++ b/frontend/src/components/MonacoEditor/composables/useOptions.ts
@@ -1,8 +1,9 @@
import type monaco from "monaco-editor";
-import { Ref, unref, watch, watchEffect } from "vue";
+import type { Ref } from "vue";
+import { unref, watch, watchEffect } from "vue";
import type { MaybeRef } from "@/types";
import type { MonacoModule } from "../types";
-import { EditorType } from "./common";
+import type { EditorType } from "./common";
type OptionsType<E> = E extends monaco.editor.IStandaloneCodeEditor
? monaco.editor.IEditorOptions
diff --git a/frontend/src/components/MonacoEditor/lsp-client.ts b/frontend/src/components/MonacoEditor/lsp-client.ts
index c46f91e919..29c6921476 100644
--- a/frontend/src/components/MonacoEditor/lsp-client.ts
+++ b/frontend/src/components/MonacoEditor/lsp-client.ts
@@ -1,10 +1,9 @@
import { MonacoLanguageClient } from "monaco-languageclient";
-import {
- CloseAction,
- ErrorAction,
+import type {
ExecuteCommandParams,
MessageTransports,
} from "vscode-languageclient";
+import { CloseAction, ErrorAction } from "vscode-languageclient";
import {
WebSocketMessageReader,
WebSocketMessageWriter,
diff --git a/frontend/src/components/MonacoEditor/text-model.ts b/frontend/src/components/MonacoEditor/text-model.ts
index 06d1983834..ff2ca6dfb2 100644
--- a/frontend/src/components/MonacoEditor/text-model.ts
+++ b/frontend/src/components/MonacoEditor/text-model.ts
@@ -1,7 +1,7 @@
import { Uri, editor } from "monaco-editor";
import slug from "slug";
import { isRef, markRaw, ref, shallowRef, unref, watch } from "vue";
-import { Language, MaybeRef } from "@/types";
+import type { Language, MaybeRef } from "@/types";
import { MonacoEditorReady } from "./editor";
const ready = ref(false);
diff --git a/frontend/src/components/PagedActivityTable.vue b/frontend/src/components/PagedActivityTable.vue
index cd491b1b7e..cb7487f9e0 100644
--- a/frontend/src/components/PagedActivityTable.vue
+++ b/frontend/src/components/PagedActivityTable.vue
@@ -27,10 +27,11 @@
<script lang="ts" setup>
import { useSessionStorage } from "@vueuse/core";
import { stringify } from "qs";
-import { computed, PropType, reactive, watch } from "vue";
+import type { PropType } from "vue";
+import { computed, reactive, watch } from "vue";
import { useIsLoggedIn, useActivityV1Store } from "@/store";
-import { FindActivityMessage } from "@/types";
-import { LogEntity } from "@/types/proto/v1/logging_service";
+import type { FindActivityMessage } from "@/types";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
type LocalState = {
loading: boolean;
diff --git a/frontend/src/components/PartitionTablesDataTable.vue b/frontend/src/components/PartitionTablesDataTable.vue
index b8d7c78cad..9007ea9a0c 100644
--- a/frontend/src/components/PartitionTablesDataTable.vue
+++ b/frontend/src/components/PartitionTablesDataTable.vue
@@ -14,11 +14,11 @@ import { NDataTable } from "naive-ui";
import { computed, h } from "vue";
import { useI18n } from "vue-i18n";
import TextOverflowPopover from "@/components/misc/TextOverflowPopover.vue";
-import {
+import type {
TableMetadata,
TablePartitionMetadata,
- TablePartitionMetadata_Type,
} from "@/types/proto/v1/database_service";
+import { TablePartitionMetadata_Type } from "@/types/proto/v1/database_service";
type PartitionTableRowData = {
name: string;
diff --git a/frontend/src/components/PricingTable/FeatureItem.vue b/frontend/src/components/PricingTable/FeatureItem.vue
index ca7600aa90..481f44c187 100644
--- a/frontend/src/components/PricingTable/FeatureItem.vue
+++ b/frontend/src/components/PricingTable/FeatureItem.vue
@@ -36,9 +36,10 @@
<script lang="ts" setup>
import { NTooltip } from "naive-ui";
-import { PropType, computed } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { getFeatureLocalization } from "@/types";
-import { LocalPlan } from "./types";
+import type { LocalPlan } from "./types";
const props = defineProps({
plan: {
diff --git a/frontend/src/components/PricingTable/PricingTable.vue b/frontend/src/components/PricingTable/PricingTable.vue
index 548ee8b134..1929de1940 100644
--- a/frontend/src/components/PricingTable/PricingTable.vue
+++ b/frontend/src/components/PricingTable/PricingTable.vue
@@ -279,15 +279,11 @@ import { reactive, computed, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useLanguage } from "@/composables/useLanguage";
import { useSubscriptionV1Store } from "@/store";
-import {
- Plan,
- PLANS,
- FEATURE_SECTIONS,
- ENTERPRISE_INQUIRE_LINK,
-} from "@/types";
+import type { Plan } from "@/types";
+import { PLANS, FEATURE_SECTIONS, ENTERPRISE_INQUIRE_LINK } from "@/types";
import { PlanType } from "@/types/proto/v1/subscription_service";
import FeatureItem from "./FeatureItem.vue";
-import { LocalPlan } from "./types";
+import type { LocalPlan } from "./types";
interface LocalState {
isMonthly: boolean;
diff --git a/frontend/src/components/PricingTable/types.ts b/frontend/src/components/PricingTable/types.ts
index 14032e8783..17873cad6b 100644
--- a/frontend/src/components/PricingTable/types.ts
+++ b/frontend/src/components/PricingTable/types.ts
@@ -1,4 +1,4 @@
-import { Plan } from "@/types";
+import type { Plan } from "@/types";
export interface LocalPlan extends Plan {
label: string;
diff --git a/frontend/src/components/PrincipalAvatar.vue b/frontend/src/components/PrincipalAvatar.vue
index a9f942c2e3..1b2be252ae 100644
--- a/frontend/src/components/PrincipalAvatar.vue
+++ b/frontend/src/components/PrincipalAvatar.vue
@@ -9,12 +9,14 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { BBAvatar } from "@/bbkit";
-import { BBAvatarSizeType } from "@/bbkit/types";
+import type { BBAvatarSizeType } from "@/bbkit/types";
import { UNKNOWN_ID, unknownUser } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
-import { extractUserUID, VueClass } from "@/utils";
+import type { User } from "@/types/proto/v1/auth_service";
+import type { VueClass } from "@/utils";
+import { extractUserUID } from "@/utils";
const props = defineProps({
user: {
diff --git a/frontend/src/components/ProfileDropdown.vue b/frontend/src/components/ProfileDropdown.vue
index 0df186e44b..76e225686d 100644
--- a/frontend/src/components/ProfileDropdown.vue
+++ b/frontend/src/components/ProfileDropdown.vue
@@ -14,7 +14,8 @@
</template>
<script lang="ts" setup>
-import { NSwitch, NDropdown, DropdownOption } from "naive-ui";
+import type { DropdownOption } from "naive-ui";
+import { NSwitch, NDropdown } from "naive-ui";
import { storeToRefs } from "pinia";
import { computed, ref, h } from "vue";
import { useI18n } from "vue-i18n";
diff --git a/frontend/src/components/Project/CreateProjectBranchProtectionRulePanel.vue b/frontend/src/components/Project/CreateProjectBranchProtectionRulePanel.vue
index 3b0f1a03a6..bb7b8878ab 100644
--- a/frontend/src/components/Project/CreateProjectBranchProtectionRulePanel.vue
+++ b/frontend/src/components/Project/CreateProjectBranchProtectionRulePanel.vue
@@ -115,7 +115,8 @@ import {
useProjectBranchProtectionRules,
useProjectProtectionRulesStore,
} from "@/store/modules/v1/projectProtectionRoles";
-import { ComposedProject, PresetRoleType } from "@/types";
+import type { ComposedProject } from "@/types";
+import { PresetRoleType } from "@/types";
import {
ProtectionRule,
ProtectionRule_BranchSource as BranchSource,
diff --git a/frontend/src/components/Project/ProjectArchiveRestoreButton.vue b/frontend/src/components/Project/ProjectArchiveRestoreButton.vue
index 612c9305c7..990d068345 100644
--- a/frontend/src/components/Project/ProjectArchiveRestoreButton.vue
+++ b/frontend/src/components/Project/ProjectArchiveRestoreButton.vue
@@ -42,7 +42,7 @@ import { NCheckbox } from "naive-ui";
import { computed, ref } from "vue";
import { restartAppRoot } from "@/AppRootContext";
import { useCurrentUserV1, useProjectV1Store } from "@/store";
-import { ComposedProject } from "@/types";
+import type { ComposedProject } from "@/types";
import { State } from "@/types/proto/v1/common";
import { hasWorkspacePermissionV2 } from "@/utils";
diff --git a/frontend/src/components/Project/ProjectBranchProtectionRulesSettingPanel.vue b/frontend/src/components/Project/ProjectBranchProtectionRulesSettingPanel.vue
index 7dc1c59fec..b4ac47b057 100644
--- a/frontend/src/components/Project/ProjectBranchProtectionRulesSettingPanel.vue
+++ b/frontend/src/components/Project/ProjectBranchProtectionRulesSettingPanel.vue
@@ -54,8 +54,8 @@ import { PenLine } from "lucide-vue-next";
import { NButton, NTag } from "naive-ui";
import { ref } from "vue";
import { useProjectBranchProtectionRules } from "@/store/modules/v1/projectProtectionRoles";
-import { ComposedProject } from "@/types";
-import { ProtectionRule } from "@/types/proto/v1/project_service";
+import type { ComposedProject } from "@/types";
+import type { ProtectionRule } from "@/types/proto/v1/project_service";
import CreateProjectBranchProtectionRulePanel from "./CreateProjectBranchProtectionRulePanel.vue";
const props = defineProps<{
diff --git a/frontend/src/components/Project/ProjectCreatePanel.vue b/frontend/src/components/Project/ProjectCreatePanel.vue
index 0550448e79..0c148095ab 100644
--- a/frontend/src/components/Project/ProjectCreatePanel.vue
+++ b/frontend/src/components/Project/ProjectCreatePanel.vue
@@ -106,8 +106,10 @@ import {
} from "@/store";
import { projectNamePrefix } from "@/store/modules/v1/common";
import { useProjectV1Store } from "@/store/modules/v1/project";
-import { ResourceId, ValidatedMessage, emptyProject } from "@/types";
-import { Project, TenantMode } from "@/types/proto/v1/project_service";
+import type { ResourceId, ValidatedMessage } from "@/types";
+import { emptyProject } from "@/types";
+import type { Project } from "@/types/proto/v1/project_service";
+import { TenantMode } from "@/types/proto/v1/project_service";
import { randomString } from "@/utils";
import { hasWorkspacePermissionV2 } from "@/utils";
import { getErrorCode } from "@/utils/grpcweb";
diff --git a/frontend/src/components/Project/ProjectGeneralSettingPanel.vue b/frontend/src/components/Project/ProjectGeneralSettingPanel.vue
index c94a7b7141..6f24d26e80 100644
--- a/frontend/src/components/Project/ProjectGeneralSettingPanel.vue
+++ b/frontend/src/components/Project/ProjectGeneralSettingPanel.vue
@@ -82,8 +82,10 @@ import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
import ResourceIdField from "@/components/v2/Form/ResourceIdField.vue";
import { hasFeature, pushNotification, useProjectV1Store } from "@/store";
-import { DEFAULT_PROJECT_ID, FeatureType } from "@/types";
-import { Project, TenantMode } from "@/types/proto/v1/project_service";
+import type { FeatureType } from "@/types";
+import { DEFAULT_PROJECT_ID } from "@/types";
+import type { Project } from "@/types/proto/v1/project_service";
+import { TenantMode } from "@/types/proto/v1/project_service";
import { extractProjectResourceName } from "@/utils";
interface LocalState {
diff --git a/frontend/src/components/Project/ProjectIssuesPanel.vue b/frontend/src/components/Project/ProjectIssuesPanel.vue
index 91f98cbcc6..cac1b54ead 100644
--- a/frontend/src/components/Project/ProjectIssuesPanel.vue
+++ b/frontend/src/components/Project/ProjectIssuesPanel.vue
@@ -85,12 +85,10 @@ import { useI18n } from "vue-i18n";
import { useRoute, useRouter } from "vue-router";
import IssueTableV1 from "@/components/IssueV1/components/IssueTableV1.vue";
import PagedIssueTableV1 from "@/components/IssueV1/components/PagedIssueTableV1.vue";
-import { TabFilterItem } from "@/components/v2";
-import { ComposedProject } from "@/types";
+import type { TabFilterItem } from "@/components/v2";
+import type { ComposedProject } from "@/types";
+import type { SearchParams, SearchScope, SearchScopeId } from "@/utils";
import {
- SearchParams,
- SearchScope,
- SearchScopeId,
buildIssueFilterBySearchParams,
buildSearchParamsBySearchText,
buildSearchTextBySearchParams,
diff --git a/frontend/src/components/Project/ProjectSidebarV1.vue b/frontend/src/components/Project/ProjectSidebarV1.vue
index 4b8f0bf93e..0382d1e15c 100644
--- a/frontend/src/components/Project/ProjectSidebarV1.vue
+++ b/frontend/src/components/Project/ProjectSidebarV1.vue
@@ -22,8 +22,9 @@ import {
} from "lucide-vue-next";
import { computed, h } from "vue";
import { useI18n } from "vue-i18n";
-import { useRouter, useRoute, RouteRecordRaw } from "vue-router";
-import { SidebarItem } from "@/components/CommonSidebar.vue";
+import type { RouteRecordRaw } from "vue-router";
+import { useRouter, useRoute } from "vue-router";
+import type { SidebarItem } from "@/components/CommonSidebar.vue";
import projectV1Routes, {
PROJECT_V1_ROUTE_DATABASES,
PROJECT_V1_ROUTE_ISSUES,
@@ -55,7 +56,8 @@ import projectV1Routes, {
} from "@/router/dashboard/projectV1";
import { useCurrentUserV1 } from "@/store";
import { getProjectName } from "@/store/modules/v1/common";
-import { DEFAULT_PROJECT_V1_NAME, ProjectPermission } from "@/types";
+import type { ProjectPermission } from "@/types";
+import { DEFAULT_PROJECT_V1_NAME } from "@/types";
import { TenantMode } from "@/types/proto/v1/project_service";
import { hasProjectPermissionV2 } from "@/utils";
import { useProjectDatabaseActions } from "../KBar/useDatabaseActions";
diff --git a/frontend/src/components/Project/ProjectSwitchModal.vue b/frontend/src/components/Project/ProjectSwitchModal.vue
index e65d8ef65a..252b579a22 100644
--- a/frontend/src/components/Project/ProjectSwitchModal.vue
+++ b/frontend/src/components/Project/ProjectSwitchModal.vue
@@ -55,11 +55,11 @@ import { useRecentProjects } from "@/components/Project/useRecentProjects";
import { SearchBox, ProjectV1Table } from "@/components/v2";
import { Drawer } from "@/components/v2";
import { useProjectV1List } from "@/store";
+import type { ComposedProject } from "@/types";
import {
DEFAULT_PROJECT_ID,
UNKNOWN_PROJECT_NAME,
EMPTY_PROJECT_NAME,
- ComposedProject,
} from "@/types";
import { filterProjectV1ListByKeyword } from "@/utils";
diff --git a/frontend/src/components/Project/useCurrentProject.ts b/frontend/src/components/Project/useCurrentProject.ts
index af37f2855e..198004d2ea 100644
--- a/frontend/src/components/Project/useCurrentProject.ts
+++ b/frontend/src/components/Project/useCurrentProject.ts
@@ -1,5 +1,6 @@
import { computedAsync } from "@vueuse/core";
-import { computed, unref, ComputedRef } from "vue";
+import type { ComputedRef } from "vue";
+import { computed, unref } from "vue";
import { useRoute } from "vue-router";
import {
useProjectV1Store,
diff --git a/frontend/src/components/ProjectActivityPanel.vue b/frontend/src/components/ProjectActivityPanel.vue
index 0604fac4e4..b7d7899872 100644
--- a/frontend/src/components/ProjectActivityPanel.vue
+++ b/frontend/src/components/ProjectActivityPanel.vue
@@ -18,8 +18,8 @@
</template>
<script lang="ts" setup>
-import { PropType } from "vue";
-import { Project } from "@/types/proto/v1/project_service";
+import type { PropType } from "vue";
+import type { Project } from "@/types/proto/v1/project_service";
defineProps({
project: {
diff --git a/frontend/src/components/ProjectBranchesPanel.vue b/frontend/src/components/ProjectBranchesPanel.vue
index 4e65381f84..b68885324e 100644
--- a/frontend/src/components/ProjectBranchesPanel.vue
+++ b/frontend/src/components/ProjectBranchesPanel.vue
@@ -45,7 +45,7 @@ import { PROJECT_V1_ROUTE_BRANCH_DETAIL } from "@/router/dashboard/projectV1";
import { useCurrentUserV1 } from "@/store";
import { useBranchListByProject } from "@/store/modules/branch";
import { userNamePrefix } from "@/store/modules/v1/common";
-import { ComposedProject } from "@/types";
+import type { ComposedProject } from "@/types";
import { hasProjectPermissionV2 } from "@/utils";
const props = defineProps<{
diff --git a/frontend/src/components/ProjectChangeHistoryPanel.vue b/frontend/src/components/ProjectChangeHistoryPanel.vue
index f210210148..b800549cbf 100644
--- a/frontend/src/components/ProjectChangeHistoryPanel.vue
+++ b/frontend/src/components/ProjectChangeHistoryPanel.vue
@@ -24,12 +24,13 @@
</template>
<script lang="ts" setup>
-import { PropType, reactive, watchEffect } from "vue";
-import { BBTableSectionDataSource } from "@/bbkit/types";
+import type { PropType } from "vue";
+import { reactive, watchEffect } from "vue";
+import type { BBTableSectionDataSource } from "@/bbkit/types";
import { ChangeHistoryTable } from "@/components/ChangeHistory";
import { useChangeHistoryStore } from "@/store";
-import { ComposedDatabase } from "@/types";
-import { ChangeHistory } from "@/types/proto/v1/database_service";
+import type { ComposedDatabase } from "@/types";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
import { databaseV1Url } from "@/utils";
// Show at most 5 recent migration history for each database
diff --git a/frontend/src/components/ProjectDatabasesPanel.vue b/frontend/src/components/ProjectDatabasesPanel.vue
index a709785f3c..82c8cb74ac 100644
--- a/frontend/src/components/ProjectDatabasesPanel.vue
+++ b/frontend/src/components/ProjectDatabasesPanel.vue
@@ -91,10 +91,11 @@
import { NCheckbox } from "naive-ui";
import { reactive, computed } from "vue";
import { useFilterStore, usePageMode } from "@/store";
-import { ComposedDatabase, ComposedProject, UNKNOWN_ID } from "@/types";
+import type { ComposedDatabase, ComposedProject } from "@/types";
+import { UNKNOWN_ID } from "@/types";
+import type { SearchParams } from "@/utils";
import {
filterDatabaseV1ByKeyword,
- SearchParams,
CommonFilterScopeIdList,
extractEnvironmentResourceName,
extractInstanceResourceName,
diff --git a/frontend/src/components/ProjectDeploymentConfigPanel.vue b/frontend/src/components/ProjectDeploymentConfigPanel.vue
index 3161ccbe38..08189fe178 100644
--- a/frontend/src/components/ProjectDeploymentConfigPanel.vue
+++ b/frontend/src/components/ProjectDeploymentConfigPanel.vue
@@ -81,27 +81,21 @@
<script lang="ts" setup>
import { cloneDeep, isEqual } from "lodash-es";
import { NPopover, useDialog } from "naive-ui";
-import {
- computed,
- nextTick,
- PropType,
- reactive,
- watch,
- watchEffect,
-} from "vue";
+import type { PropType } from "vue";
+import { computed, nextTick, reactive, watch, watchEffect } from "vue";
import { useI18n } from "vue-i18n";
import {
pushNotification,
useDeploymentConfigV1Store,
useEnvironmentV1List,
} from "@/store";
-import {
+import type {
DeploymentConfig,
LabelSelectorRequirement,
- OperatorType,
Project,
} from "@/types/proto/v1/project_service";
-import { ComposedDatabase } from "../types";
+import { OperatorType } from "@/types/proto/v1/project_service";
+import type { ComposedDatabase } from "../types";
import {
extractEnvironmentResourceName,
validateDeploymentConfigV1,
diff --git a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
index 09d7ac95c1..18630c39d3 100644
--- a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
+++ b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
@@ -85,14 +85,10 @@ import QuerierDatabaseResourceForm from "@/components/Issue/panel/RequestQueryPa
import ProjectRoleSelect from "@/components/v2/Select/ProjectRoleSelect.vue";
import { useUserStore } from "@/store";
import { getUserId } from "@/store/modules/v1/common";
-import {
- ComposedProject,
- DatabaseResource,
- getUserEmailInBinding,
- PresetRoleType,
-} from "@/types";
+import type { ComposedProject, DatabaseResource } from "@/types";
+import { getUserEmailInBinding, PresetRoleType } from "@/types";
import { Expr } from "@/types/proto/google/type/expr";
-import { Binding } from "@/types/proto/v1/iam_policy";
+import type { Binding } from "@/types/proto/v1/iam_policy";
import { displayRoleTitle, extractDatabaseResourceName } from "@/utils";
const props = defineProps<{
diff --git a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMembersPanel.vue b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMembersPanel.vue
index 4eb4918d18..f0de9ba27b 100644
--- a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMembersPanel.vue
+++ b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMembersPanel.vue
@@ -53,7 +53,8 @@ import {
useProjectIamPolicy,
useProjectIamPolicyStore,
} from "@/store";
-import { ComposedProject, PresetRoleType } from "@/types";
+import type { ComposedProject } from "@/types";
+import { PresetRoleType } from "@/types";
import { Binding } from "@/types/proto/v1/iam_policy";
import AddProjectMemberForm from "./AddProjectMemberForm.vue";
diff --git a/frontend/src/components/ProjectMember/EditProjectRolePanel.vue b/frontend/src/components/ProjectMember/EditProjectRolePanel.vue
index 65d5fa6e21..21c10df6b0 100644
--- a/frontend/src/components/ProjectMember/EditProjectRolePanel.vue
+++ b/frontend/src/components/ProjectMember/EditProjectRolePanel.vue
@@ -129,16 +129,12 @@ import {
useProjectIamPolicyStore,
useUserStore,
} from "@/store";
-import {
- ComposedProject,
- DatabaseResource,
- getUserEmailInBinding,
- PresetRoleType,
-} from "@/types";
+import type { ComposedProject, DatabaseResource } from "@/types";
+import { getUserEmailInBinding, PresetRoleType } from "@/types";
import { Expr } from "@/types/proto/google/type/expr";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
-import { Binding } from "@/types/proto/v1/iam_policy";
+import type { Binding } from "@/types/proto/v1/iam_policy";
import { displayRoleTitle, extractUserUID } from "@/utils";
import {
convertFromCELString,
diff --git a/frontend/src/components/ProjectMember/ProjectMemberDataTable/cells/UserNameCell.vue b/frontend/src/components/ProjectMember/ProjectMemberDataTable/cells/UserNameCell.vue
index dc1971e69d..de6eb855d6 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberDataTable/cells/UserNameCell.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberDataTable/cells/UserNameCell.vue
@@ -29,8 +29,9 @@
import { computed } from "vue";
import { useCurrentUserV1 } from "@/store";
import { SYSTEM_BOT_USER_NAME } from "@/types";
-import { User, UserType } from "@/types/proto/v1/auth_service";
-import { ProjectMember } from "../../types";
+import type { User } from "@/types/proto/v1/auth_service";
+import { UserType } from "@/types/proto/v1/auth_service";
+import type { ProjectMember } from "../../types";
const props = defineProps<{
projectMember: ProjectMember;
diff --git a/frontend/src/components/ProjectMember/ProjectMemberDataTable/cells/UserOperationsCell.vue b/frontend/src/components/ProjectMember/ProjectMemberDataTable/cells/UserOperationsCell.vue
index 936bb027a3..7c59778529 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberDataTable/cells/UserOperationsCell.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberDataTable/cells/UserOperationsCell.vue
@@ -20,11 +20,12 @@ import { PencilIcon } from "lucide-vue-next";
import { NButton } from "naive-ui";
import { computed } from "vue";
import { useCurrentUserV1 } from "@/store";
-import { ComposedProject, SYSTEM_BOT_USER_NAME } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { ComposedProject } from "@/types";
+import { SYSTEM_BOT_USER_NAME } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
import { hasProjectPermissionV2 } from "@/utils";
-import { ProjectMember } from "../../types";
+import type { ProjectMember } from "../../types";
const props = defineProps<{
project: ComposedProject;
diff --git a/frontend/src/components/ProjectMember/ProjectMemberDataTable/cells/UserRolesCell.vue b/frontend/src/components/ProjectMember/ProjectMemberDataTable/cells/UserRolesCell.vue
index 03a7d1358e..7b366d7222 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberDataTable/cells/UserRolesCell.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberDataTable/cells/UserRolesCell.vue
@@ -23,7 +23,7 @@ import { Building2Icon } from "lucide-vue-next";
import { NTag, NTooltip } from "naive-ui";
import { computed } from "vue";
import { displayRoleTitle, sortRoles } from "@/utils";
-import { ProjectMember } from "../../types";
+import type { ProjectMember } from "../../types";
const props = defineProps<{
projectMember: ProjectMember;
diff --git a/frontend/src/components/ProjectMember/ProjectMemberDataTable/index.vue b/frontend/src/components/ProjectMember/ProjectMemberDataTable/index.vue
index d67d8979b9..08dee948ee 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberDataTable/index.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberDataTable/index.vue
@@ -10,11 +10,12 @@
</template>
<script lang="ts" setup>
-import { DataTableColumn, DataTableRowKey, NDataTable } from "naive-ui";
+import type { DataTableColumn, DataTableRowKey } from "naive-ui";
+import { NDataTable } from "naive-ui";
import { computed, h } from "vue";
import { useI18n } from "vue-i18n";
-import { ComposedProject } from "@/types";
-import { ProjectMember } from "../types";
+import type { ComposedProject } from "@/types";
+import type { ProjectMember } from "../types";
import UserNameCell from "./cells/UserNameCell.vue";
import UserOperationsCell from "./cells/UserOperationsCell.vue";
import UserRolesCell from "./cells/UserRolesCell.vue";
diff --git a/frontend/src/components/ProjectMember/ProjectMemberDataTableByRole/cells/UserNameCell.vue b/frontend/src/components/ProjectMember/ProjectMemberDataTableByRole/cells/UserNameCell.vue
index dc1971e69d..de6eb855d6 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberDataTableByRole/cells/UserNameCell.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberDataTableByRole/cells/UserNameCell.vue
@@ -29,8 +29,9 @@
import { computed } from "vue";
import { useCurrentUserV1 } from "@/store";
import { SYSTEM_BOT_USER_NAME } from "@/types";
-import { User, UserType } from "@/types/proto/v1/auth_service";
-import { ProjectMember } from "../../types";
+import type { User } from "@/types/proto/v1/auth_service";
+import { UserType } from "@/types/proto/v1/auth_service";
+import type { ProjectMember } from "../../types";
const props = defineProps<{
projectMember: ProjectMember;
diff --git a/frontend/src/components/ProjectMember/ProjectMemberDataTableByRole/cells/UserOperationsCell.vue b/frontend/src/components/ProjectMember/ProjectMemberDataTableByRole/cells/UserOperationsCell.vue
index 936bb027a3..7c59778529 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberDataTableByRole/cells/UserOperationsCell.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberDataTableByRole/cells/UserOperationsCell.vue
@@ -20,11 +20,12 @@ import { PencilIcon } from "lucide-vue-next";
import { NButton } from "naive-ui";
import { computed } from "vue";
import { useCurrentUserV1 } from "@/store";
-import { ComposedProject, SYSTEM_BOT_USER_NAME } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { ComposedProject } from "@/types";
+import { SYSTEM_BOT_USER_NAME } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
import { hasProjectPermissionV2 } from "@/utils";
-import { ProjectMember } from "../../types";
+import type { ProjectMember } from "../../types";
const props = defineProps<{
project: ComposedProject;
diff --git a/frontend/src/components/ProjectMember/ProjectMemberDataTableByRole/index.vue b/frontend/src/components/ProjectMember/ProjectMemberDataTableByRole/index.vue
index 8dbefb971b..339f56e727 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberDataTableByRole/index.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberDataTableByRole/index.vue
@@ -10,13 +10,15 @@
</template>
<script lang="ts" setup>
-import { DataTableColumn, NDataTable } from "naive-ui";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
import { computed, h } from "vue";
import { useI18n } from "vue-i18n";
import { useRoleStore } from "@/store";
-import { ComposedProject, PRESET_WORKSPACE_ROLES } from "@/types";
+import type { ComposedProject } from "@/types";
+import { PRESET_WORKSPACE_ROLES } from "@/types";
import { displayRoleTitle, sortRoles } from "@/utils";
-import { ProjectMember } from "../types";
+import type { ProjectMember } from "../types";
import UserNameCell from "./cells/UserNameCell.vue";
import UserOperationsCell from "./cells/UserOperationsCell.vue";
diff --git a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue b/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
index 0ff3eaa123..7ada3cd31d 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
@@ -93,8 +93,8 @@ import {
useProjectIamPolicyStore,
useUserStore,
} from "@/store";
+import type { ComposedProject } from "@/types";
import {
- ComposedProject,
DEFAULT_PROJECT_V1_NAME,
getUserEmailInBinding,
unknownUser,
@@ -102,14 +102,14 @@ import {
ALL_USERS_USER_EMAIL,
PRESET_WORKSPACE_ROLES,
} from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
import { convertFromExpr } from "@/utils/issue/cel";
import AddProjectMembersPanel from "./AddProjectMember/AddProjectMembersPanel.vue";
import ProjectMemberDataTable from "./ProjectMemberDataTable/index.vue";
import ProjectMemberDataTableByRole from "./ProjectMemberDataTableByRole/index.vue";
import ProjectMemberRolePanel from "./ProjectMemberRolePanel/index.vue";
-import { ProjectMember } from "./types";
+import type { ProjectMember } from "./types";
interface LocalState {
searchText: string;
diff --git a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue
index 1d482e0bd6..82a5ba5946 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue
@@ -191,7 +191,8 @@ import { Building2Icon } from "lucide-vue-next";
import { NButton, NTooltip, useDialog } from "naive-ui";
import { computed, reactive, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGrid, BBGridRow } from "@/bbkit";
+import type { BBGridRow } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
import { Drawer, DrawerContent, InstanceV1Name } from "@/components/v2";
import {
useCurrentUserV1,
@@ -200,14 +201,9 @@ import {
useProjectIamPolicyStore,
useUserStore,
} from "@/store";
-import {
- ComposedProject,
- DatabaseResource,
- getUserEmailInBinding,
- PresetRoleType,
- PRESET_ROLES,
-} from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { ComposedProject, DatabaseResource } from "@/types";
+import { getUserEmailInBinding, PresetRoleType, PRESET_ROLES } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
import { Binding } from "@/types/proto/v1/iam_policy";
import { displayRoleTitle, hasProjectPermissionV2 } from "@/utils";
@@ -216,7 +212,7 @@ import {
stringifyConditionExpression,
} from "@/utils/issue/cel";
import EditProjectRolePanel from "../EditProjectRolePanel.vue";
-import { ProjectMember } from "../types";
+import type { ProjectMember } from "../types";
import RoleDescription from "./RoleDescription.vue";
import RoleExpiredTip from "./RoleExpiredTip.vue";
diff --git a/frontend/src/components/ProjectMember/common/util.ts b/frontend/src/components/ProjectMember/common/util.ts
index 4da60e3204..74c7b5a538 100644
--- a/frontend/src/components/ProjectMember/common/util.ts
+++ b/frontend/src/components/ProjectMember/common/util.ts
@@ -1,4 +1,4 @@
-import { Binding } from "@/types/proto/v1/iam_policy";
+import type { Binding } from "@/types/proto/v1/iam_policy";
export const getBindingConditionTitle = (binding: Binding): string => {
return binding.condition?.title || "";
diff --git a/frontend/src/components/ProjectMember/types.ts b/frontend/src/components/ProjectMember/types.ts
index 4b1f45f830..a6c499cc1b 100644
--- a/frontend/src/components/ProjectMember/types.ts
+++ b/frontend/src/components/ProjectMember/types.ts
@@ -1,5 +1,5 @@
-import { User } from "@/types/proto/v1/auth_service";
-import { Binding } from "@/types/proto/v1/iam_policy";
+import type { User } from "@/types/proto/v1/auth_service";
+import type { Binding } from "@/types/proto/v1/iam_policy";
export interface ProjectMember {
user: User;
diff --git a/frontend/src/components/ProjectMember/utils.ts b/frontend/src/components/ProjectMember/utils.ts
index 4cdbb76dd3..ac6b9cd0d0 100644
--- a/frontend/src/components/ProjectMember/utils.ts
+++ b/frontend/src/components/ProjectMember/utils.ts
@@ -1,5 +1,5 @@
import { useI18n } from "vue-i18n";
-import { Binding } from "@/types/proto/v1/iam_policy";
+import type { Binding } from "@/types/proto/v1/iam_policy";
import { convertFromExpr } from "@/utils/issue/cel";
export const getExpiredTimeString = (binding: Binding) => {
diff --git a/frontend/src/components/ProjectSettingPanel.vue b/frontend/src/components/ProjectSettingPanel.vue
index 2d572bea1d..7ef844034b 100644
--- a/frontend/src/components/ProjectSettingPanel.vue
+++ b/frontend/src/components/ProjectSettingPanel.vue
@@ -14,7 +14,7 @@
</template>
<script lang="ts" setup>
-import { ComposedProject } from "@/types";
+import type { ComposedProject } from "@/types";
import ProjectArchiveRestoreButton from "./Project/ProjectArchiveRestoreButton.vue";
import ProjectGeneralSettingPanel from "./Project/ProjectGeneralSettingPanel.vue";
diff --git a/frontend/src/components/ProjectSlowQueryPanel.vue b/frontend/src/components/ProjectSlowQueryPanel.vue
index 1738f65b7d..7e1b95ce54 100644
--- a/frontend/src/components/ProjectSlowQueryPanel.vue
+++ b/frontend/src/components/ProjectSlowQueryPanel.vue
@@ -9,8 +9,9 @@
<script lang="ts" setup>
import { computed } from "vue";
import { SlowQueryPanel } from "@/components/SlowQuery";
-import { Project } from "@/types/proto/v1/project_service";
-import { SearchScope, extractProjectResourceName } from "@/utils";
+import type { Project } from "@/types/proto/v1/project_service";
+import type { SearchScope } from "@/utils";
+import { extractProjectResourceName } from "@/utils";
const props = defineProps<{
project: Project;
diff --git a/frontend/src/components/ProjectVersionControlPanel.vue b/frontend/src/components/ProjectVersionControlPanel.vue
index bc5138983d..a1db7876fa 100644
--- a/frontend/src/components/ProjectVersionControlPanel.vue
+++ b/frontend/src/components/ProjectVersionControlPanel.vue
@@ -67,11 +67,13 @@
<script lang="ts" setup>
import { NRadio, NRadioGroup } from "naive-ui";
import { reactive, watch } from "vue";
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { pushNotification, useRepositoryV1Store, useVCSV1Store } from "@/store";
-import { Project, Workflow } from "@/types/proto/v1/project_service";
-import { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
+import type { Project } from "@/types/proto/v1/project_service";
+import { Workflow } from "@/types/proto/v1/project_service";
+import type { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
interface LocalState {
workflowType: Workflow;
diff --git a/frontend/src/components/ProjectWebhookCard.vue b/frontend/src/components/ProjectWebhookCard.vue
index 6e3303a011..de0bd1f1dd 100644
--- a/frontend/src/components/ProjectWebhookCard.vue
+++ b/frontend/src/components/ProjectWebhookCard.vue
@@ -56,12 +56,13 @@
</template>
<script lang="ts" setup>
-import { PropType, computed } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useRouter } from "vue-router";
import { PROJECT_V1_ROUTE_WEBHOOK_DETAIL } from "@/router/dashboard/projectV1";
import { projectWebhookV1ActivityItemList } from "@/types";
+import type { Webhook } from "@/types/proto/v1/project_service";
import {
- Webhook,
Webhook_Type,
activity_TypeToJSON,
} from "@/types/proto/v1/project_service";
diff --git a/frontend/src/components/ProjectWebhookForm.vue b/frontend/src/components/ProjectWebhookForm.vue
index c318a64eb8..99499d24e7 100644
--- a/frontend/src/components/ProjectWebhookForm.vue
+++ b/frontend/src/components/ProjectWebhookForm.vue
@@ -259,7 +259,8 @@
<script lang="ts" setup>
import { cloneDeep, isEmpty, isEqual } from "lodash-es";
import { NCheckbox, NRadio, NRadioGroup } from "naive-ui";
-import { reactive, computed, PropType, watch } from "vue";
+import type { PropType } from "vue";
+import { reactive, computed, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import {
@@ -275,12 +276,12 @@ import {
projectWebhookV1ActivityItemList,
projectWebhookV1TypeItemList,
} from "@/types";
-import {
+import type {
Activity_Type,
Project,
Webhook,
- Webhook_Type,
} from "@/types/proto/v1/project_service";
+import { Webhook_Type } from "@/types/proto/v1/project_service";
import { projectWebhookV1Slug } from "../utils";
interface LocalState {
diff --git a/frontend/src/components/ProjectWebhookPanel.vue b/frontend/src/components/ProjectWebhookPanel.vue
index a5b8cde398..360f0ec559 100644
--- a/frontend/src/components/ProjectWebhookPanel.vue
+++ b/frontend/src/components/ProjectWebhookPanel.vue
@@ -40,10 +40,11 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useRouter } from "vue-router";
import { PROJECT_V1_ROUTE_WEBHOOK_CREATE } from "@/router/dashboard/projectV1";
-import { Project } from "@/types/proto/v1/project_service";
+import type { Project } from "@/types/proto/v1/project_service";
import ProjectWebhookCard from "./ProjectWebhookCard.vue";
const props = defineProps({
diff --git a/frontend/src/components/ProvideSQLEditorContext.vue b/frontend/src/components/ProvideSQLEditorContext.vue
index c57db9ba07..1973403160 100644
--- a/frontend/src/components/ProvideSQLEditorContext.vue
+++ b/frontend/src/components/ProvideSQLEditorContext.vue
@@ -41,10 +41,10 @@ import {
pushNotification,
useFilterStore,
} from "@/store";
+import type { SQLEditorConnection } from "@/types";
import {
DEFAULT_PROJECT_V1_NAME,
DEFAULT_SQL_EDITOR_TAB_MODE,
- SQLEditorConnection,
UNKNOWN_ID,
UNKNOWN_USER_NAME,
} from "@/types";
diff --git a/frontend/src/components/QuickActionPanel.vue b/frontend/src/components/QuickActionPanel.vue
index 5c233a80f0..9f0bba1200 100644
--- a/frontend/src/components/QuickActionPanel.vue
+++ b/frontend/src/components/QuickActionPanel.vue
@@ -109,7 +109,8 @@ import {
FileDownIcon,
} from "lucide-vue-next";
import { NButton, NEllipsis } from "naive-ui";
-import { reactive, PropType, computed, watch, VNode, h } from "vue";
+import type { PropType, VNode } from "vue";
+import { reactive, computed, watch, h } from "vue";
import { useI18n } from "vue-i18n";
import { useRoute } from "vue-router";
import AlterSchemaPrepForm from "@/components/AlterSchemaPrepForm/";
@@ -130,7 +131,7 @@ import {
useProjectV1List,
} from "@/store";
import { projectNamePrefix } from "@/store/modules/v1/common";
-import {
+import type {
QuickActionType,
DatabaseGroupQuickActionType,
FeatureType,
diff --git a/frontend/src/components/Quickstart.vue b/frontend/src/components/Quickstart.vue
index 752b8883aa..af738c31f4 100644
--- a/frontend/src/components/Quickstart.vue
+++ b/frontend/src/components/Quickstart.vue
@@ -110,9 +110,10 @@
<script setup lang="ts">
import { useKBarHandler, useKBarEventOnce } from "@bytebase/vue-kbar";
-import { computed, unref, Ref, watchEffect } from "vue";
+import type { Ref } from "vue";
+import { computed, unref, watchEffect } from "vue";
import { useI18n } from "vue-i18n";
-import { RouteLocationRaw } from "vue-router";
+import type { RouteLocationRaw } from "vue-router";
import { ISSUE_ROUTE_DETAIL } from "@/router/dashboard/issue";
import {
DATABASE_ROUTE_DASHBOARD,
@@ -128,7 +129,8 @@ import {
useUIStateStore,
useProjectV1Store,
} from "@/store";
-import { WorkspacePermission, UNKNOWN_ID, PresetRoleType } from "@/types";
+import type { WorkspacePermission } from "@/types";
+import { UNKNOWN_ID, PresetRoleType } from "@/types";
import {
hasWorkspacePermissionV2,
hasProjectPermissionV2,
diff --git a/frontend/src/components/RepositoryConfigPanel.vue b/frontend/src/components/RepositoryConfigPanel.vue
index 3c42739a0b..f38ce61330 100644
--- a/frontend/src/components/RepositoryConfigPanel.vue
+++ b/frontend/src/components/RepositoryConfigPanel.vue
@@ -10,9 +10,9 @@
</template>
<script lang="ts" setup>
-import { PropType } from "vue";
-import { Project } from "@/types/proto/v1/project_service";
-import { ProjectRepositoryConfig } from "../types";
+import type { PropType } from "vue";
+import type { Project } from "@/types/proto/v1/project_service";
+import type { ProjectRepositoryConfig } from "../types";
defineProps({
config: {
diff --git a/frontend/src/components/RepositoryForm.vue b/frontend/src/components/RepositoryForm.vue
index 80911f444f..d40775f383 100644
--- a/frontend/src/components/RepositoryForm.vue
+++ b/frontend/src/components/RepositoryForm.vue
@@ -147,8 +147,9 @@
<script lang="ts" setup>
import { reactive, computed } from "vue";
-import { ExternalRepositoryInfo, RepositoryConfig } from "@/types";
-import { Project, TenantMode } from "@/types/proto/v1/project_service";
+import type { ExternalRepositoryInfo, RepositoryConfig } from "@/types";
+import type { Project } from "@/types/proto/v1/project_service";
+import { TenantMode } from "@/types/proto/v1/project_service";
import { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";
const FILE_REQUIRED_PLACEHOLDER = "{{DB_NAME}}, {{VERSION}}, {{TYPE}}";
diff --git a/frontend/src/components/RepositoryPanel.vue b/frontend/src/components/RepositoryPanel.vue
index a71131497c..ea20a53cf9 100644
--- a/frontend/src/components/RepositoryPanel.vue
+++ b/frontend/src/components/RepositoryPanel.vue
@@ -89,20 +89,21 @@
<script lang="ts" setup>
import isEmpty from "lodash-es/isEmpty";
-import { computed, PropType, reactive, watch } from "vue";
+import type { PropType } from "vue";
+import { computed, reactive, watch } from "vue";
import { useI18n } from "vue-i18n";
import {
pushNotification,
useProjectV1Store,
useRepositoryV1Store,
} from "@/store";
-import { Project } from "@/types/proto/v1/project_service";
-import {
+import type { Project } from "@/types/proto/v1/project_service";
+import type {
ProjectGitOpsInfo,
VCSProvider,
- VCSProvider_Type,
} from "@/types/proto/v1/vcs_provider_service";
-import { ExternalRepositoryInfo, RepositoryConfig } from "../types";
+import { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";
+import type { ExternalRepositoryInfo, RepositoryConfig } from "../types";
interface LocalState {
repositoryConfig: RepositoryConfig;
diff --git a/frontend/src/components/RepositorySelectionPanel.vue b/frontend/src/components/RepositorySelectionPanel.vue
index 3bb60bed9d..06e3cf21d1 100644
--- a/frontend/src/components/RepositorySelectionPanel.vue
+++ b/frontend/src/components/RepositorySelectionPanel.vue
@@ -41,12 +41,10 @@ export default { name: "RepositorySelectionPanel" };
<script setup lang="ts">
import { reactive, computed, onMounted } from "vue";
-import { ExternalRepositoryInfo, ProjectRepositoryConfig } from "@/types";
+import type { ExternalRepositoryInfo, ProjectRepositoryConfig } from "@/types";
import { pushNotification, useCurrentUserV1, useVCSV1Store } from "@/store";
-import {
- VCSProvider_Type,
- SearchVCSProviderProjectsResponse_Project,
-} from "@/types/proto/v1/vcs_provider_service";
+import type { SearchVCSProviderProjectsResponse_Project } from "@/types/proto/v1/vcs_provider_service";
+import { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";
import { hasWorkspacePermissionV2 } from "@/utils";
interface LocalState {
diff --git a/frontend/src/components/RepositorySetupWizard.vue b/frontend/src/components/RepositorySetupWizard.vue
index f0f77769a3..d2a7a80940 100644
--- a/frontend/src/components/RepositorySetupWizard.vue
+++ b/frontend/src/components/RepositorySetupWizard.vue
@@ -46,19 +46,21 @@
<script lang="ts" setup>
import isEmpty from "lodash-es/isEmpty";
-import { reactive, computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { reactive, computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { StepTab } from "@/components/v2";
import { PROJECT_V1_ROUTE_GITOPS } from "@/router/dashboard/projectV1";
import { useRepositoryV1Store } from "@/store";
-import { Project, TenantMode } from "@/types/proto/v1/project_service";
-import {
+import type { Project } from "@/types/proto/v1/project_service";
+import { TenantMode } from "@/types/proto/v1/project_service";
+import type {
ProjectGitOpsInfo,
VCSProvider,
- VCSProvider_Type,
} from "@/types/proto/v1/vcs_provider_service";
-import { ExternalRepositoryInfo, ProjectRepositoryConfig } from "../types";
+import { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";
+import type { ExternalRepositoryInfo, ProjectRepositoryConfig } from "../types";
// Default file path template is to organize migration files from different environments under separate directories.
const DEFAULT_FILE_PATH_TEMPLATE =
diff --git a/frontend/src/components/RepositoryTable.vue b/frontend/src/components/RepositoryTable.vue
index 3143819a27..539656fad6 100644
--- a/frontend/src/components/RepositoryTable.vue
+++ b/frontend/src/components/RepositoryTable.vue
@@ -19,12 +19,13 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { PROJECT_V1_ROUTE_GITOPS } from "@/router/dashboard/projectV1";
import { getProjectName } from "@/store/modules/v1/common";
-import { ComposedRepository } from "@/types";
+import type { ComposedRepository } from "@/types";
import { projectV1Name } from "../utils";
const props = defineProps({
diff --git a/frontend/src/components/RepositoryVCSProviderPanel.vue b/frontend/src/components/RepositoryVCSProviderPanel.vue
index 1f7f962afe..e02e107110 100644
--- a/frontend/src/components/RepositoryVCSProviderPanel.vue
+++ b/frontend/src/components/RepositoryVCSProviderPanel.vue
@@ -39,7 +39,7 @@ export default { name: "RepositoryVCSProviderPanel" };
import { reactive, computed, watchEffect } from "vue";
import { hasWorkspacePermissionV2 } from "@/utils";
import { useCurrentUserV1, useVCSV1Store } from "@/store";
-import { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
+import type { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
interface LocalState {
selectedVCS?: VCSProvider;
diff --git a/frontend/src/components/Role/Setting/components/RoleDataTable/cells/RoleOperationsCell.vue b/frontend/src/components/Role/Setting/components/RoleDataTable/cells/RoleOperationsCell.vue
index 4484ba7e89..1ceecdad66 100644
--- a/frontend/src/components/Role/Setting/components/RoleDataTable/cells/RoleOperationsCell.vue
+++ b/frontend/src/components/Role/Setting/components/RoleDataTable/cells/RoleOperationsCell.vue
@@ -20,8 +20,8 @@
<script lang="ts" setup>
import { useCurrentUserV1, useRoleStore } from "@/store";
-import { WorkspacePermission } from "@/types";
-import { Role } from "@/types/proto/v1/role_service";
+import type { WorkspacePermission } from "@/types";
+import type { Role } from "@/types/proto/v1/role_service";
import { hasWorkspacePermissionV2, isCustomRole } from "@/utils";
import { useCustomRoleSettingContext } from "../../../context";
diff --git a/frontend/src/components/Role/Setting/components/RoleDataTable/cells/RoleTitleCell.vue b/frontend/src/components/Role/Setting/components/RoleDataTable/cells/RoleTitleCell.vue
index d9e6fee4c5..f7416b59f1 100644
--- a/frontend/src/components/Role/Setting/components/RoleDataTable/cells/RoleTitleCell.vue
+++ b/frontend/src/components/Role/Setting/components/RoleDataTable/cells/RoleTitleCell.vue
@@ -6,7 +6,7 @@
</template>
<script lang="ts" setup>
-import { Role } from "@/types/proto/v1/role_service";
+import type { Role } from "@/types/proto/v1/role_service";
import { displayRoleTitle, isCustomRole } from "@/utils";
defineProps<{
diff --git a/frontend/src/components/Role/Setting/components/RoleDataTable/index.vue b/frontend/src/components/Role/Setting/components/RoleDataTable/index.vue
index 5b6911694a..b399ce249d 100644
--- a/frontend/src/components/Role/Setting/components/RoleDataTable/index.vue
+++ b/frontend/src/components/Role/Setting/components/RoleDataTable/index.vue
@@ -8,10 +8,11 @@
</template>
<script lang="ts" setup>
-import { DataTableColumn, NDataTable } from "naive-ui";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
import { computed, h } from "vue";
import { useI18n } from "vue-i18n";
-import { Role } from "@/types/proto/v1/role_service";
+import type { Role } from "@/types/proto/v1/role_service";
import { displayRoleDescription } from "@/utils";
import RoleOperationsCell from "./cells/RoleOperationsCell.vue";
import RoleTitleCell from "./cells/RoleTitleCell.vue";
diff --git a/frontend/src/components/Role/Setting/components/RolePanel.vue b/frontend/src/components/Role/Setting/components/RolePanel.vue
index 2b3491dd6b..1e969efffe 100644
--- a/frontend/src/components/Role/Setting/components/RolePanel.vue
+++ b/frontend/src/components/Role/Setting/components/RolePanel.vue
@@ -104,11 +104,8 @@ import { computed, reactive, watch, nextTick, ref } from "vue";
import { useI18n } from "vue-i18n";
import { Drawer, DrawerContent, ResourceIdField } from "@/components/v2";
import { pushNotification, useRoleStore } from "@/store";
-import {
- PROJECT_PERMISSIONS,
- ValidatedMessage,
- WORKSPACE_PERMISSIONS,
-} from "@/types";
+import type { ValidatedMessage } from "@/types";
+import { PROJECT_PERMISSIONS, WORKSPACE_PERMISSIONS } from "@/types";
import { Role } from "@/types/proto/v1/role_service";
import { extractRoleResourceName } from "@/utils";
import { displayPermissionTitle } from "@/utils/permission";
diff --git a/frontend/src/components/SQLCheck/SQLCheckButton.vue b/frontend/src/components/SQLCheck/SQLCheckButton.vue
index 2f5f83d4e1..49a420cac9 100644
--- a/frontend/src/components/SQLCheck/SQLCheckButton.vue
+++ b/frontend/src/components/SQLCheck/SQLCheckButton.vue
@@ -64,21 +64,20 @@
<script lang="ts" setup>
import { computedAsync } from "@vueuse/core";
-import { ButtonProps, NButton, NPopover } from "naive-ui";
+import type { ButtonProps } from "naive-ui";
+import { NButton, NPopover } from "naive-ui";
import { computed, onUnmounted, ref } from "vue";
import { onMounted } from "vue";
import { useI18n } from "vue-i18n";
import { sqlServiceClient } from "@/grpcweb";
import { WORKSPACE_ROUTE_SQL_REVIEW } from "@/router/dashboard/workspaceRoutes";
import { useCurrentUserV1, useSQLReviewStore } from "@/store";
-import { ComposedDatabase } from "@/types";
-import { DatabaseMetadata } from "@/types/proto/v1/database_service";
-import {
- Advice,
- Advice_Status,
- CheckRequest_ChangeType,
-} from "@/types/proto/v1/sql_service";
-import { Defer, VueStyle, defer, hasWorkspacePermissionV2 } from "@/utils";
+import type { ComposedDatabase } from "@/types";
+import type { DatabaseMetadata } from "@/types/proto/v1/database_service";
+import type { CheckRequest_ChangeType } from "@/types/proto/v1/sql_service";
+import { Advice, Advice_Status } from "@/types/proto/v1/sql_service";
+import type { Defer, VueStyle } from "@/utils";
+import { defer, hasWorkspacePermissionV2 } from "@/utils";
import ErrorList from "../misc/ErrorList.vue";
import SQLCheckPanel from "./SQLCheckPanel.vue";
import { useSQLCheckContext } from "./context";
diff --git a/frontend/src/components/SQLCheck/SQLCheckPanel.vue b/frontend/src/components/SQLCheck/SQLCheckPanel.vue
index 3e57d00089..0c29f70e29 100644
--- a/frontend/src/components/SQLCheck/SQLCheckPanel.vue
+++ b/frontend/src/components/SQLCheck/SQLCheckPanel.vue
@@ -36,7 +36,7 @@
import { NButton } from "naive-ui";
import { computed, onMounted } from "vue";
import { usePolicyV1Store } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import {
PlanCheckRun,
PlanCheckRun_Result,
@@ -44,8 +44,9 @@ import {
PlanCheckRun_Result_SqlReviewReport,
PlanCheckRun_Status,
} from "@/types/proto/v1/rollout_service";
-import { Advice, Advice_Status } from "@/types/proto/v1/sql_service";
-import { Defer } from "@/utils";
+import type { Advice } from "@/types/proto/v1/sql_service";
+import { Advice_Status } from "@/types/proto/v1/sql_service";
+import type { Defer } from "@/utils";
import PlanCheckDetail from "../IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue";
const { advices, database } = defineProps<{
diff --git a/frontend/src/components/SQLCheck/SQLCheckSummary.vue b/frontend/src/components/SQLCheck/SQLCheckSummary.vue
index 454ee58e22..c13446109b 100644
--- a/frontend/src/components/SQLCheck/SQLCheckSummary.vue
+++ b/frontend/src/components/SQLCheck/SQLCheckSummary.vue
@@ -22,8 +22,9 @@
<script setup lang="ts">
import { NButton } from "naive-ui";
import { computed, ref } from "vue";
-import { ComposedDatabase } from "@/types";
-import { Advice, Advice_Status } from "@/types/proto/v1/sql_service";
+import type { ComposedDatabase } from "@/types";
+import type { Advice } from "@/types/proto/v1/sql_service";
+import { Advice_Status } from "@/types/proto/v1/sql_service";
import SQLCheckPanel from "./SQLCheckPanel.vue";
type Summary = {
diff --git a/frontend/src/components/SQLCheck/context.ts b/frontend/src/components/SQLCheck/context.ts
index 93bfd8236a..d30a7838ce 100644
--- a/frontend/src/components/SQLCheck/context.ts
+++ b/frontend/src/components/SQLCheck/context.ts
@@ -1,4 +1,5 @@
-import { InjectionKey, Ref, inject, provide, ref } from "vue";
+import type { InjectionKey, Ref } from "vue";
+import { inject, provide, ref } from "vue";
export type SQLCheckContext = {
runSQLCheck: Ref<(() => Promise<boolean>) | undefined>;
diff --git a/frontend/src/components/SQLReview/SQLReviewConfig.vue b/frontend/src/components/SQLReview/SQLReviewConfig.vue
index 8fbc42c116..a98dd1863d 100644
--- a/frontend/src/components/SQLReview/SQLReviewConfig.vue
+++ b/frontend/src/components/SQLReview/SQLReviewConfig.vue
@@ -17,16 +17,17 @@
</template>
<script lang="ts" setup>
-import { PropType, toRef } from "vue";
-import { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";
-import { RuleTemplate } from "@/types/sqlReview";
+import type { PropType } from "vue";
+import { toRef } from "vue";
+import type { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";
+import type { RuleTemplate } from "@/types/sqlReview";
import {
SQLRuleTable,
SQLRuleFilter,
useSQLRuleFilter,
payloadValueListToComponentList,
} from "./components/";
-import { PayloadForEngine } from "./components/RuleConfigComponents";
+import type { PayloadForEngine } from "./components/RuleConfigComponents";
const props = defineProps({
selectedRuleList: {
diff --git a/frontend/src/components/SQLReview/SQLReviewCreation.vue b/frontend/src/components/SQLReview/SQLReviewCreation.vue
index 472d3c411f..5610d5c358 100644
--- a/frontend/src/components/SQLReview/SQLReviewCreation.vue
+++ b/frontend/src/components/SQLReview/SQLReviewCreation.vue
@@ -52,16 +52,18 @@ import {
useSubscriptionV1Store,
useEnvironmentV1List,
} from "@/store";
-import {
+import type {
RuleTemplate,
- convertToCategoryList,
- convertRuleTemplateToPolicyRule,
- ruleIsAvailableInSubscription,
SQLReviewPolicyTemplate,
SQLReviewPolicy,
SchemaPolicyRule,
} from "@/types";
-import { Environment } from "@/types/proto/v1/environment_service";
+import {
+ convertToCategoryList,
+ convertRuleTemplateToPolicyRule,
+ ruleIsAvailableInSubscription,
+} from "@/types";
+import type { Environment } from "@/types/proto/v1/environment_service";
import { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import SQLReviewConfig from "./SQLReviewConfig.vue";
diff --git a/frontend/src/components/SQLReview/SQLReviewInfo.vue b/frontend/src/components/SQLReview/SQLReviewInfo.vue
index 6334055e77..3815fe5725 100644
--- a/frontend/src/components/SQLReview/SQLReviewInfo.vue
+++ b/frontend/src/components/SQLReview/SQLReviewInfo.vue
@@ -52,10 +52,10 @@
</template>
<script lang="ts" setup>
-import { PropType } from "vue";
+import type { PropType } from "vue";
import { BBTextField } from "@/bbkit";
-import { SQLReviewPolicyTemplate } from "@/types";
-import { Environment } from "@/types/proto/v1/environment_service";
+import type { SQLReviewPolicyTemplate } from "@/types";
+import type { Environment } from "@/types/proto/v1/environment_service";
import { environmentV1Name } from "@/utils";
import { SQLReviewTemplateSelector } from "./components";
diff --git a/frontend/src/components/SQLReview/SQLReviewPolicyTable.vue b/frontend/src/components/SQLReview/SQLReviewPolicyTable.vue
index 23c3752b9b..87b7f82e41 100644
--- a/frontend/src/components/SQLReview/SQLReviewPolicyTable.vue
+++ b/frontend/src/components/SQLReview/SQLReviewPolicyTable.vue
@@ -142,7 +142,8 @@ import { NCheckbox } from "naive-ui";
import { computed, onMounted } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
-import { BBButtonConfirm, BBGrid, BBGridColumn } from "@/bbkit";
+import type { BBGridColumn } from "@/bbkit";
+import { BBButtonConfirm, BBGrid } from "@/bbkit";
import { EnvironmentV1Name } from "@/components/v2";
import {
WORKSPACE_ROUTE_SQL_REVIEW_CREATE,
@@ -154,8 +155,8 @@ import {
useSQLReviewStore,
useEnvironmentV1List,
} from "@/store";
-import { SQLReviewPolicy } from "@/types";
-import { Environment } from "@/types/proto/v1/environment_service";
+import type { SQLReviewPolicy } from "@/types";
+import type { Environment } from "@/types/proto/v1/environment_service";
import {
extractEnvironmentResourceName,
hasWorkspacePermissionV2,
diff --git a/frontend/src/components/SQLReview/components/RuleConfigComponents/NumberComponent.vue b/frontend/src/components/SQLReview/components/RuleConfigComponents/NumberComponent.vue
index 4f24ec6a07..010c430f5c 100644
--- a/frontend/src/components/SQLReview/components/RuleConfigComponents/NumberComponent.vue
+++ b/frontend/src/components/SQLReview/components/RuleConfigComponents/NumberComponent.vue
@@ -9,7 +9,7 @@
<script lang="ts" setup>
import { NInputNumber } from "naive-ui";
-import { RuleConfigComponent } from "@/types";
+import type { RuleConfigComponent } from "@/types";
defineProps<{
config: RuleConfigComponent;
diff --git a/frontend/src/components/SQLReview/components/RuleConfigComponents/StringComponent.vue b/frontend/src/components/SQLReview/components/RuleConfigComponents/StringComponent.vue
index ef9b2dbfc9..84ef397bf7 100644
--- a/frontend/src/components/SQLReview/components/RuleConfigComponents/StringComponent.vue
+++ b/frontend/src/components/SQLReview/components/RuleConfigComponents/StringComponent.vue
@@ -8,7 +8,7 @@
</template>
<script lang="ts" setup>
-import { RuleConfigComponent } from "@/types";
+import type { RuleConfigComponent } from "@/types";
defineProps<{
config: RuleConfigComponent;
diff --git a/frontend/src/components/SQLReview/components/RuleConfigComponents/TemplateComponent.vue b/frontend/src/components/SQLReview/components/RuleConfigComponents/TemplateComponent.vue
index 30835e0672..47d194394a 100644
--- a/frontend/src/components/SQLReview/components/RuleConfigComponents/TemplateComponent.vue
+++ b/frontend/src/components/SQLReview/components/RuleConfigComponents/TemplateComponent.vue
@@ -14,12 +14,12 @@ import {
InputWithTemplate,
type Template,
} from "@/components/InputWithTemplate";
-import {
- getRuleLocalizationKey,
+import type {
RuleConfigComponent,
RuleTemplate,
TemplatePayload,
} from "@/types";
+import { getRuleLocalizationKey } from "@/types";
const props = defineProps<{
rule: RuleTemplate;
diff --git a/frontend/src/components/SQLReview/components/RuleConfigComponents/types.ts b/frontend/src/components/SQLReview/components/RuleConfigComponents/types.ts
index d7408c4122..35abec970b 100644
--- a/frontend/src/components/SQLReview/components/RuleConfigComponents/types.ts
+++ b/frontend/src/components/SQLReview/components/RuleConfigComponents/types.ts
@@ -1,4 +1,4 @@
-import { Engine } from "@/types/proto/v1/common";
+import type { Engine } from "@/types/proto/v1/common";
export type PayloadValueType = boolean | string | number | string[];
diff --git a/frontend/src/components/SQLReview/components/RuleEngineIcon.vue b/frontend/src/components/SQLReview/components/RuleEngineIcon.vue
index 3201632c36..6fc9d48f22 100644
--- a/frontend/src/components/SQLReview/components/RuleEngineIcon.vue
+++ b/frontend/src/components/SQLReview/components/RuleEngineIcon.vue
@@ -9,7 +9,7 @@
<script lang="ts" setup>
import RichEngineName from "@/components/v2/Model/Instance/RichEngineName.vue";
-import { Engine } from "@/types/proto/v1/common";
+import type { Engine } from "@/types/proto/v1/common";
defineProps<{
engine: Engine;
diff --git a/frontend/src/components/SQLReview/components/RuleEngineIcons.vue b/frontend/src/components/SQLReview/components/RuleEngineIcons.vue
index da10c498aa..721c41163b 100644
--- a/frontend/src/components/SQLReview/components/RuleEngineIcons.vue
+++ b/frontend/src/components/SQLReview/components/RuleEngineIcons.vue
@@ -5,7 +5,7 @@
</template>
<script lang="ts" setup>
-import { RuleTemplate } from "@/types";
+import type { RuleTemplate } from "@/types";
defineProps<{
rule: RuleTemplate;
diff --git a/frontend/src/components/SQLReview/components/SQLReviewCategorySummaryFilter.vue b/frontend/src/components/SQLReview/components/SQLReviewCategorySummaryFilter.vue
index 6c19875c99..7b3b4fcbb8 100644
--- a/frontend/src/components/SQLReview/components/SQLReviewCategorySummaryFilter.vue
+++ b/frontend/src/components/SQLReview/components/SQLReviewCategorySummaryFilter.vue
@@ -49,12 +49,12 @@
<script lang="ts" setup>
import { NCheckbox } from "naive-ui";
import { computed } from "vue";
-import { LEVEL_LIST, RuleTemplate } from "@/types";
-import { engineFromJSON, Engine, engineToJSON } from "@/types/proto/v1/common";
-import {
- SQLReviewRuleLevel,
- sQLReviewRuleLevelToJSON,
-} from "@/types/proto/v1/org_policy_service";
+import type { RuleTemplate } from "@/types";
+import { LEVEL_LIST } from "@/types";
+import type { Engine } from "@/types/proto/v1/common";
+import { engineFromJSON, engineToJSON } from "@/types/proto/v1/common";
+import type { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";
+import { sQLReviewRuleLevelToJSON } from "@/types/proto/v1/org_policy_service";
import SQLRuleLevelBadge from "./SQLRuleLevelBadge.vue";
type EngineTypeStats = {
diff --git a/frontend/src/components/SQLReview/components/SQLReviewTemplateSelector.vue b/frontend/src/components/SQLReview/components/SQLReviewTemplateSelector.vue
index fff75461ec..c8f9cde59e 100644
--- a/frontend/src/components/SQLReview/components/SQLReviewTemplateSelector.vue
+++ b/frontend/src/components/SQLReview/components/SQLReviewTemplateSelector.vue
@@ -93,7 +93,7 @@
import { computed, watch } from "vue";
import { EnvironmentV1Name } from "@/components/v2";
import { useSQLReviewPolicyList } from "@/store";
-import { SQLReviewPolicyTemplate } from "@/types";
+import type { SQLReviewPolicyTemplate } from "@/types";
import { TEMPLATE_LIST as builtInTemplateList } from "@/types";
import { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";
import { rulesToTemplate } from "./utils";
diff --git a/frontend/src/components/SQLReview/components/SQLRuleEditDialog.vue b/frontend/src/components/SQLReview/components/SQLRuleEditDialog.vue
index 7c53be706f..d7676e1be2 100644
--- a/frontend/src/components/SQLReview/components/SQLRuleEditDialog.vue
+++ b/frontend/src/components/SQLReview/components/SQLRuleEditDialog.vue
@@ -162,20 +162,18 @@ import { computed, nextTick, reactive, watch } from "vue";
import { useI18n } from "vue-i18n";
import { Engine } from "@/types/proto/v1/common";
import { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";
-import {
- getRuleLocalization,
- getRuleLocalizationKey,
- RuleConfigComponent,
- RuleTemplate,
-} from "@/types/sqlReview";
+import type { RuleConfigComponent, RuleTemplate } from "@/types/sqlReview";
+import { getRuleLocalization, getRuleLocalizationKey } from "@/types/sqlReview";
+import type {
+ PayloadValueType,
+ PayloadForEngine,
+} from "./RuleConfigComponents";
import {
StringComponent,
NumberComponent,
BooleanComponent,
StringArrayComponent,
TemplateComponent,
- PayloadValueType,
- PayloadForEngine,
} from "./RuleConfigComponents";
import RuleEngineIcons from "./RuleEngineIcons.vue";
import RuleEngineTabFilter from "./RuleEngineTabFilter.vue";
diff --git a/frontend/src/components/SQLReview/components/SQLRuleFilter.vue b/frontend/src/components/SQLReview/components/SQLRuleFilter.vue
index 994a8a9109..a3bc6ce1dc 100644
--- a/frontend/src/components/SQLReview/components/SQLRuleFilter.vue
+++ b/frontend/src/components/SQLReview/components/SQLRuleFilter.vue
@@ -29,13 +29,14 @@
<script lang="ts" setup>
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { convertToCategoryList, RuleTemplate } from "@/types";
-import { Engine } from "@/types/proto/v1/common";
-import { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";
+import type { RuleTemplate } from "@/types";
+import { convertToCategoryList } from "@/types";
+import type { Engine } from "@/types/proto/v1/common";
+import type { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";
import SQLReviewCategorySummaryFilter from "./SQLReviewCategorySummaryFilter.vue";
import type { CategoryFilterItem } from "./SQLReviewCategoryTabFilter.vue";
import SQLReviewCategoryTabFilter from "./SQLReviewCategoryTabFilter.vue";
-import { SQLRuleFilterParams } from "./useSQLRuleFilter";
+import type { SQLRuleFilterParams } from "./useSQLRuleFilter";
const props = defineProps<{
ruleList: RuleTemplate[];
diff --git a/frontend/src/components/SQLReview/components/SQLRuleLevelBadge.vue b/frontend/src/components/SQLReview/components/SQLRuleLevelBadge.vue
index 39fdeb0992..eb579c8dee 100644
--- a/frontend/src/components/SQLReview/components/SQLRuleLevelBadge.vue
+++ b/frontend/src/components/SQLReview/components/SQLRuleLevelBadge.vue
@@ -10,7 +10,7 @@
<script lang="ts" setup>
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { BBBadgeStyle } from "@/bbkit/BBBadge.vue";
+import type { BBBadgeStyle } from "@/bbkit/BBBadge.vue";
import {
SQLReviewRuleLevel,
sQLReviewRuleLevelToJSON,
diff --git a/frontend/src/components/SQLReview/components/SQLRuleTable.vue b/frontend/src/components/SQLReview/components/SQLRuleTable.vue
index 2203277ffd..95fdee0500 100644
--- a/frontend/src/components/SQLReview/components/SQLRuleTable.vue
+++ b/frontend/src/components/SQLReview/components/SQLRuleTable.vue
@@ -183,15 +183,15 @@ import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
import { BBGrid, type BBGridColumn } from "@/bbkit";
import { useCurrentPlan } from "@/store";
+import type { RuleTemplate } from "@/types";
import {
convertToCategoryList,
getRuleLocalization,
ruleIsAvailableInSubscription,
planTypeToString,
- RuleTemplate,
} from "@/types";
import { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";
-import { PayloadForEngine } from "./RuleConfigComponents";
+import type { PayloadForEngine } from "./RuleConfigComponents";
import RuleLevelSwitch from "./RuleLevelSwitch.vue";
import SQLRuleEditDialog from "./SQLRuleEditDialog.vue";
diff --git a/frontend/src/components/SQLReview/components/useSQLRuleFilter.ts b/frontend/src/components/SQLReview/components/useSQLRuleFilter.ts
index 5abba18520..1c738a770e 100644
--- a/frontend/src/components/SQLReview/components/useSQLRuleFilter.ts
+++ b/frontend/src/components/SQLReview/components/useSQLRuleFilter.ts
@@ -1,8 +1,9 @@
import { computed, reactive, unref } from "vue";
import { useRoute } from "vue-router";
-import { getRuleLocalization, MaybeRef, RuleTemplate } from "@/types";
-import { Engine } from "@/types/proto/v1/common";
-import { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";
+import type { MaybeRef, RuleTemplate } from "@/types";
+import { getRuleLocalization } from "@/types";
+import type { Engine } from "@/types/proto/v1/common";
+import type { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";
export type SQLRuleFilterParams = {
checkedEngine: Set<Engine>;
diff --git a/frontend/src/components/SQLReview/components/utils.ts b/frontend/src/components/SQLReview/components/utils.ts
index 6593d1265a..8eb6cdd701 100644
--- a/frontend/src/components/SQLReview/components/utils.ts
+++ b/frontend/src/components/SQLReview/components/utils.ts
@@ -1,16 +1,15 @@
import { groupBy, cloneDeep } from "lodash-es";
-import {
- convertPolicyRuleToRuleTemplate,
+import type {
RuleConfigComponent,
RuleTemplate,
SQLReviewPolicy,
- TEMPLATE_LIST,
IndividualConfigForEngine,
} from "@/types";
+import { convertPolicyRuleToRuleTemplate, TEMPLATE_LIST } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { Environment } from "@/types/proto/v1/environment_service";
+import type { Environment } from "@/types/proto/v1/environment_service";
import { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";
-import { PayloadForEngine } from "./RuleConfigComponents";
+import type { PayloadForEngine } from "./RuleConfigComponents";
export const templateIdForEnvironment = (environment: Environment): string => {
return `bb.sql-review.environment-policy.${environment.name}`;
diff --git a/frontend/src/components/SchemaDiagram/Canvas/DummyCanvas.vue b/frontend/src/components/SchemaDiagram/Canvas/DummyCanvas.vue
index 9de808576f..06c08c15bb 100644
--- a/frontend/src/components/SchemaDiagram/Canvas/DummyCanvas.vue
+++ b/frontend/src/components/SchemaDiagram/Canvas/DummyCanvas.vue
@@ -52,7 +52,8 @@
<script lang="ts" setup>
import dayjs from "dayjs";
-import { computed, defineComponent, nextTick, PropType, ref, VNode } from "vue";
+import type { PropType, VNode } from "vue";
+import { computed, defineComponent, nextTick, ref } from "vue";
import Watermark from "@/components/misc/Watermark.vue";
import { pushNotification } from "@/store";
import { minmax } from "@/utils";
diff --git a/frontend/src/components/SchemaDiagram/ER/ForeignKeyLine.vue b/frontend/src/components/SchemaDiagram/ER/ForeignKeyLine.vue
index a87f5cf733..f00b6efa21 100644
--- a/frontend/src/components/SchemaDiagram/ER/ForeignKeyLine.vue
+++ b/frontend/src/components/SchemaDiagram/ER/ForeignKeyLine.vue
@@ -15,15 +15,15 @@
<script lang="ts" setup>
import { computed, onMounted, ref } from "vue";
-import { TableMetadata } from "@/types/proto/v1/database_service";
+import type { TableMetadata } from "@/types/proto/v1/database_service";
import type { VueClass } from "@/utils";
+import type { SegmentOverlap1D } from "../common";
import {
segmentOverlap1D,
- SegmentOverlap1D,
useGeometry,
useSchemaDiagramContext,
} from "../common";
-import { Point, Rect, Path, ForeignKey } from "../types";
+import type { Point, Rect, Path, ForeignKey } from "../types";
type Direction = "LEFT" | "RIGHT";
type Segment1D = [number, number];
diff --git a/frontend/src/components/SchemaDiagram/ER/TableNode.vue b/frontend/src/components/SchemaDiagram/ER/TableNode.vue
index be7d3d18d9..c4c2a74ac9 100644
--- a/frontend/src/components/SchemaDiagram/ER/TableNode.vue
+++ b/frontend/src/components/SchemaDiagram/ER/TableNode.vue
@@ -91,7 +91,7 @@
<script lang="ts" setup>
import { computed } from "vue";
import { hashCode } from "@/bbkit/BBUtil";
-import {
+import type {
ColumnMetadata,
SchemaMetadata,
TableMetadata,
diff --git a/frontend/src/components/SchemaDiagram/ER/libs/SVGLine.vue b/frontend/src/components/SchemaDiagram/ER/libs/SVGLine.vue
index f009006edb..e0fd6bebb3 100644
--- a/frontend/src/components/SchemaDiagram/ER/libs/SVGLine.vue
+++ b/frontend/src/components/SchemaDiagram/ER/libs/SVGLine.vue
@@ -52,7 +52,7 @@ import { useElementHover } from "@vueuse/core";
import { curveMonotoneX, line as d3Line } from "d3-shape";
import { computed, ref } from "vue";
import { calcBBox } from "../../common";
-import { Path, Rect } from "../../types";
+import type { Path, Rect } from "../../types";
const GLOW_WIDTH = 12;
const PADDING = GLOW_WIDTH / 2;
diff --git a/frontend/src/components/SchemaDiagram/ER/libs/autoLayout/engines/elk.ts b/frontend/src/components/SchemaDiagram/ER/libs/autoLayout/engines/elk.ts
index fc23ef4623..7d9f4c9c2c 100644
--- a/frontend/src/components/SchemaDiagram/ER/libs/autoLayout/engines/elk.ts
+++ b/frontend/src/components/SchemaDiagram/ER/libs/autoLayout/engines/elk.ts
@@ -1,4 +1,5 @@
-import ELK, { LayoutOptions, type ElkNode } from "elkjs/lib/elk.bundled";
+import type { LayoutOptions } from "elkjs/lib/elk.bundled";
+import ELK, { type ElkNode } from "elkjs/lib/elk.bundled";
import { groupBy } from "lodash-es";
import type { Path, Rect } from "@/components/SchemaDiagram/types";
import type { GraphEdgeItem, GraphNodeItem, Layout } from "../types";
diff --git a/frontend/src/components/SchemaDiagram/ER/libs/autoLayout/index.ts b/frontend/src/components/SchemaDiagram/ER/libs/autoLayout/index.ts
index c1b881bc18..a3f7bf580a 100644
--- a/frontend/src/components/SchemaDiagram/ER/libs/autoLayout/index.ts
+++ b/frontend/src/components/SchemaDiagram/ER/libs/autoLayout/index.ts
@@ -1,4 +1,4 @@
-import { GraphEdgeItem, GraphNodeItem, Layout } from "./types";
+import type { GraphEdgeItem, GraphNodeItem, Layout } from "./types";
export * from "./types";
diff --git a/frontend/src/components/SchemaDiagram/Navigator/Tree.vue b/frontend/src/components/SchemaDiagram/Navigator/Tree.vue
index cb5dabcc2a..419ec6b812 100644
--- a/frontend/src/components/SchemaDiagram/Navigator/Tree.vue
+++ b/frontend/src/components/SchemaDiagram/Navigator/Tree.vue
@@ -23,7 +23,7 @@ import { isDescendantOf } from "@/utils";
import { useSchemaDiagramContext } from "../common";
import { DEFAULT_PADDINGS } from "../common/const";
import { Label, Prefix, Suffix } from "./TreeNode";
-import { TreeNode } from "./types";
+import type { TreeNode } from "./types";
import { isTypedNode } from "./utils";
const props = withDefaults(
diff --git a/frontend/src/components/SchemaDiagram/Navigator/types.ts b/frontend/src/components/SchemaDiagram/Navigator/types.ts
index aadb5030cc..5293898c2c 100644
--- a/frontend/src/components/SchemaDiagram/Navigator/types.ts
+++ b/frontend/src/components/SchemaDiagram/Navigator/types.ts
@@ -1,5 +1,5 @@
import type { TreeOption } from "naive-ui";
-import {
+import type {
SchemaMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
diff --git a/frontend/src/components/SchemaDiagram/SchemaDiagram.vue b/frontend/src/components/SchemaDiagram/SchemaDiagram.vue
index e618e2d734..6dc5c27384 100644
--- a/frontend/src/components/SchemaDiagram/SchemaDiagram.vue
+++ b/frontend/src/components/SchemaDiagram/SchemaDiagram.vue
@@ -34,17 +34,18 @@ import Emittery from "emittery";
import { uniqueId } from "lodash-es";
import { computed, nextTick, ref, toRef, watch } from "vue";
import type { ComposedDatabase } from "@/types";
-import {
+import type {
ColumnMetadata,
DatabaseMetadata,
SchemaMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
import Canvas from "./Canvas";
-import { TableNode, autoLayout, GraphNodeItem, GraphEdgeItem } from "./ER";
+import type { GraphNodeItem, GraphEdgeItem } from "./ER";
+import { TableNode, autoLayout } from "./ER";
import Navigator from "./Navigator";
import { provideSchemaDiagramContext } from "./common";
-import {
+import type {
Point,
Rect,
Size,
diff --git a/frontend/src/components/SchemaDiagram/common/FocusButton.vue b/frontend/src/components/SchemaDiagram/common/FocusButton.vue
index 566dfdbc17..ebc6faf973 100644
--- a/frontend/src/components/SchemaDiagram/common/FocusButton.vue
+++ b/frontend/src/components/SchemaDiagram/common/FocusButton.vue
@@ -11,8 +11,8 @@
<script lang="ts" setup>
import { computed } from "vue";
-import { TableMetadata } from "@/types/proto/v1/database_service";
-import { VueClass } from "@/utils";
+import type { TableMetadata } from "@/types/proto/v1/database_service";
+import type { VueClass } from "@/utils";
import { expectedZoomRange, useSchemaDiagramContext } from ".";
import FocusIcon from "./FocusIcon.vue";
import { DEFAULT_PADDINGS } from "./const";
diff --git a/frontend/src/components/SchemaDiagram/common/context.ts b/frontend/src/components/SchemaDiagram/common/context.ts
index 7b8b70740e..181a2aec24 100644
--- a/frontend/src/components/SchemaDiagram/common/context.ts
+++ b/frontend/src/components/SchemaDiagram/common/context.ts
@@ -1,4 +1,5 @@
-import { inject, InjectionKey, provide, unref, watchEffect } from "vue";
+import type { InjectionKey } from "vue";
+import { inject, provide, unref, watchEffect } from "vue";
import type { MaybeRef } from "@/types";
import type { Geometry, SchemaDiagramContext } from "../types";
diff --git a/frontend/src/components/SchemaDiagram/common/schema.ts b/frontend/src/components/SchemaDiagram/common/schema.ts
index b4881a75e5..a67856d857 100644
--- a/frontend/src/components/SchemaDiagram/common/schema.ts
+++ b/frontend/src/components/SchemaDiagram/common/schema.ts
@@ -1,4 +1,4 @@
-import {
+import type {
ColumnMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
diff --git a/frontend/src/components/SchemaDiagram/common/useDraggable.ts b/frontend/src/components/SchemaDiagram/common/useDraggable.ts
index 6792a94a0c..ba31c007a7 100644
--- a/frontend/src/components/SchemaDiagram/common/useDraggable.ts
+++ b/frontend/src/components/SchemaDiagram/common/useDraggable.ts
@@ -1,6 +1,7 @@
-import { MaybeRef, useEventListener } from "@vueuse/core";
+import type { MaybeRef } from "@vueuse/core";
+import { useEventListener } from "@vueuse/core";
import { ref, unref } from "vue";
-import { Point } from "../types";
+import type { Point } from "../types";
export type DraggableOptions = {
exact?: boolean;
diff --git a/frontend/src/components/SchemaDiagram/types/context.ts b/frontend/src/components/SchemaDiagram/types/context.ts
index 498cb586af..b0d11bc438 100644
--- a/frontend/src/components/SchemaDiagram/types/context.ts
+++ b/frontend/src/components/SchemaDiagram/types/context.ts
@@ -1,7 +1,7 @@
import type Emittery from "emittery";
import type { Ref } from "vue";
import type { ComposedDatabase } from "@/types";
-import {
+import type {
ColumnMetadata,
DatabaseMetadata,
SchemaMetadata,
diff --git a/frontend/src/components/SchemaDiagram/types/schema.ts b/frontend/src/components/SchemaDiagram/types/schema.ts
index 77bba218f4..5a6ebf6799 100644
--- a/frontend/src/components/SchemaDiagram/types/schema.ts
+++ b/frontend/src/components/SchemaDiagram/types/schema.ts
@@ -1,4 +1,4 @@
-import {
+import type {
ForeignKeyMetadata,
SchemaMetadata,
TableMetadata,
diff --git a/frontend/src/components/SchemaEditorLite/Aside/Tree.vue b/frontend/src/components/SchemaEditorLite/Aside/Tree.vue
index 55de9fddfc..8371aae034 100644
--- a/frontend/src/components/SchemaEditorLite/Aside/Tree.vue
+++ b/frontend/src/components/SchemaEditorLite/Aside/Tree.vue
@@ -77,31 +77,17 @@
import { useElementSize } from "@vueuse/core";
import { cloneDeep, debounce, escape, head } from "lodash-es";
import { MoreHorizontalIcon, CopyIcon } from "lucide-vue-next";
-import {
- TreeOption,
- NInput,
- NDropdown,
- NTree,
- DropdownOption,
- NPerformantEllipsis,
-} from "naive-ui";
-import {
- computed,
- onMounted,
- watch,
- ref,
- h,
- reactive,
- nextTick,
- VNodeChild,
-} from "vue";
+import type { TreeOption, DropdownOption } from "naive-ui";
+import { NInput, NDropdown, NTree, NPerformantEllipsis } from "naive-ui";
+import type { VNodeChild } from "vue";
+import { computed, onMounted, watch, ref, h, reactive, nextTick } from "vue";
import { useI18n } from "vue-i18n";
import { DatabaseIcon, SchemaIcon, TableIcon } from "@/components/Icon";
import { InstanceV1EngineIcon } from "@/components/v2";
import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import {
+import type {
DatabaseMetadata,
SchemaMetadata,
TableMetadata,
@@ -113,13 +99,13 @@ import { useSchemaEditorContext } from "../context";
import { keyForResource, keyForResourceName } from "../context/common";
import { engineHasSchema } from "../engine-specs";
import NodeCheckbox from "./NodeCheckbox";
-import {
+import type {
TreeNode,
TreeNodeForInstance,
TreeNodeForSchema,
TreeNodeForTable,
- buildTree,
} from "./common";
+import { buildTree } from "./common";
interface TreeContextMenu {
showDropdown: boolean;
diff --git a/frontend/src/components/SchemaEditorLite/Aside/common.ts b/frontend/src/components/SchemaEditorLite/Aside/common.ts
index 8398cd7832..6bbb3775a9 100644
--- a/frontend/src/components/SchemaEditorLite/Aside/common.ts
+++ b/frontend/src/components/SchemaEditorLite/Aside/common.ts
@@ -1,6 +1,6 @@
-import { TreeOption } from "naive-ui";
-import { ComposedDatabase, ComposedInstance } from "@/types";
-import {
+import type { TreeOption } from "naive-ui";
+import type { ComposedDatabase, ComposedInstance } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
SchemaMetadata,
@@ -8,7 +8,7 @@ import {
} from "@/types/proto/v1/database_service";
import { groupBy } from "@/utils";
import { keyForResource } from "../context/common";
-import { EditTarget } from "../types";
+import type { EditTarget } from "../types";
export interface BaseTreeNode extends TreeOption {
key: string;
diff --git a/frontend/src/components/SchemaEditorLite/Modals/ActionConfirmModal.vue b/frontend/src/components/SchemaEditorLite/Modals/ActionConfirmModal.vue
index c705ac3105..ae1e1c2e63 100644
--- a/frontend/src/components/SchemaEditorLite/Modals/ActionConfirmModal.vue
+++ b/frontend/src/components/SchemaEditorLite/Modals/ActionConfirmModal.vue
@@ -20,8 +20,9 @@
</template>
<script lang="ts" setup>
-import { ButtonProps, NButton } from "naive-ui";
-import { PropType } from "vue";
+import type { ButtonProps } from "naive-ui";
+import { NButton } from "naive-ui";
+import type { PropType } from "vue";
const props = defineProps({
show: {
diff --git a/frontend/src/components/SchemaEditorLite/Modals/ColumnDefaultValueExpressionModal.vue b/frontend/src/components/SchemaEditorLite/Modals/ColumnDefaultValueExpressionModal.vue
index 55516e545a..5b7773e0c0 100644
--- a/frontend/src/components/SchemaEditorLite/Modals/ColumnDefaultValueExpressionModal.vue
+++ b/frontend/src/components/SchemaEditorLite/Modals/ColumnDefaultValueExpressionModal.vue
@@ -24,7 +24,8 @@
</template>
<script lang="ts" setup>
-import { InputInst, NButton, NInput } from "naive-ui";
+import type { InputInst } from "naive-ui";
+import { NButton, NInput } from "naive-ui";
import { onMounted, reactive, ref } from "vue";
import { useNotificationStore } from "@/store";
diff --git a/frontend/src/components/SchemaEditorLite/Modals/EditColumnForeignKeyModal.vue b/frontend/src/components/SchemaEditorLite/Modals/EditColumnForeignKeyModal.vue
index 8f792cf30d..e503982094 100644
--- a/frontend/src/components/SchemaEditorLite/Modals/EditColumnForeignKeyModal.vue
+++ b/frontend/src/components/SchemaEditorLite/Modals/EditColumnForeignKeyModal.vue
@@ -66,18 +66,19 @@
</template>
<script lang="ts" setup>
-import { NSelect, SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NSelect } from "naive-ui";
import { computed, onMounted, reactive } from "vue";
import { BBModal } from "@/bbkit";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import {
+import type {
ColumnMetadata,
DatabaseMetadata,
- ForeignKeyMetadata,
SchemaMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
+import { ForeignKeyMetadata } from "@/types/proto/v1/database_service";
import { randomString } from "@/utils";
import { useSchemaEditorContext } from "../context";
import {
diff --git a/frontend/src/components/SchemaEditorLite/Modals/SchemaNameModal.vue b/frontend/src/components/SchemaEditorLite/Modals/SchemaNameModal.vue
index 92d74ea2c4..08e9c00711 100644
--- a/frontend/src/components/SchemaEditorLite/Modals/SchemaNameModal.vue
+++ b/frontend/src/components/SchemaEditorLite/Modals/SchemaNameModal.vue
@@ -29,11 +29,9 @@ import { NInput } from "naive-ui";
import { reactive } from "vue";
import { useI18n } from "vue-i18n";
import { useNotificationStore } from "@/store";
-import { ComposedDatabase } from "@/types";
-import {
- DatabaseMetadata,
- SchemaMetadata,
-} from "@/types/proto/v1/database_service";
+import type { ComposedDatabase } from "@/types";
+import type { DatabaseMetadata } from "@/types/proto/v1/database_service";
+import { SchemaMetadata } from "@/types/proto/v1/database_service";
import { useSchemaEditorContext } from "../context";
const schemaNameFieldRegexp = /^\S+$/;
diff --git a/frontend/src/components/SchemaEditorLite/Modals/TableNameModal.vue b/frontend/src/components/SchemaEditorLite/Modals/TableNameModal.vue
index fab1de38ca..8814f86453 100644
--- a/frontend/src/components/SchemaEditorLite/Modals/TableNameModal.vue
+++ b/frontend/src/components/SchemaEditorLite/Modals/TableNameModal.vue
@@ -29,16 +29,19 @@
</template>
<script lang="ts" setup>
-import { InputInst, NButton, NInput } from "naive-ui";
+import type { InputInst } from "naive-ui";
+import { NButton, NInput } from "naive-ui";
import { computed, onMounted, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
import { useNotificationStore } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import {
- ColumnMetadata,
+import type {
DatabaseMetadata,
SchemaMetadata,
+} from "@/types/proto/v1/database_service";
+import {
+ ColumnMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
import { useSchemaEditorContext } from "../context";
diff --git a/frontend/src/components/SchemaEditorLite/Panels/ColumnSelectionSummary.vue b/frontend/src/components/SchemaEditorLite/Panels/ColumnSelectionSummary.vue
index 6131bbb1a7..c25ce42282 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/ColumnSelectionSummary.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/ColumnSelectionSummary.vue
@@ -7,8 +7,8 @@
<script setup lang="ts">
import { computed } from "vue";
import { useSchemaEditorContext } from "@/components/SchemaEditorLite/context";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
DatabaseMetadata,
SchemaMetadata,
TableMetadata,
diff --git a/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue
index d2a9724325..8035bdbff6 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue
@@ -156,15 +156,15 @@ import { computed, nextTick, reactive, watch } from "vue";
import { SchemaDiagramIcon } from "@/components/SchemaDiagram";
import { Drawer, DrawerContent } from "@/components/v2";
import { hasFeature } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import {
+import type {
ColumnMetadata,
DatabaseMetadata,
SchemaMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
-import { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";
+import type { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";
import TableTemplates from "@/views/SchemaTemplate/TableTemplates.vue";
import TableNameModal from "../Modals/TableNameModal.vue";
import { useSchemaEditorContext } from "../context";
diff --git a/frontend/src/components/SchemaEditorLite/Panels/IndexesEditor/IndexesEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/IndexesEditor/IndexesEditor.vue
index 9326b440af..ff73b15d01 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/IndexesEditor/IndexesEditor.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/IndexesEditor/IndexesEditor.vue
@@ -27,17 +27,13 @@
<script lang="ts" setup>
import { useElementSize } from "@vueuse/core";
import { pull } from "lodash-es";
-import {
- DataTableColumn,
- DataTableInst,
- NCheckbox,
- NDataTable,
-} from "naive-ui";
+import type { DataTableColumn, DataTableInst } from "naive-ui";
+import { NCheckbox, NDataTable } from "naive-ui";
import { computed, h, ref } from "vue";
import { useI18n } from "vue-i18n";
import { InlineInput } from "@/components/v2";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
DatabaseMetadata,
IndexMetadata,
SchemaMetadata,
diff --git a/frontend/src/components/SchemaEditorLite/Panels/IndexesEditor/components/ColumnsCell.vue b/frontend/src/components/SchemaEditorLite/Panels/IndexesEditor/components/ColumnsCell.vue
index 8e37a421ec..b1ded5ac3e 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/IndexesEditor/components/ColumnsCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/IndexesEditor/components/ColumnsCell.vue
@@ -18,10 +18,12 @@
</template>
<script lang="ts" setup>
-import { NSelect, SelectOption } from "naive-ui";
-import { CSSProperties, computed, ref } from "vue";
-import { ComposedDatabase } from "@/types";
-import {
+import type { SelectOption } from "naive-ui";
+import { NSelect } from "naive-ui";
+import type { CSSProperties } from "vue";
+import { computed, ref } from "vue";
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
IndexMetadata,
diff --git a/frontend/src/components/SchemaEditorLite/Panels/IndexesEditor/components/OperationCell.vue b/frontend/src/components/SchemaEditorLite/Panels/IndexesEditor/components/OperationCell.vue
index 79f532ec18..3cf004af07 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/IndexesEditor/components/OperationCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/IndexesEditor/components/OperationCell.vue
@@ -16,7 +16,7 @@
import { TrashIcon } from "lucide-vue-next";
import { NPopconfirm } from "naive-ui";
import { MiniActionButton } from "@/components/v2";
-import { IndexMetadata } from "@/types/proto/v1/database_service";
+import type { IndexMetadata } from "@/types/proto/v1/database_service";
defineProps<{
index: IndexMetadata;
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue
index c6f7ff7f74..245fee6868 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue
@@ -66,37 +66,30 @@
<script lang="ts" setup>
import { useElementSize } from "@vueuse/core";
import { pick } from "lodash-es";
-import {
- DataTableColumn,
- DataTableInst,
- NCheckbox,
- NDataTable,
-} from "naive-ui";
+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 SelectClassificationDrawer from "@/components/SchemaTemplate/SelectClassificationDrawer.vue";
import SemanticTypesDrawer from "@/components/SensitiveData/components/SemanticTypesDrawer.vue";
import { InlineInput } from "@/components/v2";
import { useSettingV1Store, useSubscriptionV1Store } from "@/store/modules";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import {
- ColumnConfig,
+import type {
ColumnMetadata,
DatabaseMetadata,
ForeignKeyMetadata,
SchemaMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
+import { ColumnConfig } from "@/types/proto/v1/database_service";
import { DataClassificationSetting_DataClassificationConfig as DataClassificationConfig } from "@/types/proto/v1/setting_service";
import ColumnDefaultValueExpressionModal from "../../Modals/ColumnDefaultValueExpressionModal.vue";
import { useSchemaEditorContext } from "../../context";
-import { EditStatus } from "../../types";
-import {
- DefaultValueOption,
- getDefaultValueByKey,
- isTextOfColumnType,
-} from "../../utils";
+import type { EditStatus } from "../../types";
+import type { DefaultValueOption } from "../../utils";
+import { getDefaultValueByKey, isTextOfColumnType } from "../../utils";
import { markUUID } from "../common";
import {
ClassificationCell,
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/ClassificationCell.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/ClassificationCell.vue
index c15477a296..1db4717909 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/ClassificationCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/ClassificationCell.vue
@@ -19,7 +19,7 @@
import { PencilIcon, XIcon } from "lucide-vue-next";
import ClassificationLevelBadge from "@/components/SchemaTemplate/ClassificationLevelBadge.vue";
import { MiniActionButton } from "@/components/v2";
-import { DataClassificationSetting_DataClassificationConfig as DataClassificationConfig } from "@/types/proto/v1/setting_service";
+import type { DataClassificationSetting_DataClassificationConfig as DataClassificationConfig } from "@/types/proto/v1/setting_service";
defineProps<{
classification?: string | undefined;
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/DataTypeCell.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/DataTypeCell.vue
index df465c4996..25e50db39d 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/DataTypeCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/DataTypeCell.vue
@@ -16,11 +16,12 @@
</template>
<script lang="ts" setup>
-import { SelectOption } from "naive-ui";
-import { CSSProperties, computed, ref, onMounted } from "vue";
+import type { SelectOption } from "naive-ui";
+import type { CSSProperties } from "vue";
+import { computed, ref, onMounted } from "vue";
import { DropdownInput } from "@/components/v2";
-import { Engine } from "@/types/proto/v1/common";
-import { ColumnMetadata } from "@/types/proto/v1/database_service";
+import type { Engine } from "@/types/proto/v1/common";
+import type { ColumnMetadata } from "@/types/proto/v1/database_service";
import { getDataTypeSuggestionList } from "@/utils";
const props = defineProps<{
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/DefaultValueCell.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/DefaultValueCell.vue
index 180b327757..8e74e51241 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/DefaultValueCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/DefaultValueCell.vue
@@ -14,18 +14,19 @@
</template>
<script lang="ts" setup>
-import { SelectOption } from "naive-ui";
-import { CSSProperties, computed, ref } from "vue";
+import type { SelectOption } from "naive-ui";
+import type { CSSProperties } from "vue";
+import { computed, ref } from "vue";
+import type { DefaultValueOption } from "@/components/SchemaEditorLite/utils";
import {
- DefaultValueOption,
getColumnDefaultDisplayString,
getColumnDefaultValueOptions,
getColumnDefaultValuePlaceholder,
getDefaultValueByKey,
} from "@/components/SchemaEditorLite/utils";
import { DropdownInput } from "@/components/v2";
-import { Engine } from "@/types/proto/v1/common";
-import { ColumnMetadata } from "@/types/proto/v1/database_service";
+import type { Engine } from "@/types/proto/v1/common";
+import type { ColumnMetadata } from "@/types/proto/v1/database_service";
const props = defineProps<{
column: ColumnMetadata;
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/ForeignKeyCell.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/ForeignKeyCell.vue
index 2f11973068..d6091b5bd9 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/ForeignKeyCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/ForeignKeyCell.vue
@@ -37,8 +37,8 @@ import { PenSquareIcon } from "lucide-vue-next";
import { computed } from "vue";
import { engineHasSchema } from "@/components/SchemaEditorLite/engine-specs";
import { MiniActionButton } from "@/components/v2";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
ForeignKeyMetadata,
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/LabelsCell.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/LabelsCell.vue
index 07d3f74fc2..d7003243cb 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/LabelsCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/LabelsCell.vue
@@ -13,8 +13,8 @@ import { computed } from "vue";
import { useSchemaEditorContext } from "@/components/SchemaEditorLite/context";
import { MiniActionButton } from "@/components/v2";
import LabelsColumn from "@/components/v2/Model/DatabaseV1Table/LabelsColumn.vue";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
SchemaMetadata,
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/OperationCell.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/OperationCell.vue
index 586a3cc272..363910606f 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/OperationCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/OperationCell.vue
@@ -26,7 +26,7 @@
<script lang="ts" setup>
import { TrashIcon, Undo2Icon } from "lucide-vue-next";
import { MiniActionButton } from "@/components/v2";
-import { ColumnMetadata } from "@/types/proto/v1/database_service";
+import type { ColumnMetadata } from "@/types/proto/v1/database_service";
defineProps<{
column: ColumnMetadata;
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/ReorderCell.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/ReorderCell.vue
index e7d65388fe..be66f1f943 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/ReorderCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/ReorderCell.vue
@@ -17,7 +17,7 @@
<script setup lang="ts">
import { ChevronDownIcon, ChevronUpIcon } from "lucide-vue-next";
import { MiniActionButton } from "@/components/v2";
-import { ColumnMetadata } from "@/types/proto/v1/database_service";
+import type { ColumnMetadata } from "@/types/proto/v1/database_service";
defineProps<{
column: ColumnMetadata;
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/SelectionCell.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/SelectionCell.vue
index 7e5333d233..d6dee035e9 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/SelectionCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/SelectionCell.vue
@@ -10,8 +10,8 @@
import { NCheckbox } from "naive-ui";
import { computed } from "vue";
import { useSchemaEditorContext } from "@/components/SchemaEditorLite/context";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
SchemaMetadata,
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/SemanticTypeCell.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/SemanticTypeCell.vue
index 7ab244ff4f..6efb7157ca 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/SemanticTypeCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/SemanticTypeCell.vue
@@ -24,14 +24,14 @@ import { PencilIcon, XIcon } from "lucide-vue-next";
import { computed } from "vue";
import { useSchemaEditorContext } from "@/components/SchemaEditorLite/context";
import { MiniActionButton } from "@/components/v2";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
SchemaMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
-import { SemanticTypeSetting_SemanticType as SemanticType } from "@/types/proto/v1/setting_service";
+import type { SemanticTypeSetting_SemanticType as SemanticType } from "@/types/proto/v1/setting_service";
const props = defineProps<{
db: ComposedDatabase;
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue
index 1f6b38789f..c9fbcaa652 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue
@@ -149,16 +149,18 @@ import { useI18n } from "vue-i18n";
import { IndexIcon } from "@/components/Icon";
import { Drawer, DrawerContent } from "@/components/v2";
import { hasFeature, pushNotification } from "@/store/modules";
-import { ComposedDatabase } from "@/types";
-import {
- ColumnMetadata,
+import type { ComposedDatabase } from "@/types";
+import type {
DatabaseMetadata,
ForeignKeyMetadata,
- IndexMetadata,
SchemaMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
-import { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";
+import {
+ ColumnMetadata,
+ IndexMetadata,
+} from "@/types/proto/v1/database_service";
+import type { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";
import {
arraySwap,
instanceV1AllowsReorderColumns,
@@ -172,7 +174,7 @@ import {
removeColumnPrimaryKey,
upsertColumnPrimaryKey,
} from "../edit";
-import { EditStatus } from "../types";
+import type { EditStatus } from "../types";
import ColumnSelectionSummary from "./ColumnSelectionSummary.vue";
import IndexesEditor from "./IndexesEditor";
import TableColumnEditor from "./TableColumnEditor";
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableList/TableList.vue b/frontend/src/components/SchemaEditorLite/Panels/TableList/TableList.vue
index 75c5502899..5d645fb75e 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableList/TableList.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableList/TableList.vue
@@ -57,28 +57,22 @@
<script lang="ts" setup>
import { useElementSize } from "@vueuse/core";
import { cloneDeep, pick } from "lodash-es";
-import {
- DataTableColumn,
- DataTableInst,
- NCheckbox,
- NDataTable,
-} from "naive-ui";
+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 FeatureModal from "@/components/FeatureGuard/FeatureModal.vue";
import SelectClassificationDrawer from "@/components/SchemaTemplate/SelectClassificationDrawer.vue";
import { Drawer, DrawerContent, InlineInput } from "@/components/v2";
import { hasFeature, useSettingV1Store } from "@/store";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
DatabaseMetadata,
SchemaMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
-import {
- SchemaTemplateSetting_TableTemplate,
- DataClassificationSetting_DataClassificationConfig as DataClassificationConfig,
-} from "@/types/proto/v1/setting_service";
+import type { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";
+import { DataClassificationSetting_DataClassificationConfig as DataClassificationConfig } from "@/types/proto/v1/setting_service";
import TableTemplates from "@/views/SchemaTemplate/TableTemplates.vue";
import { useSchemaEditorContext } from "../../context";
import ClassificationCell from "../TableColumnEditor/components/ClassificationCell.vue";
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableList/components/NameCell.vue b/frontend/src/components/SchemaEditorLite/Panels/TableList/components/NameCell.vue
index 97459cf3b4..50ce6b127f 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableList/components/NameCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableList/components/NameCell.vue
@@ -10,7 +10,7 @@
<script lang="ts" setup>
import { NPerformantEllipsis } from "naive-ui";
-import { TableMetadata } from "@/types/proto/v1/database_service";
+import type { TableMetadata } from "@/types/proto/v1/database_service";
defineProps<{
table: TableMetadata;
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableList/components/OperationCell.vue b/frontend/src/components/SchemaEditorLite/Panels/TableList/components/OperationCell.vue
index 81118c01a6..4e7e3e77ee 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableList/components/OperationCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableList/components/OperationCell.vue
@@ -25,7 +25,7 @@
<script lang="ts" setup>
import { TrashIcon, Undo2Icon } from "lucide-vue-next";
import { MiniActionButton } from "@/components/v2";
-import { TableMetadata } from "@/types/proto/v1/database_service";
+import type { TableMetadata } from "@/types/proto/v1/database_service";
defineProps<{
table: TableMetadata;
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableList/components/SelectionCell.vue b/frontend/src/components/SchemaEditorLite/Panels/TableList/components/SelectionCell.vue
index 6ba7ba79b4..e8f4d3244f 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableList/components/SelectionCell.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableList/components/SelectionCell.vue
@@ -10,8 +10,8 @@
import { NCheckbox } from "naive-ui";
import { computed } from "vue";
import { useSchemaEditorContext } from "@/components/SchemaEditorLite/context";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
DatabaseMetadata,
SchemaMetadata,
TableMetadata,
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableSelectionSummary.vue b/frontend/src/components/SchemaEditorLite/Panels/TableSelectionSummary.vue
index f2fb12cf54..d8ba969c0c 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableSelectionSummary.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableSelectionSummary.vue
@@ -6,8 +6,8 @@
<script setup lang="ts">
import { computed } from "vue";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
DatabaseMetadata,
SchemaMetadata,
} from "@/types/proto/v1/database_service";
diff --git a/frontend/src/components/SchemaEditorLite/SchemaEditorLite.vue b/frontend/src/components/SchemaEditorLite/SchemaEditorLite.vue
index 37c5ad6bc3..fc1ee71848 100644
--- a/frontend/src/components/SchemaEditorLite/SchemaEditorLite.vue
+++ b/frontend/src/components/SchemaEditorLite/SchemaEditorLite.vue
@@ -24,14 +24,14 @@ import { reactive, computed, onMounted, toRef, watch } from "vue";
import MaskSpinner from "@/components/misc/MaskSpinner.vue";
import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";
import { useDatabaseV1Store, useSettingV1Store } from "@/store";
-import { ComposedProject } from "@/types";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { ComposedProject } from "@/types";
+import type { Branch } from "@/types/proto/v1/branch_service";
import { DatabaseMetadata } from "@/types/proto/v1/database_service";
import Aside from "./Aside";
import Editor from "./Editor.vue";
import { useAlgorithm } from "./algorithm";
import { provideSchemaEditorContext } from "./context";
-import { EditTarget, RolloutObject } from "./types";
+import type { EditTarget, RolloutObject } from "./types";
const props = defineProps<{
project: ComposedProject;
diff --git a/frontend/src/components/SchemaEditorLite/TabsContainer.vue b/frontend/src/components/SchemaEditorLite/TabsContainer.vue
index c50882360f..57f8e05c6d 100644
--- a/frontend/src/components/SchemaEditorLite/TabsContainer.vue
+++ b/frontend/src/components/SchemaEditorLite/TabsContainer.vue
@@ -66,7 +66,7 @@ import { computed, nextTick, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import { DatabaseIcon, TableIcon } from "../Icon";
import { useSchemaEditorContext } from "./context";
-import { TabContext } from "./types";
+import type { TabContext } from "./types";
const emit = defineEmits<{
(event: "update:table-search-pattern", pattern: string): void;
diff --git a/frontend/src/components/SchemaEditorLite/algorithm/apply-selected.ts b/frontend/src/components/SchemaEditorLite/algorithm/apply-selected.ts
index 83736357b5..ed680cb8c5 100644
--- a/frontend/src/components/SchemaEditorLite/algorithm/apply-selected.ts
+++ b/frontend/src/components/SchemaEditorLite/algorithm/apply-selected.ts
@@ -1,18 +1,17 @@
import { cloneDeep } from "lodash-es";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnConfig,
ColumnMetadata,
DatabaseMetadata,
- SchemaConfig,
SchemaMetadata,
- TableConfig,
TableMetadata,
} from "@/types/proto/v1/database_service";
+import { SchemaConfig, TableConfig } from "@/types/proto/v1/database_service";
import { filterColumnMetadata, filterTableMetadata } from "@/utils";
-import { SchemaEditorContext } from "../context";
+import type { SchemaEditorContext } from "../context";
import { keyForResource, keyForResourceName } from "../context/common";
-import { RolloutObject } from "../types";
+import type { RolloutObject } from "../types";
import {
buildColumnConfigMap,
buildColumnMap,
diff --git a/frontend/src/components/SchemaEditorLite/algorithm/apply.ts b/frontend/src/components/SchemaEditorLite/algorithm/apply.ts
index 88ff921dfe..350a085d01 100644
--- a/frontend/src/components/SchemaEditorLite/algorithm/apply.ts
+++ b/frontend/src/components/SchemaEditorLite/algorithm/apply.ts
@@ -1,6 +1,6 @@
-import { ComposedDatabase } from "@/types";
-import { DatabaseMetadata } from "@/types/proto/v1/database_service";
-import { SchemaEditorContext } from "../context";
+import type { ComposedDatabase } from "@/types";
+import type { DatabaseMetadata } from "@/types/proto/v1/database_service";
+import type { SchemaEditorContext } from "../context";
import { cleanupUnusedConfigs } from "./utils";
export const useApplyMetadataEdit = (context: SchemaEditorContext) => {
diff --git a/frontend/src/components/SchemaEditorLite/algorithm/diff-merge.ts b/frontend/src/components/SchemaEditorLite/algorithm/diff-merge.ts
index cf61d88f66..6e22fec9ff 100644
--- a/frontend/src/components/SchemaEditorLite/algorithm/diff-merge.ts
+++ b/frontend/src/components/SchemaEditorLite/algorithm/diff-merge.ts
@@ -1,16 +1,18 @@
import { cloneDeep, isEqual, pick } from "lodash-es";
-import { ComposedDatabase } from "@/types";
-import {
- ColumnConfig,
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
ForeignKeyMetadata,
IndexMetadata,
- SchemaConfig,
SchemaMetadata,
- TableConfig,
TableMetadata,
} from "@/types/proto/v1/database_service";
+import {
+ ColumnConfig,
+ SchemaConfig,
+ TableConfig,
+} from "@/types/proto/v1/database_service";
import { TinyTimer, keyBy } from "@/utils";
import {
ComparableColumnFields,
@@ -18,7 +20,7 @@ import {
ComparableIndexFields,
ComparableTableFields,
} from "@/utils";
-import { SchemaEditorContext } from "../context";
+import type { SchemaEditorContext } from "../context";
import { keyForResourceName } from "../context/common";
type RichSchemaMetadata = {
diff --git a/frontend/src/components/SchemaEditorLite/algorithm/index.ts b/frontend/src/components/SchemaEditorLite/algorithm/index.ts
index f981539022..9b62f9655b 100644
--- a/frontend/src/components/SchemaEditorLite/algorithm/index.ts
+++ b/frontend/src/components/SchemaEditorLite/algorithm/index.ts
@@ -1,4 +1,4 @@
-import { SchemaEditorContext } from "../context";
+import type { SchemaEditorContext } from "../context";
import { useApplyMetadataEdit } from "./apply";
import { useApplySelectedMetadataEdit } from "./apply-selected";
import { useRebuildMetadataEdit } from "./rebuild";
diff --git a/frontend/src/components/SchemaEditorLite/algorithm/rebuild.ts b/frontend/src/components/SchemaEditorLite/algorithm/rebuild.ts
index b825e4203b..6128450840 100644
--- a/frontend/src/components/SchemaEditorLite/algorithm/rebuild.ts
+++ b/frontend/src/components/SchemaEditorLite/algorithm/rebuild.ts
@@ -1,7 +1,7 @@
import { nextTick } from "vue";
-import { ComposedDatabase } from "@/types";
-import { DatabaseMetadata } from "@/types/proto/v1/database_service";
-import { SchemaEditorContext } from "../context";
+import type { ComposedDatabase } from "@/types";
+import type { DatabaseMetadata } from "@/types/proto/v1/database_service";
+import type { SchemaEditorContext } from "../context";
import { DiffMerge } from "./diff-merge";
export type RebuildMetadataEditReset = "tabs" | "tree";
diff --git a/frontend/src/components/SchemaEditorLite/algorithm/utils.ts b/frontend/src/components/SchemaEditorLite/algorithm/utils.ts
index 962447a644..caca833a77 100644
--- a/frontend/src/components/SchemaEditorLite/algorithm/utils.ts
+++ b/frontend/src/components/SchemaEditorLite/algorithm/utils.ts
@@ -1,5 +1,5 @@
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnConfig,
ColumnMetadata,
DatabaseMetadata,
diff --git a/frontend/src/components/SchemaEditorLite/common.ts b/frontend/src/components/SchemaEditorLite/common.ts
index 4c634ea1a3..2b55b496c1 100644
--- a/frontend/src/components/SchemaEditorLite/common.ts
+++ b/frontend/src/components/SchemaEditorLite/common.ts
@@ -1,8 +1,8 @@
import { isEqual } from "lodash-es";
import { branchServiceClient } from "@/grpcweb";
import { t } from "@/plugins/i18n";
-import { ComposedDatabase } from "@/types";
-import { DatabaseMetadata } from "@/types/proto/v1/database_service";
+import type { ComposedDatabase } from "@/types";
+import type { DatabaseMetadata } from "@/types/proto/v1/database_service";
import { TinyTimer } from "@/utils";
import { extractGrpcErrorMessage } from "@/utils/grpcweb";
import { validateDatabaseMetadata } from "./utils";
diff --git a/frontend/src/components/SchemaEditorLite/context/common.ts b/frontend/src/components/SchemaEditorLite/context/common.ts
index 5937d58f59..ef2e748839 100644
--- a/frontend/src/components/SchemaEditorLite/context/common.ts
+++ b/frontend/src/components/SchemaEditorLite/context/common.ts
@@ -1,5 +1,5 @@
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
SchemaMetadata,
TableMetadata,
diff --git a/frontend/src/components/SchemaEditorLite/context/config.ts b/frontend/src/components/SchemaEditorLite/context/config.ts
index bed25d7edb..56550e66a5 100644
--- a/frontend/src/components/SchemaEditorLite/context/config.ts
+++ b/frontend/src/components/SchemaEditorLite/context/config.ts
@@ -1,16 +1,19 @@
import { pick } from "lodash-es";
-import { Ref, reactive, watch } from "vue";
-import { ComposedDatabase } from "@/types";
-import {
- ColumnConfig,
+import type { Ref } from "vue";
+import { reactive, watch } from "vue";
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
- SchemaConfig,
SchemaMetadata,
- TableConfig,
TableMetadata,
} from "@/types/proto/v1/database_service";
-import { EditTarget } from "../types";
+import {
+ ColumnConfig,
+ SchemaConfig,
+ TableConfig,
+} from "@/types/proto/v1/database_service";
+import type { EditTarget } from "../types";
import { keyForResource, keyForResourceName } from "./common";
export const useEditConfigs = (targets: Ref<EditTarget[]>) => {
diff --git a/frontend/src/components/SchemaEditorLite/context/edit.ts b/frontend/src/components/SchemaEditorLite/context/edit.ts
index c5eda82fe2..7df9162099 100644
--- a/frontend/src/components/SchemaEditorLite/context/edit.ts
+++ b/frontend/src/components/SchemaEditorLite/context/edit.ts
@@ -1,12 +1,12 @@
import { computed, ref } from "vue";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
SchemaMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
-import { EditStatus } from "../types";
+import type { EditStatus } from "../types";
import { keyForResource } from "./common";
export const useEditStatus = () => {
diff --git a/frontend/src/components/SchemaEditorLite/context/index.ts b/frontend/src/components/SchemaEditorLite/context/index.ts
index 95f0131cc6..bf5959582b 100644
--- a/frontend/src/components/SchemaEditorLite/context/index.ts
+++ b/frontend/src/components/SchemaEditorLite/context/index.ts
@@ -1,8 +1,9 @@
import Emittery from "emittery";
-import { Ref, inject, provide } from "vue";
-import { ComposedProject } from "@/types";
-import { RebuildMetadataEditReset } from "../algorithm/rebuild";
-import { EditTarget, ResourceType, RolloutObject } from "../types";
+import type { Ref } from "vue";
+import { inject, provide } from "vue";
+import type { ComposedProject } from "@/types";
+import type { RebuildMetadataEditReset } from "../algorithm/rebuild";
+import type { EditTarget, ResourceType, RolloutObject } from "../types";
import { useEditConfigs } from "./config";
import { useEditStatus } from "./edit";
import { useScrollStatus } from "./scroll";
diff --git a/frontend/src/components/SchemaEditorLite/context/scroll.ts b/frontend/src/components/SchemaEditorLite/context/scroll.ts
index d4d59fc20c..9d1dc79fa4 100644
--- a/frontend/src/components/SchemaEditorLite/context/scroll.ts
+++ b/frontend/src/components/SchemaEditorLite/context/scroll.ts
@@ -1,7 +1,8 @@
import { useMounted } from "@vueuse/core";
-import { Ref, computed, ref, watch } from "vue";
-import { ComposedDatabase } from "@/types";
-import {
+import type { Ref } from "vue";
+import { computed, ref, watch } from "vue";
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
SchemaMetadata,
diff --git a/frontend/src/components/SchemaEditorLite/context/selection.ts b/frontend/src/components/SchemaEditorLite/context/selection.ts
index 26b717966e..b4ff463fbf 100644
--- a/frontend/src/components/SchemaEditorLite/context/selection.ts
+++ b/frontend/src/components/SchemaEditorLite/context/selection.ts
@@ -1,14 +1,15 @@
import { pick } from "lodash-es";
-import { Ref, computed } from "vue";
-import { ComposedDatabase } from "@/types";
-import {
+import type { Ref } from "vue";
+import { computed } from "vue";
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
SchemaMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
-import { SchemaEditorEvents } from ".";
-import { RolloutObject } from "../types";
+import type { SchemaEditorEvents } from ".";
+import type { RolloutObject } from "../types";
import { keyForResource } from "./common";
export const useSelection = (
diff --git a/frontend/src/components/SchemaEditorLite/context/tabs.ts b/frontend/src/components/SchemaEditorLite/context/tabs.ts
index 613eadbc96..0ad09f05bb 100644
--- a/frontend/src/components/SchemaEditorLite/context/tabs.ts
+++ b/frontend/src/components/SchemaEditorLite/context/tabs.ts
@@ -1,8 +1,8 @@
import { v1 as uuidv1 } from "uuid";
import { computed, ref } from "vue";
import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";
-import { CoreTabContext, TabContext } from "../types";
-import { SchemaEditorEvents } from "./index";
+import type { CoreTabContext, TabContext } from "../types";
+import type { SchemaEditorEvents } from "./index";
export const useTabs = (events: SchemaEditorEvents) => {
const tabMap = ref(new Map<string, TabContext>());
diff --git a/frontend/src/components/SchemaEditorLite/edit.ts b/frontend/src/components/SchemaEditorLite/edit.ts
index 68a092f9ca..b9bb0826c4 100644
--- a/frontend/src/components/SchemaEditorLite/edit.ts
+++ b/frontend/src/components/SchemaEditorLite/edit.ts
@@ -1,9 +1,9 @@
import { pull, pullAt } from "lodash-es";
-import {
+import type {
ForeignKeyMetadata,
- IndexMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
+import { IndexMetadata } from "@/types/proto/v1/database_service";
import { upsertArray } from "@/utils";
export const upsertColumnPrimaryKey = (
diff --git a/frontend/src/components/SchemaEditorLite/types.ts b/frontend/src/components/SchemaEditorLite/types.ts
index 984af9a214..c3438c7684 100644
--- a/frontend/src/components/SchemaEditorLite/types.ts
+++ b/frontend/src/components/SchemaEditorLite/types.ts
@@ -1,5 +1,5 @@
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
SchemaMetadata,
diff --git a/frontend/src/components/SchemaEditorLite/utils/columnDefaultValue.ts b/frontend/src/components/SchemaEditorLite/utils/columnDefaultValue.ts
index 9d9fa16fd2..28a50c7c34 100644
--- a/frontend/src/components/SchemaEditorLite/utils/columnDefaultValue.ts
+++ b/frontend/src/components/SchemaEditorLite/utils/columnDefaultValue.ts
@@ -1,7 +1,7 @@
-import { DropdownOption } from "naive-ui";
+import type { DropdownOption } from "naive-ui";
import { t } from "@/plugins/i18n";
import { Engine } from "@/types/proto/v1/common";
-import { ColumnDefaultValue } from "@/types/v1/schemaEditor";
+import type { ColumnDefaultValue } from "@/types/v1/schemaEditor";
interface DefaultValue {
hasDefault: boolean;
diff --git a/frontend/src/components/SchemaEditorLite/utils/metadata.ts b/frontend/src/components/SchemaEditorLite/utils/metadata.ts
index c5cdc10648..9606ba1599 100644
--- a/frontend/src/components/SchemaEditorLite/utils/metadata.ts
+++ b/frontend/src/components/SchemaEditorLite/utils/metadata.ts
@@ -1,5 +1,5 @@
import { uniq } from "lodash-es";
-import { DatabaseMetadata } from "@/types/proto/v1/database_service";
+import type { DatabaseMetadata } from "@/types/proto/v1/database_service";
export const validateDatabaseMetadata = (
databaseMetadata: DatabaseMetadata
diff --git a/frontend/src/components/SchemaEditorV1/Aside/BranchTree.vue b/frontend/src/components/SchemaEditorV1/Aside/BranchTree.vue
index 3a83143f25..967b81642a 100644
--- a/frontend/src/components/SchemaEditorV1/Aside/BranchTree.vue
+++ b/frontend/src/components/SchemaEditorV1/Aside/BranchTree.vue
@@ -76,7 +76,8 @@
<script lang="ts" setup>
import { useElementSize } from "@vueuse/core";
import { debounce, escape, head, isUndefined, pick } from "lodash-es";
-import { TreeOption, NEllipsis, NInput, NDropdown, NTree } from "naive-ui";
+import type { TreeOption } from "naive-ui";
+import { NEllipsis, NInput, NDropdown, NTree } from "naive-ui";
import { v1 as uuidv1 } from "uuid";
import { computed, watch, ref, h, reactive, nextTick, onMounted } from "vue";
import { useI18n } from "vue-i18n";
@@ -85,10 +86,11 @@ import TableIcon from "~icons/heroicons-outline/table-cells";
import SchemaIcon from "~icons/heroicons-outline/view-columns";
import EllipsisIcon from "~icons/heroicons-solid/ellipsis-horizontal";
import { generateUniqueTabId, useSchemaEditorV1Store } from "@/store";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
import { Engine } from "@/types/proto/v1/common";
-import { Table } from "@/types/v1/schemaEditor";
-import { BranchSchema, SchemaEditorTabType } from "@/types/v1/schemaEditor";
+import type { Table } from "@/types/v1/schemaEditor";
+import type { BranchSchema } from "@/types/v1/schemaEditor";
+import { SchemaEditorTabType } from "@/types/v1/schemaEditor";
import { getHighlightHTMLByKeyWords, isDescendantOf } from "@/utils";
import SchemaNameModal from "../Modals/SchemaNameModal.vue";
import TableNameModal from "../Modals/TableNameModal.vue";
diff --git a/frontend/src/components/SchemaEditorV1/Aside/DatabaseTree.vue b/frontend/src/components/SchemaEditorV1/Aside/DatabaseTree.vue
index a4ff19a3ff..f08b358fca 100644
--- a/frontend/src/components/SchemaEditorV1/Aside/DatabaseTree.vue
+++ b/frontend/src/components/SchemaEditorV1/Aside/DatabaseTree.vue
@@ -70,7 +70,8 @@
<script lang="ts" setup>
import { useElementSize } from "@vueuse/core";
import { escape, head, isUndefined, pick } from "lodash-es";
-import { TreeOption, NEllipsis, NInput, NDropdown, NTree } from "naive-ui";
+import type { TreeOption } from "naive-ui";
+import { NEllipsis, NInput, NDropdown, NTree } from "naive-ui";
import { computed, onMounted, watch, ref, h, reactive, nextTick } from "vue";
import { useI18n } from "vue-i18n";
import DatabaseIcon from "~icons/heroicons-outline/circle-stack";
@@ -87,7 +88,7 @@ import {
} from "@/store";
import { Engine } from "@/types/proto/v1/common";
import { SchemaEditorTabType } from "@/types/v1/schemaEditor";
-import { Schema, Table } from "@/types/v1/schemaEditor";
+import type { Schema, Table } from "@/types/v1/schemaEditor";
import { getHighlightHTMLByKeyWords, isDescendantOf } from "@/utils";
import SchemaNameModal from "../Modals/SchemaNameModal.vue";
import TableNameModal from "../Modals/TableNameModal.vue";
diff --git a/frontend/src/components/SchemaEditorV1/Modals/ActionConfirmModal.vue b/frontend/src/components/SchemaEditorV1/Modals/ActionConfirmModal.vue
index c705ac3105..ae1e1c2e63 100644
--- a/frontend/src/components/SchemaEditorV1/Modals/ActionConfirmModal.vue
+++ b/frontend/src/components/SchemaEditorV1/Modals/ActionConfirmModal.vue
@@ -20,8 +20,9 @@
</template>
<script lang="ts" setup>
-import { ButtonProps, NButton } from "naive-ui";
-import { PropType } from "vue";
+import type { ButtonProps } from "naive-ui";
+import { NButton } from "naive-ui";
+import type { PropType } from "vue";
const props = defineProps({
show: {
diff --git a/frontend/src/components/SchemaEditorV1/Modals/ColumnDefaultValueExpressionModal.vue b/frontend/src/components/SchemaEditorV1/Modals/ColumnDefaultValueExpressionModal.vue
index 55516e545a..5b7773e0c0 100644
--- a/frontend/src/components/SchemaEditorV1/Modals/ColumnDefaultValueExpressionModal.vue
+++ b/frontend/src/components/SchemaEditorV1/Modals/ColumnDefaultValueExpressionModal.vue
@@ -24,7 +24,8 @@
</template>
<script lang="ts" setup>
-import { InputInst, NButton, NInput } from "naive-ui";
+import type { InputInst } from "naive-ui";
+import { NButton, NInput } from "naive-ui";
import { onMounted, reactive, ref } from "vue";
import { useNotificationStore } from "@/store";
diff --git a/frontend/src/components/SchemaEditorV1/Modals/EditColumnForeignKeyModal.vue b/frontend/src/components/SchemaEditorV1/Modals/EditColumnForeignKeyModal.vue
index 0d18dffa94..3c8e7eb8a3 100644
--- a/frontend/src/components/SchemaEditorV1/Modals/EditColumnForeignKeyModal.vue
+++ b/frontend/src/components/SchemaEditorV1/Modals/EditColumnForeignKeyModal.vue
@@ -64,7 +64,7 @@ import { computed, onMounted, reactive, watch } from "vue";
import { BBModal } from "@/bbkit";
import { useSchemaEditorV1Store } from "@/store";
import { Engine } from "@/types/proto/v1/common";
-import { Column, ForeignKey } from "@/types/v1/schemaEditor";
+import type { Column, ForeignKey } from "@/types/v1/schemaEditor";
interface LocalState {
referencedSchemaId?: string;
diff --git a/frontend/src/components/SchemaEditorV1/Modals/TableNameModal.vue b/frontend/src/components/SchemaEditorV1/Modals/TableNameModal.vue
index 5a66d0449a..382f4dfae7 100644
--- a/frontend/src/components/SchemaEditorV1/Modals/TableNameModal.vue
+++ b/frontend/src/components/SchemaEditorV1/Modals/TableNameModal.vue
@@ -29,7 +29,8 @@
</template>
<script lang="ts" setup>
-import { InputInst, NButton, NInput } from "naive-ui";
+import type { InputInst } from "naive-ui";
+import { NButton, NInput } from "naive-ui";
import { computed, onMounted, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
import {
diff --git a/frontend/src/components/SchemaEditorV1/Panels/DatabaseEditor.vue b/frontend/src/components/SchemaEditorV1/Panels/DatabaseEditor.vue
index 44015dce3b..064a6ab94f 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/DatabaseEditor.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/DatabaseEditor.vue
@@ -136,17 +136,19 @@ import {
useSchemaEditorV1Store,
} from "@/store";
import { Engine } from "@/types/proto/v1/common";
-import {
+import type {
ColumnMetadata,
SchemaMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
-import { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";
+import type { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";
import { emptyDatabase } from "@/types/v1/database";
-import {
+import type {
Table,
DatabaseTabContext,
DatabaseSchema,
+} from "@/types/v1/schemaEditor";
+import {
SchemaEditorTabType,
convertTableMetadataToTable,
} from "@/types/v1/schemaEditor";
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/TableColumnEditor.vue b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/TableColumnEditor.vue
index 2332af19ee..7faa6e6428 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/TableColumnEditor.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/TableColumnEditor.vue
@@ -63,7 +63,8 @@
<script lang="ts" setup>
import { useElementSize } from "@vueuse/core";
import { flatten } from "lodash-es";
-import { DataTableColumn, NCheckbox, NDataTable } from "naive-ui";
+import type { DataTableColumn } from "naive-ui";
+import { NCheckbox, NDataTable } from "naive-ui";
import { computed, h, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
import LabelEditorDrawer from "@/components/LabelEditorDrawer.vue";
@@ -75,10 +76,10 @@ import {
useSubscriptionV1Store,
useSchemaEditorV1Store,
} from "@/store/modules";
-import { Engine } from "@/types/proto/v1/common";
+import type { Engine } from "@/types/proto/v1/common";
import { ColumnConfig } from "@/types/proto/v1/database_service";
import { DataClassificationSetting_DataClassificationConfig as DataClassificationConfig } from "@/types/proto/v1/setting_service";
-import { Table, Column, ForeignKey } from "@/types/v1/schemaEditor";
+import type { Table, Column, ForeignKey } from "@/types/v1/schemaEditor";
import ColumnDefaultValueExpressionModal from "../../Modals/ColumnDefaultValueExpressionModal.vue";
import {
getDefaultValueByKey,
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ClassificationCell.vue b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ClassificationCell.vue
index c15477a296..1db4717909 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ClassificationCell.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ClassificationCell.vue
@@ -19,7 +19,7 @@
import { PencilIcon, XIcon } from "lucide-vue-next";
import ClassificationLevelBadge from "@/components/SchemaTemplate/ClassificationLevelBadge.vue";
import { MiniActionButton } from "@/components/v2";
-import { DataClassificationSetting_DataClassificationConfig as DataClassificationConfig } from "@/types/proto/v1/setting_service";
+import type { DataClassificationSetting_DataClassificationConfig as DataClassificationConfig } from "@/types/proto/v1/setting_service";
defineProps<{
classification?: string | undefined;
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/DataTypeCell.vue b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/DataTypeCell.vue
index 0f166672de..78e2831ecb 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/DataTypeCell.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/DataTypeCell.vue
@@ -16,11 +16,12 @@
</template>
<script lang="ts" setup>
-import { SelectOption } from "naive-ui";
-import { CSSProperties, computed, ref, onMounted } from "vue";
+import type { SelectOption } from "naive-ui";
+import type { CSSProperties } from "vue";
+import { computed, ref, onMounted } from "vue";
import { DropdownInput } from "@/components/v2";
-import { Engine } from "@/types/proto/v1/common";
-import { Column } from "@/types/v1/schemaEditor";
+import type { Engine } from "@/types/proto/v1/common";
+import type { Column } from "@/types/v1/schemaEditor";
import { getDataTypeSuggestionList } from "@/utils";
const props = defineProps<{
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/DefaultValueCell.vue b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/DefaultValueCell.vue
index 665692b1fc..b38f0376ad 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/DefaultValueCell.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/DefaultValueCell.vue
@@ -14,18 +14,19 @@
</template>
<script lang="ts" setup>
-import { SelectOption } from "naive-ui";
-import { CSSProperties, computed, ref } from "vue";
+import type { SelectOption } from "naive-ui";
+import type { CSSProperties } from "vue";
+import { computed, ref } from "vue";
+import type { DefaultValueOption } from "@/components/SchemaEditorV1/utils/columnDefaultValue";
import {
- DefaultValueOption,
getColumnDefaultDisplayString,
getColumnDefaultValueOptions,
getColumnDefaultValuePlaceholder,
getDefaultValueByKey,
} from "@/components/SchemaEditorV1/utils/columnDefaultValue";
import { DropdownInput } from "@/components/v2";
-import { Engine } from "@/types/proto/v1/common";
-import { Column } from "@/types/v1/schemaEditor";
+import type { Engine } from "@/types/proto/v1/common";
+import type { Column } from "@/types/v1/schemaEditor";
const props = defineProps<{
column: Column;
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ForeignKeyCell.vue b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ForeignKeyCell.vue
index 7b64e510ba..0d868a4e48 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ForeignKeyCell.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ForeignKeyCell.vue
@@ -18,7 +18,7 @@
<script lang="ts" setup>
import { PenSquareIcon } from "lucide-vue-next";
import { MiniActionButton } from "@/components/v2";
-import { Column } from "@/types/v1/schemaEditor";
+import type { Column } from "@/types/v1/schemaEditor";
defineProps<{
column: Column;
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/LabelsCell.vue b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/LabelsCell.vue
index f9307a07eb..4cd48bc7e8 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/LabelsCell.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/LabelsCell.vue
@@ -11,7 +11,7 @@
import { PencilIcon } from "lucide-vue-next";
import { MiniActionButton } from "@/components/v2";
import LabelsColumn from "@/components/v2/Model/DatabaseV1Table/LabelsColumn.vue";
-import { Column } from "@/types/v1/schemaEditor";
+import type { Column } from "@/types/v1/schemaEditor";
defineProps<{
column: Column;
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/OperationCell.vue b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/OperationCell.vue
index ffad111bf4..295ff15cd7 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/OperationCell.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/OperationCell.vue
@@ -26,7 +26,7 @@
<script lang="ts" setup>
import { TrashIcon, Undo2Icon } from "lucide-vue-next";
import { MiniActionButton } from "@/components/v2";
-import { Column } from "@/types/v1/schemaEditor";
+import type { Column } from "@/types/v1/schemaEditor";
defineProps<{
column: Column;
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ReorderCell.vue b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ReorderCell.vue
index 3ddf7f60e3..3f58633869 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ReorderCell.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ReorderCell.vue
@@ -17,7 +17,7 @@
<script setup lang="ts">
import { ChevronDownIcon, ChevronUpIcon } from "lucide-vue-next";
import { MiniActionButton } from "@/components/v2";
-import { Column } from "@/types/v1/schemaEditor";
+import type { Column } from "@/types/v1/schemaEditor";
defineProps<{
column: Column;
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/SemanticTypeCell.vue b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/SemanticTypeCell.vue
index a8a9432efc..0533ee6cce 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/SemanticTypeCell.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/SemanticTypeCell.vue
@@ -23,8 +23,8 @@
import { PencilIcon, XIcon } from "lucide-vue-next";
import { computed } from "vue";
import { MiniActionButton } from "@/components/v2";
-import { SemanticTypeSetting_SemanticType as SemanticType } from "@/types/proto/v1/setting_service";
-import { Column } from "@/types/v1/schemaEditor";
+import type { SemanticTypeSetting_SemanticType as SemanticType } from "@/types/proto/v1/setting_service";
+import type { Column } from "@/types/v1/schemaEditor";
const props = defineProps<{
column: Column;
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableEditor.vue b/frontend/src/components/SchemaEditorV1/Panels/TableEditor.vue
index 0f5fe66393..29c9e83dea 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/TableEditor.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/TableEditor.vue
@@ -97,16 +97,18 @@ import {
} from "@/store/modules";
import { Engine } from "@/types/proto/v1/common";
import { ColumnMetadata } from "@/types/proto/v1/database_service";
-import { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";
-import {
+import type { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";
+import type {
Column,
Table,
Schema,
- convertColumnMetadataToColumn,
ForeignKey,
+} from "@/types/v1/schemaEditor";
+import {
+ convertColumnMetadataToColumn,
SchemaEditorTabType,
} from "@/types/v1/schemaEditor";
-import { TableTabContext } from "@/types/v1/schemaEditor";
+import type { TableTabContext } from "@/types/v1/schemaEditor";
import { arraySwap, instanceV1AllowsReorderColumns } from "@/utils";
import FieldTemplates from "@/views/SchemaTemplate/FieldTemplates.vue";
import EditColumnForeignKeyModal from "../Modals/EditColumnForeignKeyModal.vue";
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableList/TableList.vue b/frontend/src/components/SchemaEditorV1/Panels/TableList/TableList.vue
index a6c4b025e2..c15dfcd7a1 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/TableList/TableList.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/TableList/TableList.vue
@@ -62,7 +62,8 @@
<script lang="ts" setup>
import { useElementSize } from "@vueuse/core";
-import { DataTableColumn, NDataTable } from "naive-ui";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
import { computed, h, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
import FeatureModal from "@/components/FeatureGuard/FeatureModal.vue";
@@ -74,13 +75,10 @@ import {
useSettingV1Store,
useSchemaEditorV1Store,
} from "@/store";
+import type { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";
+import { DataClassificationSetting_DataClassificationConfig as DataClassificationConfig } from "@/types/proto/v1/setting_service";
+import type { Table, DatabaseTabContext } from "@/types/v1/schemaEditor";
import {
- SchemaTemplateSetting_TableTemplate,
- DataClassificationSetting_DataClassificationConfig as DataClassificationConfig,
-} from "@/types/proto/v1/setting_service";
-import {
- Table,
- DatabaseTabContext,
SchemaEditorTabType,
convertTableMetadataToTable,
} from "@/types/v1/schemaEditor";
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableList/components/NameCell.vue b/frontend/src/components/SchemaEditorV1/Panels/TableList/components/NameCell.vue
index ca2d79e75a..f5c84f3ee7 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/TableList/components/NameCell.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/TableList/components/NameCell.vue
@@ -10,7 +10,7 @@
<script lang="ts" setup>
import { NPerformantEllipsis } from "naive-ui";
-import { Table } from "@/types/v1/schemaEditor";
+import type { Table } from "@/types/v1/schemaEditor";
defineProps<{
table: Table;
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableList/components/OperationCell.vue b/frontend/src/components/SchemaEditorV1/Panels/TableList/components/OperationCell.vue
index b634fe5436..4104f9a28a 100644
--- a/frontend/src/components/SchemaEditorV1/Panels/TableList/components/OperationCell.vue
+++ b/frontend/src/components/SchemaEditorV1/Panels/TableList/components/OperationCell.vue
@@ -21,7 +21,7 @@
</div>
</template>
<script lang="ts" setup>
-import { Table } from "@/types/v1/schemaEditor";
+import type { Table } from "@/types/v1/schemaEditor";
defineProps<{
table: Table;
diff --git a/frontend/src/components/SchemaEditorV1/TabsContainer.vue b/frontend/src/components/SchemaEditorV1/TabsContainer.vue
index 0cf930600a..f3827bb8db 100644
--- a/frontend/src/components/SchemaEditorV1/TabsContainer.vue
+++ b/frontend/src/components/SchemaEditorV1/TabsContainer.vue
@@ -65,7 +65,8 @@ import scrollIntoView from "scroll-into-view-if-needed";
import { computed, nextTick, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useSchemaEditorV1Store } from "@/store";
-import { SchemaEditorTabType, TabContext } from "@/types/v1/schemaEditor";
+import type { TabContext } from "@/types/v1/schemaEditor";
+import { SchemaEditorTabType } from "@/types/v1/schemaEditor";
import { isTableChanged } from "./utils";
const emit = defineEmits<{
diff --git a/frontend/src/components/SchemaEditorV1/index.vue b/frontend/src/components/SchemaEditorV1/index.vue
index 9f3d658848..9d99272c73 100644
--- a/frontend/src/components/SchemaEditorV1/index.vue
+++ b/frontend/src/components/SchemaEditorV1/index.vue
@@ -25,9 +25,9 @@ import { Splitpanes, Pane } from "splitpanes";
import { onMounted, watch, reactive, computed } from "vue";
import { useSchemaEditorV1Store, useSettingV1Store } from "@/store";
import { useBranchStore } from "@/store/modules/branch";
-import { ComposedProject, ComposedDatabase } from "@/types";
-import { Branch } from "@/types/proto/v1/branch_service";
-import { BranchSchema } from "@/types/v1/schemaEditor";
+import type { ComposedProject, ComposedDatabase } from "@/types";
+import type { Branch } from "@/types/proto/v1/branch_service";
+import type { BranchSchema } from "@/types/v1/schemaEditor";
import { nextAnimationFrame } from "@/utils";
import MaskSpinner from "../misc/MaskSpinner.vue";
import Aside from "./Aside/index.vue";
diff --git a/frontend/src/components/SchemaEditorV1/utils/branch.ts b/frontend/src/components/SchemaEditorV1/utils/branch.ts
index 172f434501..27e72e13dd 100644
--- a/frontend/src/components/SchemaEditorV1/utils/branch.ts
+++ b/frontend/src/components/SchemaEditorV1/utils/branch.ts
@@ -1,10 +1,8 @@
import { markRaw } from "vue";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
import { DatabaseMetadata } from "@/types/proto/v1/database_service";
-import {
- BranchSchema,
- convertSchemaMetadataList,
-} from "@/types/v1/schemaEditor";
+import type { BranchSchema } from "@/types/v1/schemaEditor";
+import { convertSchemaMetadataList } from "@/types/v1/schemaEditor";
import { rebuildEditableSchemas } from "./metadata";
export const convertBranchToBranchSchema = async (
diff --git a/frontend/src/components/SchemaEditorV1/utils/columnDefaultValue.ts b/frontend/src/components/SchemaEditorV1/utils/columnDefaultValue.ts
index 5f4c82d10e..335f2ae637 100644
--- a/frontend/src/components/SchemaEditorV1/utils/columnDefaultValue.ts
+++ b/frontend/src/components/SchemaEditorV1/utils/columnDefaultValue.ts
@@ -1,7 +1,7 @@
-import { DropdownOption } from "naive-ui";
+import type { DropdownOption } from "naive-ui";
import { useI18n } from "vue-i18n";
import { Engine } from "@/types/proto/v1/common";
-import { ColumnDefaultValue } from "@/types/v1/schemaEditor";
+import type { ColumnDefaultValue } from "@/types/v1/schemaEditor";
interface DefaultValue {
hasDefault: boolean;
diff --git a/frontend/src/components/SchemaEditorV1/utils/metadata.ts b/frontend/src/components/SchemaEditorV1/utils/metadata.ts
index a901940b3d..47d180e8d1 100644
--- a/frontend/src/components/SchemaEditorV1/utils/metadata.ts
+++ b/frontend/src/components/SchemaEditorV1/utils/metadata.ts
@@ -1,7 +1,7 @@
import { cloneDeep, isEqual, uniq } from "lodash-es";
+import type { DatabaseMetadata } from "@/types/proto/v1/database_service";
import {
ColumnMetadata,
- DatabaseMetadata,
ForeignKeyMetadata,
IndexMetadata,
SchemaMetadata,
@@ -10,11 +10,13 @@ import {
ColumnConfig,
TableConfig,
} from "@/types/proto/v1/database_service";
-import {
+import type {
Column,
ForeignKey,
Schema,
Table,
+} from "@/types/v1/schemaEditor";
+import {
convertColumnMetadataToColumn,
convertSchemaMetadataToSchema,
convertTableMetadataToTable,
diff --git a/frontend/src/components/SchemaEditorV1/utils/useMetadataForDiagram.ts b/frontend/src/components/SchemaEditorV1/utils/useMetadataForDiagram.ts
index f2ff1cf4f1..a265290fa8 100644
--- a/frontend/src/components/SchemaEditorV1/utils/useMetadataForDiagram.ts
+++ b/frontend/src/components/SchemaEditorV1/utils/useMetadataForDiagram.ts
@@ -1,6 +1,6 @@
import { computed, unref } from "vue";
-import { EditStatus } from "@/components/SchemaDiagram";
-import { ComposedDatabase, MaybeRef } from "@/types";
+import type { EditStatus } from "@/components/SchemaDiagram";
+import type { ComposedDatabase, MaybeRef } from "@/types";
import {
ColumnMetadata,
DatabaseMetadata,
@@ -9,7 +9,12 @@ import {
SchemaMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
-import { DatabaseSchema, Column, Schema, Table } from "@/types/v1/schemaEditor";
+import type {
+ DatabaseSchema,
+ Column,
+ Schema,
+ Table,
+} from "@/types/v1/schemaEditor";
import { isColumnChanged } from "./column";
import { isSchemaChanged } from "./schema";
import { isTableChanged } from "./table";
diff --git a/frontend/src/components/SchemaTemplate/ClassificationLevelBadge.vue b/frontend/src/components/SchemaTemplate/ClassificationLevelBadge.vue
index 1657ee836e..fe44df50c4 100644
--- a/frontend/src/components/SchemaTemplate/ClassificationLevelBadge.vue
+++ b/frontend/src/components/SchemaTemplate/ClassificationLevelBadge.vue
@@ -10,7 +10,7 @@
<script lang="ts" setup>
import { NPerformantEllipsis } from "naive-ui";
import { computed } from "vue";
-import { DataClassificationSetting_DataClassificationConfig } from "@/types/proto/v1/setting_service";
+import type { DataClassificationSetting_DataClassificationConfig } from "@/types/proto/v1/setting_service";
const props = withDefaults(
defineProps<{
diff --git a/frontend/src/components/SchemaTemplate/ClassificationTree.vue b/frontend/src/components/SchemaTemplate/ClassificationTree.vue
index c7669637b8..965145bf27 100644
--- a/frontend/src/components/SchemaTemplate/ClassificationTree.vue
+++ b/frontend/src/components/SchemaTemplate/ClassificationTree.vue
@@ -26,9 +26,10 @@
</template>
<script lang="ts" setup>
-import { NTree, TreeOption } from "naive-ui";
+import type { TreeOption } from "naive-ui";
+import { NTree } from "naive-ui";
import { computed, reactive, h } from "vue";
-import { DataClassificationSetting_DataClassificationConfig } from "@/types/proto/v1/setting_service";
+import type { DataClassificationSetting_DataClassificationConfig } from "@/types/proto/v1/setting_service";
import { getHighlightHTMLByKeyWords } from "@/utils";
import ClassificationLevelBadge from "./ClassificationLevelBadge.vue";
diff --git a/frontend/src/components/SchemaTemplate/FieldTemplateForm.vue b/frontend/src/components/SchemaTemplate/FieldTemplateForm.vue
index c2029bc353..8720983d37 100644
--- a/frontend/src/components/SchemaTemplate/FieldTemplateForm.vue
+++ b/frontend/src/components/SchemaTemplate/FieldTemplateForm.vue
@@ -238,7 +238,8 @@
<script lang="ts" setup>
import { isEqual, cloneDeep } from "lodash-es";
import { XIcon, PencilIcon } from "lucide-vue-next";
-import { NButton, NInput, NSwitch, SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NButton, NInput, NSwitch } from "naive-ui";
import { computed, reactive, watch } from "vue";
import { useI18n } from "vue-i18n";
import { LabelListEditor } from "@/components/Label";
diff --git a/frontend/src/components/SchemaTemplate/FieldTemplateTable.vue b/frontend/src/components/SchemaTemplate/FieldTemplateTable.vue
index 0051515998..41cf619b70 100644
--- a/frontend/src/components/SchemaTemplate/FieldTemplateTable.vue
+++ b/frontend/src/components/SchemaTemplate/FieldTemplateTable.vue
@@ -61,15 +61,14 @@ import { TrashIcon } from "lucide-vue-next";
import { NPopconfirm } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGrid, BBGridColumn } from "@/bbkit";
+import type { BBGridColumn } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
import { getColumnDefaultValuePlaceholder } from "@/components/SchemaEditorV1/utils/columnDefaultValue";
import { MiniActionButton } from "@/components/v2";
import { useSettingV1Store } from "@/store";
-import { Engine } from "@/types/proto/v1/common";
-import {
- SchemaTemplateSetting,
- SchemaTemplateSetting_FieldTemplate,
-} from "@/types/proto/v1/setting_service";
+import type { Engine } from "@/types/proto/v1/common";
+import type { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";
+import { SchemaTemplateSetting } from "@/types/proto/v1/setting_service";
import { classificationConfig } from "./utils";
const props = defineProps<{
diff --git a/frontend/src/components/SchemaTemplate/FieldTemplateView.vue b/frontend/src/components/SchemaTemplate/FieldTemplateView.vue
index a6b4eb6bf5..de13d64227 100644
--- a/frontend/src/components/SchemaTemplate/FieldTemplateView.vue
+++ b/frontend/src/components/SchemaTemplate/FieldTemplateView.vue
@@ -50,8 +50,8 @@
import { NCheckbox } from "naive-ui";
import { reactive, computed } from "vue";
import { useI18n } from "vue-i18n";
-import { Engine } from "@/types/proto/v1/common";
-import { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";
+import type { Engine } from "@/types/proto/v1/common";
+import type { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";
import FieldTemplateTable from "./FieldTemplateTable.vue";
interface LocalState {
diff --git a/frontend/src/components/SchemaTemplate/SelectClassificationDrawer.vue b/frontend/src/components/SchemaTemplate/SelectClassificationDrawer.vue
index 83180e063b..607c7c39ff 100644
--- a/frontend/src/components/SchemaTemplate/SelectClassificationDrawer.vue
+++ b/frontend/src/components/SchemaTemplate/SelectClassificationDrawer.vue
@@ -24,7 +24,7 @@
<script lang="ts" setup>
import ClassificationTree from "@/components/SchemaTemplate/ClassificationTree.vue";
import { Drawer, DrawerContent } from "@/components/v2";
-import { DataClassificationSetting_DataClassificationConfig } from "@/types/proto/v1/setting_service";
+import type { DataClassificationSetting_DataClassificationConfig } from "@/types/proto/v1/setting_service";
defineProps<{
show: boolean;
diff --git a/frontend/src/components/SchemaTemplate/TableTemplateForm.vue b/frontend/src/components/SchemaTemplate/TableTemplateForm.vue
index 319e8af4e7..d785875978 100644
--- a/frontend/src/components/SchemaTemplate/TableTemplateForm.vue
+++ b/frontend/src/components/SchemaTemplate/TableTemplateForm.vue
@@ -176,7 +176,8 @@
<script lang="ts" setup>
import { isEqual, cloneDeep } from "lodash-es";
import { PlusIcon, XIcon, PencilIcon } from "lucide-vue-next";
-import { NButton, NInput, SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NButton, NInput } from "naive-ui";
import { computed, nextTick, reactive } from "vue";
import { useI18n } from "vue-i18n";
import FeatureBadge from "@/components/FeatureGuard/FeatureBadge.vue";
@@ -188,19 +189,16 @@ import {
InstanceEngineRadioGrid,
} from "@/components/v2";
import { useSettingV1Store, useNotificationStore } from "@/store";
-import { Engine } from "@/types/proto/v1/common";
+import type { Engine } from "@/types/proto/v1/common";
import { ColumnMetadata, TableConfig } from "@/types/proto/v1/database_service";
-import {
- SchemaTemplateSetting,
+import type {
SchemaTemplateSetting_FieldTemplate,
SchemaTemplateSetting_TableTemplate,
} from "@/types/proto/v1/setting_service";
+import { SchemaTemplateSetting } from "@/types/proto/v1/setting_service";
import { convertTableMetadataToTable } from "@/types/v1/schemaEditor";
-import {
- Column,
- Table,
- convertColumnMetadataToColumn,
-} from "@/types/v1/schemaEditor";
+import type { Column, Table } from "@/types/v1/schemaEditor";
+import { convertColumnMetadataToColumn } from "@/types/v1/schemaEditor";
import { arraySwap, instanceV1AllowsReorderColumns } from "@/utils";
import FieldTemplates from "@/views/SchemaTemplate/FieldTemplates.vue";
import { engineList, categoryList, classificationConfig } from "./utils";
diff --git a/frontend/src/components/SchemaTemplate/TableTemplateTable.vue b/frontend/src/components/SchemaTemplate/TableTemplateTable.vue
index 15caa7feb8..4ba68cae1f 100644
--- a/frontend/src/components/SchemaTemplate/TableTemplateTable.vue
+++ b/frontend/src/components/SchemaTemplate/TableTemplateTable.vue
@@ -48,14 +48,13 @@ import { PencilIcon, TrashIcon } from "lucide-vue-next";
import { NPopconfirm } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGrid, BBGridColumn } from "@/bbkit";
+import type { BBGridColumn } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
import { MiniActionButton } from "@/components/v2";
import { useSettingV1Store } from "@/store";
-import { Engine } from "@/types/proto/v1/common";
-import {
- SchemaTemplateSetting,
- SchemaTemplateSetting_TableTemplate,
-} from "@/types/proto/v1/setting_service";
+import type { Engine } from "@/types/proto/v1/common";
+import type { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";
+import { SchemaTemplateSetting } from "@/types/proto/v1/setting_service";
import { classificationConfig } from "./utils";
const props = defineProps<{
diff --git a/frontend/src/components/SchemaTemplate/TableTemplateView.vue b/frontend/src/components/SchemaTemplate/TableTemplateView.vue
index c03003e5f4..cf9cc9f7e0 100644
--- a/frontend/src/components/SchemaTemplate/TableTemplateView.vue
+++ b/frontend/src/components/SchemaTemplate/TableTemplateView.vue
@@ -44,8 +44,8 @@
import { NCheckbox } from "naive-ui";
import { reactive, computed } from "vue";
import { useI18n } from "vue-i18n";
-import { Engine } from "@/types/proto/v1/common";
-import { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";
+import type { Engine } from "@/types/proto/v1/common";
+import type { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";
import TableTemplateTable from "./TableTemplateTable.vue";
interface LocalState {
diff --git a/frontend/src/components/SensitiveData/ClassificationView.vue b/frontend/src/components/SensitiveData/ClassificationView.vue
index 6e3c6c5de2..a45c4184ca 100644
--- a/frontend/src/components/SensitiveData/ClassificationView.vue
+++ b/frontend/src/components/SensitiveData/ClassificationView.vue
@@ -60,11 +60,11 @@ import {
useSettingV1Store,
pushNotification,
} from "@/store";
-import {
- DataClassificationSetting_DataClassificationConfig,
+import type {
DataClassificationSetting_DataClassificationConfig_Level as ClassificationLevel,
DataClassificationSetting_DataClassificationConfig_DataClassification as DataClassification,
} from "@/types/proto/v1/setting_service";
+import { DataClassificationSetting_DataClassificationConfig } from "@/types/proto/v1/setting_service";
import { hasWorkspacePermissionV2 } from "@/utils";
const uploader = ref<HTMLInputElement | null>(null);
diff --git a/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue b/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue
index 4732efc04d..5a96e4af81 100644
--- a/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue
+++ b/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue
@@ -111,7 +111,7 @@ import { v4 as uuidv4 } from "uuid";
import { computed, reactive, nextTick, onMounted } from "vue";
import { useI18n } from "vue-i18n";
import { useBodyLayoutContext } from "@/layouts/common";
-import { Factor } from "@/plugins/cel";
+import type { Factor } from "@/plugins/cel";
import {
featureToRef,
pushNotification,
@@ -119,8 +119,8 @@ import {
usePolicyV1Store,
} from "@/store";
import { MaskingLevel } from "@/types/proto/v1/common";
+import type { Policy } from "@/types/proto/v1/org_policy_service";
import {
- Policy,
PolicyType,
PolicyResourceType,
MaskingRulePolicy_MaskingRule,
diff --git a/frontend/src/components/SensitiveData/GrantAccessDrawer.vue b/frontend/src/components/SensitiveData/GrantAccessDrawer.vue
index 7d0b683f89..73ab04c84f 100644
--- a/frontend/src/components/SensitiveData/GrantAccessDrawer.vue
+++ b/frontend/src/components/SensitiveData/GrantAccessDrawer.vue
@@ -95,20 +95,23 @@ import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
import { Drawer, DrawerContent } from "@/components/v2";
import { usePolicyV1Store, useUserStore, pushNotification } from "@/store";
-import { ComposedProject, getUserEmailInBinding } from "@/types";
+import type { ComposedProject } from "@/types";
+import { getUserEmailInBinding } from "@/types";
import { Expr } from "@/types/proto/google/type/expr";
import { MaskingLevel } from "@/types/proto/v1/common";
-import {
+import type {
Policy,
+ MaskingExceptionPolicy_MaskingException,
+} from "@/types/proto/v1/org_policy_service";
+import {
PolicyType,
PolicyResourceType,
- MaskingExceptionPolicy_MaskingException,
MaskingExceptionPolicy_MaskingException_Action,
maskingExceptionPolicy_MaskingException_ActionToJSON,
} from "@/types/proto/v1/org_policy_service";
import MaskingLevelRadioGroup from "./components/MaskingLevelRadioGroup.vue";
import SensitiveColumnTable from "./components/SensitiveColumnTable.vue";
-import { SensitiveColumn } from "./types";
+import type { SensitiveColumn } from "./types";
import { getExpressionsForSensitiveColumn } from "./utils";
const props = defineProps<{
diff --git a/frontend/src/components/SensitiveData/SemanticTypesView.vue b/frontend/src/components/SensitiveData/SemanticTypesView.vue
index f14c230608..6dbf44c1c3 100644
--- a/frontend/src/components/SensitiveData/SemanticTypesView.vue
+++ b/frontend/src/components/SensitiveData/SemanticTypesView.vue
@@ -49,9 +49,8 @@ import {
import { SemanticTypeSetting_SemanticType } from "@/types/proto/v1/setting_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import SemanticTemplateDrawer from "./components/SemanticTemplateDrawer.vue";
-import SemanticTypesTable, {
- SemanticItem,
-} from "./components/SemanticTypesTable.vue";
+import type { SemanticItem } from "./components/SemanticTypesTable.vue";
+import SemanticTypesTable from "./components/SemanticTypesTable.vue";
interface LocalState {
semanticItemList: SemanticItem[];
diff --git a/frontend/src/components/SensitiveData/SensitiveColumnDrawer.vue b/frontend/src/components/SensitiveData/SensitiveColumnDrawer.vue
index 1c6f723478..562ad7bee4 100644
--- a/frontend/src/components/SensitiveData/SensitiveColumnDrawer.vue
+++ b/frontend/src/components/SensitiveData/SensitiveColumnDrawer.vue
@@ -236,13 +236,13 @@
<script lang="ts" setup>
import { computedAsync } from "@vueuse/core";
import { TrashIcon } from "lucide-vue-next";
+import type { SelectOption } from "naive-ui";
import {
NSelect,
NButton,
NCheckbox,
NDatePicker,
NPopconfirm,
- SelectOption,
} from "naive-ui";
import { computed, reactive, watch, ref } from "vue";
import { useI18n } from "vue-i18n";
@@ -261,14 +261,16 @@ import {
import { getUserId } from "@/store/modules/v1/common";
import { unknownUser } from "@/types";
import { Expr } from "@/types/proto/google/type/expr";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
import { MaskingLevel, maskingLevelToJSON } from "@/types/proto/v1/common";
-import {
+import type {
Policy,
- PolicyType,
MaskData,
- PolicyResourceType,
MaskingExceptionPolicy_MaskingException,
+} from "@/types/proto/v1/org_policy_service";
+import {
+ PolicyType,
+ PolicyResourceType,
MaskingExceptionPolicy_MaskingException_Action,
} from "@/types/proto/v1/org_policy_service";
import { hasWorkspacePermissionV2 } from "@/utils";
@@ -276,7 +278,7 @@ import UserAvatar from "../User/UserAvatar.vue";
import GrantAccessDrawer from "./GrantAccessDrawer.vue";
import MaskingLevelDropdown from "./components/MaskingLevelDropdown.vue";
import MaskingLevelRadioGroup from "./components/MaskingLevelRadioGroup.vue";
-import { SensitiveColumn } from "./types";
+import type { SensitiveColumn } from "./types";
import { getMaskDataIdentifier, isCurrentColumnException } from "./utils";
interface AccessUser {
diff --git a/frontend/src/components/SensitiveData/SensitiveColumnView.vue b/frontend/src/components/SensitiveData/SensitiveColumnView.vue
index 8fe6afb769..fe36c85611 100644
--- a/frontend/src/components/SensitiveData/SensitiveColumnView.vue
+++ b/frontend/src/components/SensitiveData/SensitiveColumnView.vue
@@ -141,11 +141,8 @@ import {
usePolicyV1Store,
useSubscriptionV1Store,
} from "@/store";
-import {
- UNKNOWN_ID,
- UNKNOWN_ENVIRONMENT_NAME,
- ComposedInstance,
-} from "@/types";
+import type { ComposedInstance } from "@/types";
+import { UNKNOWN_ID, UNKNOWN_ENVIRONMENT_NAME } from "@/types";
import { MaskingLevel } from "@/types/proto/v1/common";
import {
PolicyType,
@@ -156,7 +153,7 @@ import FeatureModal from "../FeatureGuard/FeatureModal.vue";
import GrantAccessDrawer from "./GrantAccessDrawer.vue";
import SensitiveColumnDrawer from "./SensitiveColumnDrawer.vue";
import SensitiveColumnTable from "./components/SensitiveColumnTable.vue";
-import { SensitiveColumn } from "./types";
+import type { SensitiveColumn } from "./types";
import { getMaskDataIdentifier, isCurrentColumnException } from "./utils";
interface LocalState {
diff --git a/frontend/src/components/SensitiveData/components/MaskingAlgorithmsCreateDrawer.vue b/frontend/src/components/SensitiveData/components/MaskingAlgorithmsCreateDrawer.vue
index c515effada..a279b4f27c 100644
--- a/frontend/src/components/SensitiveData/components/MaskingAlgorithmsCreateDrawer.vue
+++ b/frontend/src/components/SensitiveData/components/MaskingAlgorithmsCreateDrawer.vue
@@ -218,12 +218,11 @@ import { TrashIcon } from "lucide-vue-next";
import { NInput, NInputNumber } from "naive-ui";
import { computed, watch, reactive } from "vue";
import { useI18n } from "vue-i18n";
+import type { RadioGridOption, RadioGridItem } from "@/components/v2";
import {
Drawer,
DrawerContent,
RadioGrid,
- RadioGridOption,
- RadioGridItem,
MiniActionButton,
} from "@/components/v2";
import { pushNotification, useSettingV1Store } from "@/store";
@@ -234,7 +233,8 @@ import {
MaskingAlgorithmSetting_Algorithm_MD5Mask as MD5Mask,
MaskingAlgorithmSetting_Algorithm_RangeMask_Slice as RangeMask_Slice,
} from "@/types/proto/v1/setting_service";
-import { MaskingType, getMaskingType } from "./utils";
+import type { MaskingType } from "./utils";
+import { getMaskingType } from "./utils";
interface MaskingTypeOption extends RadioGridOption<MaskingType> {
value: MaskingType;
diff --git a/frontend/src/components/SensitiveData/components/MaskingLevelDropdown.vue b/frontend/src/components/SensitiveData/components/MaskingLevelDropdown.vue
index 27f556b447..3ab2e13120 100644
--- a/frontend/src/components/SensitiveData/components/MaskingLevelDropdown.vue
+++ b/frontend/src/components/SensitiveData/components/MaskingLevelDropdown.vue
@@ -7,10 +7,12 @@
</template>
<script lang="ts" setup>
-import { SelectOption, NSelect } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NSelect } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { MaskingLevel, maskingLevelToJSON } from "@/types/proto/v1/common";
+import type { MaskingLevel } from "@/types/proto/v1/common";
+import { maskingLevelToJSON } from "@/types/proto/v1/common";
const props = defineProps<{
level: MaskingLevel;
diff --git a/frontend/src/components/SensitiveData/components/MaskingRuleConfig.vue b/frontend/src/components/SensitiveData/components/MaskingRuleConfig.vue
index 9921e737d8..c4b680493c 100644
--- a/frontend/src/components/SensitiveData/components/MaskingRuleConfig.vue
+++ b/frontend/src/components/SensitiveData/components/MaskingRuleConfig.vue
@@ -82,7 +82,8 @@
<script lang="ts" setup>
import { TrashIcon } from "lucide-vue-next";
-import { NSelect, SelectOption, NPopconfirm } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NSelect, NPopconfirm } from "naive-ui";
import { computed, reactive, onMounted, nextTick } from "vue";
import { useI18n } from "vue-i18n";
import ExprEditor from "@/components/ExprEditor";
@@ -99,7 +100,7 @@ import {
} from "@/types/proto/google/api/expr/v1alpha1/syntax";
import { Expr } from "@/types/proto/google/type/expr";
import { MaskingLevel, maskingLevelToJSON } from "@/types/proto/v1/common";
-import { MaskingRulePolicy_MaskingRule } from "@/types/proto/v1/org_policy_service";
+import type { MaskingRulePolicy_MaskingRule } from "@/types/proto/v1/org_policy_service";
import {
batchConvertCELStringToParsedExpr,
batchConvertParsedExprToCELString,
diff --git a/frontend/src/components/SensitiveData/components/SemanticTemplateDrawer.vue b/frontend/src/components/SensitiveData/components/SemanticTemplateDrawer.vue
index 71e2737265..1a22bd8395 100644
--- a/frontend/src/components/SensitiveData/components/SemanticTemplateDrawer.vue
+++ b/frontend/src/components/SensitiveData/components/SemanticTemplateDrawer.vue
@@ -28,8 +28,9 @@
import { computed } from "vue";
import { Drawer, DrawerContent } from "@/components/v2";
import { getSemanticTemplateList } from "@/types";
-import { SemanticTypeSetting_SemanticType } from "@/types/proto/v1/setting_service";
-import SemanticTypesTable, { SemanticItem } from "./SemanticTypesTable.vue";
+import type { SemanticTypeSetting_SemanticType } from "@/types/proto/v1/setting_service";
+import type { SemanticItem } from "./SemanticTypesTable.vue";
+import SemanticTypesTable from "./SemanticTypesTable.vue";
defineProps<{
show: boolean;
diff --git a/frontend/src/components/SensitiveData/components/SemanticTypesDrawer.vue b/frontend/src/components/SensitiveData/components/SemanticTypesDrawer.vue
index ae509f4ce4..aa0f854e58 100644
--- a/frontend/src/components/SensitiveData/components/SemanticTypesDrawer.vue
+++ b/frontend/src/components/SensitiveData/components/SemanticTypesDrawer.vue
@@ -25,8 +25,9 @@
<script lang="ts" setup>
import { computed } from "vue";
import { Drawer, DrawerContent } from "@/components/v2";
-import { SemanticTypeSetting_SemanticType } from "@/types/proto/v1/setting_service";
-import SemanticTypesTable, { SemanticItem } from "./SemanticTypesTable.vue";
+import type { SemanticTypeSetting_SemanticType } from "@/types/proto/v1/setting_service";
+import type { SemanticItem } from "./SemanticTypesTable.vue";
+import SemanticTypesTable from "./SemanticTypesTable.vue";
const props = defineProps<{
show: boolean;
diff --git a/frontend/src/components/SensitiveData/components/SemanticTypesTable.vue b/frontend/src/components/SensitiveData/components/SemanticTypesTable.vue
index ee0612a880..d794deab44 100644
--- a/frontend/src/components/SensitiveData/components/SemanticTypesTable.vue
+++ b/frontend/src/components/SensitiveData/components/SemanticTypesTable.vue
@@ -146,7 +146,7 @@ import { useI18n } from "vue-i18n";
import type { BBGridColumn, BBGridRow } from "@/bbkit/types";
import { MiniActionButton } from "@/components/v2";
import { useSettingV1Store } from "@/store";
-import { SemanticTypeSetting_SemanticType } from "@/types/proto/v1/setting_service";
+import type { SemanticTypeSetting_SemanticType } from "@/types/proto/v1/setting_service";
type SemanticItemMode = "NORMAL" | "CREATE" | "EDIT";
diff --git a/frontend/src/components/SensitiveData/components/SensitiveColumnTable.vue b/frontend/src/components/SensitiveData/components/SensitiveColumnTable.vue
index df28378c3a..5462a20c03 100644
--- a/frontend/src/components/SensitiveData/components/SensitiveColumnTable.vue
+++ b/frontend/src/components/SensitiveData/components/SensitiveColumnTable.vue
@@ -102,8 +102,9 @@ import {
MiniActionButton,
ProjectV1Name,
} from "@/components/v2";
-import { MaskingLevel, maskingLevelToJSON } from "@/types/proto/v1/common";
-import { SensitiveColumn } from "../types";
+import type { MaskingLevel } from "@/types/proto/v1/common";
+import { maskingLevelToJSON } from "@/types/proto/v1/common";
+import type { SensitiveColumn } from "../types";
type SensitiveColumnRow = BBGridRow<SensitiveColumn>;
diff --git a/frontend/src/components/SensitiveData/components/utils.ts b/frontend/src/components/SensitiveData/components/utils.ts
index 261116f299..00d279d43c 100644
--- a/frontend/src/components/SensitiveData/components/utils.ts
+++ b/frontend/src/components/SensitiveData/components/utils.ts
@@ -1,11 +1,7 @@
import { uniq } from "lodash-es";
import type { SelectOption } from "naive-ui";
-import {
- Factor,
- Operator,
- EqualityOperatorList,
- CollectionOperatorList,
-} from "@/plugins/cel";
+import type { Factor, Operator } from "@/plugins/cel";
+import { EqualityOperatorList, CollectionOperatorList } from "@/plugins/cel";
import {
useEnvironmentV1Store,
useInstanceV1List,
@@ -13,7 +9,7 @@ import {
useSettingV1Store,
} from "@/store";
import { DEFAULT_PROJECT_V1_NAME } from "@/types";
-import { MaskingAlgorithmSetting_Algorithm } from "@/types/proto/v1/setting_service";
+import type { MaskingAlgorithmSetting_Algorithm } from "@/types/proto/v1/setting_service";
import {
extractEnvironmentResourceName,
extractInstanceResourceName,
diff --git a/frontend/src/components/SensitiveData/types.ts b/frontend/src/components/SensitiveData/types.ts
index 4424d9d744..4b71a506a0 100644
--- a/frontend/src/components/SensitiveData/types.ts
+++ b/frontend/src/components/SensitiveData/types.ts
@@ -1,5 +1,5 @@
-import { ComposedDatabase } from "@/types";
-import { MaskData } from "@/types/proto/v1/org_policy_service";
+import type { ComposedDatabase } from "@/types";
+import type { MaskData } from "@/types/proto/v1/org_policy_service";
export interface SensitiveColumn {
database: ComposedDatabase;
diff --git a/frontend/src/components/SensitiveData/utils.ts b/frontend/src/components/SensitiveData/utils.ts
index 1a265c01f6..cc9f63cae7 100644
--- a/frontend/src/components/SensitiveData/utils.ts
+++ b/frontend/src/components/SensitiveData/utils.ts
@@ -1,9 +1,9 @@
-import {
+import type {
MaskData,
MaskingExceptionPolicy_MaskingException,
} from "@/types/proto/v1/org_policy_service";
import { extractInstanceResourceName } from "@/utils";
-import { SensitiveColumn } from "./types";
+import type { SensitiveColumn } from "./types";
export const getMaskDataIdentifier = (maskData: MaskData): string => {
return `${maskData.schema}.${maskData.table}.${maskData.column}`;
diff --git a/frontend/src/components/SingleFileSelector.vue b/frontend/src/components/SingleFileSelector.vue
index d6d3d71e17..1a71f3b83d 100644
--- a/frontend/src/components/SingleFileSelector.vue
+++ b/frontend/src/components/SingleFileSelector.vue
@@ -25,7 +25,8 @@
</template>
<script lang="ts" setup>
-import { ref, reactive, PropType } from "vue";
+import type { PropType } from "vue";
+import { ref, reactive } from "vue";
import { useI18n } from "vue-i18n";
import { pushNotification } from "@/store";
diff --git a/frontend/src/components/SlowQuery/Panel/IndexAdvisor.vue b/frontend/src/components/SlowQuery/Panel/IndexAdvisor.vue
index e512acbacc..0a1728f4f2 100644
--- a/frontend/src/components/SlowQuery/Panel/IndexAdvisor.vue
+++ b/frontend/src/components/SlowQuery/Panel/IndexAdvisor.vue
@@ -59,7 +59,7 @@ import { databaseServiceClient } from "@/grpcweb";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
import { featureToRef, hasFeature } from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
-import { ComposedSlowQueryLog } from "@/types";
+import type { ComposedSlowQueryLog } from "@/types";
import { extractProjectResourceName } from "@/utils";
import { getErrorCode } from "@/utils/grpcweb";
diff --git a/frontend/src/components/SlowQuery/Panel/LogFilter.vue b/frontend/src/components/SlowQuery/Panel/LogFilter.vue
index 6cbf2b16ba..d909d5c783 100644
--- a/frontend/src/components/SlowQuery/Panel/LogFilter.vue
+++ b/frontend/src/components/SlowQuery/Panel/LogFilter.vue
@@ -47,7 +47,7 @@
import dayjs from "dayjs";
import { NDatePicker, NInputGroup } from "naive-ui";
import { useSlowQueryPolicyList } from "@/store";
-import { SearchParams, SearchScopeId } from "@/utils";
+import type { SearchParams, SearchScopeId } from "@/utils";
const props = defineProps<{
fromTime: number | undefined;
diff --git a/frontend/src/components/SlowQuery/Panel/LogTable.vue b/frontend/src/components/SlowQuery/Panel/LogTable.vue
index b38a8a4cdf..fa205e2f50 100644
--- a/frontend/src/components/SlowQuery/Panel/LogTable.vue
+++ b/frontend/src/components/SlowQuery/Panel/LogTable.vue
@@ -27,7 +27,8 @@
<script lang="ts" setup>
import dayjs from "dayjs";
-import { NDataTable, DataTableColumn } from "naive-ui";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
import { computed, h, ref } from "vue";
import { useI18n } from "vue-i18n";
import HighlightCodeBlock from "@/components/HighlightCodeBlock";
diff --git a/frontend/src/components/SlowQuery/Panel/SlowQueryPanel.vue b/frontend/src/components/SlowQuery/Panel/SlowQueryPanel.vue
index ed9fe2bbbc..bafa38d6f2 100644
--- a/frontend/src/components/SlowQuery/Panel/SlowQueryPanel.vue
+++ b/frontend/src/components/SlowQuery/Panel/SlowQueryPanel.vue
@@ -75,14 +75,9 @@ import {
useSlowQueryPolicyStore,
useSlowQueryStore,
} from "@/store";
-import { ComposedSlowQueryLog } from "@/types";
-import {
- SearchScope,
- SearchParams,
- SearchScopeId,
- extractInstanceResourceName,
- hasWorkspacePermissionV2,
-} from "@/utils";
+import type { ComposedSlowQueryLog } from "@/types";
+import type { SearchScope, SearchParams, SearchScopeId } from "@/utils";
+import { extractInstanceResourceName, hasWorkspacePermissionV2 } from "@/utils";
import { SlowQuerySettings } from "../Settings";
import DetailPanel from "./DetailPanel.vue";
import LogFilter from "./LogFilter.vue";
diff --git a/frontend/src/components/SlowQuery/Panel/types.ts b/frontend/src/components/SlowQuery/Panel/types.ts
index f324bfff6d..81ef0d5f59 100644
--- a/frontend/src/components/SlowQuery/Panel/types.ts
+++ b/frontend/src/components/SlowQuery/Panel/types.ts
@@ -2,7 +2,7 @@ import dayjs from "dayjs";
import { useDatabaseV1Store } from "@/store";
import { UNKNOWN_ID } from "@/types";
import { ListSlowQueriesRequest } from "@/types/proto/v1/database_service";
-import { SearchScope } from "@/utils";
+import type { SearchScope } from "@/utils";
export const buildListSlowQueriesRequest = (
scopes: SearchScope[],
diff --git a/frontend/src/components/SlowQuery/Settings/SlowQuerySettings.vue b/frontend/src/components/SlowQuery/Settings/SlowQuerySettings.vue
index 94737652cd..5437a4dc8f 100644
--- a/frontend/src/components/SlowQuery/Settings/SlowQuerySettings.vue
+++ b/frontend/src/components/SlowQuery/Settings/SlowQuerySettings.vue
@@ -42,8 +42,9 @@ import {
useSlowQueryStore,
} from "@/store";
import { useGracefulRequest } from "@/store/modules/utils";
-import { ComposedInstance, ComposedSlowQueryPolicy, UNKNOWN_ID } from "@/types";
-import { Environment } from "@/types/proto/v1/environment_service";
+import type { ComposedInstance, ComposedSlowQueryPolicy } from "@/types";
+import { UNKNOWN_ID } from "@/types";
+import type { Environment } from "@/types/proto/v1/environment_service";
import { instanceV1SupportSlowQuery } from "@/utils";
import { SlowQueryPolicyTable } from "./components";
diff --git a/frontend/src/components/StreamTable.vue b/frontend/src/components/StreamTable.vue
index b76a3aaaa9..f3718229da 100644
--- a/frontend/src/components/StreamTable.vue
+++ b/frontend/src/components/StreamTable.vue
@@ -32,12 +32,13 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useI18n } from "vue-i18n";
import DefinitionView from "@/components/DefinitionView.vue";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
+import type { StreamMetadata } from "@/types/proto/v1/database_service";
import {
- StreamMetadata,
StreamMetadata_Mode,
StreamMetadata_Type,
} from "@/types/proto/v1/database_service";
diff --git a/frontend/src/components/SyncDatabaseSchema/DatabaseSchemaSelector.vue b/frontend/src/components/SyncDatabaseSchema/DatabaseSchemaSelector.vue
index 5f206e620c..a0e7e712c9 100644
--- a/frontend/src/components/SyncDatabaseSchema/DatabaseSchemaSelector.vue
+++ b/frontend/src/components/SyncDatabaseSchema/DatabaseSchemaSelector.vue
@@ -75,9 +75,10 @@
<script lang="ts" setup>
import { computedAsync } from "@vueuse/core";
import { head, isNull, isUndefined } from "lodash-es";
-import { NEllipsis, NSelect, SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NEllipsis, NSelect } from "naive-ui";
import { computed, h, reactive, ref, watch } from "vue";
-import { VNodeArrayChildren } from "vue";
+import type { VNodeArrayChildren } from "vue";
import { useI18n } from "vue-i18n";
import {
EnvironmentSelect,
@@ -92,8 +93,8 @@ import {
useDBSchemaV1Store,
} from "@/store";
import { UNKNOWN_ID } from "@/types";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
import {
- ChangeHistory,
ChangeHistoryView,
ChangeHistory_Type,
DatabaseMetadataView,
@@ -105,7 +106,7 @@ import {
} from "@/utils";
import FeatureBadge from "../FeatureGuard/FeatureBadge.vue";
import HumanizeDate from "../misc/HumanizeDate.vue";
-import { ChangeHistorySourceSchema } from "./types";
+import type { ChangeHistorySourceSchema } from "./types";
const props = defineProps<{
selectState?: ChangeHistorySourceSchema;
diff --git a/frontend/src/components/SyncDatabaseSchema/DiffViewPanel.vue b/frontend/src/components/SyncDatabaseSchema/DiffViewPanel.vue
index 0fd4d67ce7..70a4cd5e3d 100644
--- a/frontend/src/components/SyncDatabaseSchema/DiffViewPanel.vue
+++ b/frontend/src/components/SyncDatabaseSchema/DiffViewPanel.vue
@@ -61,7 +61,7 @@ import { NTabs, NTab } from "naive-ui";
import { ref } from "vue";
import { MonacoEditor } from "@/components/MonacoEditor";
import { dialectOfEngineV1 } from "@/types";
-import { Engine } from "@/types/proto/v1/common";
+import type { Engine } from "@/types/proto/v1/common";
import SchemaDiffViewer from "./SchemaDiffViewer.vue";
defineProps<{
diff --git a/frontend/src/components/SyncDatabaseSchema/RawSQLEditor.vue b/frontend/src/components/SyncDatabaseSchema/RawSQLEditor.vue
index b9950b389d..2d31171a44 100644
--- a/frontend/src/components/SyncDatabaseSchema/RawSQLEditor.vue
+++ b/frontend/src/components/SyncDatabaseSchema/RawSQLEditor.vue
@@ -94,7 +94,7 @@ import {
getStatementSize,
getSheetStatement,
} from "@/utils";
-import { RawSQLState } from "./types";
+import type { RawSQLState } from "./types";
const MAX_UPLOAD_FILE_SIZE_MB = 1;
diff --git a/frontend/src/components/SyncDatabaseSchema/RawSQLEditorPanel.vue b/frontend/src/components/SyncDatabaseSchema/RawSQLEditorPanel.vue
index 21027b5be7..a1795cd200 100644
--- a/frontend/src/components/SyncDatabaseSchema/RawSQLEditorPanel.vue
+++ b/frontend/src/components/SyncDatabaseSchema/RawSQLEditorPanel.vue
@@ -35,7 +35,7 @@
<script lang="ts" setup>
import { Drawer, DrawerContent } from "@/components/v2";
import RawSQLEditor from "./RawSQLEditor.vue";
-import { RawSQLState } from "./types";
+import type { RawSQLState } from "./types";
defineProps<{
rawSqlState: RawSQLState;
diff --git a/frontend/src/components/SyncDatabaseSchema/SelectTargetDatabasesView.vue b/frontend/src/components/SyncDatabaseSchema/SelectTargetDatabasesView.vue
index 52c8ec9faa..f24b1dacca 100644
--- a/frontend/src/components/SyncDatabaseSchema/SelectTargetDatabasesView.vue
+++ b/frontend/src/components/SyncDatabaseSchema/SelectTargetDatabasesView.vue
@@ -242,9 +242,10 @@ import {
useProjectV1Store,
useSheetV1Store,
} from "@/store";
-import { ComposedDatabase, UNKNOWN_ID } from "@/types";
+import type { ComposedDatabase } from "@/types";
+import { UNKNOWN_ID } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { ChangeHistory } from "@/types/proto/v1/database_service";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
import {
changeHistoryLink,
databaseV1Url,
@@ -254,7 +255,7 @@ import {
import DiffViewPanel from "./DiffViewPanel.vue";
import RawSQLEditorPanel from "./RawSQLEditorPanel.vue";
import TargetDatabasesSelectPanel from "./TargetDatabasesSelectPanel.vue";
-import { RawSQLState, SourceSchemaType } from "./types";
+import type { RawSQLState, SourceSchemaType } from "./types";
interface DatabaseSourceSchema {
environmentId: string;
diff --git a/frontend/src/components/SyncDatabaseSchema/TargetDatabasesSelectPanel.vue b/frontend/src/components/SyncDatabaseSchema/TargetDatabasesSelectPanel.vue
index 98d884eeea..4b705b3a3b 100644
--- a/frontend/src/components/SyncDatabaseSchema/TargetDatabasesSelectPanel.vue
+++ b/frontend/src/components/SyncDatabaseSchema/TargetDatabasesSelectPanel.vue
@@ -131,9 +131,10 @@ import {
InstanceV1Name,
} from "@/components/v2";
import { useDatabaseV1Store, useEnvironmentV1Store } from "@/store";
-import { ComposedDatabase } from "@/types";
-import { Engine, State } from "@/types/proto/v1/common";
-import { Environment } from "@/types/proto/v1/environment_service";
+import type { ComposedDatabase } from "@/types";
+import type { Engine } from "@/types/proto/v1/common";
+import { State } from "@/types/proto/v1/common";
+import type { Environment } from "@/types/proto/v1/environment_service";
import MaskSpinner from "../misc/MaskSpinner.vue";
type LocalState = {
diff --git a/frontend/src/components/SyncDatabaseSchema/index.vue b/frontend/src/components/SyncDatabaseSchema/index.vue
index 6fd76a6239..bfd4581551 100644
--- a/frontend/src/components/SyncDatabaseSchema/index.vue
+++ b/frontend/src/components/SyncDatabaseSchema/index.vue
@@ -64,7 +64,8 @@
<script lang="ts" setup>
import dayjs from "dayjs";
import { isNull, isUndefined } from "lodash-es";
-import { NRadioGroup, NRadio, useDialog, ButtonProps } from "naive-ui";
+import type { ButtonProps } from "naive-ui";
+import { NRadioGroup, NRadio, useDialog } from "naive-ui";
import { computed, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
@@ -72,13 +73,14 @@ import { StepTab } from "@/components/v2";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
import { WORKSPACE_HOME_MODULE } from "@/router/dashboard/workspaceRoutes";
import { useProjectV1Store } from "@/store";
-import { UNKNOWN_ID, ComposedProject } from "@/types";
+import type { ComposedProject } from "@/types";
+import { UNKNOWN_ID } from "@/types";
import { Engine } from "@/types/proto/v1/common";
import { extractProjectResourceName } from "@/utils";
import DatabaseSchemaSelector from "./DatabaseSchemaSelector.vue";
import RawSQLEditor from "./RawSQLEditor.vue";
import SelectTargetDatabasesView from "./SelectTargetDatabasesView.vue";
-import {
+import type {
ChangeHistorySourceSchema,
RawSQLState,
SourceSchemaType,
diff --git a/frontend/src/components/SyncDatabaseSchema/types.ts b/frontend/src/components/SyncDatabaseSchema/types.ts
index dc607615a7..6edd919260 100644
--- a/frontend/src/components/SyncDatabaseSchema/types.ts
+++ b/frontend/src/components/SyncDatabaseSchema/types.ts
@@ -1,5 +1,5 @@
-import { Engine } from "@/types/proto/v1/common";
-import { ChangeHistory } from "@/types/proto/v1/database_service";
+import type { Engine } from "@/types/proto/v1/common";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
export type SourceSchemaType = "SCHEMA_HISTORY_VERSION" | "RAW_SQL";
diff --git a/frontend/src/components/TableDataTable.vue b/frontend/src/components/TableDataTable.vue
index a6230e5af9..3dca3f8784 100644
--- a/frontend/src/components/TableDataTable.vue
+++ b/frontend/src/components/TableDataTable.vue
@@ -20,15 +20,17 @@
</template>
<script lang="ts" setup>
-import { DataTableColumn, NDataTable } from "naive-ui";
-import { computed, PropType, reactive, onMounted, h, watch } from "vue";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
+import type { PropType } from "vue";
+import { computed, reactive, onMounted, h, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRoute, useRouter } from "vue-router";
import ClassificationLevelBadge from "@/components/SchemaTemplate/ClassificationLevelBadge.vue";
import { useSettingV1Store } from "@/store/modules";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { TableMetadata } from "@/types/proto/v1/database_service";
+import type { TableMetadata } from "@/types/proto/v1/database_service";
import { bytesToString, isGhostTable } from "@/utils";
import TableDetailDrawer from "./TableDetailDrawer.vue";
diff --git a/frontend/src/components/TableDetailDrawer.vue b/frontend/src/components/TableDetailDrawer.vue
index 3c90cea5c4..f742524535 100644
--- a/frontend/src/components/TableDetailDrawer.vue
+++ b/frontend/src/components/TableDetailDrawer.vue
@@ -249,8 +249,9 @@ import {
import { usePolicyByParentAndType } from "@/store/modules/v1/policy";
import { DEFAULT_PROJECT_V1_NAME, defaultProject } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { PolicyType, MaskData } from "@/types/proto/v1/org_policy_service";
-import { DataClassificationSetting_DataClassificationConfig } from "@/types/proto/v1/setting_service";
+import type { MaskData } from "@/types/proto/v1/org_policy_service";
+import { PolicyType } from "@/types/proto/v1/org_policy_service";
+import type { DataClassificationSetting_DataClassificationConfig } from "@/types/proto/v1/setting_service";
import {
bytesToString,
hasProjectPermissionV2,
diff --git a/frontend/src/components/TaskTable.vue b/frontend/src/components/TaskTable.vue
index f7c5f0e194..33ba52b856 100644
--- a/frontend/src/components/TaskTable.vue
+++ b/frontend/src/components/TaskTable.vue
@@ -35,14 +35,13 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useI18n } from "vue-i18n";
import DefinitionView from "@/components/DefinitionView.vue";
-import { ComposedDatabase } from "@/types";
-import {
- TaskMetadata,
- TaskMetadata_State,
-} from "@/types/proto/v1/database_service";
+import type { ComposedDatabase } from "@/types";
+import type { TaskMetadata } from "@/types/proto/v1/database_service";
+import { TaskMetadata_State } from "@/types/proto/v1/database_service";
defineProps({
database: {
diff --git a/frontend/src/components/TenantDatabaseTable/DatabaseMatrixItem.vue b/frontend/src/components/TenantDatabaseTable/DatabaseMatrixItem.vue
index 0b2146587f..ec0c232fd0 100644
--- a/frontend/src/components/TenantDatabaseTable/DatabaseMatrixItem.vue
+++ b/frontend/src/components/TenantDatabaseTable/DatabaseMatrixItem.vue
@@ -82,8 +82,9 @@
<script lang="ts" setup>
import { NPopover } from "naive-ui";
-import { computed, PropType } from "vue";
-import { ComposedDatabase } from "@/types";
+import type { PropType } from "vue";
+import { computed } from "vue";
+import type { ComposedDatabase } from "@/types";
import { State } from "@/types/proto/v1/common";
import {
convertLabelsToKVList,
diff --git a/frontend/src/components/TenantDatabaseTable/DeployDatabaseTable.vue b/frontend/src/components/TenantDatabaseTable/DeployDatabaseTable.vue
index a4b327538c..62e9d34a2f 100644
--- a/frontend/src/components/TenantDatabaseTable/DeployDatabaseTable.vue
+++ b/frontend/src/components/TenantDatabaseTable/DeployDatabaseTable.vue
@@ -107,8 +107,8 @@ import { groupBy } from "lodash-es";
import { NPopover } from "naive-ui";
import { computed, withDefaults } from "vue";
import type { ComposedDatabase } from "@/types";
-import { Environment } from "@/types/proto/v1/environment_service";
-import { DeploymentConfig } from "@/types/proto/v1/project_service";
+import type { Environment } from "@/types/proto/v1/environment_service";
+import type { DeploymentConfig } from "@/types/proto/v1/project_service";
import {
getLabelValuesFromDatabaseV1List,
getPipelineFromDeploymentScheduleV1,
diff --git a/frontend/src/components/TenantDatabaseTable/YAxisRadioGroup.vue b/frontend/src/components/TenantDatabaseTable/YAxisRadioGroup.vue
index 30d4b5d2d4..ec8740aa4e 100644
--- a/frontend/src/components/TenantDatabaseTable/YAxisRadioGroup.vue
+++ b/frontend/src/components/TenantDatabaseTable/YAxisRadioGroup.vue
@@ -10,9 +10,10 @@
</template>
<script lang="ts" setup>
-import { NSelect, SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NSelect } from "naive-ui";
import { computed, withDefaults } from "vue";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import {
displayDeploymentMatchSelectorKey,
getAvailableDeploymentConfigMatchSelectorKeyList,
diff --git a/frontend/src/components/TransferDatabaseForm.vue b/frontend/src/components/TransferDatabaseForm.vue
index 0dabf4785d..9a3e632291 100644
--- a/frontend/src/components/TransferDatabaseForm.vue
+++ b/frontend/src/components/TransferDatabaseForm.vue
@@ -68,9 +68,9 @@
import { cloneDeep } from "lodash-es";
import { computed, onBeforeMount, reactive } from "vue";
import { toRef } from "vue";
+import type { TransferSource } from "@/components/TransferDatabaseForm";
import {
MultipleDatabaseSelector,
- TransferSource,
TransferSourceSelector,
} from "@/components/TransferDatabaseForm";
import {
@@ -80,14 +80,13 @@ import {
useProjectV1ByUID,
useProjectV1Store,
} from "@/store";
+import type { ComposedInstance, ComposedDatabase } from "@/types";
import {
DEFAULT_PROJECT_ID,
- ComposedInstance,
DEFAULT_PROJECT_V1_NAME,
UNKNOWN_INSTANCE_NAME,
- ComposedDatabase,
} from "@/types";
-import { Project } from "@/types/proto/v1/project_service";
+import type { Project } from "@/types/proto/v1/project_service";
import {
filterDatabaseV1ByKeyword,
hasProjectPermissionV2,
diff --git a/frontend/src/components/TransferDatabaseForm/MultipleDatabaseSelector.vue b/frontend/src/components/TransferDatabaseForm/MultipleDatabaseSelector.vue
index 9c773d6b58..923b827835 100644
--- a/frontend/src/components/TransferDatabaseForm/MultipleDatabaseSelector.vue
+++ b/frontend/src/components/TransferDatabaseForm/MultipleDatabaseSelector.vue
@@ -107,11 +107,11 @@ import { NCollapse, NCollapseItem, NCheckbox } from "naive-ui";
import { computed, reactive, watch } from "vue";
import { type BBGridColumn, BBGrid } from "@/bbkit";
import { useEnvironmentV1List } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { State } from "@/types/proto/v1/common";
-import { Environment } from "@/types/proto/v1/environment_service";
+import type { Environment } from "@/types/proto/v1/environment_service";
import { InstanceV1Name, ProductionEnvironmentV1Icon } from "../v2";
-import { TransferSource } from "./utils";
+import type { TransferSource } from "./utils";
type LocalState = {
selectedDatabaseUidListForEnvironment: Map<string, Set<string>>;
diff --git a/frontend/src/components/TransferDatabaseForm/TransferSourceSelector.vue b/frontend/src/components/TransferDatabaseForm/TransferSourceSelector.vue
index 715884ca33..67b2cc1ec0 100644
--- a/frontend/src/components/TransferDatabaseForm/TransferSourceSelector.vue
+++ b/frontend/src/components/TransferDatabaseForm/TransferSourceSelector.vue
@@ -53,15 +53,10 @@ import { NInputGroup, NRadio, NRadioGroup } from "naive-ui";
import { computed, reactive, watch } from "vue";
import { InstanceSelect, ProjectSelect, SearchBox } from "@/components/v2";
import { useInstanceV1Store, useProjectV1Store } from "@/store";
-import {
- UNKNOWN_ID,
- ComposedDatabase,
- ComposedInstance,
- DEFAULT_PROJECT_V1_NAME,
- PresetRoleType,
-} from "@/types";
-import { Project } from "@/types/proto/v1/project_service";
-import { TransferSource } from "./utils";
+import type { ComposedDatabase, ComposedInstance } from "@/types";
+import { UNKNOWN_ID, DEFAULT_PROJECT_V1_NAME, PresetRoleType } from "@/types";
+import type { Project } from "@/types/proto/v1/project_service";
+import type { TransferSource } from "./utils";
interface LocalState {
transferSource: TransferSource;
diff --git a/frontend/src/components/TransferOutDatabaseForm/Label.vue b/frontend/src/components/TransferOutDatabaseForm/Label.vue
index 9cda0cd03f..628c40bd03 100644
--- a/frontend/src/components/TransferOutDatabaseForm/Label.vue
+++ b/frontend/src/components/TransferOutDatabaseForm/Label.vue
@@ -23,7 +23,7 @@ import { computed } from "vue";
import { EnvironmentV1Name, InstanceV1Name } from "@/components/v2";
import { useDatabaseV1Store, useEnvironmentV1Store } from "@/store";
import { getHighlightHTMLByRegExp } from "@/utils";
-import { DatabaseTreeOption } from "./common";
+import type { DatabaseTreeOption } from "./common";
const props = defineProps<{
option: DatabaseTreeOption;
diff --git a/frontend/src/components/TransferOutDatabaseForm/TransferOutDatabaseForm.vue b/frontend/src/components/TransferOutDatabaseForm/TransferOutDatabaseForm.vue
index 650355b76d..d64857fa79 100644
--- a/frontend/src/components/TransferOutDatabaseForm/TransferOutDatabaseForm.vue
+++ b/frontend/src/components/TransferOutDatabaseForm/TransferOutDatabaseForm.vue
@@ -71,7 +71,8 @@ import {
useDatabaseV1Store,
useProjectV1Store,
} from "@/store";
-import { ComposedDatabase, UNKNOWN_ID, PresetRoleType } from "@/types";
+import type { ComposedDatabase } from "@/types";
+import { UNKNOWN_ID, PresetRoleType } from "@/types";
const props = defineProps<{
databaseList: ComposedDatabase[];
diff --git a/frontend/src/components/TransferOutDatabaseForm/common.ts b/frontend/src/components/TransferOutDatabaseForm/common.ts
index a02a555a4a..b74a2b35b9 100644
--- a/frontend/src/components/TransferOutDatabaseForm/common.ts
+++ b/frontend/src/components/TransferOutDatabaseForm/common.ts
@@ -1,7 +1,7 @@
import { groupBy } from "lodash-es";
-import { TransferOption, TreeOption } from "naive-ui";
+import type { TransferOption, TreeOption } from "naive-ui";
import { useEnvironmentV1Store } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
export interface DatabaseTreeOption<L = "environment" | "database">
extends TreeOption {
diff --git a/frontend/src/components/TroubleshootLink.vue b/frontend/src/components/TroubleshootLink.vue
index e3d73c7f48..958e3a5d19 100644
--- a/frontend/src/components/TroubleshootLink.vue
+++ b/frontend/src/components/TroubleshootLink.vue
@@ -10,7 +10,7 @@
</template>
<script lang="ts" setup>
-import { PropType } from "vue";
+import type { PropType } from "vue";
defineProps({
url: {
diff --git a/frontend/src/components/User/Settings/CreateUserDrawer.vue b/frontend/src/components/User/Settings/CreateUserDrawer.vue
index 58cc12de44..81ffa58487 100644
--- a/frontend/src/components/User/Settings/CreateUserDrawer.vue
+++ b/frontend/src/components/User/Settings/CreateUserDrawer.vue
@@ -138,6 +138,7 @@
<script lang="ts" setup>
import { cloneDeep } from "lodash-es";
import { ArchiveIcon } from "lucide-vue-next";
+import type { SelectGroupOption, SelectOption } from "naive-ui";
import {
NPopconfirm,
NButton,
@@ -147,8 +148,6 @@ import {
NSelect,
NRadioGroup,
NRadio,
- SelectGroupOption,
- SelectOption,
} from "naive-ui";
import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
@@ -165,11 +164,8 @@ import {
PresetRoleType,
emptyUser,
} from "@/types";
-import {
- UpdateUserRequest,
- User,
- UserType,
-} from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
+import { UpdateUserRequest, UserType } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
import { displayRoleTitle, randomString } from "@/utils";
diff --git a/frontend/src/components/User/Settings/UserDataTable/cells/UserNameCell.vue b/frontend/src/components/User/Settings/UserDataTable/cells/UserNameCell.vue
index 97bf74d65b..9c6f2b02d7 100644
--- a/frontend/src/components/User/Settings/UserDataTable/cells/UserNameCell.vue
+++ b/frontend/src/components/User/Settings/UserDataTable/cells/UserNameCell.vue
@@ -63,7 +63,8 @@ import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { pushNotification, useCurrentUserV1 } from "@/store";
import { SYSTEM_BOT_USER_NAME } from "@/types";
-import { User, UserType } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
+import { UserType } from "@/types/proto/v1/auth_service";
import { hasWorkspacePermissionV2, toClipboard } from "@/utils";
defineProps<{
diff --git a/frontend/src/components/User/Settings/UserDataTable/cells/UserOperationsCell.vue b/frontend/src/components/User/Settings/UserDataTable/cells/UserOperationsCell.vue
index 952efc6062..cd6cdf7bab 100644
--- a/frontend/src/components/User/Settings/UserDataTable/cells/UserOperationsCell.vue
+++ b/frontend/src/components/User/Settings/UserDataTable/cells/UserOperationsCell.vue
@@ -32,7 +32,7 @@ import { NButton } from "naive-ui";
import { computed } from "vue";
import { useCurrentUserV1, useUserStore } from "@/store";
import { PresetRoleType, SYSTEM_BOT_USER_NAME } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
defineProps<{
diff --git a/frontend/src/components/User/Settings/UserDataTable/cells/UserRolesCell.vue b/frontend/src/components/User/Settings/UserDataTable/cells/UserRolesCell.vue
index d038006616..9d4650dab1 100644
--- a/frontend/src/components/User/Settings/UserDataTable/cells/UserRolesCell.vue
+++ b/frontend/src/components/User/Settings/UserDataTable/cells/UserRolesCell.vue
@@ -8,7 +8,7 @@
<script lang="ts" setup>
import { NTag } from "naive-ui";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
import { displayRoleTitle, sortRoles } from "@/utils";
defineProps<{
diff --git a/frontend/src/components/User/Settings/UserDataTable/index.vue b/frontend/src/components/User/Settings/UserDataTable/index.vue
index 1fb300893e..6b3b22cf0c 100644
--- a/frontend/src/components/User/Settings/UserDataTable/index.vue
+++ b/frontend/src/components/User/Settings/UserDataTable/index.vue
@@ -18,11 +18,12 @@
</template>
<script lang="ts" setup>
-import { DataTableColumn, NDataTable } from "naive-ui";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
import { computed, reactive, h } from "vue";
import { useI18n } from "vue-i18n";
import { useUserStore } from "@/store";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
import { copyServiceKeyToClipboardIfNeeded } from "../common";
import UserNameCell from "./cells/UserNameCell.vue";
import UserOperationsCell from "./cells/UserOperationsCell.vue";
diff --git a/frontend/src/components/User/Settings/UserDataTableByRole/cells/UserNameCell.vue b/frontend/src/components/User/Settings/UserDataTableByRole/cells/UserNameCell.vue
index 8a5d8b6527..069910d853 100644
--- a/frontend/src/components/User/Settings/UserDataTableByRole/cells/UserNameCell.vue
+++ b/frontend/src/components/User/Settings/UserDataTableByRole/cells/UserNameCell.vue
@@ -25,7 +25,8 @@
<script lang="ts" setup>
import { useCurrentUserV1 } from "@/store";
import { SYSTEM_BOT_USER_NAME } from "@/types";
-import { User, UserType } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
+import { UserType } from "@/types/proto/v1/auth_service";
defineProps<{
user: User;
diff --git a/frontend/src/components/User/Settings/UserDataTableByRole/cells/UserOperationsCell.vue b/frontend/src/components/User/Settings/UserDataTableByRole/cells/UserOperationsCell.vue
index cd7e219c9b..e071629256 100644
--- a/frontend/src/components/User/Settings/UserDataTableByRole/cells/UserOperationsCell.vue
+++ b/frontend/src/components/User/Settings/UserDataTableByRole/cells/UserOperationsCell.vue
@@ -21,7 +21,7 @@ import { NButton } from "naive-ui";
import { computed } from "vue";
import { useCurrentUserV1 } from "@/store";
import { PresetRoleType, SYSTEM_BOT_USER_NAME } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
defineProps<{
diff --git a/frontend/src/components/User/Settings/UserDataTableByRole/index.vue b/frontend/src/components/User/Settings/UserDataTableByRole/index.vue
index d6dd40255c..7ed86a415c 100644
--- a/frontend/src/components/User/Settings/UserDataTableByRole/index.vue
+++ b/frontend/src/components/User/Settings/UserDataTableByRole/index.vue
@@ -10,12 +10,13 @@
</template>
<script lang="ts" setup>
-import { DataTableColumn, NDataTable } from "naive-ui";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
import { computed, h } from "vue";
import { useI18n } from "vue-i18n";
import { useRoleStore } from "@/store";
import { PRESET_WORKSPACE_ROLES } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
import { displayRoleTitle, sortRoles } from "@/utils";
import UserNameCell from "./cells/UserNameCell.vue";
import UserOperationsCell from "./cells/UserOperationsCell.vue";
diff --git a/frontend/src/components/User/Settings/common.ts b/frontend/src/components/User/Settings/common.ts
index 2863fb2f00..5169215450 100644
--- a/frontend/src/components/User/Settings/common.ts
+++ b/frontend/src/components/User/Settings/common.ts
@@ -1,6 +1,6 @@
import { t } from "@/plugins/i18n";
import { pushNotification } from "@/store";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
import { toClipboard } from "@/utils";
export const copyServiceKeyToClipboardIfNeeded = (user: User) => {
diff --git a/frontend/src/components/User/UserAvatar.vue b/frontend/src/components/User/UserAvatar.vue
index 00db719992..26c67823a1 100644
--- a/frontend/src/components/User/UserAvatar.vue
+++ b/frontend/src/components/User/UserAvatar.vue
@@ -9,12 +9,13 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { BBAvatar } from "@/bbkit";
-import { BBAvatarSizeType } from "@/bbkit/types";
+import type { BBAvatarSizeType } from "@/bbkit/types";
import { UNKNOWN_ID, unknownUser } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
-import { VueClass } from "@/utils";
+import type { User } from "@/types/proto/v1/auth_service";
+import type { VueClass } from "@/utils";
const props = defineProps({
user: {
diff --git a/frontend/src/components/VCS/VCSCard.vue b/frontend/src/components/VCS/VCSCard.vue
index 2ad829949f..df139bef72 100644
--- a/frontend/src/components/VCS/VCSCard.vue
+++ b/frontend/src/components/VCS/VCSCard.vue
@@ -30,12 +30,13 @@
<script lang="ts" setup>
import { NButton } from "naive-ui";
-import { PropType, computed } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useRouter } from "vue-router";
import { WORKSPACE_ROUTE_GITOPS_DETAIL } from "@/router/dashboard/workspaceRoutes";
import { useCurrentUserV1 } from "@/store";
import { getVCSId } from "@/store/modules/v1/common";
-import { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
+import type { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
import { hasWorkspacePermissionV2 } from "@/utils";
const props = defineProps({
diff --git a/frontend/src/components/VCS/VCSProviderBasicInfoPanel.vue b/frontend/src/components/VCS/VCSProviderBasicInfoPanel.vue
index 733bd2d809..2ecd2eb304 100644
--- a/frontend/src/components/VCS/VCSProviderBasicInfoPanel.vue
+++ b/frontend/src/components/VCS/VCSProviderBasicInfoPanel.vue
@@ -174,8 +174,9 @@ import { useI18n } from "vue-i18n";
import ResourceIdField from "@/components/v2/Form/ResourceIdField.vue";
import { useVCSV1Store } from "@/store";
import { vcsProviderPrefix } from "@/store/modules/v1/common";
-import { TEXT_VALIDATION_DELAY, VCSConfig } from "@/types";
-import { ResourceId, ValidatedMessage } from "@/types";
+import type { VCSConfig } from "@/types";
+import { TEXT_VALIDATION_DELAY } from "@/types";
+import type { ResourceId, ValidatedMessage } from "@/types";
import { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";
import { isUrl } from "@/utils";
import { getErrorCode } from "@/utils/grpcweb";
diff --git a/frontend/src/components/VCS/VCSSetupWizard.vue b/frontend/src/components/VCS/VCSSetupWizard.vue
index ff4d57a592..0daa2a86a3 100644
--- a/frontend/src/components/VCS/VCSSetupWizard.vue
+++ b/frontend/src/components/VCS/VCSSetupWizard.vue
@@ -22,11 +22,9 @@ import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { WORKSPACE_ROUTE_GITOPS } from "@/router/dashboard/workspaceRoutes";
import { pushNotification, useVCSV1Store, useCurrentUserV1 } from "@/store";
-import { VCSConfig } from "@/types";
-import {
- VCSProvider,
- VCSProvider_Type,
-} from "@/types/proto/v1/vcs_provider_service";
+import type { VCSConfig } from "@/types";
+import type { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
+import { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import VCSProviderBasicInfoPanel from "./VCSProviderBasicInfoPanel.vue";
diff --git a/frontend/src/components/VCS/utils.ts b/frontend/src/components/VCS/utils.ts
index 10c07d1f71..c3379e072a 100644
--- a/frontend/src/components/VCS/utils.ts
+++ b/frontend/src/components/VCS/utils.ts
@@ -1,6 +1,6 @@
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { VCSUIType } from "@/types";
+import type { VCSUIType } from "@/types";
import { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";
export const vcsListByUIType = computed(
diff --git a/frontend/src/components/ViewDataTable.vue b/frontend/src/components/ViewDataTable.vue
index ab51514dc4..3a5e648afa 100644
--- a/frontend/src/components/ViewDataTable.vue
+++ b/frontend/src/components/ViewDataTable.vue
@@ -10,12 +10,14 @@
</template>
<script lang="ts" setup>
-import { DataTableColumn, NDataTable } from "naive-ui";
-import { computed, PropType } from "vue";
+import type { DataTableColumn } from "naive-ui";
+import { NDataTable } from "naive-ui";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { ViewMetadata } from "@/types/proto/v1/database_service";
+import type { ViewMetadata } from "@/types/proto/v1/database_service";
const props = defineProps({
database: {
diff --git a/frontend/src/components/misc/HumanizeDate.vue b/frontend/src/components/misc/HumanizeDate.vue
index 5a8b56902a..47a5d8dd11 100644
--- a/frontend/src/components/misc/HumanizeDate.vue
+++ b/frontend/src/components/misc/HumanizeDate.vue
@@ -14,7 +14,8 @@
<script lang="ts" setup>
import dayjs from "dayjs";
import { NTooltip } from "naive-ui";
-import { PropType, computed } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { humanizeDate } from "@/utils";
const props = defineProps({
diff --git a/frontend/src/components/misc/MaskSpinner.vue b/frontend/src/components/misc/MaskSpinner.vue
index cc145230aa..041e98f68b 100644
--- a/frontend/src/components/misc/MaskSpinner.vue
+++ b/frontend/src/components/misc/MaskSpinner.vue
@@ -9,7 +9,8 @@
</template>
<script lang="ts" setup>
-import { NSpin, SpinProps } from "naive-ui";
+import type { SpinProps } from "naive-ui";
+import { NSpin } from "naive-ui";
import { zindexable as vZindexable } from "vdirs";
withDefaults(
diff --git a/frontend/src/components/misc/NoDataPlaceholder.vue b/frontend/src/components/misc/NoDataPlaceholder.vue
index b282895ccb..169c74d716 100644
--- a/frontend/src/components/misc/NoDataPlaceholder.vue
+++ b/frontend/src/components/misc/NoDataPlaceholder.vue
@@ -16,7 +16,7 @@
</template>
<script lang="ts" setup>
-import { HTMLAttributes } from "vue";
+import type { HTMLAttributes } from "vue";
defineProps<{
imgAttrs?: HTMLAttributes;
diff --git a/frontend/src/components/misc/OverlayStackManager.vue b/frontend/src/components/misc/OverlayStackManager.vue
index 35797e238a..f37484c6f2 100644
--- a/frontend/src/components/misc/OverlayStackManager.vue
+++ b/frontend/src/components/misc/OverlayStackManager.vue
@@ -7,17 +7,17 @@ import { useEventListener } from "@vueuse/core";
import Emittery from "emittery";
import { last, pullAt } from "lodash-es";
import { unref } from "vue";
+import type { Ref } from "vue";
import {
computed,
defineComponent,
inject,
onUnmounted,
provide,
- Ref,
ref,
watch,
} from "vue";
-import { MaybeRef } from "@/types";
+import type { MaybeRef } from "@/types";
export type OverlayStackEvents = Emittery<{
esc: KeyboardEvent;
diff --git a/frontend/src/components/misc/TextOverflowPopover.vue b/frontend/src/components/misc/TextOverflowPopover.vue
index b123773bd1..762858f4ba 100644
--- a/frontend/src/components/misc/TextOverflowPopover.vue
+++ b/frontend/src/components/misc/TextOverflowPopover.vue
@@ -22,9 +22,11 @@
</template>
<script lang="ts" setup>
-import { NPopover, PopoverPlacement } from "naive-ui";
-import { PropType, computed } from "vue";
-import { VueClass } from "@/utils";
+import type { PopoverPlacement } from "naive-ui";
+import { NPopover } from "naive-ui";
+import type { PropType } from "vue";
+import { computed } from "vue";
+import type { VueClass } from "@/utils";
const props = defineProps({
content: {
diff --git a/frontend/src/components/v2/Button/ContextMenuButton.vue b/frontend/src/components/v2/Button/ContextMenuButton.vue
index 9fbfadd4ff..484ba54252 100644
--- a/frontend/src/components/v2/Button/ContextMenuButton.vue
+++ b/frontend/src/components/v2/Button/ContextMenuButton.vue
@@ -33,15 +33,10 @@
<script setup lang="ts">
import { useLocalStorage } from "@vueuse/core";
import { head } from "lodash-es";
-import {
- NButton,
- NButtonGroup,
- ButtonGroupProps,
- NPopselect,
- SelectOption,
-} from "naive-ui";
+import type { ButtonGroupProps, SelectOption } from "naive-ui";
+import { NButton, NButtonGroup, NPopselect } from "naive-ui";
import { ref, computed } from "vue";
-import { ContextMenuButtonAction } from "./types";
+import type { ContextMenuButtonAction } from "./types";
const STORE_PREFIX = "bb.context-menu-button";
diff --git a/frontend/src/components/v2/Button/ErrorTipsButton.vue b/frontend/src/components/v2/Button/ErrorTipsButton.vue
index fa2a6ab7c4..f5a806c5c4 100644
--- a/frontend/src/components/v2/Button/ErrorTipsButton.vue
+++ b/frontend/src/components/v2/Button/ErrorTipsButton.vue
@@ -30,9 +30,10 @@
</template>
<script setup lang="ts">
-import { NTooltip, NButton, TooltipProps, ButtonProps } from "naive-ui";
+import type { TooltipProps, ButtonProps } from "naive-ui";
+import { NTooltip, NButton } from "naive-ui";
import ErrorList from "@/components/misc/ErrorList.vue";
-import { VueClass } from "@/utils";
+import type { VueClass } from "@/utils";
defineProps<{
disabled?: boolean;
diff --git a/frontend/src/components/v2/Button/TooltipButton.vue b/frontend/src/components/v2/Button/TooltipButton.vue
index e3db1b990a..432e33f437 100644
--- a/frontend/src/components/v2/Button/TooltipButton.vue
+++ b/frontend/src/components/v2/Button/TooltipButton.vue
@@ -24,7 +24,7 @@
<script lang="ts" setup>
import { NTooltip, type TooltipProps } from "naive-ui";
import { withDefaults, computed, useSlots } from "vue";
-import { TooltipMode } from "./types";
+import type { TooltipMode } from "./types";
const props = withDefaults(
defineProps<{
diff --git a/frontend/src/components/v2/Container/DrawerContent.vue b/frontend/src/components/v2/Container/DrawerContent.vue
index db6daafb9c..e9e815ef88 100644
--- a/frontend/src/components/v2/Container/DrawerContent.vue
+++ b/frontend/src/components/v2/Container/DrawerContent.vue
@@ -18,7 +18,8 @@
</template>
<script setup lang="ts">
-import { NDrawerContent, DrawerContentProps } from "naive-ui";
+import type { DrawerContentProps } from "naive-ui";
+import { NDrawerContent } from "naive-ui";
withDefaults(
defineProps<{
diff --git a/frontend/src/components/v2/Form/DropdownInput.vue b/frontend/src/components/v2/Form/DropdownInput.vue
index c3b21100a2..d0f733594b 100644
--- a/frontend/src/components/v2/Form/DropdownInput.vue
+++ b/frontend/src/components/v2/Form/DropdownInput.vue
@@ -50,17 +50,10 @@
</template>
<script setup lang="ts">
-import {
- DropdownOption,
- DropdownProps,
- NDropdown,
- NElement,
- NInput,
- NSelect,
- SelectOption,
-} from "naive-ui";
+import type { DropdownOption, DropdownProps, SelectOption } from "naive-ui";
+import { NDropdown, NElement, NInput, NSelect } from "naive-ui";
import { computed, h, ref } from "vue";
-import { VueClass, VueStyle } from "@/utils";
+import type { VueClass, VueStyle } from "@/utils";
const props = withDefaults(
defineProps<{
diff --git a/frontend/src/components/v2/Form/InlineInput.vue b/frontend/src/components/v2/Form/InlineInput.vue
index d63afd9a06..868b75a420 100644
--- a/frontend/src/components/v2/Form/InlineInput.vue
+++ b/frontend/src/components/v2/Form/InlineInput.vue
@@ -10,7 +10,8 @@
<script setup lang="ts">
import { NInput } from "naive-ui";
-import { CSSProperties, computed, ref } from "vue";
+import type { CSSProperties } from "vue";
+import { computed, ref } from "vue";
defineProps<{
value: string | undefined | null;
diff --git a/frontend/src/components/v2/Form/RadioGrid.vue b/frontend/src/components/v2/Form/RadioGrid.vue
index 9753054692..df8982b90a 100644
--- a/frontend/src/components/v2/Form/RadioGrid.vue
+++ b/frontend/src/components/v2/Form/RadioGrid.vue
@@ -30,8 +30,9 @@
</template>
<script setup lang="ts">
-import { ButtonProps, NButton, NRadio, RadioProps } from "naive-ui";
-import { RadioGridOption } from "./types";
+import type { ButtonProps, RadioProps } from "naive-ui";
+import { NButton, NRadio } from "naive-ui";
+import type { RadioGridOption } from "./types";
defineProps<{
value?: string | number | undefined | null;
diff --git a/frontend/src/components/v2/Form/SpinnerButton.vue b/frontend/src/components/v2/Form/SpinnerButton.vue
index 4a64e315a6..7fbb421921 100644
--- a/frontend/src/components/v2/Form/SpinnerButton.vue
+++ b/frontend/src/components/v2/Form/SpinnerButton.vue
@@ -29,7 +29,7 @@ defineComponent({
<script lang="ts" setup>
import { computed, ref, useAttrs } from "vue";
import { omit } from "lodash-es";
-import { VueClass } from "@/utils";
+import type { VueClass } from "@/utils";
import {
type ButtonProps,
type PopconfirmProps,
diff --git a/frontend/src/components/v2/Form/StepTab.vue b/frontend/src/components/v2/Form/StepTab.vue
index abf237e142..8ea6f727de 100644
--- a/frontend/src/components/v2/Form/StepTab.vue
+++ b/frontend/src/components/v2/Form/StepTab.vue
@@ -76,8 +76,9 @@
</template>
<script lang="ts" setup>
-import { NSteps, NStep, NButton, ButtonProps } from "naive-ui";
-import { VueClass } from "@/utils/types";
+import type { ButtonProps } from "naive-ui";
+import { NSteps, NStep, NButton } from "naive-ui";
+import type { VueClass } from "@/utils/types";
withDefaults(
defineProps<{
diff --git a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseGroupTableRow.vue b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseGroupTableRow.vue
index 26374c1bcd..cf6b416420 100644
--- a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseGroupTableRow.vue
+++ b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseGroupTableRow.vue
@@ -43,9 +43,9 @@
import BBBadge from "@/bbkit/BBBadge.vue";
import { SQLEditorButtonV1 } from "@/components/DatabaseDetail";
import { EnvironmentV1Name } from "@/components/v2";
-import { ComposedDatabaseGroup } from "@/types";
+import type { ComposedDatabaseGroup } from "@/types";
import ProjectCol from "./ProjectCol.vue";
-import { Mode } from "./utils";
+import type { Mode } from "./utils";
defineProps<{
databaseGroup: ComposedDatabaseGroup;
diff --git a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseLabelFilter.vue b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseLabelFilter.vue
index d046a8dd63..84a87581dd 100644
--- a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseLabelFilter.vue
+++ b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseLabelFilter.vue
@@ -24,10 +24,11 @@
<script setup lang="ts">
import { orderBy, uniqBy } from "lodash-es";
-import { CascaderOption, NCascader } from "naive-ui";
+import type { CascaderOption } from "naive-ui";
+import { NCascader } from "naive-ui";
import { computed, h } from "vue";
import { useI18n } from "vue-i18n";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { groupBy } from "@/utils";
type KV = { key: string; value: string };
diff --git a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue
index 261fe2fd7c..e1dbc896b0 100644
--- a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue
+++ b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue
@@ -90,7 +90,8 @@ import {
PenSquareIcon,
ArrowRightLeftIcon,
} from "lucide-vue-next";
-import { computed, h, VNode, reactive, ref } from "vue";
+import type { VNode } from "vue";
+import { computed, h, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { Drawer } from "@/components/v2";
@@ -105,11 +106,8 @@ import {
pushNotification,
usePageMode,
} from "@/store";
-import {
- ComposedDatabase,
- DEFAULT_PROJECT_V1_NAME,
- ProjectPermission,
-} from "@/types";
+import type { ComposedDatabase, ProjectPermission } from "@/types";
+import { DEFAULT_PROJECT_V1_NAME } from "@/types";
import {
Database,
DatabaseMetadataView,
diff --git a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseTableRow.vue b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseTableRow.vue
index e17e3997db..12cbbeb5af 100644
--- a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseTableRow.vue
+++ b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseTableRow.vue
@@ -51,10 +51,10 @@
import { computed } from "vue";
import { InstanceV1Name, EnvironmentV1Name } from "@/components/v2";
import { useEnvironmentV1Store } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import LabelsColumn from "./LabelsColumn.vue";
import ProjectCol from "./ProjectCol.vue";
-import { Mode } from "./utils";
+import type { Mode } from "./utils";
const props = defineProps<{
database: ComposedDatabase;
diff --git a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseV1Table.vue b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseV1Table.vue
index f8930dc838..2d6f4de1dd 100644
--- a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseV1Table.vue
+++ b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseV1Table.vue
@@ -124,23 +124,21 @@ import type { ColumnDef } from "@tanstack/vue-table";
import { sortBy } from "lodash-es";
import cloneDeep from "lodash-es/cloneDeep";
import { NPagination } from "naive-ui";
-import { computed, PropType, reactive, ref, watch } from "vue";
+import type { PropType } from "vue";
+import { computed, reactive, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
-import { BBGridColumn } from "@/bbkit/types";
+import type { BBGridColumn } from "@/bbkit/types";
import { PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL } from "@/router/dashboard/projectV1";
import { usePageMode, useCurrentUserV1 } from "@/store";
import { getProjectNameAndDatabaseGroupName } from "@/store/modules/v1/common";
-import { ComposedDatabase, ComposedDatabaseGroup } from "@/types";
-import {
- databaseV1Url,
- getScrollParent,
- isDatabaseV1Queryable,
- VueClass,
-} from "@/utils";
+import type { ComposedDatabase, ComposedDatabaseGroup } from "@/types";
+import type { VueClass } from "@/utils";
+import { databaseV1Url, getScrollParent, isDatabaseV1Queryable } from "@/utils";
import DatabaseGroupTableRow from "./DatabaseGroupTableRow.vue";
import DatabaseTableRow from "./DatabaseTableRow.vue";
-import { isDatabase, Mode } from "./utils";
+import type { Mode } from "./utils";
+import { isDatabase } from "./utils";
const { getCoreRowModel, getPaginationRowModel, useVueTable } = await import(
"@tanstack/vue-table"
diff --git a/frontend/src/components/v2/Model/DatabaseV1Table/ProjectCol.vue b/frontend/src/components/v2/Model/DatabaseV1Table/ProjectCol.vue
index 0a4875190b..22096ee548 100644
--- a/frontend/src/components/v2/Model/DatabaseV1Table/ProjectCol.vue
+++ b/frontend/src/components/v2/Model/DatabaseV1Table/ProjectCol.vue
@@ -41,12 +41,9 @@
<script setup lang="ts">
import { NTooltip } from "naive-ui";
import { State } from "@/types/proto/v1/common";
-import {
- Project,
- TenantMode,
- Workflow,
-} from "@/types/proto/v1/project_service";
-import { Mode } from "./utils";
+import type { Project } from "@/types/proto/v1/project_service";
+import { TenantMode, Workflow } from "@/types/proto/v1/project_service";
+import type { Mode } from "./utils";
withDefaults(
defineProps<{
diff --git a/frontend/src/components/v2/Model/DatabaseV1Table/utils.ts b/frontend/src/components/v2/Model/DatabaseV1Table/utils.ts
index 31fe713734..3a9320be56 100644
--- a/frontend/src/components/v2/Model/DatabaseV1Table/utils.ts
+++ b/frontend/src/components/v2/Model/DatabaseV1Table/utils.ts
@@ -1,5 +1,5 @@
import { has } from "lodash-es";
-import { ComposedDatabase, ComposedDatabaseGroup } from "@/types";
+import type { ComposedDatabase, ComposedDatabaseGroup } from "@/types";
export type Mode =
| "ALL"
diff --git a/frontend/src/components/v2/Model/DatabaseView.vue b/frontend/src/components/v2/Model/DatabaseView.vue
index 984f27bcf4..c05598bcd1 100644
--- a/frontend/src/components/v2/Model/DatabaseView.vue
+++ b/frontend/src/components/v2/Model/DatabaseView.vue
@@ -13,7 +13,7 @@
</template>
<script lang="ts" setup>
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { InstanceV1EngineIcon } from "./Instance";
defineProps<{
diff --git a/frontend/src/components/v2/Model/EnvironmentV1Name.vue b/frontend/src/components/v2/Model/EnvironmentV1Name.vue
index e67325b9d4..a5c90ff585 100644
--- a/frontend/src/components/v2/Model/EnvironmentV1Name.vue
+++ b/frontend/src/components/v2/Model/EnvironmentV1Name.vue
@@ -21,8 +21,9 @@
<script lang="ts" setup>
import { computed } from "vue";
-import { Environment } from "@/types/proto/v1/environment_service";
-import { VueClass, environmentV1Name } from "@/utils";
+import type { Environment } from "@/types/proto/v1/environment_service";
+import type { VueClass } from "@/utils";
+import { environmentV1Name } from "@/utils";
import ProductionEnvironmentV1Icon from "./ProductionEnvironmentV1Icon.vue";
const props = withDefaults(
diff --git a/frontend/src/components/v2/Model/EnvironmentV1Table.vue b/frontend/src/components/v2/Model/EnvironmentV1Table.vue
index 7ae05092b1..96a1a76221 100644
--- a/frontend/src/components/v2/Model/EnvironmentV1Table.vue
+++ b/frontend/src/components/v2/Model/EnvironmentV1Table.vue
@@ -22,8 +22,9 @@
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
-import { BBGridColumn, BBGridRow, BBGrid } from "@/bbkit";
-import { Environment } from "@/types/proto/v1/environment_service";
+import type { BBGridColumn, BBGridRow } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
+import type { Environment } from "@/types/proto/v1/environment_service";
import { EnvironmentV1Name } from ".";
export type EnvironmentRow = BBGridRow<Environment>;
diff --git a/frontend/src/components/v2/Model/Instance/InstanceEngineRadioGrid.vue b/frontend/src/components/v2/Model/Instance/InstanceEngineRadioGrid.vue
index 96e869756d..67b4b69242 100644
--- a/frontend/src/components/v2/Model/Instance/InstanceEngineRadioGrid.vue
+++ b/frontend/src/components/v2/Model/Instance/InstanceEngineRadioGrid.vue
@@ -25,9 +25,9 @@
<script setup lang="ts">
import { computed } from "vue";
import { EngineIconPath } from "@/components/InstanceForm/constants";
-import { Engine } from "@/types/proto/v1/common";
+import type { Engine } from "@/types/proto/v1/common";
import { engineNameV1 } from "@/utils";
-import { RadioGridItem, RadioGridOption } from "../../Form";
+import type { RadioGridItem, RadioGridOption } from "../../Form";
import RichEngineName from "./RichEngineName.vue";
type EngineOption = RadioGridOption<Engine>;
diff --git a/frontend/src/components/v2/Model/Instance/InstanceRoleTable/InstanceRoleTable.vue b/frontend/src/components/v2/Model/Instance/InstanceRoleTable/InstanceRoleTable.vue
index 30042ad709..fefa88aba5 100644
--- a/frontend/src/components/v2/Model/Instance/InstanceRoleTable/InstanceRoleTable.vue
+++ b/frontend/src/components/v2/Model/Instance/InstanceRoleTable/InstanceRoleTable.vue
@@ -19,8 +19,9 @@
<script lang="ts" setup>
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGrid, BBGridColumn } from "@/bbkit";
-import { InstanceRole } from "@/types/proto/v1/instance_role_service";
+import type { BBGridColumn } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
+import type { InstanceRole } from "@/types/proto/v1/instance_role_service";
defineProps<{
instanceRoleList: InstanceRole[];
diff --git a/frontend/src/components/v2/Model/Instance/InstanceV1EngineIcon.vue b/frontend/src/components/v2/Model/Instance/InstanceV1EngineIcon.vue
index 7b817a4dba..89c0796bfc 100644
--- a/frontend/src/components/v2/Model/Instance/InstanceV1EngineIcon.vue
+++ b/frontend/src/components/v2/Model/Instance/InstanceV1EngineIcon.vue
@@ -16,8 +16,8 @@
<script lang="ts" setup>
import { NTooltip } from "naive-ui";
-import { PropType } from "vue";
-import { Instance } from "@/types/proto/v1/instance_service";
+import type { PropType } from "vue";
+import type { Instance } from "@/types/proto/v1/instance_service";
defineProps({
instance: {
diff --git a/frontend/src/components/v2/Model/Instance/InstanceV1Name.vue b/frontend/src/components/v2/Model/Instance/InstanceV1Name.vue
index 787795ce2b..f99c236775 100644
--- a/frontend/src/components/v2/Model/Instance/InstanceV1Name.vue
+++ b/frontend/src/components/v2/Model/Instance/InstanceV1Name.vue
@@ -26,7 +26,7 @@
<script lang="ts" setup>
import { NEllipsis } from "naive-ui";
import { computed } from "vue";
-import { Instance } from "@/types/proto/v1/instance_service";
+import type { Instance } from "@/types/proto/v1/instance_service";
import { instanceV1Name } from "@/utils";
import InstanceV1EngineIcon from "./InstanceV1EngineIcon.vue";
diff --git a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue
index cc26ca8485..fb72214e44 100644
--- a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue
+++ b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue
@@ -35,14 +35,15 @@
<script setup lang="ts">
import { GraduationCapIcon, RefreshCwIcon } from "lucide-vue-next";
import { NButton } from "naive-ui";
-import { computed, h, VNode, reactive } from "vue";
+import type { VNode } from "vue";
+import { computed, h, reactive } from "vue";
import { useI18n } from "vue-i18n";
import {
useInstanceV1Store,
pushNotification,
useCurrentUserV1,
} from "@/store";
-import { ComposedInstance } from "@/types";
+import type { ComposedInstance } from "@/types";
import { hasWorkspacePermissionV2 } from "@/utils";
interface Action {
diff --git a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceV1Table.vue b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceV1Table.vue
index 0c11e5508a..e1ee1ac93b 100644
--- a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceV1Table.vue
+++ b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceV1Table.vue
@@ -74,8 +74,9 @@ import { NCheckbox } from "naive-ui";
import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
-import { BBGrid, BBGridColumn, BBGridRow } from "@/bbkit";
-import { ComposedInstance } from "@/types";
+import type { BBGridColumn, BBGridRow } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
+import type { ComposedInstance } from "@/types";
import { urlfy, hostPortOfInstanceV1 } from "@/utils";
import EnvironmentV1Name from "../../EnvironmentV1Name.vue";
diff --git a/frontend/src/components/v2/Model/Instance/RichEngineName.vue b/frontend/src/components/v2/Model/Instance/RichEngineName.vue
index f6ae34c7a5..422b1625aa 100644
--- a/frontend/src/components/v2/Model/Instance/RichEngineName.vue
+++ b/frontend/src/components/v2/Model/Instance/RichEngineName.vue
@@ -9,7 +9,7 @@
<script setup lang="ts">
import { computed } from "vue";
-import { Engine } from "@/types/proto/v1/common";
+import type { Engine } from "@/types/proto/v1/common";
import { engineNameV1 } from "@/utils";
const RE_SUBTITLE = /\(.+?\)/;
diff --git a/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue b/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue
index 6dc436514c..e464a44518 100644
--- a/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue
+++ b/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue
@@ -13,12 +13,11 @@
</template>
<script lang="ts">
-import { computed, defineComponent, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed, defineComponent } from "vue";
import { featureToRef } from "@/store";
-import {
- Environment,
- EnvironmentTier,
-} from "@/types/proto/v1/environment_service";
+import type { Environment } from "@/types/proto/v1/environment_service";
+import { EnvironmentTier } from "@/types/proto/v1/environment_service";
export default defineComponent({
name: "ProductionEnvironmentV1Icon",
diff --git a/frontend/src/components/v2/Model/ProjectV1Table.vue b/frontend/src/components/v2/Model/ProjectV1Table.vue
index 447d91c492..c3f0151658 100644
--- a/frontend/src/components/v2/Model/ProjectV1Table.vue
+++ b/frontend/src/components/v2/Model/ProjectV1Table.vue
@@ -34,11 +34,12 @@ import { CheckIcon } from "lucide-vue-next";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
-import { BBGridColumn, BBGridRow, BBGrid } from "@/bbkit";
+import type { BBGridColumn, BBGridRow } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
import { PROJECT_V1_ROUTE_DETAIL } from "@/router/dashboard/projectV1";
import { PROJECT_V1_ROUTE_DASHBOARD } from "@/router/dashboard/workspaceRoutes";
import { getProjectName } from "@/store/modules/v1/common";
-import { Project } from "@/types/proto/v1/project_service";
+import type { Project } from "@/types/proto/v1/project_service";
export type ProjectGridRow = BBGridRow<Project>;
diff --git a/frontend/src/components/v2/Model/RichDatabaseName.vue b/frontend/src/components/v2/Model/RichDatabaseName.vue
index fbc42b6ecd..b2939272a2 100644
--- a/frontend/src/components/v2/Model/RichDatabaseName.vue
+++ b/frontend/src/components/v2/Model/RichDatabaseName.vue
@@ -60,7 +60,7 @@
<script setup lang="ts">
import { NPopover } from "naive-ui";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import DatabaseV1Name from "./DatabaseV1Name.vue";
import EnvironmentV1Name from "./EnvironmentV1Name.vue";
import { InstanceV1EngineIcon, InstanceV1Name } from "./Instance";
diff --git a/frontend/src/components/v2/Select/DatabaseSelect.vue b/frontend/src/components/v2/Select/DatabaseSelect.vue
index 30a0b66519..247a7ce19c 100644
--- a/frontend/src/components/v2/Select/DatabaseSelect.vue
+++ b/frontend/src/components/v2/Select/DatabaseSelect.vue
@@ -15,7 +15,8 @@
</template>
<script lang="ts" setup>
-import { NSelect, SelectOption, SelectRenderLabel } from "naive-ui";
+import type { SelectOption, SelectRenderLabel } from "naive-ui";
+import { NSelect } from "naive-ui";
import { computed, h, watch } from "vue";
import { useSlots } from "vue";
import { useI18n } from "vue-i18n";
@@ -24,8 +25,9 @@ import {
useSearchDatabaseV1List,
useDatabaseV1Store,
} from "@/store";
-import { ComposedDatabase, UNKNOWN_ID, unknownDatabase } from "@/types";
-import { Engine } from "@/types/proto/v1/common";
+import type { ComposedDatabase } from "@/types";
+import { UNKNOWN_ID, unknownDatabase } from "@/types";
+import type { Engine } from "@/types/proto/v1/common";
import { instanceV1Name, supportedEngineV1List } from "@/utils";
import { InstanceV1EngineIcon } from "../Model";
diff --git a/frontend/src/components/v2/Select/EnvironmentSelect.vue b/frontend/src/components/v2/Select/EnvironmentSelect.vue
index 7ddf64bf64..51b3867886 100644
--- a/frontend/src/components/v2/Select/EnvironmentSelect.vue
+++ b/frontend/src/components/v2/Select/EnvironmentSelect.vue
@@ -13,12 +13,13 @@
</template>
<script lang="ts" setup>
-import { NSelect, SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NSelect } from "naive-ui";
import { computed, h, watchEffect } from "vue";
import { useI18n } from "vue-i18n";
import { useEnvironmentV1Store, useProjectV1Store } from "@/store";
import { State } from "@/types/proto/v1/common";
-import { Environment } from "@/types/proto/v1/environment_service";
+import type { Environment } from "@/types/proto/v1/environment_service";
import { EnvironmentV1Name } from "../Model";
interface EnvironmentSelectOption extends SelectOption {
diff --git a/frontend/src/components/v2/Select/InstanceSelect.vue b/frontend/src/components/v2/Select/InstanceSelect.vue
index fafa6a6e40..656669616b 100644
--- a/frontend/src/components/v2/Select/InstanceSelect.vue
+++ b/frontend/src/components/v2/Select/InstanceSelect.vue
@@ -16,12 +16,15 @@
</template>
<script lang="ts" setup>
-import { NSelect, SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NSelect } from "naive-ui";
import { computed, watch, h } from "vue";
import { useI18n } from "vue-i18n";
import { useEnvironmentV1Store, useInstanceV1List } from "@/store";
-import { ComposedInstance, UNKNOWN_ID, unknownInstance } from "@/types";
-import { Engine, State } from "@/types/proto/v1/common";
+import type { ComposedInstance } from "@/types";
+import { UNKNOWN_ID, unknownInstance } from "@/types";
+import type { Engine } from "@/types/proto/v1/common";
+import { State } from "@/types/proto/v1/common";
import { supportedEngineV1List } from "@/utils";
import { InstanceV1EngineIcon } from "../Model/Instance";
diff --git a/frontend/src/components/v2/Select/ProjectRoleSelect.vue b/frontend/src/components/v2/Select/ProjectRoleSelect.vue
index f8afed9600..26ab0b99d5 100644
--- a/frontend/src/components/v2/Select/ProjectRoleSelect.vue
+++ b/frontend/src/components/v2/Select/ProjectRoleSelect.vue
@@ -21,13 +21,15 @@
</template>
<script setup lang="ts">
-import { type SelectOption, NSelect, NTooltip, TooltipProps } from "naive-ui";
-import { computed, h, ref, VNode } from "vue";
+import type { TooltipProps } from "naive-ui";
+import { type SelectOption, NSelect, NTooltip } from "naive-ui";
+import type { VNode } from "vue";
+import { computed, h, ref } from "vue";
import FeatureBadge from "@/components/FeatureGuard/FeatureBadge.vue";
import FeatureModal from "@/components/FeatureGuard/FeatureModal.vue";
import { featureToRef, useRoleStore } from "@/store";
import { PresetRoleType } from "@/types";
-import { Role } from "@/types/proto/v1/role_service";
+import type { Role } from "@/types/proto/v1/role_service";
import { displayRoleDescription, displayRoleTitle } from "@/utils";
// UNALLOWED_ROLES_IN_PROJECT are roles that are not allowed to be assigned to
diff --git a/frontend/src/components/v2/Select/ProjectSelect.vue b/frontend/src/components/v2/Select/ProjectSelect.vue
index a38e7e6530..ec0efa30d5 100644
--- a/frontend/src/components/v2/Select/ProjectSelect.vue
+++ b/frontend/src/components/v2/Select/ProjectSelect.vue
@@ -15,22 +15,16 @@
<script lang="ts" setup>
import { intersection } from "lodash-es";
-import { NSelect, SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NSelect } from "naive-ui";
import { computed, watchEffect } from "vue";
import { useI18n } from "vue-i18n";
import { useCurrentUserV1, useProjectV1Store, useProjectV1List } from "@/store";
-import {
- ComposedProject,
- DEFAULT_PROJECT_ID,
- UNKNOWN_ID,
- unknownProject,
-} from "@/types";
+import type { ComposedProject } from "@/types";
+import { DEFAULT_PROJECT_ID, UNKNOWN_ID, unknownProject } from "@/types";
import { State } from "@/types/proto/v1/common";
-import {
- Project,
- TenantMode,
- Workflow,
-} from "@/types/proto/v1/project_service";
+import type { Project } from "@/types/proto/v1/project_service";
+import { TenantMode, Workflow } from "@/types/proto/v1/project_service";
import { hasWorkspacePermissionV2, roleListInProjectV1 } from "@/utils";
interface ProjectSelectOption extends SelectOption {
diff --git a/frontend/src/components/v2/Select/UserSelect.vue b/frontend/src/components/v2/Select/UserSelect.vue
index 71ef853cf2..db4f2d0d43 100644
--- a/frontend/src/components/v2/Select/UserSelect.vue
+++ b/frontend/src/components/v2/Select/UserSelect.vue
@@ -23,12 +23,8 @@
<script lang="ts" setup>
import { intersection } from "lodash-es";
-import {
- NSelect,
- SelectGroupOption,
- SelectOption,
- SelectProps,
-} from "naive-ui";
+import type { SelectGroupOption, SelectOption, SelectProps } from "naive-ui";
+import { NSelect } from "naive-ui";
import { computed, watch, watchEffect, h, ref } from "vue";
import { useI18n } from "vue-i18n";
import UserIcon from "~icons/heroicons-outline/user";
@@ -43,7 +39,8 @@ import {
unknownUser,
PresetRoleType,
} from "@/types";
-import { User, UserType } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
+import { UserType } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
import { extractUserUID, memberListInProjectV1 } from "@/utils";
diff --git a/frontend/src/components/v2/TabFilter/EnvironmentTabFilter.vue b/frontend/src/components/v2/TabFilter/EnvironmentTabFilter.vue
index c0af080ed9..5a08105b47 100644
--- a/frontend/src/components/v2/TabFilter/EnvironmentTabFilter.vue
+++ b/frontend/src/components/v2/TabFilter/EnvironmentTabFilter.vue
@@ -22,9 +22,9 @@ import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useEnvironmentV1List } from "@/store";
import { UNKNOWN_ENVIRONMENT_NAME, unknownEnvironment } from "@/types";
-import { Environment } from "@/types/proto/v1/environment_service";
+import type { Environment } from "@/types/proto/v1/environment_service";
import { EnvironmentV1Name } from "../Model";
-import { TabFilterItem } from "./types";
+import type { TabFilterItem } from "./types";
interface EnvironmentTabFilterItem extends TabFilterItem<string> {
environment: Environment;
diff --git a/frontend/src/components/v2/TabFilter/TabFilter.vue b/frontend/src/components/v2/TabFilter/TabFilter.vue
index a36480dc6e..be11a5e599 100644
--- a/frontend/src/components/v2/TabFilter/TabFilter.vue
+++ b/frontend/src/components/v2/TabFilter/TabFilter.vue
@@ -40,7 +40,7 @@
<script lang="ts" setup>
import { NSelect } from "naive-ui";
-import { TabFilterItem } from "./types";
+import type { TabFilterItem } from "./types";
type ValueType = string | number; // Use generic typed component in the future
diff --git a/frontend/src/composables/useCancelableTimeout.ts b/frontend/src/composables/useCancelableTimeout.ts
index 3a75c6f033..2293267fde 100644
--- a/frontend/src/composables/useCancelableTimeout.ts
+++ b/frontend/src/composables/useCancelableTimeout.ts
@@ -1,6 +1,6 @@
import { useTimestamp } from "@vueuse/core";
import { computed, ref, unref } from "vue";
-import { MaybeRef } from "@/types";
+import type { MaybeRef } from "@/types";
export const useCancelableTimeout = (timeoutMS: MaybeRef<number>) => {
const running = ref(false);
diff --git a/frontend/src/composables/useDelayedValue.ts b/frontend/src/composables/useDelayedValue.ts
index 505c879721..27bfb60dfb 100644
--- a/frontend/src/composables/useDelayedValue.ts
+++ b/frontend/src/composables/useDelayedValue.ts
@@ -1,4 +1,5 @@
-import { Ref, reactive, ref } from "vue";
+import type { Ref } from "vue";
+import { reactive, ref } from "vue";
export type UseDelayedValueOptions = {
delayBefore?: number;
diff --git a/frontend/src/composables/useEmitteryEventListener.ts b/frontend/src/composables/useEmitteryEventListener.ts
index 0715c6f5c0..91484cf3eb 100644
--- a/frontend/src/composables/useEmitteryEventListener.ts
+++ b/frontend/src/composables/useEmitteryEventListener.ts
@@ -1,8 +1,9 @@
-import Emittery, {
+import type {
DatalessEventNames,
EventName,
OmnipresentEventData,
} from "emittery";
+import type Emittery from "emittery";
import { onUnmounted } from "vue";
export const useEmitteryEventListener = <
diff --git a/frontend/src/composables/useExecuteSQL.ts b/frontend/src/composables/useExecuteSQL.ts
index f8038d41fb..50c9404d68 100644
--- a/frontend/src/composables/useExecuteSQL.ts
+++ b/frontend/src/composables/useExecuteSQL.ts
@@ -13,13 +13,13 @@ import {
useSQLStore,
useSQLEditorQueryHistoryStore,
} from "@/store";
-import {
+import type {
ComposedDatabase,
SQLResultSetV1,
- UNKNOWN_ID,
BBNotificationStyle,
SQLEditorQueryParams,
} from "@/types";
+import { UNKNOWN_ID } from "@/types";
import {
Advice_Status,
advice_StatusToJSON,
diff --git a/frontend/src/composables/useProgressivePoll.ts b/frontend/src/composables/useProgressivePoll.ts
index fe37ce30a6..a10d5bc5e5 100644
--- a/frontend/src/composables/useProgressivePoll.ts
+++ b/frontend/src/composables/useProgressivePoll.ts
@@ -1,6 +1,6 @@
import { random } from "lodash-es";
import { onBeforeUnmount, reactive, unref } from "vue";
-import { MaybeRef } from "@/types";
+import type { MaybeRef } from "@/types";
import { minmax } from "@/utils";
type ProgressivePollOptions = {
diff --git a/frontend/src/composables/useScrollState.ts b/frontend/src/composables/useScrollState.ts
index 30d8539af6..2861581462 100644
--- a/frontend/src/composables/useScrollState.ts
+++ b/frontend/src/composables/useScrollState.ts
@@ -1,6 +1,7 @@
import { useEventListener, useScroll } from "@vueuse/core";
-import { computed, ref, Ref, unref, watchEffect } from "vue";
-import { MaybeRef } from "@/types";
+import type { Ref } from "vue";
+import { computed, ref, unref, watchEffect } from "vue";
+import type { MaybeRef } from "@/types";
export const useVerticalScrollState = (
elemRef: Ref<HTMLElement | undefined>,
diff --git a/frontend/src/directives/data-source-type.ts b/frontend/src/directives/data-source-type.ts
index 491b854447..705445966f 100644
--- a/frontend/src/directives/data-source-type.ts
+++ b/frontend/src/directives/data-source-type.ts
@@ -1,4 +1,4 @@
-import { DataSourceType } from "../types";
+import type { DataSourceType } from "../types";
const directive = {
beforeMount(el: HTMLElement) {
diff --git a/frontend/src/grpcweb/middlewares/authInterceptorMiddleware.ts b/frontend/src/grpcweb/middlewares/authInterceptorMiddleware.ts
index 8f43a9a2fc..941c2d8bd8 100644
--- a/frontend/src/grpcweb/middlewares/authInterceptorMiddleware.ts
+++ b/frontend/src/grpcweb/middlewares/authInterceptorMiddleware.ts
@@ -1,5 +1,5 @@
import { ClientError, ServerError, Status } from "nice-grpc-common";
-import { ClientMiddleware } from "nice-grpc-web";
+import type { ClientMiddleware } from "nice-grpc-web";
import { router } from "@/router";
import { AUTH_SIGNIN_MODULE } from "@/router/auth";
import { useAuthStore } from "@/store";
diff --git a/frontend/src/grpcweb/middlewares/errorNotificationMiddleware.ts b/frontend/src/grpcweb/middlewares/errorNotificationMiddleware.ts
index 625c0d0d4e..ac7cd65941 100644
--- a/frontend/src/grpcweb/middlewares/errorNotificationMiddleware.ts
+++ b/frontend/src/grpcweb/middlewares/errorNotificationMiddleware.ts
@@ -1,5 +1,5 @@
import { ClientError, ServerError, Status } from "nice-grpc-common";
-import { ClientMiddleware } from "nice-grpc-web";
+import type { ClientMiddleware } from "nice-grpc-web";
import { t } from "@/plugins/i18n";
import { pushNotification } from "@/store";
diff --git a/frontend/src/layouts/BodyLayout.vue b/frontend/src/layouts/BodyLayout.vue
index 6b82d6dc39..0d56cf8bcc 100644
--- a/frontend/src/layouts/BodyLayout.vue
+++ b/frontend/src/layouts/BodyLayout.vue
@@ -248,7 +248,8 @@ import {
useCurrentUserV1,
useSubscriptionV1Store,
} from "@/store";
-import { QuickActionType, QuickActionPermissionMap } from "@/types";
+import type { QuickActionType } from "@/types";
+import { QuickActionPermissionMap } from "@/types";
import { PlanType } from "@/types/proto/v1/subscription_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import DashboardHeader from "@/views/DashboardHeader.vue";
diff --git a/frontend/src/layouts/DashboardLayout.vue b/frontend/src/layouts/DashboardLayout.vue
index 980e2c99ae..39c495a677 100644
--- a/frontend/src/layouts/DashboardLayout.vue
+++ b/frontend/src/layouts/DashboardLayout.vue
@@ -22,7 +22,7 @@ import BannersWrapper from "@/components/BannersWrapper.vue";
import HelpDrawer from "@/components/HelpDrawer";
import ProvideDashboardContext from "@/components/ProvideDashboardContext.vue";
import { useHelpStore, useUIStateStore } from "@/store";
-import { RouteMapList } from "@/types";
+import type { RouteMapList } from "@/types";
interface LocalState {
helpTimer: number | undefined;
diff --git a/frontend/src/layouts/ProjectV1Layout.vue b/frontend/src/layouts/ProjectV1Layout.vue
index e642206fc5..131a7cf6f5 100644
--- a/frontend/src/layouts/ProjectV1Layout.vue
+++ b/frontend/src/layouts/ProjectV1Layout.vue
@@ -51,9 +51,9 @@ import {
pushNotification,
} from "@/store";
import { projectNamePrefix } from "@/store/modules/v1/common";
+import type { QuickActionType } from "@/types";
import {
DEFAULT_PROJECT_V1_NAME,
- QuickActionType,
activityName,
QuickActionProjectPermissionMap,
} from "@/types";
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 88e0f75171..a8e5568519 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -15,13 +15,13 @@ import NaiveUI from "./plugins/naive-ui";
import { isSilent } from "./plugins/silent-request";
import { router } from "./router";
import { AUTH_SIGNIN_MODULE } from "./router/auth";
+import type { PageMode } from "./store";
import {
pinia,
pushNotification,
useActuatorV1Store,
useAuthStore,
useSubscriptionV1Store,
- PageMode,
} from "./store";
import {
environmentName,
diff --git a/frontend/src/plugins/ai/components/AIChatToSQL.vue b/frontend/src/plugins/ai/components/AIChatToSQL.vue
index 365bca53e4..5e4dfe2036 100644
--- a/frontend/src/plugins/ai/components/AIChatToSQL.vue
+++ b/frontend/src/plugins/ai/components/AIChatToSQL.vue
@@ -8,7 +8,7 @@ import Emittery from "emittery";
import { computed, reactive, toRef } from "vue";
import { useMetadata, useConnectionOfCurrentSQLEditorTab } from "@/store";
import { useSettingV1Store } from "@/store/modules/v1/setting";
-import { SQLEditorConnection } from "@/types";
+import type { SQLEditorConnection } from "@/types";
import { DatabaseMetadataView } from "@/types/proto/v1/database_service";
import type { AIContextEvents } from "../types";
diff --git a/frontend/src/plugins/ai/components/ChatPanel.vue b/frontend/src/plugins/ai/components/ChatPanel.vue
index c0b880232b..c68c3e4933 100644
--- a/frontend/src/plugins/ai/components/ChatPanel.vue
+++ b/frontend/src/plugins/ai/components/ChatPanel.vue
@@ -30,7 +30,8 @@
</template>
<script lang="ts" setup>
-import { Axios, AxiosResponse } from "axios";
+import type { AxiosResponse } from "axios";
+import { Axios } from "axios";
import { head } from "lodash-es";
import { storeToRefs } from "pinia";
import { computed, reactive, watch } from "vue";
@@ -38,7 +39,7 @@ import { useSQLEditorTabStore } from "@/store";
import { engineNameV1 } from "@/utils";
import { onConnectionChanged, useAIContext, useCurrentChat } from "../logic";
import { useConversationStore } from "../store";
-import { OpenAIMessage, OpenAIResponse } from "../types";
+import type { OpenAIMessage, OpenAIResponse } from "../types";
import ActionBar from "./ActionBar.vue";
import ChatView from "./ChatView";
import DynamicSuggestions from "./DynamicSuggestions.vue";
diff --git a/frontend/src/plugins/ai/components/ChatView/context.ts b/frontend/src/plugins/ai/components/ChatView/context.ts
index d85afb2f19..e6d38300ac 100644
--- a/frontend/src/plugins/ai/components/ChatView/context.ts
+++ b/frontend/src/plugins/ai/components/ChatView/context.ts
@@ -1,5 +1,6 @@
-import { inject, InjectionKey, provide, Ref } from "vue";
-import { Mode } from "./types";
+import type { InjectionKey, Ref } from "vue";
+import { inject, provide } from "vue";
+import type { Mode } from "./types";
export type ChatViewContext = {
mode: Ref<Mode>;
diff --git a/frontend/src/plugins/ai/logic/context.ts b/frontend/src/plugins/ai/logic/context.ts
index 629d1ed1e3..06de318cb0 100644
--- a/frontend/src/plugins/ai/logic/context.ts
+++ b/frontend/src/plugins/ai/logic/context.ts
@@ -1,5 +1,5 @@
import { inject, provide, type InjectionKey } from "vue";
-import { AIContext } from "../types";
+import type { AIContext } from "../types";
export const KEY = Symbol("bb.plugin.ai") as InjectionKey<AIContext>;
diff --git a/frontend/src/plugins/ai/logic/useChatByTab.ts b/frontend/src/plugins/ai/logic/useChatByTab.ts
index 3b0616ad61..abe36fa0ff 100644
--- a/frontend/src/plugins/ai/logic/useChatByTab.ts
+++ b/frontend/src/plugins/ai/logic/useChatByTab.ts
@@ -1,9 +1,9 @@
import { last } from "lodash-es";
import { computed, ref, watch } from "vue";
import { useSQLEditorTabStore } from "@/store";
-import { SQLEditorTab } from "@/types";
+import type { SQLEditorTab } from "@/types";
import { useConversationStore } from "../store";
-import { AIChatInfo, Conversation } from "../types";
+import type { AIChatInfo, Conversation } from "../types";
import { useAIContext } from "./context";
const chatsByTab = new Map<string, AIChatInfo>();
diff --git a/frontend/src/plugins/ai/logic/useDynamicSuggestions.ts b/frontend/src/plugins/ai/logic/useDynamicSuggestions.ts
index 943609c2f2..c03043368b 100644
--- a/frontend/src/plugins/ai/logic/useDynamicSuggestions.ts
+++ b/frontend/src/plugins/ai/logic/useDynamicSuggestions.ts
@@ -3,7 +3,7 @@ import { head, uniq, values } from "lodash-es";
import { computed, reactive, ref } from "vue";
import { hashCode } from "@/bbkit/BBUtil";
import { WebStorageHelper } from "@/utils";
-import { OpenAIMessage, OpenAIResponse } from "../types";
+import type { OpenAIMessage, OpenAIResponse } from "../types";
import { useAIContext } from "./context";
import { databaseMetadataToText } from "./utils";
diff --git a/frontend/src/plugins/ai/logic/utils.ts b/frontend/src/plugins/ai/logic/utils.ts
index 3b399a2c09..a7b7b8cf26 100644
--- a/frontend/src/plugins/ai/logic/utils.ts
+++ b/frontend/src/plugins/ai/logic/utils.ts
@@ -1,8 +1,8 @@
import { watch } from "vue";
import { useCurrentSQLEditorTab } from "@/store";
import type { SQLEditorConnection } from "@/types";
-import { Engine } from "@/types/proto/v1/common";
-import { DatabaseMetadata } from "@/types/proto/v1/database_service";
+import type { Engine } from "@/types/proto/v1/common";
+import type { DatabaseMetadata } from "@/types/proto/v1/database_service";
import { engineNameV1 } from "@/utils";
export const onConnectionChanged = (
diff --git a/frontend/src/plugins/ai/store/conversation.ts b/frontend/src/plugins/ai/store/conversation.ts
index 49076feb67..65212ec434 100644
--- a/frontend/src/plugins/ai/store/conversation.ts
+++ b/frontend/src/plugins/ai/store/conversation.ts
@@ -4,8 +4,8 @@ import PouchDB from "pouchdb";
import PouchDBFind from "pouchdb-find";
import { v1 as uuidv1 } from "uuid";
import { computed, reactive, ref, unref, watchEffect } from "vue";
-import { MaybeRef, SQLEditorConnection } from "@/types";
-import { Conversation, Message } from "../types";
+import type { MaybeRef, SQLEditorConnection } from "@/types";
+import type { Conversation, Message } from "../types";
type RowStatus = "NORMAL" | "ARCHIVED";
diff --git a/frontend/src/plugins/ai/types/context.ts b/frontend/src/plugins/ai/types/context.ts
index d8ddd19fd0..71c753d28a 100644
--- a/frontend/src/plugins/ai/types/context.ts
+++ b/frontend/src/plugins/ai/types/context.ts
@@ -1,8 +1,8 @@
import type Emittery from "emittery";
import type { Ref } from "vue";
-import { Engine } from "@/types/proto/v1/common";
+import type { Engine } from "@/types/proto/v1/common";
import type { DatabaseMetadata } from "@/types/proto/v1/database_service";
-import { Conversation } from "./conversation";
+import type { Conversation } from "./conversation";
export type AIContextEvents = Emittery<{
"apply-statement": { statement: string; run: boolean };
diff --git a/frontend/src/plugins/cel/logic/resolve.ts b/frontend/src/plugins/cel/logic/resolve.ts
index fc8645e150..77c78d81fd 100644
--- a/frontend/src/plugins/cel/logic/resolve.ts
+++ b/frontend/src/plugins/cel/logic/resolve.ts
@@ -1,4 +1,4 @@
-import { Expr as CELExpr } from "@/types/proto/google/api/expr/v1alpha1/syntax";
+import type { Expr as CELExpr } from "@/types/proto/google/api/expr/v1alpha1/syntax";
import type {
StringFactor,
Operator,
diff --git a/frontend/src/plugins/cel/logic/validate.ts b/frontend/src/plugins/cel/logic/validate.ts
index 3574463399..ab945b9ede 100644
--- a/frontend/src/plugins/cel/logic/validate.ts
+++ b/frontend/src/plugins/cel/logic/validate.ts
@@ -1,12 +1,6 @@
import { isNumber } from "lodash-es";
-import {
- ConditionExpr,
- ConditionGroupExpr,
- isEqualityExpr,
- isNumberFactor,
- isStringFactor,
- SimpleExpr,
-} from "../types";
+import type { ConditionExpr, ConditionGroupExpr, SimpleExpr } from "../types";
+import { isEqualityExpr, isNumberFactor, isStringFactor } from "../types";
import {
isCollectionExpr,
isConditionExpr,
diff --git a/frontend/src/plugins/cel/types/operator.ts b/frontend/src/plugins/cel/types/operator.ts
index 0c4bbb3118..dcba8adb77 100644
--- a/frontend/src/plugins/cel/types/operator.ts
+++ b/frontend/src/plugins/cel/types/operator.ts
@@ -1,5 +1,5 @@
import { uniq } from "lodash-es";
-import { Factor } from "./factor";
+import type { Factor } from "./factor";
export const NegativeOperatorList = ["!_"] as const;
export type NegativeOperator = (typeof NegativeOperatorList)[number];
diff --git a/frontend/src/plugins/cel/types/simple.ts b/frontend/src/plugins/cel/types/simple.ts
index 6ca7add195..4d96951f7e 100644
--- a/frontend/src/plugins/cel/types/simple.ts
+++ b/frontend/src/plugins/cel/types/simple.ts
@@ -1,6 +1,6 @@
/// Define a simplified version (less nested) of CEL Expr.
/// Convenient for local editing.
-import { NumberFactor, StringFactor, TimestampFactor } from "./factor";
+import type { NumberFactor, StringFactor, TimestampFactor } from "./factor";
import {
type LogicalOperator,
type EqualityOperator,
diff --git a/frontend/src/plugins/issue/template.ts b/frontend/src/plugins/issue/template.ts
index 62107ba4b9..0eeab434d8 100644
--- a/frontend/src/plugins/issue/template.ts
+++ b/frontend/src/plugins/issue/template.ts
@@ -1,3 +1,3 @@
-import { IssueType } from "@/types";
+import type { IssueType } from "@/types";
export type TemplateType = IssueType | "bb.issue.database.schema.baseline";
diff --git a/frontend/src/plugins/sql-lsp/client/useLegacyAutoComplete.ts b/frontend/src/plugins/sql-lsp/client/useLegacyAutoComplete.ts
index c7f547c65d..eee164a72d 100644
--- a/frontend/src/plugins/sql-lsp/client/useLegacyAutoComplete.ts
+++ b/frontend/src/plugins/sql-lsp/client/useLegacyAutoComplete.ts
@@ -1,23 +1,16 @@
import { computedAsync } from "@vueuse/core";
import type monaco from "monaco-editor";
-import { Ref, computed, watch } from "vue";
+import type { Ref } from "vue";
+import { computed, watch } from "vue";
import { useDBSchemaV1Store, useDatabaseV1Store } from "@/store";
-import {
- SQLDialect,
- UNKNOWN_ID,
- dialectOfEngineV1,
- unknownDatabase,
-} from "@/types";
+import type { SQLDialect } from "@/types";
+import { UNKNOWN_ID, dialectOfEngineV1, unknownDatabase } from "@/types";
import {
DatabaseMetadata,
DatabaseMetadataView,
} from "@/types/proto/v1/database_service";
-import {
- Table,
- type ConnectionScope,
- type MonacoModule,
- type Schema,
-} from "../types";
+import type { Table } from "../types";
+import { type ConnectionScope, type MonacoModule, type Schema } from "../types";
export type AutoCompleteContext = {
instance: string; // instances/{instance}
diff --git a/frontend/src/plugins/sql-lsp/server/complete/index.ts b/frontend/src/plugins/sql-lsp/server/complete/index.ts
index a3d7d214c2..281fb663c0 100644
--- a/frontend/src/plugins/sql-lsp/server/complete/index.ts
+++ b/frontend/src/plugins/sql-lsp/server/complete/index.ts
@@ -1,5 +1,5 @@
import type { Table, LanguageState } from "@sql-lsp/types";
-import { TextDocument } from "vscode-languageserver-textdocument";
+import type { TextDocument } from "vscode-languageserver-textdocument";
import type {
CompletionItem,
CompletionParams,
diff --git a/frontend/src/plugins/types.ts b/frontend/src/plugins/types.ts
index 5cdfdd1bab..b67fb59ee4 100644
--- a/frontend/src/plugins/types.ts
+++ b/frontend/src/plugins/types.ts
@@ -1,5 +1,11 @@
-import { Policy } from "@/types/proto/v1/org_policy_service";
-import { Database, Environment, Issue, IssueCreate, Principal } from "../types";
+import type { Policy } from "@/types/proto/v1/org_policy_service";
+import type {
+ Database,
+ Environment,
+ Issue,
+ IssueCreate,
+ Principal,
+} from "../types";
// Issue
// It has to be string type because the id for stage field contain multiple parts.
diff --git a/frontend/src/router/auth.ts b/frontend/src/router/auth.ts
index 21ad2677f7..1459e57299 100644
--- a/frontend/src/router/auth.ts
+++ b/frontend/src/router/auth.ts
@@ -1,4 +1,4 @@
-import { RouteRecordRaw } from "vue-router";
+import type { RouteRecordRaw } from "vue-router";
import SplashLayout from "@/layouts/SplashLayout.vue";
import { t } from "@/plugins/i18n";
diff --git a/frontend/src/router/dashboard/database.ts b/frontend/src/router/dashboard/database.ts
index 572e77b1d9..d8b0bdbdcb 100644
--- a/frontend/src/router/dashboard/database.ts
+++ b/frontend/src/router/dashboard/database.ts
@@ -1,4 +1,4 @@
-import { RouteRecordRaw } from "vue-router";
+import type { RouteRecordRaw } from "vue-router";
import { t } from "@/plugins/i18n";
import DashboardSidebar from "@/views/DashboardSidebar.vue";
import { DATABASE_ROUTE_DASHBOARD } from "./workspaceRoutes";
diff --git a/frontend/src/router/dashboard/environmentV1.ts b/frontend/src/router/dashboard/environmentV1.ts
index fba17c01a3..1e1c8c5571 100644
--- a/frontend/src/router/dashboard/environmentV1.ts
+++ b/frontend/src/router/dashboard/environmentV1.ts
@@ -1,4 +1,4 @@
-import { RouteLocationNormalized, RouteRecordRaw } from "vue-router";
+import type { RouteLocationNormalized, RouteRecordRaw } from "vue-router";
import { useEnvironmentV1Store } from "@/store";
import { environmentNamePrefix } from "@/store/modules/v1/common";
import { unknownEnvironment } from "@/types";
diff --git a/frontend/src/router/dashboard/index.ts b/frontend/src/router/dashboard/index.ts
index 544d5e4c81..3167b642fd 100644
--- a/frontend/src/router/dashboard/index.ts
+++ b/frontend/src/router/dashboard/index.ts
@@ -1,4 +1,4 @@
-import { RouteRecordRaw } from "vue-router";
+import type { RouteRecordRaw } from "vue-router";
import BodyLayout from "@/layouts/BodyLayout.vue";
import DashboardLayout from "@/layouts/DashboardLayout.vue";
import databaseRoutes from "./database";
diff --git a/frontend/src/router/dashboard/instance.ts b/frontend/src/router/dashboard/instance.ts
index 6668d800dd..574d2a5af1 100644
--- a/frontend/src/router/dashboard/instance.ts
+++ b/frontend/src/router/dashboard/instance.ts
@@ -1,4 +1,4 @@
-import { RouteRecordRaw } from "vue-router";
+import type { RouteRecordRaw } from "vue-router";
import InstanceLayout from "@/layouts/InstanceLayout.vue";
import DashboardSidebar from "@/views/DashboardSidebar.vue";
import { INSTANCE_ROUTE_DASHBOARD } from "./workspaceRoutes";
diff --git a/frontend/src/router/dashboard/issue.ts b/frontend/src/router/dashboard/issue.ts
index d78727ff1c..e4ab3902f1 100644
--- a/frontend/src/router/dashboard/issue.ts
+++ b/frontend/src/router/dashboard/issue.ts
@@ -1,4 +1,4 @@
-import { RouteRecordRaw } from "vue-router";
+import type { RouteRecordRaw } from "vue-router";
import ProjectSidebarV1 from "@/components/Project/ProjectSidebarV1.vue";
import { t } from "@/plugins/i18n";
import DashboardSidebar from "@/views/DashboardSidebar.vue";
diff --git a/frontend/src/router/dashboard/projectV1.ts b/frontend/src/router/dashboard/projectV1.ts
index c2227e7243..759c4a879a 100644
--- a/frontend/src/router/dashboard/projectV1.ts
+++ b/frontend/src/router/dashboard/projectV1.ts
@@ -1,4 +1,4 @@
-import { RouteRecordRaw } from "vue-router";
+import type { RouteRecordRaw } from "vue-router";
import ProjectSidebarV1 from "@/components/Project/ProjectSidebarV1.vue";
import { t } from "@/plugins/i18n";
import { PROJECT_V1_ROUTE_DASHBOARD } from "./workspaceRoutes";
diff --git a/frontend/src/router/dashboard/workspace.ts b/frontend/src/router/dashboard/workspace.ts
index 3e9f15a818..36fbe15345 100644
--- a/frontend/src/router/dashboard/workspace.ts
+++ b/frontend/src/router/dashboard/workspace.ts
@@ -1,5 +1,5 @@
import { startCase } from "lodash-es";
-import { RouteRecordRaw } from "vue-router";
+import type { RouteRecordRaw } from "vue-router";
import { t } from "@/plugins/i18n";
import Home from "@/views/Home.vue";
import SettingSidebar from "@/views/SettingSidebar.vue";
diff --git a/frontend/src/router/dashboard/workspaceSetting.ts b/frontend/src/router/dashboard/workspaceSetting.ts
index e51df9c58b..5911ff6d30 100644
--- a/frontend/src/router/dashboard/workspaceSetting.ts
+++ b/frontend/src/router/dashboard/workspaceSetting.ts
@@ -1,4 +1,4 @@
-import { RouteRecordRaw } from "vue-router";
+import type { RouteRecordRaw } from "vue-router";
import { t } from "@/plugins/i18n";
import SettingSidebar from "@/views/SettingSidebar.vue";
diff --git a/frontend/src/router/sqlEditor.ts b/frontend/src/router/sqlEditor.ts
index f91753e4ab..4acf99141f 100644
--- a/frontend/src/router/sqlEditor.ts
+++ b/frontend/src/router/sqlEditor.ts
@@ -1,4 +1,4 @@
-import { RouteRecordRaw } from "vue-router";
+import type { RouteRecordRaw } from "vue-router";
import SQLEditorLayout from "@/layouts/SQLEditorLayout.vue";
export const SQL_EDITOR_HOME_MODULE = "sql-editor.home";
diff --git a/frontend/src/shims-3rd-party.d.ts b/frontend/src/shims-3rd-party.d.ts
index 1c802c7308..7206cd9cd5 100644
--- a/frontend/src/shims-3rd-party.d.ts
+++ b/frontend/src/shims-3rd-party.d.ts
@@ -1,6 +1,6 @@
/* eslint-disable prettier/prettier */
declare module "pev2" {
- import { defineComponent } from "vue";
+ import type { defineComponent } from "vue";
const Plan: ReturnType<typeof defineComponent>;
export { Plan };
}
diff --git a/frontend/src/shims-vue-router.d.ts b/frontend/src/shims-vue-router.d.ts
index 9e8ff2c3f8..4fde4c911a 100644
--- a/frontend/src/shims-vue-router.d.ts
+++ b/frontend/src/shims-vue-router.d.ts
@@ -1,4 +1,4 @@
-import {
+import type {
QuickActionType,
ProjectPermission,
WorkspacePermission,
diff --git a/frontend/src/store/modules/auth.ts b/frontend/src/store/modules/auth.ts
index 7738866b2e..13354ff34c 100644
--- a/frontend/src/store/modules/auth.ts
+++ b/frontend/src/store/modules/auth.ts
@@ -3,13 +3,14 @@ import { isEqual } from "lodash-es";
import { defineStore } from "pinia";
import { computed } from "vue";
import { authServiceClient } from "@/grpcweb";
-import { SignupInfo, ActivateInfo, unknownUser, PresetRoleType } from "@/types";
-import {
+import type { SignupInfo, ActivateInfo } from "@/types";
+import { unknownUser, PresetRoleType } from "@/types";
+import type {
LoginRequest,
LoginResponse,
User,
- UserType,
} from "@/types/proto/v1/auth_service";
+import { UserType } from "@/types/proto/v1/auth_service";
import { getIntCookie } from "@/utils";
import { useUserStore } from ".";
diff --git a/frontend/src/store/modules/branch.ts b/frontend/src/store/modules/branch.ts
index 5af8c3a529..ba42483b5b 100644
--- a/frontend/src/store/modules/branch.ts
+++ b/frontend/src/store/modules/branch.ts
@@ -1,13 +1,13 @@
import { defineStore } from "pinia";
import { ref, unref, watchEffect } from "vue";
import { branchServiceClient } from "@/grpcweb";
-import { MaybeRef } from "@/types";
-import {
+import type { MaybeRef } from "@/types";
+import type {
MergeBranchRequest,
Branch,
- BranchView,
RebaseBranchRequest,
} from "@/types/proto/v1/branch_service";
+import { BranchView } from "@/types/proto/v1/branch_service";
import { useCache } from "../cache";
type BranchCacheKey = [string /* name */, BranchView];
diff --git a/frontend/src/store/modules/command.ts b/frontend/src/store/modules/command.ts
index 3d02de3f47..0f273ebcfb 100644
--- a/frontend/src/store/modules/command.ts
+++ b/frontend/src/store/modules/command.ts
@@ -1,6 +1,11 @@
import { defineStore } from "pinia";
import { onMounted, onUnmounted } from "vue";
-import { Command, CommandId, CommandRegisterId, CommandState } from "@/types";
+import type {
+ Command,
+ CommandId,
+ CommandRegisterId,
+ CommandState,
+} from "@/types";
export const useCommandStore = defineStore("command", {
state: (): CommandState => ({
diff --git a/frontend/src/store/modules/dbGroup.ts b/frontend/src/store/modules/dbGroup.ts
index b7ea92e7ce..56c9413617 100644
--- a/frontend/src/store/modules/dbGroup.ts
+++ b/frontend/src/store/modules/dbGroup.ts
@@ -1,16 +1,17 @@
import { computedAsync } from "@vueuse/core";
import { isEqual } from "lodash-es";
import { defineStore } from "pinia";
-import { MaybeRef, computed, ref, unref } from "vue";
+import type { MaybeRef } from "vue";
+import { computed, ref, unref } from "vue";
import { projectServiceClient } from "@/grpcweb";
+import type { ConditionGroupExpr } from "@/plugins/cel";
import {
- ConditionGroupExpr,
buildCELExpr,
emptySimpleExpr,
resolveCELExpr,
wrapAsGroup,
} from "@/plugins/cel";
-import {
+import type {
ComposedSchemaGroupTable,
ComposedDatabaseGroup,
ComposedSchemaGroup,
@@ -20,11 +21,13 @@ import {
import { unknownEnvironment } from "@/types";
import { ParsedExpr } from "@/types/proto/google/api/expr/v1alpha1/syntax";
import { Expr } from "@/types/proto/google/type/expr";
-import { Environment } from "@/types/proto/v1/environment_service";
-import {
+import type { Environment } from "@/types/proto/v1/environment_service";
+import type {
DatabaseGroup,
- DatabaseGroupView,
SchemaGroup,
+} from "@/types/proto/v1/project_service";
+import {
+ DatabaseGroupView,
TenantMode,
} from "@/types/proto/v1/project_service";
import {
diff --git a/frontend/src/store/modules/export.ts b/frontend/src/store/modules/export.ts
index 2c1dd0c0e6..61326237d7 100644
--- a/frontend/src/store/modules/export.ts
+++ b/frontend/src/store/modules/export.ts
@@ -1,5 +1,5 @@
import { useSQLStore } from "@/store";
-import { ExportFormat } from "@/types/proto/v1/common";
+import type { ExportFormat } from "@/types/proto/v1/common";
import { extractDatabaseResourceName } from "@/utils";
export type ExportDataParams = {
diff --git a/frontend/src/store/modules/idp.ts b/frontend/src/store/modules/idp.ts
index 0dd553e2d6..9011ca7534 100644
--- a/frontend/src/store/modules/idp.ts
+++ b/frontend/src/store/modules/idp.ts
@@ -2,7 +2,7 @@ import { isEqual, isUndefined } from "lodash-es";
import { defineStore } from "pinia";
import { identityProviderClient } from "@/grpcweb";
import { State } from "@/types/proto/v1/common";
-import { IdentityProvider } from "@/types/proto/v1/idp_service";
+import type { IdentityProvider } from "@/types/proto/v1/idp_service";
interface IdentityProviderState {
identityProviderMapByName: Map<string, IdentityProvider>;
diff --git a/frontend/src/store/modules/notification.ts b/frontend/src/store/modules/notification.ts
index 6a03a34055..fcf43a2a08 100644
--- a/frontend/src/store/modules/notification.ts
+++ b/frontend/src/store/modules/notification.ts
@@ -1,6 +1,6 @@
import { defineStore } from "pinia";
import { v1 as uuidv1 } from "uuid";
-import {
+import type {
Notification,
NotificationCreate,
NotificationFilter,
diff --git a/frontend/src/store/modules/risk.ts b/frontend/src/store/modules/risk.ts
index 6e356d9ca5..08ac70f7fa 100644
--- a/frontend/src/store/modules/risk.ts
+++ b/frontend/src/store/modules/risk.ts
@@ -1,7 +1,7 @@
import { defineStore } from "pinia";
import { ref } from "vue";
import { riskServiceClient } from "@/grpcweb";
-import { Risk } from "@/types/proto/v1/risk_service";
+import type { Risk } from "@/types/proto/v1/risk_service";
export const useRiskStore = defineStore("risk", () => {
const riskList = ref<Risk[]>([]);
diff --git a/frontend/src/store/modules/role.ts b/frontend/src/store/modules/role.ts
index 55e17d5573..a3f4167754 100644
--- a/frontend/src/store/modules/role.ts
+++ b/frontend/src/store/modules/role.ts
@@ -1,7 +1,7 @@
import { defineStore } from "pinia";
import { ref } from "vue";
import { roleServiceClient } from "@/grpcweb";
-import { Role } from "@/types/proto/v1/role_service";
+import type { Role } from "@/types/proto/v1/role_service";
import { extractRoleResourceName } from "@/utils";
import { useGracefulRequest } from "./utils";
diff --git a/frontend/src/store/modules/router.ts b/frontend/src/store/modules/router.ts
index 1818054b8d..099a0c64b9 100644
--- a/frontend/src/store/modules/router.ts
+++ b/frontend/src/store/modules/router.ts
@@ -1,6 +1,6 @@
import { defineStore } from "pinia";
-import { RouteLocationNormalized } from "vue-router";
-import { RouterSlug } from "@/types";
+import type { RouteLocationNormalized } from "vue-router";
+import type { RouterSlug } from "@/types";
export const useRouterStore = defineStore("router", {
// need not to initialize a state since we store everything into localStorage
diff --git a/frontend/src/store/modules/slowQuery.ts b/frontend/src/store/modules/slowQuery.ts
index 75c49df5ae..9d717647d8 100644
--- a/frontend/src/store/modules/slowQuery.ts
+++ b/frontend/src/store/modules/slowQuery.ts
@@ -1,7 +1,7 @@
import { defineStore } from "pinia";
import { databaseServiceClient, instanceServiceClient } from "@/grpcweb";
-import { ComposedSlowQueryLog, ComposedDatabase } from "@/types";
-import {
+import type { ComposedSlowQueryLog, ComposedDatabase } from "@/types";
+import type {
ListSlowQueriesRequest,
SlowQueryLog,
} from "@/types/proto/v1/database_service";
diff --git a/frontend/src/store/modules/slowQueryPolicy.ts b/frontend/src/store/modules/slowQueryPolicy.ts
index e8d79cf395..a62c4db8bd 100644
--- a/frontend/src/store/modules/slowQueryPolicy.ts
+++ b/frontend/src/store/modules/slowQueryPolicy.ts
@@ -1,8 +1,8 @@
import { defineStore } from "pinia";
import { computed, ref, watchEffect } from "vue";
import { UNKNOWN_USER_NAME } from "@/types";
+import type { Policy } from "@/types/proto/v1/org_policy_service";
import {
- Policy,
PolicyType,
PolicyResourceType,
} from "@/types/proto/v1/org_policy_service";
diff --git a/frontend/src/store/modules/sqlEditor/editor.ts b/frontend/src/store/modules/sqlEditor/editor.ts
index 5a17c39e5e..61b874a446 100644
--- a/frontend/src/store/modules/sqlEditor/editor.ts
+++ b/frontend/src/store/modules/sqlEditor/editor.ts
@@ -1,7 +1,7 @@
import { useLocalStorage } from "@vueuse/core";
import { defineStore } from "pinia";
import { computed, ref, watch } from "vue";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { hasWorkspacePermissionV2 } from "@/utils";
import { useCurrentUserV1 } from "../auth";
import { useProjectV1Store } from "../v1";
diff --git a/frontend/src/store/modules/sqlEditor/queryHistory.ts b/frontend/src/store/modules/sqlEditor/queryHistory.ts
index 1efd944deb..4a0e9cda66 100644
--- a/frontend/src/store/modules/sqlEditor/queryHistory.ts
+++ b/frontend/src/store/modules/sqlEditor/queryHistory.ts
@@ -1,7 +1,7 @@
import { defineStore } from "pinia";
import { ref } from "vue";
import { sqlServiceClient } from "@/grpcweb";
-import { QueryHistory } from "@/types/proto/v1/sql_service";
+import type { QueryHistory } from "@/types/proto/v1/sql_service";
export const useSQLEditorQueryHistoryStore = defineStore(
"sqlEditorQueryHistory",
diff --git a/frontend/src/store/modules/sqlEditor/tab.ts b/frontend/src/store/modules/sqlEditor/tab.ts
index aea6c9cc9a..95b31d2dde 100644
--- a/frontend/src/store/modules/sqlEditor/tab.ts
+++ b/frontend/src/store/modules/sqlEditor/tab.ts
@@ -1,14 +1,15 @@
-import { MaybeRef, useLocalStorage, watchThrottled } from "@vueuse/core";
+import type { MaybeRef } from "@vueuse/core";
+import { useLocalStorage, watchThrottled } from "@vueuse/core";
import { head, pick, uniqBy } from "lodash-es";
import { defineStore, storeToRefs } from "pinia";
import { computed, reactive, unref } from "vue";
-import {
+import type {
SQLEditorConnection,
SQLEditorTreeNodeMeta,
CoreSQLEditorTab,
SQLEditorTab,
- UNKNOWN_ID,
} from "@/types";
+import { UNKNOWN_ID } from "@/types";
import {
WebStorageHelper,
defaultSQLEditorTab,
diff --git a/frontend/src/store/modules/sqlEditor/tree.ts b/frontend/src/store/modules/sqlEditor/tree.ts
index 8b5aa222a9..dccb983b15 100644
--- a/frontend/src/store/modules/sqlEditor/tree.ts
+++ b/frontend/src/store/modules/sqlEditor/tree.ts
@@ -3,7 +3,7 @@ import { cloneDeep, isFunction, orderBy } from "lodash-es";
import { defineStore, storeToRefs } from "pinia";
import { v4 as uuidv4 } from "uuid";
import { computed, reactive, ref, watch } from "vue";
-import {
+import type {
ComposedDatabase,
ComposedInstance,
ComposedProject,
@@ -12,20 +12,22 @@ import {
SQLEditorTreeNodeTarget as NodeTarget,
SQLEditorTreeNodeType as NodeType,
SQLEditorTreeState as TreeState,
- isValidSQLEditorTreeFactor as isValidFactor,
- extractSQLEditorLabelFactor as extractLabelFactor,
- unknownEnvironment,
RichSchemaMetadata,
RichTableMetadata,
StatefulSQLEditorTreeFactor as StatefulFactor,
- LeafTreeNodeTypes,
- DEFAULT_PROJECT_V1_NAME,
RichViewMetadata,
TextTarget,
RichPartitionTableMetadata,
RichExternalTableMetadata,
} from "@/types";
-import { Environment } from "@/types/proto/v1/environment_service";
+import {
+ isValidSQLEditorTreeFactor as isValidFactor,
+ extractSQLEditorLabelFactor as extractLabelFactor,
+ unknownEnvironment,
+ LeafTreeNodeTypes,
+ DEFAULT_PROJECT_V1_NAME,
+} from "@/types";
+import type { Environment } from "@/types/proto/v1/environment_service";
import { getSemanticLabelValue, groupBy } from "@/utils";
import { useFilterStore } from "../filter";
import {
diff --git a/frontend/src/store/modules/sqlEditor/webTerminal.ts b/frontend/src/store/modules/sqlEditor/webTerminal.ts
index f63fa9f1e7..9bec5e42d9 100644
--- a/frontend/src/store/modules/sqlEditor/webTerminal.ts
+++ b/frontend/src/store/modules/sqlEditor/webTerminal.ts
@@ -2,10 +2,11 @@ import Emittery from "emittery";
import { uniqueId } from "lodash-es";
import { ClientError, Status } from "nice-grpc-common";
import { defineStore } from "pinia";
-import { fromEventPattern, map, Observable, Subscription } from "rxjs";
+import type { Subscription } from "rxjs";
+import { fromEventPattern, map, Observable } from "rxjs";
import { markRaw, ref, shallowRef } from "vue";
import { useCancelableTimeout } from "@/composables/useCancelableTimeout";
-import {
+import type {
SQLResultSetV1,
StreamingQueryController,
SQLEditorTab,
diff --git a/frontend/src/store/modules/sqlReview.ts b/frontend/src/store/modules/sqlReview.ts
index 9ec42bcf85..61cdc4acce 100644
--- a/frontend/src/store/modules/sqlReview.ts
+++ b/frontend/src/store/modules/sqlReview.ts
@@ -5,19 +5,21 @@ import {
policyNamePrefix,
environmentNamePrefix,
} from "@/store/modules/v1/common";
-import {
+import type {
PolicyId,
SchemaPolicyRule,
SQLReviewPolicy,
IdType,
MaybeRef,
} from "@/types";
-import { Environment } from "@/types/proto/v1/environment_service";
+import type { Environment } from "@/types/proto/v1/environment_service";
+import type {
+ Policy,
+ SQLReviewPolicy as SQLReviewPolicyV1,
+} from "@/types/proto/v1/org_policy_service";
import {
PolicyType,
- Policy,
policyTypeToJSON,
- SQLReviewPolicy as SQLReviewPolicyV1,
PolicyResourceType,
} from "@/types/proto/v1/org_policy_service";
import { extractEnvironmentResourceName } from "@/utils";
diff --git a/frontend/src/store/modules/user.ts b/frontend/src/store/modules/user.ts
index dd0b320132..e94e44be19 100644
--- a/frontend/src/store/modules/user.ts
+++ b/frontend/src/store/modules/user.ts
@@ -1,17 +1,10 @@
import { isEqual, isUndefined } from "lodash-es";
import { defineStore } from "pinia";
import { authServiceClient } from "@/grpcweb";
-import {
- ALL_USERS_USER_ID,
- ALL_USERS_USER_EMAIL,
- PrincipalType,
- allUsersUser,
-} from "@/types";
-import {
- UpdateUserRequest,
- User,
- UserType,
-} from "@/types/proto/v1/auth_service";
+import type { PrincipalType } from "@/types";
+import { ALL_USERS_USER_ID, ALL_USERS_USER_EMAIL, allUsersUser } from "@/types";
+import type { UpdateUserRequest, User } from "@/types/proto/v1/auth_service";
+import { UserType } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
import { extractUserUID } from "@/utils";
import { userNamePrefix, getUserEmailFromIdentifier } from "./v1/common";
diff --git a/frontend/src/store/modules/v1/activity.ts b/frontend/src/store/modules/v1/activity.ts
index 1a54e5fdac..7dd6aea8d9 100644
--- a/frontend/src/store/modules/v1/activity.ts
+++ b/frontend/src/store/modules/v1/activity.ts
@@ -3,16 +3,11 @@ import utc from "dayjs/plugin/utc";
import { defineStore } from "pinia";
import { reactive } from "vue";
import { loggingServiceClient } from "@/grpcweb";
+import type { IdType, FindActivityMessage, ComposedIssue } from "@/types";
+import { UNKNOWN_ID, EMPTY_ID } from "@/types";
+import type { ExportFormat } from "@/types/proto/v1/common";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
import {
- IdType,
- FindActivityMessage,
- UNKNOWN_ID,
- EMPTY_ID,
- ComposedIssue,
-} from "@/types";
-import { ExportFormat } from "@/types/proto/v1/common";
-import {
- LogEntity,
logEntity_ActionToJSON,
logEntity_LevelToJSON,
} from "@/types/proto/v1/logging_service";
diff --git a/frontend/src/store/modules/v1/actuator.ts b/frontend/src/store/modules/v1/actuator.ts
index cc5ee71544..82839f0e23 100644
--- a/frontend/src/store/modules/v1/actuator.ts
+++ b/frontend/src/store/modules/v1/actuator.ts
@@ -1,12 +1,12 @@
-import { RemovableRef } from "@vueuse/core";
+import type { RemovableRef } from "@vueuse/core";
import { useLocalStorage } from "@vueuse/core";
import axios from "axios";
import { defineStore, storeToRefs } from "pinia";
import { watchEffect } from "vue";
import { actuatorServiceClient } from "@/grpcweb";
import { useSilentRequest } from "@/plugins/silent-request";
-import { Release, ReleaseInfo } from "@/types";
-import {
+import type { Release, ReleaseInfo } from "@/types";
+import type {
ActuatorInfo,
ResourcePackage,
DebugLog,
diff --git a/frontend/src/store/modules/v1/anomaly.ts b/frontend/src/store/modules/v1/anomaly.ts
index 225794f463..2d7223f903 100644
--- a/frontend/src/store/modules/v1/anomaly.ts
+++ b/frontend/src/store/modules/v1/anomaly.ts
@@ -1,8 +1,8 @@
import { defineStore } from "pinia";
import { computed, ref, unref, watch } from "vue";
import { anomalyServiceClient } from "@/grpcweb";
-import { FindAnomalyMessage, MaybeRef } from "@/types";
-import { Anomaly } from "@/types/proto/v1/anomaly_service";
+import type { FindAnomalyMessage, MaybeRef } from "@/types";
+import type { Anomaly } from "@/types/proto/v1/anomaly_service";
const buildFilter = (find: FindAnomalyMessage): string => {
const filter: string[] = [];
diff --git a/frontend/src/store/modules/v1/changeHistory.ts b/frontend/src/store/modules/v1/changeHistory.ts
index 3d7c35229f..ac95d5b6ca 100644
--- a/frontend/src/store/modules/v1/changeHistory.ts
+++ b/frontend/src/store/modules/v1/changeHistory.ts
@@ -3,13 +3,15 @@ import { reactive } from "vue";
import { databaseServiceClient } from "@/grpcweb";
import { useCache } from "@/store/cache";
import { UNKNOWN_ID } from "@/types";
-import {
+import type {
ChangeHistory,
- ChangeHistoryView,
- ChangeHistory_Type,
GetChangeHistoryRequest,
ListChangeHistoriesRequest,
} from "@/types/proto/v1/database_service";
+import {
+ ChangeHistoryView,
+ ChangeHistory_Type,
+} from "@/types/proto/v1/database_service";
import { extractChangeHistoryUID } from "@/utils";
type CacheKeyType = [string /* name */, ChangeHistoryView];
diff --git a/frontend/src/store/modules/v1/changelist.ts b/frontend/src/store/modules/v1/changelist.ts
index 99f646cc19..21e710ab73 100644
--- a/frontend/src/store/modules/v1/changelist.ts
+++ b/frontend/src/store/modules/v1/changelist.ts
@@ -1,7 +1,7 @@
import { defineStore } from "pinia";
import { reactive } from "vue";
import { changelistServiceClient } from "@/grpcweb";
-import {
+import type {
Changelist,
Changelist_Change as Change,
CreateChangelistRequest,
diff --git a/frontend/src/store/modules/v1/common.ts b/frontend/src/store/modules/v1/common.ts
index 8ffba0eeab..563c6aedb0 100644
--- a/frontend/src/store/modules/v1/common.ts
+++ b/frontend/src/store/modules/v1/common.ts
@@ -1,4 +1,5 @@
-import { ResourceId, UNKNOWN_ID, Project, SheetId } from "@/types";
+import type { ResourceId, Project, SheetId } from "@/types";
+import { UNKNOWN_ID } from "@/types";
export const userNamePrefix = "users/";
export const environmentNamePrefix = "environments/";
diff --git a/frontend/src/store/modules/v1/database.ts b/frontend/src/store/modules/v1/database.ts
index ce73871a72..6a203373af 100644
--- a/frontend/src/store/modules/v1/database.ts
+++ b/frontend/src/store/modules/v1/database.ts
@@ -2,12 +2,10 @@ import { uniq } from "lodash-es";
import { defineStore } from "pinia";
import { computed, reactive, ref, unref, watch } from "vue";
import { databaseServiceClient } from "@/grpcweb";
+import type { ComposedInstance, ComposedDatabase, MaybeRef } from "@/types";
import {
- ComposedInstance,
- ComposedDatabase,
emptyDatabase,
EMPTY_ID,
- MaybeRef,
unknownDatabase,
unknownEnvironment,
unknownInstance,
@@ -15,8 +13,8 @@ import {
UNKNOWN_INSTANCE_NAME,
} from "@/types";
import { DEFAULT_PROJECT_V1_NAME } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
-import {
+import type { User } from "@/types/proto/v1/auth_service";
+import type {
Database,
UpdateDatabaseRequest,
DiffSchemaRequest,
diff --git a/frontend/src/store/modules/v1/databaseSecret.ts b/frontend/src/store/modules/v1/databaseSecret.ts
index 06fcbf0bfb..c6363ce137 100644
--- a/frontend/src/store/modules/v1/databaseSecret.ts
+++ b/frontend/src/store/modules/v1/databaseSecret.ts
@@ -2,7 +2,7 @@ import { Status } from "nice-grpc-common";
import { defineStore } from "pinia";
import { reactive } from "vue";
import { databaseServiceClient } from "@/grpcweb";
-import { Secret } from "@/types/proto/v1/database_service";
+import type { Secret } from "@/types/proto/v1/database_service";
import { secretNamePrefix } from "./common";
export const useDatabaseSecretStore = defineStore("database-secret", () => {
diff --git a/frontend/src/store/modules/v1/dbSchema.ts b/frontend/src/store/modules/v1/dbSchema.ts
index 92cdb78fda..50084765fd 100644
--- a/frontend/src/store/modules/v1/dbSchema.ts
+++ b/frontend/src/store/modules/v1/dbSchema.ts
@@ -2,10 +2,11 @@ import { defineStore } from "pinia";
import { computed, unref, watchEffect } from "vue";
import { databaseServiceClient } from "@/grpcweb";
import { useCache } from "@/store/cache";
-import { MaybeRef, UNKNOWN_ID, EMPTY_ID, UNKNOWN_INSTANCE_NAME } from "@/types";
+import type { MaybeRef } from "@/types";
+import { UNKNOWN_ID, EMPTY_ID, UNKNOWN_INSTANCE_NAME } from "@/types";
+import type { TableMetadata } from "@/types/proto/v1/database_service";
import {
DatabaseMetadata,
- TableMetadata,
DatabaseMetadataView,
} from "@/types/proto/v1/database_service";
import { extractDatabaseResourceName } from "@/utils";
diff --git a/frontend/src/store/modules/v1/deploymentConfig.ts b/frontend/src/store/modules/v1/deploymentConfig.ts
index 32e563e79f..c47b15742f 100644
--- a/frontend/src/store/modules/v1/deploymentConfig.ts
+++ b/frontend/src/store/modules/v1/deploymentConfig.ts
@@ -1,8 +1,8 @@
import { defineStore } from "pinia";
import { computed, reactive, ref, unref, watchEffect } from "vue";
import { projectServiceClient } from "@/grpcweb";
-import { MaybeRef, ResourceId } from "@/types";
-import { DeploymentConfig } from "@/types/proto/v1/project_service";
+import type { MaybeRef, ResourceId } from "@/types";
+import type { DeploymentConfig } from "@/types/proto/v1/project_service";
export const useDeploymentConfigV1Store = defineStore(
"deploymentConfig_v1",
diff --git a/frontend/src/store/modules/v1/environment.ts b/frontend/src/store/modules/v1/environment.ts
index b7a2bb4e43..3901c27066 100644
--- a/frontend/src/store/modules/v1/environment.ts
+++ b/frontend/src/store/modules/v1/environment.ts
@@ -3,12 +3,11 @@ import { defineStore } from "pinia";
import { computed } from "vue";
import { environmentServiceClient } from "@/grpcweb";
import { environmentNamePrefix } from "@/store/modules/v1/common";
-import { ResourceId, unknownEnvironment } from "@/types";
+import type { ResourceId } from "@/types";
+import { unknownEnvironment } from "@/types";
import { State } from "@/types/proto/v1/common";
-import {
- Environment,
- EnvironmentTier,
-} from "@/types/proto/v1/environment_service";
+import type { Environment } from "@/types/proto/v1/environment_service";
+import { EnvironmentTier } from "@/types/proto/v1/environment_service";
interface EnvironmentState {
environmentMapByName: Map<ResourceId, Environment>;
diff --git a/frontend/src/store/modules/v1/experimental-issue.ts b/frontend/src/store/modules/v1/experimental-issue.ts
index f1111d15ec..731bdfeb8a 100644
--- a/frontend/src/store/modules/v1/experimental-issue.ts
+++ b/frontend/src/store/modules/v1/experimental-issue.ts
@@ -1,8 +1,7 @@
import { issueServiceClient, rolloutServiceClient } from "@/grpcweb";
import { useCurrentUserV1, useProjectV1Store, useUserStore } from "@/store";
+import type { ComposedIssue, ComposedProject } from "@/types";
import {
- ComposedIssue,
- ComposedProject,
emptyIssue,
emptyRollout,
unknownUser,
@@ -12,8 +11,8 @@ import {
UNKNOWN_ID,
UNKNOWN_ISSUE_NAME,
} from "@/types";
-import { Issue } from "@/types/proto/v1/issue_service";
-import { Plan, Rollout } from "@/types/proto/v1/rollout_service";
+import type { Issue } from "@/types/proto/v1/issue_service";
+import type { Plan, Rollout } from "@/types/proto/v1/rollout_service";
import {
extractProjectResourceName,
extractUserResourceName,
diff --git a/frontend/src/store/modules/v1/instance.ts b/frontend/src/store/modules/v1/instance.ts
index d05f6050c6..ee3058c70d 100644
--- a/frontend/src/store/modules/v1/instance.ts
+++ b/frontend/src/store/modules/v1/instance.ts
@@ -3,19 +3,18 @@ import { computed, reactive, ref, unref, watch, watchEffect } from "vue";
import { instanceRoleServiceClient, instanceServiceClient } from "@/grpcweb";
import { useCurrentUserV1 } from "@/store";
import { projectNamePrefix } from "@/store/modules/v1/common";
+import type { ComposedInstance, MaybeRef } from "@/types";
import {
- ComposedInstance,
emptyInstance,
EMPTY_ID,
- MaybeRef,
unknownEnvironment,
unknownInstance,
UNKNOWN_ID,
UNKNOWN_INSTANCE_NAME,
} from "@/types";
import { State } from "@/types/proto/v1/common";
-import { InstanceRole } from "@/types/proto/v1/instance_role_service";
-import { DataSource, Instance } from "@/types/proto/v1/instance_service";
+import type { InstanceRole } from "@/types/proto/v1/instance_role_service";
+import type { DataSource, Instance } from "@/types/proto/v1/instance_service";
import { extractInstanceResourceName, hasWorkspacePermissionV2 } from "@/utils";
import { extractGrpcErrorMessage } from "@/utils/grpcweb";
import { useEnvironmentV1Store } from "./environment";
diff --git a/frontend/src/store/modules/v1/issue.ts b/frontend/src/store/modules/v1/issue.ts
index f8b069db7c..5265ff0cd2 100644
--- a/frontend/src/store/modules/v1/issue.ts
+++ b/frontend/src/store/modules/v1/issue.ts
@@ -1,19 +1,19 @@
import dayjs from "dayjs";
import { uniq } from "lodash-es";
import { defineStore } from "pinia";
-import { ref, watch, WatchCallback } from "vue";
+import type { WatchCallback } from "vue";
+import { ref, watch } from "vue";
import { issueServiceClient } from "@/grpcweb";
-import {
+import type {
ActivityIssueCommentCreatePayload,
ComposedIssue,
IssueFilter,
- PresetRoleType,
- UNKNOWN_PROJECT_NAME,
} from "@/types";
+import { PresetRoleType, UNKNOWN_PROJECT_NAME } from "@/types";
import { UserType } from "@/types/proto/v1/auth_service";
+import type { ApprovalStep } from "@/types/proto/v1/issue_service";
import {
issueStatusToJSON,
- ApprovalStep,
ApprovalNode_Type,
ApprovalNode_GroupValue,
} from "@/types/proto/v1/issue_service";
diff --git a/frontend/src/store/modules/v1/localSheet.ts b/frontend/src/store/modules/v1/localSheet.ts
index 39198ba975..03da35c3e8 100644
--- a/frontend/src/store/modules/v1/localSheet.ts
+++ b/frontend/src/store/modules/v1/localSheet.ts
@@ -1,6 +1,7 @@
import { defineStore } from "pinia";
import { reactive } from "vue";
-import { Sheet, DeepPartial } from "@/types/proto/v1/sheet_service";
+import type { DeepPartial } from "@/types/proto/v1/sheet_service";
+import { Sheet } from "@/types/proto/v1/sheet_service";
import { extractProjectResourceName } from "@/utils";
import { useSheetV1Store } from "./sheet";
diff --git a/frontend/src/store/modules/v1/policy.ts b/frontend/src/store/modules/v1/policy.ts
index 3efbbe4b4e..91e48c6b05 100644
--- a/frontend/src/store/modules/v1/policy.ts
+++ b/frontend/src/store/modules/v1/policy.ts
@@ -2,9 +2,10 @@ import { defineStore } from "pinia";
import { computed, unref, watchEffect } from "vue";
import { policyServiceClient } from "@/grpcweb";
import { policyNamePrefix } from "@/store/modules/v1/common";
-import { MaybeRef, UNKNOWN_USER_NAME, VirtualRoleType } from "@/types";
+import type { MaybeRef } from "@/types";
+import { UNKNOWN_USER_NAME, VirtualRoleType } from "@/types";
+import type { Policy } from "@/types/proto/v1/org_policy_service";
import {
- Policy,
PolicyType,
PolicyResourceType,
policyTypeToJSON,
diff --git a/frontend/src/store/modules/v1/project.ts b/frontend/src/store/modules/v1/project.ts
index ce578e5a97..3f81f5f114 100644
--- a/frontend/src/store/modules/v1/project.ts
+++ b/frontend/src/store/modules/v1/project.ts
@@ -1,19 +1,17 @@
import { defineStore } from "pinia";
import { computed, reactive, ref, unref, watchEffect } from "vue";
import { projectServiceClient } from "@/grpcweb";
+import type { ComposedProject, MaybeRef, ResourceId } from "@/types";
import {
- ComposedProject,
emptyProject,
EMPTY_ID,
EMPTY_PROJECT_NAME,
- MaybeRef,
- ResourceId,
unknownProject,
UNKNOWN_ID,
UNKNOWN_PROJECT_NAME,
} from "@/types";
import { State } from "@/types/proto/v1/common";
-import { Project } from "@/types/proto/v1/project_service";
+import type { Project } from "@/types/proto/v1/project_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import { useCurrentUserV1 } from "../auth";
import { projectNamePrefix } from "./common";
diff --git a/frontend/src/store/modules/v1/projectIamPolicy.ts b/frontend/src/store/modules/v1/projectIamPolicy.ts
index 931596bd6b..b474931074 100644
--- a/frontend/src/store/modules/v1/projectIamPolicy.ts
+++ b/frontend/src/store/modules/v1/projectIamPolicy.ts
@@ -2,12 +2,8 @@ import { isUndefined, uniq } from "lodash-es";
import { defineStore } from "pinia";
import { computed, ref, unref, watch, watchEffect } from "vue";
import { projectServiceClient } from "@/grpcweb";
-import {
- ALL_USERS_USER_EMAIL,
- ComposedDatabase,
- MaybeRef,
- PresetRoleType,
-} from "@/types";
+import type { ComposedDatabase, MaybeRef } from "@/types";
+import { ALL_USERS_USER_EMAIL, PresetRoleType } from "@/types";
import { IamPolicy } from "@/types/proto/v1/iam_policy";
import {
hasWorkspacePermissionV2,
diff --git a/frontend/src/store/modules/v1/projectProtectionRoles.ts b/frontend/src/store/modules/v1/projectProtectionRoles.ts
index 23c5036809..6d4ec1276d 100644
--- a/frontend/src/store/modules/v1/projectProtectionRoles.ts
+++ b/frontend/src/store/modules/v1/projectProtectionRoles.ts
@@ -2,11 +2,11 @@ import { defineStore } from "pinia";
import { computed, watchEffect } from "vue";
import { projectServiceClient } from "@/grpcweb";
import { useCache } from "@/store/cache";
-import {
+import type {
ProtectionRule,
- ProtectionRule_Target,
ProtectionRules,
} from "@/types/proto/v1/project_service";
+import { ProtectionRule_Target } from "@/types/proto/v1/project_service";
import { protectionRulesSuffix } from "./common";
type ProjectProtectionRuleCacheKey = [
diff --git a/frontend/src/store/modules/v1/projectWebhook.ts b/frontend/src/store/modules/v1/projectWebhook.ts
index e439811b4a..fb4ac83d66 100644
--- a/frontend/src/store/modules/v1/projectWebhook.ts
+++ b/frontend/src/store/modules/v1/projectWebhook.ts
@@ -1,7 +1,7 @@
import { defineStore } from "pinia";
import { projectServiceClient } from "@/grpcweb";
-import { IdType } from "@/types";
-import { Project, Webhook } from "@/types/proto/v1/project_service";
+import type { IdType } from "@/types";
+import type { Project, Webhook } from "@/types/proto/v1/project_service";
import { extractProjectWebhookID } from "@/utils";
import { useProjectV1Store } from "./project";
diff --git a/frontend/src/store/modules/v1/repository.ts b/frontend/src/store/modules/v1/repository.ts
index 16518f7140..4fd77d17ba 100644
--- a/frontend/src/store/modules/v1/repository.ts
+++ b/frontend/src/store/modules/v1/repository.ts
@@ -2,8 +2,8 @@ import { isEqual, isUndefined } from "lodash-es";
import { defineStore } from "pinia";
import { reactive } from "vue";
import { projectServiceClient, vcsProviderServiceClient } from "@/grpcweb";
-import { ComposedRepository } from "@/types";
-import { ProjectGitOpsInfo } from "@/types/proto/v1/vcs_provider_service";
+import type { ComposedRepository } from "@/types";
+import type { ProjectGitOpsInfo } from "@/types/proto/v1/vcs_provider_service";
import { getProjectPathFromRepoName } from "./common";
import { useProjectV1Store } from "./project";
diff --git a/frontend/src/store/modules/v1/schemaEditor.ts b/frontend/src/store/modules/v1/schemaEditor.ts
index 8132d3982e..845e4cadf1 100644
--- a/frontend/src/store/modules/v1/schemaEditor.ts
+++ b/frontend/src/store/modules/v1/schemaEditor.ts
@@ -1,17 +1,18 @@
import { isUndefined, uniqueId } from "lodash-es";
import { defineStore } from "pinia";
-import { ComposedDatabase, emptyProject } from "@/types";
+import type { ComposedDatabase } from "@/types";
+import { emptyProject } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import {
+import type {
BranchSchema,
DatabaseSchema,
SchemaEditorV1State,
Table,
TabContext,
- SchemaEditorTabType,
TableTabContext,
} from "@/types/v1/schemaEditor";
-import { Schema } from "@/types/v1/schemaEditor/atomType";
+import { SchemaEditorTabType } from "@/types/v1/schemaEditor";
+import type { Schema } from "@/types/v1/schemaEditor/atomType";
import { useDatabaseV1Store } from "./database";
export const generateUniqueTabId = () => {
diff --git a/frontend/src/store/modules/v1/setting.ts b/frontend/src/store/modules/v1/setting.ts
index ecd76cfb3f..71c6b94df0 100644
--- a/frontend/src/store/modules/v1/setting.ts
+++ b/frontend/src/store/modules/v1/setting.ts
@@ -1,13 +1,13 @@
import { defineStore } from "pinia";
import { settingServiceClient } from "@/grpcweb";
import { settingNamePrefix } from "@/store/modules/v1/common";
-import {
+import type {
Setting,
Value as SettingValue,
WorkspaceProfileSetting,
DataClassificationSetting_DataClassificationConfig,
} from "@/types/proto/v1/setting_service";
-import { SettingName } from "@/types/setting";
+import type { SettingName } from "@/types/setting";
import { useActuatorV1Store } from "./actuator";
interface SettingState {
diff --git a/frontend/src/store/modules/v1/sheet.ts b/frontend/src/store/modules/v1/sheet.ts
index e8629138a0..55b13d403f 100644
--- a/frontend/src/store/modules/v1/sheet.ts
+++ b/frontend/src/store/modules/v1/sheet.ts
@@ -2,8 +2,9 @@ import { defineStore } from "pinia";
import { computed, unref, watchEffect } from "vue";
import { sheetServiceClient } from "@/grpcweb";
import { useCache } from "@/store/cache";
-import { UNKNOWN_ID, MaybeRef } from "@/types";
-import { Sheet } from "@/types/proto/v1/sheet_service";
+import type { MaybeRef } from "@/types";
+import { UNKNOWN_ID } from "@/types";
+import type { Sheet } from "@/types/proto/v1/sheet_service";
import { extractSheetUID, getSheetStatement } from "@/utils";
export type SheetView = "FULL" | "BASIC";
diff --git a/frontend/src/store/modules/v1/sql.ts b/frontend/src/store/modules/v1/sql.ts
index f114cc05d2..62cabb93e8 100644
--- a/frontend/src/store/modules/v1/sql.ts
+++ b/frontend/src/store/modules/v1/sql.ts
@@ -2,14 +2,14 @@ import { ClientError, Status } from "nice-grpc-common";
import { RichClientError } from "nice-grpc-error-details";
import { defineStore } from "pinia";
import { sqlServiceClient } from "@/grpcweb";
-import { SQLResultSetV1 } from "@/types";
+import type { SQLResultSetV1 } from "@/types";
import { PlanCheckRun_Result_SqlReviewReport } from "@/types/proto/v1/rollout_service";
-import {
+import type {
ExportRequest,
QueryRequest,
Advice,
- Advice_Status,
} from "@/types/proto/v1/sql_service";
+import { Advice_Status } from "@/types/proto/v1/sql_service";
import { extractGrpcErrorMessage } from "@/utils/grpcweb";
const getSqlReviewReports = (err: unknown): Advice[] => {
diff --git a/frontend/src/store/modules/v1/subscription.ts b/frontend/src/store/modules/v1/subscription.ts
index 00d42d3e1b..9ca5a30933 100644
--- a/frontend/src/store/modules/v1/subscription.ts
+++ b/frontend/src/store/modules/v1/subscription.ts
@@ -1,18 +1,15 @@
import dayjs from "dayjs";
import { defineStore } from "pinia";
-import { computed, Ref } from "vue";
+import type { Ref } from "vue";
+import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { subscriptionServiceClient } from "@/grpcweb";
-import {
- PLANS,
- FeatureType,
- planTypeToString,
- instanceLimitFeature,
-} from "@/types";
-import { Instance } from "@/types/proto/v1/instance_service";
+import type { FeatureType } from "@/types";
+import { PLANS, planTypeToString, instanceLimitFeature } from "@/types";
+import type { Instance } from "@/types/proto/v1/instance_service";
+import type { Subscription } from "@/types/proto/v1/subscription_service";
import {
PlanType,
- Subscription,
planTypeFromJSON,
planTypeToJSON,
} from "@/types/proto/v1/subscription_service";
diff --git a/frontend/src/store/modules/v1/vcs.ts b/frontend/src/store/modules/v1/vcs.ts
index 863100f359..267cc6e1e9 100644
--- a/frontend/src/store/modules/v1/vcs.ts
+++ b/frontend/src/store/modules/v1/vcs.ts
@@ -2,8 +2,8 @@ import { isEqual, isUndefined } from "lodash-es";
import { defineStore } from "pinia";
import { reactive } from "vue";
import { vcsProviderServiceClient } from "@/grpcweb";
-import { VCSId } from "@/types";
-import { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
+import type { VCSId } from "@/types";
+import type { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
import { vcsProviderPrefix } from "./common";
export const useVCSV1Store = defineStore("vcs_v1", () => {
diff --git a/frontend/src/store/modules/v1/worksheet.ts b/frontend/src/store/modules/v1/worksheet.ts
index 78d6fc3932..971fdaae57 100644
--- a/frontend/src/store/modules/v1/worksheet.ts
+++ b/frontend/src/store/modules/v1/worksheet.ts
@@ -4,7 +4,7 @@ import { computed } from "vue";
import { worksheetServiceClient } from "@/grpcweb";
import { useCache } from "@/store/cache";
import { UNKNOWN_ID } from "@/types";
-import {
+import type {
Worksheet,
WorksheetOrganizer,
} from "@/types/proto/v1/worksheet_service";
diff --git a/frontend/src/store/modules/workspaceApprovalSetting.ts b/frontend/src/store/modules/workspaceApprovalSetting.ts
index 6051f872a3..be7450285b 100644
--- a/frontend/src/store/modules/workspaceApprovalSetting.ts
+++ b/frontend/src/store/modules/workspaceApprovalSetting.ts
@@ -3,8 +3,8 @@ import { defineStore } from "pinia";
import { ref } from "vue";
import { settingServiceClient } from "@/grpcweb";
import type { LocalApprovalConfig, LocalApprovalRule } from "@/types";
-import { Risk_Source } from "@/types/proto/v1/risk_service";
-import { Setting } from "@/types/proto/v1/setting_service";
+import type { Risk_Source } from "@/types/proto/v1/risk_service";
+import type { Setting } from "@/types/proto/v1/setting_service";
import {
resolveLocalApprovalConfig,
buildWorkspaceApprovalSetting,
diff --git a/frontend/src/store/modules/workspaceMailDeliverySetting.ts b/frontend/src/store/modules/workspaceMailDeliverySetting.ts
index 4199de3e28..730ed57f7e 100644
--- a/frontend/src/store/modules/workspaceMailDeliverySetting.ts
+++ b/frontend/src/store/modules/workspaceMailDeliverySetting.ts
@@ -1,7 +1,7 @@
import { defineStore } from "pinia";
import { ref } from "vue";
import { settingServiceClient } from "@/grpcweb";
-import {
+import type {
SMTPMailDeliverySettingValue,
Setting,
} from "@/types/proto/v1/setting_service";
diff --git a/frontend/src/types/InstanceUser.ts b/frontend/src/types/InstanceUser.ts
index 76fc04799b..68dc6985d1 100644
--- a/frontend/src/types/InstanceUser.ts
+++ b/frontend/src/types/InstanceUser.ts
@@ -1,4 +1,4 @@
-import { InstanceId, InstanceUserId } from "./id";
+import type { InstanceId, InstanceUserId } from "./id";
export type InstanceUser = {
id: InstanceUserId;
diff --git a/frontend/src/types/activity.ts b/frontend/src/types/activity.ts
index 653b9fd920..a5a3f49a05 100644
--- a/frontend/src/types/activity.ts
+++ b/frontend/src/types/activity.ts
@@ -1,16 +1,18 @@
-import {
- LogEntity_Action,
- LogEntity_Level,
-} from "@/types/proto/v1/logging_service";
-import { FieldId } from "../plugins";
+import type { LogEntity_Level } from "@/types/proto/v1/logging_service";
+import { LogEntity_Action } from "@/types/proto/v1/logging_service";
+import type { FieldId } from "../plugins";
import { t } from "../plugins/i18n";
-import { ExternalApprovalEvent } from "./externalApproval";
-import { IssueId, PrincipalId, SheetId, StageId, TaskId } from "./id";
-import { IssueStatus } from "./issue";
-import { MemberStatus, RoleType } from "./member";
-import { StageStatusUpdateType, TaskRunStatus, TaskStatus } from "./pipeline";
-import { ApprovalEvent } from "./review";
-import { VCSPushEvent } from "./vcs";
+import type { ExternalApprovalEvent } from "./externalApproval";
+import type { IssueId, PrincipalId, SheetId, StageId, TaskId } from "./id";
+import type { IssueStatus } from "./issue";
+import type { MemberStatus, RoleType } from "./member";
+import type {
+ StageStatusUpdateType,
+ TaskRunStatus,
+ TaskStatus,
+} from "./pipeline";
+import type { ApprovalEvent } from "./review";
+import type { VCSPushEvent } from "./vcs";
export function activityName(action: LogEntity_Action): string {
switch (action) {
diff --git a/frontend/src/types/anomaly.ts b/frontend/src/types/anomaly.ts
index dde4cff473..8cdf6bdfa5 100644
--- a/frontend/src/types/anomaly.ts
+++ b/frontend/src/types/anomaly.ts
@@ -1,4 +1,4 @@
-import { Anomaly_AnomalyType } from "@/types/proto/v1/anomaly_service";
+import type { Anomaly_AnomalyType } from "@/types/proto/v1/anomaly_service";
export interface FindAnomalyMessage {
instance?: string;
diff --git a/frontend/src/types/common.ts b/frontend/src/types/common.ts
index 67e2d1037d..2f5c411810 100644
--- a/frontend/src/types/common.ts
+++ b/frontend/src/types/common.ts
@@ -1,15 +1,15 @@
import { Environment as EnvironmentV1 } from "@/types/proto/v1/environment_service";
import { EMPTY_ID, UNKNOWN_ID } from "./const";
-import { DataSource } from "./dataSource";
-import { Database } from "./database";
-import { Environment } from "./environment";
-import { CommandId, CommandRegisterId } from "./id";
-import { Instance } from "./instance";
-import { Issue } from "./issue";
-import { Pipeline, Stage, Task, TaskProgress } from "./pipeline";
-import { Principal } from "./principal";
-import { Project, ProjectMember } from "./project";
-import { SQLReviewPolicy } from "./sqlReview";
+import type { DataSource } from "./dataSource";
+import type { Database } from "./database";
+import type { Environment } from "./environment";
+import type { CommandId, CommandRegisterId } from "./id";
+import type { Instance } from "./instance";
+import type { Issue } from "./issue";
+import type { Pipeline, Stage, Task, TaskProgress } from "./pipeline";
+import type { Principal } from "./principal";
+import type { Project, ProjectMember } from "./project";
+import type { SQLReviewPolicy } from "./sqlReview";
// System bot id
export const SYSTEM_BOT_ID = 1;
diff --git a/frontend/src/types/dataSource.ts b/frontend/src/types/dataSource.ts
index d6a6f6e9e8..2e6edcd90f 100644
--- a/frontend/src/types/dataSource.ts
+++ b/frontend/src/types/dataSource.ts
@@ -1,6 +1,6 @@
// For now the ADMIN requires the same database privilege as RW.
// The seperation is to make it explicit which one serves as the ADMIN data source,
-import { DatabaseId, DataSourceId, InstanceId } from "./id";
+import type { DatabaseId, DataSourceId, InstanceId } from "./id";
// which from the ops perspective, having different meaning from the normal RW data source.
export type DataSourceType = "ADMIN" | "RW" | "RO";
diff --git a/frontend/src/types/database.ts b/frontend/src/types/database.ts
index 84021b7383..5d7b548829 100644
--- a/frontend/src/types/database.ts
+++ b/frontend/src/types/database.ts
@@ -1,10 +1,10 @@
// We periodically sync the underlying db schema and stores those info
// in the "database" object.
// Physically, a database belongs to an instance. Logically, it belongs to a project.
-import { DataSource } from "./dataSource";
-import { DatabaseId, InstanceId, ProjectId } from "./id";
-import { Instance } from "./instance";
-import { Project } from "./project";
+import type { DataSource } from "./dataSource";
+import type { DatabaseId, InstanceId, ProjectId } from "./id";
+import type { Instance } from "./instance";
+import type { Project } from "./project";
// "OK" means we find the database with the same name.
// "NOT_FOUND" means no matching database name found, this usually means someone changes the underlying db name without Bytebase knowledge.
diff --git a/frontend/src/types/dbGroup.ts b/frontend/src/types/dbGroup.ts
index 9345f246cb..00857b5b6a 100644
--- a/frontend/src/types/dbGroup.ts
+++ b/frontend/src/types/dbGroup.ts
@@ -1,7 +1,7 @@
-import { ConditionGroupExpr } from "@/plugins/cel";
-import { ComposedDatabase } from "@/types";
-import { Environment } from "./proto/v1/environment_service";
-import {
+import type { ConditionGroupExpr } from "@/plugins/cel";
+import type { ComposedDatabase } from "@/types";
+import type { Environment } from "./proto/v1/environment_service";
+import type {
DatabaseGroup,
Project,
SchemaGroup,
diff --git a/frontend/src/types/environment.ts b/frontend/src/types/environment.ts
index 336f8411f0..22d02c9110 100644
--- a/frontend/src/types/environment.ts
+++ b/frontend/src/types/environment.ts
@@ -1,5 +1,5 @@
-import { RowStatus } from "./common";
-import { EnvironmentId } from "./id";
+import type { RowStatus } from "./common";
+import type { EnvironmentId } from "./id";
export type Environment = {
id: EnvironmentId;
diff --git a/frontend/src/types/iam/index.ts b/frontend/src/types/iam/index.ts
index 8f173f4416..9e354d1831 100644
--- a/frontend/src/types/iam/index.ts
+++ b/frontend/src/types/iam/index.ts
@@ -1,4 +1,4 @@
-import { ProjectPermission, WorkspacePermission } from "./permission";
+import type { ProjectPermission, WorkspacePermission } from "./permission";
import PERMISSION_DATA from "./permission.yaml";
export const WORKSPACE_PERMISSIONS: WorkspacePermission[] =
diff --git a/frontend/src/types/instance.ts b/frontend/src/types/instance.ts
index 29f310d1ad..c98b7e7316 100644
--- a/frontend/src/types/instance.ts
+++ b/frontend/src/types/instance.ts
@@ -1,9 +1,9 @@
-import { DataSource } from ".";
-import { RowStatus } from "./common";
-import { Environment } from "./environment";
-import { InstanceId, MigrationHistoryId } from "./id";
+import type { DataSource } from ".";
+import type { RowStatus } from "./common";
+import type { Environment } from "./environment";
+import type { InstanceId, MigrationHistoryId } from "./id";
import { Engine } from "./proto/v1/common";
-import { VCSPushEvent } from "./vcs";
+import type { VCSPushEvent } from "./vcs";
export const EngineTypeList = [
"CLICKHOUSE",
diff --git a/frontend/src/types/issue.ts b/frontend/src/types/issue.ts
index 0598d4d964..56312fb1a5 100644
--- a/frontend/src/types/issue.ts
+++ b/frontend/src/types/issue.ts
@@ -1,5 +1,5 @@
-import { DatabaseResource } from "@/types";
-import {
+import type { DatabaseResource } from "@/types";
+import type {
DatabaseId,
InstanceId,
IssueId,
@@ -8,12 +8,12 @@ import {
SheetId,
TaskId,
} from "./id";
-import { MigrationType } from "./instance";
-import { Pipeline, PipelineCreate } from "./pipeline";
-import { Principal } from "./principal";
-import { Project } from "./project";
-import { Expr } from "./proto/google/type/expr";
-import { IssuePayload as IssueProtoPayload } from "./proto/store/issue";
+import type { MigrationType } from "./instance";
+import type { Pipeline, PipelineCreate } from "./pipeline";
+import type { Principal } from "./principal";
+import type { Project } from "./project";
+import type { Expr } from "./proto/google/type/expr";
+import type { IssuePayload as IssueProtoPayload } from "./proto/store/issue";
type IssueTypeGeneral = "bb.issue.general";
diff --git a/frontend/src/types/notification.ts b/frontend/src/types/notification.ts
index d45a6e8817..19521fdc56 100644
--- a/frontend/src/types/notification.ts
+++ b/frontend/src/types/notification.ts
@@ -1,4 +1,4 @@
-import { VNodeChild } from "vue";
+import type { VNodeChild } from "vue";
export type BBNotificationStyle = "INFO" | "SUCCESS" | "WARN" | "CRITICAL";
diff --git a/frontend/src/types/pipeline/pipeline.ts b/frontend/src/types/pipeline/pipeline.ts
index fa7a5e047b..898fbe9517 100644
--- a/frontend/src/types/pipeline/pipeline.ts
+++ b/frontend/src/types/pipeline/pipeline.ts
@@ -1,5 +1,5 @@
-import { PipelineId } from "../id";
-import { Stage, StageCreate } from "./stage";
+import type { PipelineId } from "../id";
+import type { Stage, StageCreate } from "./stage";
/*
An example
diff --git a/frontend/src/types/pipeline/stage.ts b/frontend/src/types/pipeline/stage.ts
index 42e92de357..3fbba584a5 100644
--- a/frontend/src/types/pipeline/stage.ts
+++ b/frontend/src/types/pipeline/stage.ts
@@ -1,8 +1,8 @@
// The database belongs to an instance which in turns belongs to an environment.
-import { Environment } from "../environment";
-import { EnvironmentId, StageId } from "../id";
-import { Pipeline } from "./pipeline";
-import { Task, TaskCreate, TaskStatus } from "./task";
+import type { Environment } from "../environment";
+import type { EnvironmentId, StageId } from "../id";
+import type { Pipeline } from "./pipeline";
+import type { Task, TaskCreate, TaskStatus } from "./task";
// THus stage can access both instance and environment info.
export type Stage = {
diff --git a/frontend/src/types/pipeline/task.ts b/frontend/src/types/pipeline/task.ts
index 15edfa30ab..e5df5a2aef 100644
--- a/frontend/src/types/pipeline/task.ts
+++ b/frontend/src/types/pipeline/task.ts
@@ -1,6 +1,6 @@
-import { ErrorCode, MigrationHistoryId, TaskCheckRunId } from "..";
-import { Database } from "../database";
-import {
+import type { ErrorCode, MigrationHistoryId, TaskCheckRunId } from "..";
+import type { Database } from "../database";
+import type {
DatabaseId,
InstanceId,
IssueId,
@@ -9,11 +9,11 @@ import {
TaskId,
TaskRunId,
} from "../id";
-import { Instance } from "../instance";
-import { Principal } from "../principal";
-import { VCSPushEvent } from "../vcs";
-import { Pipeline } from "./pipeline";
-import { Stage } from "./stage";
+import type { Instance } from "../instance";
+import type { Principal } from "../principal";
+import type { VCSPushEvent } from "../vcs";
+import type { Pipeline } from "./pipeline";
+import type { Stage } from "./stage";
export type TaskType =
| "bb.task.general"
diff --git a/frontend/src/types/principal.ts b/frontend/src/types/principal.ts
index 6d62c57719..37619208df 100644
--- a/frontend/src/types/principal.ts
+++ b/frontend/src/types/principal.ts
@@ -1,7 +1,7 @@
// This is a facet of the underlying identity entity.
// For now, there is only user type. In the future,
-import { PrincipalId } from "./id";
-import { RoleType } from "./member";
+import type { PrincipalId } from "./id";
+import type { RoleType } from "./member";
// we may support application/bot identity.
export type PrincipalType = "END_USER" | "SYSTEM_BOT" | "SERVICE_ACCOUNT";
diff --git a/frontend/src/types/project.ts b/frontend/src/types/project.ts
index bb8e0c8ce2..92056bed88 100644
--- a/frontend/src/types/project.ts
+++ b/frontend/src/types/project.ts
@@ -1,8 +1,8 @@
-import { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
-import { RowStatus } from "./common";
-import { ProjectId } from "./id";
-import { Principal } from "./principal";
-import { ExternalRepositoryInfo, RepositoryConfig } from "./repository";
+import type { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
+import type { RowStatus } from "./common";
+import type { ProjectId } from "./id";
+import type { Principal } from "./principal";
+import type { ExternalRepositoryInfo, RepositoryConfig } from "./repository";
export type ProjectWorkflowType = "UI" | "VCS";
diff --git a/frontend/src/types/quickAction.ts b/frontend/src/types/quickAction.ts
index 234cb33b3a..174d6d1268 100644
--- a/frontend/src/types/quickAction.ts
+++ b/frontend/src/types/quickAction.ts
@@ -1,4 +1,4 @@
-import { WorkspacePermission, ProjectPermission } from "./iam/permission";
+import type { WorkspacePermission, ProjectPermission } from "./iam/permission";
export type EnvironmentQuickActionType =
| "quickaction.bb.environment.create"
diff --git a/frontend/src/types/review.ts b/frontend/src/types/review.ts
index c244bb81c1..a597b58b8a 100644
--- a/frontend/src/types/review.ts
+++ b/frontend/src/types/review.ts
@@ -1,9 +1,6 @@
import type { User } from "./proto/v1/auth_service";
-import {
- ApprovalStep,
- ApprovalTemplate,
- Issue_Approver,
-} from "./proto/v1/issue_service";
+import type { ApprovalStep, Issue_Approver } from "./proto/v1/issue_service";
+import { ApprovalTemplate } from "./proto/v1/issue_service";
export type ApprovalEvent = {
status: "APPROVED" | "REJECTED" | "PENDING";
diff --git a/frontend/src/types/sheet.ts b/frontend/src/types/sheet.ts
index 0c1755ecae..e7cd40f847 100644
--- a/frontend/src/types/sheet.ts
+++ b/frontend/src/types/sheet.ts
@@ -1,5 +1,5 @@
-import { VNode } from "vue";
-import { Worksheet_Visibility } from "@/types/proto/v1/worksheet_service";
+import type { VNode } from "vue";
+import type { Worksheet_Visibility } from "@/types/proto/v1/worksheet_service";
interface SheetVCSPayload {
fileName: string;
diff --git a/frontend/src/types/slowQuery.ts b/frontend/src/types/slowQuery.ts
index c7ab1bb9a4..0b7b3c8cab 100644
--- a/frontend/src/types/slowQuery.ts
+++ b/frontend/src/types/slowQuery.ts
@@ -1,6 +1,6 @@
import type { SlowQueryLog } from "./proto/v1/database_service";
import type { ComposedDatabase } from "./v1/database";
-import { ComposedInstance } from "./v1/instance";
+import type { ComposedInstance } from "./v1/instance";
export type ComposedSlowQueryLog = {
id: string;
diff --git a/frontend/src/types/sql.ts b/frontend/src/types/sql.ts
index 0d78b00176..8d93b67094 100644
--- a/frontend/src/types/sql.ts
+++ b/frontend/src/types/sql.ts
@@ -1,4 +1,4 @@
-import { InstanceId } from "./id";
+import type { InstanceId } from "./id";
export type QueryInfo = {
instanceId: InstanceId;
diff --git a/frontend/src/types/sqlAdvice.ts b/frontend/src/types/sqlAdvice.ts
index 97ab38288c..d35a6c77f8 100644
--- a/frontend/src/types/sqlAdvice.ts
+++ b/frontend/src/types/sqlAdvice.ts
@@ -1,4 +1,4 @@
-import { SQLAdviceCode } from "./sqlAdviceCode";
+import type { SQLAdviceCode } from "./sqlAdviceCode";
export * from "./sqlAdviceCode";
diff --git a/frontend/src/types/sqlEditor/tab.ts b/frontend/src/types/sqlEditor/tab.ts
index 8b6832d847..9927e321fd 100644
--- a/frontend/src/types/sqlEditor/tab.ts
+++ b/frontend/src/types/sqlEditor/tab.ts
@@ -1,5 +1,5 @@
-import { SQLResultSetV1 } from "../v1/sql";
-import { SQLEditorConnection, SQLEditorQueryParams } from "./editor";
+import type { SQLResultSetV1 } from "../v1/sql";
+import type { SQLEditorConnection, SQLEditorQueryParams } from "./editor";
export type SQLEditorEditMode = "SQL-EDITOR" | "CHAT-TO-SQL";
diff --git a/frontend/src/types/sqlEditor/tree.ts b/frontend/src/types/sqlEditor/tree.ts
index b186eca677..c3e0d271f9 100644
--- a/frontend/src/types/sqlEditor/tree.ts
+++ b/frontend/src/types/sqlEditor/tree.ts
@@ -1,17 +1,21 @@
-import { TreeOption } from "naive-ui";
-import { RenderFunction } from "vue";
+import type { TreeOption } from "naive-ui";
+import type { RenderFunction } from "vue";
import { t } from "@/plugins/i18n";
import { useSQLEditorTreeStore } from "@/store";
import { Engine } from "../proto/v1/common";
-import {
+import type {
ExternalTableMetadata,
SchemaMetadata,
TableMetadata,
TablePartitionMetadata,
ViewMetadata,
} from "../proto/v1/database_service";
-import { Environment } from "../proto/v1/environment_service";
-import { ComposedDatabase, ComposedInstance, ComposedProject } from "../v1";
+import type { Environment } from "../proto/v1/environment_service";
+import type {
+ ComposedDatabase,
+ ComposedInstance,
+ ComposedProject,
+} from "../v1";
export type SQLEditorTreeFactor =
| "project"
diff --git a/frontend/src/types/sqlReview.ts b/frontend/src/types/sqlReview.ts
index 81e81e111a..1a0df0af1b 100644
--- a/frontend/src/types/sqlReview.ts
+++ b/frontend/src/types/sqlReview.ts
@@ -1,13 +1,14 @@
import { pullAt, cloneDeep, groupBy } from "lodash-es";
import { t } from "@/plugins/i18n";
-import { Engine, engineFromJSON } from "@/types/proto/v1/common";
-import { Environment } from "@/types/proto/v1/environment_service";
+import type { Engine } from "@/types/proto/v1/common";
+import { engineFromJSON } from "@/types/proto/v1/common";
+import type { Environment } from "@/types/proto/v1/environment_service";
import {
SQLReviewRuleLevel,
sQLReviewRuleLevelFromJSON,
} from "@/types/proto/v1/org_policy_service";
-import { PlanType } from "@/types/proto/v1/subscription_service";
-import { PolicyId } from "./id";
+import type { PlanType } from "@/types/proto/v1/subscription_service";
+import type { PolicyId } from "./id";
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/types/store.ts b/frontend/src/types/store.ts
index da468a4de4..c2eb4dbf0a 100644
--- a/frontend/src/types/store.ts
+++ b/frontend/src/types/store.ts
@@ -1,6 +1,6 @@
-import { Command } from "./common";
-import { CommandId } from "./id";
-import { Notification } from "./notification";
+import type { Command } from "./common";
+import type { CommandId } from "./id";
+import type { Notification } from "./notification";
export interface NotificationState {
notificationByModule: Map<string, Notification[]>;
diff --git a/frontend/src/types/utils.ts b/frontend/src/types/utils.ts
index f50e288415..82c26bedbe 100644
--- a/frontend/src/types/utils.ts
+++ b/frontend/src/types/utils.ts
@@ -1,4 +1,4 @@
-import { Ref } from "vue";
+import type { Ref } from "vue";
export type SubsetOf<T, S extends T> = S;
export type MaybeRef<T> = Ref<T> | T;
diff --git a/frontend/src/types/v1/database.ts b/frontend/src/types/v1/database.ts
index a492aee55f..30c138234d 100644
--- a/frontend/src/types/v1/database.ts
+++ b/frontend/src/types/v1/database.ts
@@ -1,9 +1,11 @@
import { EMPTY_ID, UNKNOWN_ID } from "../const";
import { State } from "../proto/v1/common";
import { Database } from "../proto/v1/database_service";
-import { Environment } from "../proto/v1/environment_service";
-import { ComposedInstance, emptyInstance, unknownInstance } from "./instance";
-import { ComposedProject, emptyProject, unknownProject } from "./project";
+import type { Environment } from "../proto/v1/environment_service";
+import type { ComposedInstance } from "./instance";
+import { emptyInstance, unknownInstance } from "./instance";
+import type { ComposedProject } from "./project";
+import { emptyProject, unknownProject } from "./project";
export interface ComposedDatabase extends Database {
/** related project entity */
diff --git a/frontend/src/types/v1/instance.ts b/frontend/src/types/v1/instance.ts
index 22f2e59e33..1eebadf4c1 100644
--- a/frontend/src/types/v1/instance.ts
+++ b/frontend/src/types/v1/instance.ts
@@ -1,6 +1,6 @@
import { EMPTY_ID, UNKNOWN_ID } from "../const";
import { Engine, State } from "../proto/v1/common";
-import { Environment } from "../proto/v1/environment_service";
+import type { Environment } from "../proto/v1/environment_service";
import { Instance } from "../proto/v1/instance_service";
import { emptyEnvironment, unknownEnvironment } from "./environment";
diff --git a/frontend/src/types/v1/issue/issue.ts b/frontend/src/types/v1/issue/issue.ts
index 6ed11c67e8..f7f903bf95 100644
--- a/frontend/src/types/v1/issue/issue.ts
+++ b/frontend/src/types/v1/issue/issue.ts
@@ -1,5 +1,5 @@
+import type { ComposedProject } from "@/types";
import {
- ComposedProject,
EMPTY_PROJECT_NAME,
UNKNOWN_PROJECT_NAME,
emptyProject,
@@ -7,10 +7,11 @@ import {
emptyUser,
unknownUser,
} from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
import { EMPTY_ID, UNKNOWN_ID } from "../../const";
-import { Issue, Issue_Type, IssueStatus } from "../../proto/v1/issue_service";
-import {
+import type { IssueStatus } from "../../proto/v1/issue_service";
+import { Issue, Issue_Type } from "../../proto/v1/issue_service";
+import type {
Plan,
PlanCheckRun,
Rollout,
diff --git a/frontend/src/types/v1/repository.ts b/frontend/src/types/v1/repository.ts
index 9f575a6e64..fc398d9d70 100644
--- a/frontend/src/types/v1/repository.ts
+++ b/frontend/src/types/v1/repository.ts
@@ -1,5 +1,5 @@
-import { Project } from "@/types/proto/v1/project_service";
-import { ProjectGitOpsInfo } from "@/types/proto/v1/vcs_provider_service";
+import type { Project } from "@/types/proto/v1/project_service";
+import type { ProjectGitOpsInfo } from "@/types/proto/v1/vcs_provider_service";
export interface ComposedRepository extends ProjectGitOpsInfo {
project: Project;
diff --git a/frontend/src/types/v1/schemaEditor/atomType.ts b/frontend/src/types/v1/schemaEditor/atomType.ts
index ee162eccfe..c474043a31 100644
--- a/frontend/src/types/v1/schemaEditor/atomType.ts
+++ b/frontend/src/types/v1/schemaEditor/atomType.ts
@@ -1,9 +1,11 @@
-import Long from "long";
+import type Long from "long";
import { v1 as uuidv1 } from "uuid";
-import {
+import type {
SchemaMetadata,
TableMetadata,
ColumnMetadata,
+} from "@/types/proto/v1/database_service";
+import {
ColumnConfig,
TableConfig,
SchemaConfig,
diff --git a/frontend/src/types/v1/schemaEditor/state.ts b/frontend/src/types/v1/schemaEditor/state.ts
index fb98f70161..fe9dd5fca5 100644
--- a/frontend/src/types/v1/schemaEditor/state.ts
+++ b/frontend/src/types/v1/schemaEditor/state.ts
@@ -1,6 +1,6 @@
-import { ComposedDatabase, ComposedProject } from "..";
-import { Branch } from "../../proto/v1/branch_service";
-import { Schema } from "./atomType";
+import type { ComposedDatabase, ComposedProject } from "..";
+import type { Branch } from "../../proto/v1/branch_service";
+import type { Schema } from "./atomType";
export enum SchemaEditorTabType {
TabForDatabase = "database",
diff --git a/frontend/src/types/v1/sql.ts b/frontend/src/types/v1/sql.ts
index f0123a2041..f7283e4ee2 100644
--- a/frontend/src/types/v1/sql.ts
+++ b/frontend/src/types/v1/sql.ts
@@ -1,5 +1,5 @@
-import { Status } from "nice-grpc-common";
-import { Advice, QueryResult } from "../proto/v1/sql_service";
+import type { Status } from "nice-grpc-common";
+import type { Advice, QueryResult } from "../proto/v1/sql_service";
export type SQLResultSetV1 = {
error: string; // empty if no error occurred
diff --git a/frontend/src/types/v1/webTerminal.ts b/frontend/src/types/v1/webTerminal.ts
index a08e00c3db..ea56b7f3ba 100644
--- a/frontend/src/types/v1/webTerminal.ts
+++ b/frontend/src/types/v1/webTerminal.ts
@@ -1,4 +1,4 @@
-import Emittery from "emittery";
+import type Emittery from "emittery";
import type { ComputedRef, Ref } from "vue";
import type { SQLEditorQueryParams, SQLEditorTab } from "../sqlEditor";
import type { SQLResultSetV1 } from "./sql";
diff --git a/frontend/src/types/vcs.ts b/frontend/src/types/vcs.ts
index 4241f7e98e..e2a712d8be 100644
--- a/frontend/src/types/vcs.ts
+++ b/frontend/src/types/vcs.ts
@@ -1,4 +1,4 @@
-import { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";
+import type { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";
// Backend uses the same ENUM for GitLab/GitHub SaaS and self-hosted. Because they are based on the
// same codebase.
diff --git a/frontend/src/types/workspaceApprovalSetting.ts b/frontend/src/types/workspaceApprovalSetting.ts
index d4152751dc..0300f9aed0 100644
--- a/frontend/src/types/workspaceApprovalSetting.ts
+++ b/frontend/src/types/workspaceApprovalSetting.ts
@@ -1,5 +1,5 @@
-import { SimpleExpr } from "@/plugins/cel";
-import { ApprovalTemplate } from "@/types/proto/v1/issue_service";
+import type { SimpleExpr } from "@/plugins/cel";
+import type { ApprovalTemplate } from "@/types/proto/v1/issue_service";
import type { Risk_Source } from "@/types/proto/v1/risk_service";
export type LocalApprovalRule = {
diff --git a/frontend/src/utils/activity.ts b/frontend/src/utils/activity.ts
index 00dc6864e5..57d55b60b8 100644
--- a/frontend/src/utils/activity.ts
+++ b/frontend/src/utils/activity.ts
@@ -1,12 +1,13 @@
import { t } from "@/plugins/i18n";
import { useUserStore } from "@/store";
-import { LogEntity, LogEntity_Action } from "@/types/proto/v1/logging_service";
+import type { LogEntity } from "@/types/proto/v1/logging_service";
+import { LogEntity_Action } from "@/types/proto/v1/logging_service";
import { IssueBuiltinFieldId } from "../plugins";
-import {
+import type {
ActivityIssueFieldUpdatePayload,
ActivityIssueStatusUpdatePayload,
- unknownUser,
} from "../types";
+import { unknownUser } from "../types";
export function issueActivityActionSentence(
activity: LogEntity
diff --git a/frontend/src/utils/database.ts b/frontend/src/utils/database.ts
index 9fc0d078d6..0479025327 100644
--- a/frontend/src/utils/database.ts
+++ b/frontend/src/utils/database.ts
@@ -1,6 +1,6 @@
import { keyBy } from "lodash-es";
import { Engine } from "@/types/proto/v1/common";
-import { Environment as EnvironmentV1 } from "@/types/proto/v1/environment_service";
+import type { Environment as EnvironmentV1 } from "@/types/proto/v1/environment_service";
import type { Database, Environment } from "../types";
import { semverCompare } from "./util";
diff --git a/frontend/src/utils/databaseGroup/cel.ts b/frontend/src/utils/databaseGroup/cel.ts
index 600b105616..94839a28f2 100644
--- a/frontend/src/utils/databaseGroup/cel.ts
+++ b/frontend/src/utils/databaseGroup/cel.ts
@@ -1,11 +1,6 @@
-import {
- ConditionGroupExpr,
- SimpleExpr,
- emptySimpleExpr,
- resolveCELExpr,
- wrapAsGroup,
-} from "@/plugins/cel";
-import { Expr } from "@/types/proto/google/api/expr/v1alpha1/syntax";
+import type { ConditionGroupExpr, SimpleExpr } from "@/plugins/cel";
+import { emptySimpleExpr, resolveCELExpr, wrapAsGroup } from "@/plugins/cel";
+import type { Expr } from "@/types/proto/google/api/expr/v1alpha1/syntax";
import { batchConvertCELStringToParsedExpr } from "@/utils";
interface DatabaseGroupExpr {
diff --git a/frontend/src/utils/databaseGroup/issue.ts b/frontend/src/utils/databaseGroup/issue.ts
index 6776daa3aa..fe28972dd3 100644
--- a/frontend/src/utils/databaseGroup/issue.ts
+++ b/frontend/src/utils/databaseGroup/issue.ts
@@ -1,6 +1,6 @@
import dayjs from "dayjs";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
-import { ComposedDatabaseGroup } from "@/types";
+import type { ComposedDatabaseGroup } from "@/types";
import { extractProjectResourceName } from "../v1";
export const generateDatabaseGroupIssueRoute = (
diff --git a/frontend/src/utils/environment.ts b/frontend/src/utils/environment.ts
index 02fda6e90e..1768c62a07 100644
--- a/frontend/src/utils/environment.ts
+++ b/frontend/src/utils/environment.ts
@@ -1,4 +1,4 @@
-import { Environment } from "../types";
+import type { Environment } from "../types";
export function environmentName(environment: Environment) {
let name = environment.name;
diff --git a/frontend/src/utils/iam/permission-utils.ts b/frontend/src/utils/iam/permission-utils.ts
index bf94605bdd..820b6a9d00 100644
--- a/frontend/src/utils/iam/permission-utils.ts
+++ b/frontend/src/utils/iam/permission-utils.ts
@@ -1,5 +1,5 @@
-import { ComposedDatabase, ComposedProject } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { ComposedDatabase, ComposedProject } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
import { hasProjectPermissionV2 } from "./permission";
export const hasPermissionToCreateRequestGrantIssueInProject = (
diff --git a/frontend/src/utils/iam/permission.ts b/frontend/src/utils/iam/permission.ts
index ab5af2c451..c67ea85b78 100644
--- a/frontend/src/utils/iam/permission.ts
+++ b/frontend/src/utils/iam/permission.ts
@@ -1,10 +1,10 @@
import { useProjectV1List, useRoleStore } from "@/store";
-import {
+import type {
ComposedProject,
ProjectPermission,
WorkspacePermission,
} from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
import { roleListInProjectV1 } from "../v1/project";
export const hasWorkspacePermissionV2 = (
diff --git a/frontend/src/utils/id.ts b/frontend/src/utils/id.ts
index 5936fa9788..8f9eeb9b9e 100644
--- a/frontend/src/utils/id.ts
+++ b/frontend/src/utils/id.ts
@@ -1,4 +1,4 @@
-import { ResourceId } from "@/types";
+import type { ResourceId } from "@/types";
export const convertToResourceId = (raw: string): ResourceId => {
return raw.toLowerCase().replaceAll(" ", "-");
diff --git a/frontend/src/utils/idp.ts b/frontend/src/utils/idp.ts
index 6340738cc7..1f435ef6fe 100644
--- a/frontend/src/utils/idp.ts
+++ b/frontend/src/utils/idp.ts
@@ -1,7 +1,7 @@
+import type { OAuth2IdentityProviderConfig } from "@/types/proto/v1/idp_service";
import {
IdentityProviderType,
OAuth2AuthStyle,
- OAuth2IdentityProviderConfig,
} from "@/types/proto/v1/idp_service";
export const identityProviderTypeToString = (
diff --git a/frontend/src/utils/instance.ts b/frontend/src/utils/instance.ts
index 18fa5daf7d..0ce071ced0 100644
--- a/frontend/src/utils/instance.ts
+++ b/frontend/src/utils/instance.ts
@@ -1,16 +1,15 @@
import { keyBy } from "lodash-es";
import { computed, unref } from "vue";
-import { Environment as EnvironmentV1 } from "@/types/proto/v1/environment_service";
-import { Instance as InstanceV1 } from "@/types/proto/v1/instance_service";
-import {
+import type { Environment as EnvironmentV1 } from "@/types/proto/v1/environment_service";
+import type { Instance as InstanceV1 } from "@/types/proto/v1/instance_service";
+import type {
EngineType,
Environment,
Instance,
Language,
- languageOfEngine,
- languageOfEngineV1,
MaybeRef,
} from "../types";
+import { languageOfEngine, languageOfEngineV1 } from "../types";
export const supportedEngineList = () => {
const engines: EngineType[] = [
diff --git a/frontend/src/utils/issue/cel.ts b/frontend/src/utils/issue/cel.ts
index b140dfc593..20852718e8 100644
--- a/frontend/src/utils/issue/cel.ts
+++ b/frontend/src/utils/issue/cel.ts
@@ -1,7 +1,8 @@
import { cloneDeep, last } from "lodash-es";
-import { SimpleExpr, resolveCELExpr } from "@/plugins/cel";
-import { DatabaseResource } from "@/types";
-import { Expr } from "@/types/proto/google/api/expr/v1alpha1/syntax";
+import type { SimpleExpr } from "@/plugins/cel";
+import { resolveCELExpr } from "@/plugins/cel";
+import type { DatabaseResource } from "@/types";
+import type { Expr } from "@/types/proto/google/api/expr/v1alpha1/syntax";
import { batchConvertCELStringToParsedExpr } from "@/utils";
interface DatabaseLevelCondition {
diff --git a/frontend/src/utils/issue/index.ts b/frontend/src/utils/issue/index.ts
index cf6b8b2f6d..09e42f1776 100644
--- a/frontend/src/utils/issue/index.ts
+++ b/frontend/src/utils/issue/index.ts
@@ -1,5 +1,5 @@
import dayjs from "dayjs";
-import { Issue, IssueType, StageId } from "@/types";
+import type { Issue, IssueType, StageId } from "@/types";
export function stageName(issue: Issue, stageId: StageId): string {
for (const stage of issue.pipeline?.stageList ?? []) {
diff --git a/frontend/src/utils/label.ts b/frontend/src/utils/label.ts
index 92b7d17e89..ea82b369c5 100644
--- a/frontend/src/utils/label.ts
+++ b/frontend/src/utils/label.ts
@@ -1,6 +1,6 @@
import { orderBy, uniq } from "lodash-es";
import { useEnvironmentV1Store } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { extractEnvironmentResourceName } from "./v1";
export const MAX_LABEL_VALUE_LENGTH = 63;
diff --git a/frontend/src/utils/link.ts b/frontend/src/utils/link.ts
index d228332292..3e70bed16b 100644
--- a/frontend/src/utils/link.ts
+++ b/frontend/src/utils/link.ts
@@ -1,4 +1,4 @@
-import { ResourceType } from "../types";
+import type { ResourceType } from "../types";
const resourceToPrefix = new Map([["DATABASE", "/db"]]);
diff --git a/frontend/src/utils/pipeline.ts b/frontend/src/utils/pipeline.ts
index 5a33713af2..17760886fc 100644
--- a/frontend/src/utils/pipeline.ts
+++ b/frontend/src/utils/pipeline.ts
@@ -1,8 +1,6 @@
-import { BBButtonType } from "@/bbkit/types";
-import {
+import type { BBButtonType } from "@/bbkit/types";
+import type {
Database,
- empty,
- EMPTY_ID,
Environment,
Pipeline,
PipelineCreate,
@@ -11,9 +9,8 @@ import {
Task,
TaskId,
TaskStatus,
- unknown,
- UNKNOWN_ID,
} from "../types";
+import { empty, EMPTY_ID, unknown, UNKNOWN_ID } from "../types";
export type PipelineType =
| "NO_PIPELINE"
diff --git a/frontend/src/utils/schemaEditor/index.ts b/frontend/src/utils/schemaEditor/index.ts
index d8f5e1ff64..f80c88d984 100644
--- a/frontend/src/utils/schemaEditor/index.ts
+++ b/frontend/src/utils/schemaEditor/index.ts
@@ -1,4 +1,4 @@
-import { ComposedDatabase, Database } from "@/types";
+import type { ComposedDatabase, Database } from "@/types";
import { Engine } from "@/types/proto/v1/common";
export * from "./filter";
diff --git a/frontend/src/utils/slowQuery.ts b/frontend/src/utils/slowQuery.ts
index 87e04a33f9..d5f383dc49 100644
--- a/frontend/src/utils/slowQuery.ts
+++ b/frontend/src/utils/slowQuery.ts
@@ -1,6 +1,6 @@
import type { EngineType, Instance } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import { Instance as InstanceV1 } from "@/types/proto/v1/instance_service";
+import type { Instance as InstanceV1 } from "@/types/proto/v1/instance_service";
import { semverCompare } from "./util";
export const InstanceListSupportSlowQuery: [EngineType, string][] = [
diff --git a/frontend/src/utils/slug.ts b/frontend/src/utils/slug.ts
index 3fec6efe7c..401e838b5a 100644
--- a/frontend/src/utils/slug.ts
+++ b/frontend/src/utils/slug.ts
@@ -5,9 +5,9 @@ import {
worksheetNamePrefix,
projectNamePrefix,
} from "@/store/modules/v1/common";
-import { Worksheet } from "@/types/proto/v1/worksheet_service";
-import { IssueId, SQLReviewPolicy } from "../types";
-import { IdType } from "../types/id";
+import type { Worksheet } from "@/types/proto/v1/worksheet_service";
+import type { IssueId, SQLReviewPolicy } from "../types";
+import type { IdType } from "../types/id";
export const indexOrUIDFromSlug = (slug: string): number => {
const parts = slug.split("-");
diff --git a/frontend/src/utils/sqlEditor.ts b/frontend/src/utils/sqlEditor.ts
index 79f5adec16..826646cb81 100644
--- a/frontend/src/utils/sqlEditor.ts
+++ b/frontend/src/utils/sqlEditor.ts
@@ -5,16 +5,15 @@ import {
useInstanceV1Store,
useSQLEditorTabStore,
} from "@/store";
-import {
+import type {
ComposedDatabase,
ComposedInstance,
CoreSQLEditorTab,
- DEFAULT_SQL_EDITOR_TAB_MODE,
SQLEditorConnection,
SQLEditorTab,
SQLEditorTabQueryContext,
- UNKNOWN_ID,
} from "@/types";
+import { DEFAULT_SQL_EDITOR_TAB_MODE, UNKNOWN_ID } from "@/types";
import { Engine } from "@/types/proto/v1/common";
import { instanceV1AllowsCrossDatabaseQuery } from "./v1/instance";
diff --git a/frontend/src/utils/sso.ts b/frontend/src/utils/sso.ts
index 9d3e54b0b8..4697637089 100644
--- a/frontend/src/utils/sso.ts
+++ b/frontend/src/utils/sso.ts
@@ -1,11 +1,9 @@
import axios from "axios";
import { trimEnd, uniq } from "lodash-es";
import { stringify } from "qs";
-import { OAuthState } from "@/types";
-import {
- IdentityProvider,
- IdentityProviderType,
-} from "@/types/proto/v1/idp_service";
+import type { OAuthState } from "@/types";
+import type { IdentityProvider } from "@/types/proto/v1/idp_service";
+import { IdentityProviderType } from "@/types/proto/v1/idp_service";
export const SSOConfigSessionKey = "sso-config";
diff --git a/frontend/src/utils/table.ts b/frontend/src/utils/table.ts
index 8514693088..3ec866be8e 100644
--- a/frontend/src/utils/table.ts
+++ b/frontend/src/utils/table.ts
@@ -1,4 +1,4 @@
-import { TableMetadata } from "@/types/proto/v1/database_service";
+import type { TableMetadata } from "@/types/proto/v1/database_service";
export function isGhostTable(table: TableMetadata): boolean {
const { name } = table;
diff --git a/frontend/src/utils/task.ts b/frontend/src/utils/task.ts
index b7eb77df2c..31c4103992 100644
--- a/frontend/src/utils/task.ts
+++ b/frontend/src/utils/task.ts
@@ -4,7 +4,7 @@ import {
useDatabaseV1Store,
useProjectV1Store,
} from "@/store";
-import {
+import type {
Issue,
Task,
TaskCheckStatus,
@@ -18,8 +18,8 @@ import {
TaskDatabaseSchemaUpdateSDLPayload,
TaskStatus,
TaskType,
- unknownDatabase,
} from "@/types";
+import { unknownDatabase } from "@/types";
import { hasProjectPermissionV2 } from "./iam";
import { activeTask } from "./pipeline";
import { extractUserUID } from "./v1";
diff --git a/frontend/src/utils/v1/changeHistory.ts b/frontend/src/utils/v1/changeHistory.ts
index b8ae230907..56c4737a29 100644
--- a/frontend/src/utils/v1/changeHistory.ts
+++ b/frontend/src/utils/v1/changeHistory.ts
@@ -2,12 +2,14 @@ import { isEqual, isUndefined, orderBy, uniqBy } from "lodash-es";
import Long from "long";
import { t } from "@/plugins/i18n";
import { useDBSchemaV1Store, useDatabaseV1Store } from "@/store";
-import { ComposedDatabase, UNKNOWN_ID } from "@/types";
-import { AffectedTable, EmptyAffectedTable } from "@/types/changeHistory";
+import type { ComposedDatabase } from "@/types";
+import { UNKNOWN_ID } from "@/types";
+import type { AffectedTable } from "@/types/changeHistory";
+import { EmptyAffectedTable } from "@/types/changeHistory";
+import type { DatabaseSchema } from "@/types/proto/v1/database_service";
import {
ChangeHistory,
ChangeHistory_Type,
- DatabaseSchema,
} from "@/types/proto/v1/database_service";
import { databaseV1Url, extractDatabaseResourceName } from "./database";
diff --git a/frontend/src/utils/v1/changelist.ts b/frontend/src/utils/v1/changelist.ts
index 79c5d06942..f5da3fe4d7 100644
--- a/frontend/src/utils/v1/changelist.ts
+++ b/frontend/src/utils/v1/changelist.ts
@@ -1,6 +1,6 @@
import { useChangeHistoryStore, useSheetV1Store } from "@/store";
-import { Changelist_Change_Source, ComposedDatabase } from "@/types";
-import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
+import type { Changelist_Change_Source, ComposedDatabase } from "@/types";
+import type { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
import { getHistoryChangeType } from "./changeHistory";
import { getSheetStatement } from "./sheet";
diff --git a/frontend/src/utils/v1/database.ts b/frontend/src/utils/v1/database.ts
index f61d520c22..b87674f33a 100644
--- a/frontend/src/utils/v1/database.ts
+++ b/frontend/src/utils/v1/database.ts
@@ -1,12 +1,13 @@
import { orderBy } from "lodash-es";
-import { SimpleExpr } from "@/plugins/cel";
+import type { SimpleExpr } from "@/plugins/cel";
import {
hasFeature,
useCurrentUserIamPolicy,
useSubscriptionV1Store,
} from "@/store";
-import { ComposedDatabase, UNKNOWN_ID } from "@/types";
-import { User } from "@/types/proto/v1/auth_service";
+import type { ComposedDatabase } from "@/types";
+import { UNKNOWN_ID } from "@/types";
+import type { User } from "@/types/proto/v1/auth_service";
import { Engine, State } from "@/types/proto/v1/common";
import { DataSourceType } from "@/types/proto/v1/instance_service";
import {
diff --git a/frontend/src/utils/v1/deploymentConfig.ts b/frontend/src/utils/v1/deploymentConfig.ts
index 9574186ea5..048b9746c0 100644
--- a/frontend/src/utils/v1/deploymentConfig.ts
+++ b/frontend/src/utils/v1/deploymentConfig.ts
@@ -1,13 +1,13 @@
import { orderBy, uniq } from "lodash-es";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
DeploymentConfig,
DeploymentSpec,
LabelSelector,
LabelSelectorRequirement,
- OperatorType,
Schedule,
} from "@/types/proto/v1/project_service";
+import { OperatorType } from "@/types/proto/v1/project_service";
import { getSemanticLabelValue } from "../label";
export const VIRTUAL_LABEL_KEYS = ["environment"];
diff --git a/frontend/src/utils/v1/environment.ts b/frontend/src/utils/v1/environment.ts
index 25c00fc496..bcb45ba60c 100644
--- a/frontend/src/utils/v1/environment.ts
+++ b/frontend/src/utils/v1/environment.ts
@@ -1,6 +1,6 @@
import slug from "slug";
import { State } from "@/types/proto/v1/common";
-import { Environment } from "@/types/proto/v1/environment_service";
+import type { Environment } from "@/types/proto/v1/environment_service";
export const extractEnvironmentResourceName = (name: string) => {
const pattern = /(?:^|\/)environments\/([^/]+)(?:$|\/)/;
diff --git a/frontend/src/utils/v1/instance.ts b/frontend/src/utils/v1/instance.ts
index 7ca9f7bd7b..0da4e8b91a 100644
--- a/frontend/src/utils/v1/instance.ts
+++ b/frontend/src/utils/v1/instance.ts
@@ -1,10 +1,12 @@
import { keyBy, orderBy } from "lodash-es";
import { useI18n } from "vue-i18n";
import { useSubscriptionV1Store } from "@/store";
-import { ComposedInstance, UNKNOWN_ID } from "@/types";
+import type { ComposedInstance } from "@/types";
+import { UNKNOWN_ID } from "@/types";
import { Engine, State } from "@/types/proto/v1/common";
-import { Environment } from "@/types/proto/v1/environment_service";
-import { DataSourceType, Instance } from "@/types/proto/v1/instance_service";
+import type { Environment } from "@/types/proto/v1/environment_service";
+import type { Instance } from "@/types/proto/v1/instance_service";
+import { DataSourceType } from "@/types/proto/v1/instance_service";
import { PlanType } from "@/types/proto/v1/subscription_service";
export function instanceV1Name(instance: Instance) {
diff --git a/frontend/src/utils/v1/issue/issue.ts b/frontend/src/utils/v1/issue/issue.ts
index c6b7c936b3..4bed8f2e22 100644
--- a/frontend/src/utils/v1/issue/issue.ts
+++ b/frontend/src/utils/v1/issue/issue.ts
@@ -1,7 +1,8 @@
import slug from "slug";
-import { ComposedIssue } from "@/types";
+import type { ComposedIssue } from "@/types";
import { Issue_Type } from "@/types/proto/v1/issue_service";
-import { Plan, Rollout, Task_Type } from "@/types/proto/v1/rollout_service";
+import type { Plan, Rollout } from "@/types/proto/v1/rollout_service";
+import { Task_Type } from "@/types/proto/v1/rollout_service";
export const issueV1Slug = (issue: ComposedIssue) => {
return [slug(issue.title), issue.uid].join("-");
diff --git a/frontend/src/utils/v1/issue/rollout.ts b/frontend/src/utils/v1/issue/rollout.ts
index 580b702ed4..92ecf891c1 100644
--- a/frontend/src/utils/v1/issue/rollout.ts
+++ b/frontend/src/utils/v1/issue/rollout.ts
@@ -1,20 +1,16 @@
import { last } from "lodash-es";
import { stringify } from "qs";
import slug from "slug";
+import type { ComposedIssue } from "@/types";
import {
EMPTY_TASK_NAME,
emptyStage,
emptyTask,
unknownTask,
unknownStage,
- ComposedIssue,
} from "@/types";
-import {
- Rollout,
- Stage,
- Task,
- Task_Status,
-} from "@/types/proto/v1/rollout_service";
+import type { Rollout, Stage, Task } from "@/types/proto/v1/rollout_service";
+import { Task_Status } from "@/types/proto/v1/rollout_service";
import { extractProjectResourceName } from "../project";
import { flattenTaskV1List, issueV1Slug } from "./issue";
diff --git a/frontend/src/utils/v1/issue/search/advanced-search.ts b/frontend/src/utils/v1/issue/search/advanced-search.ts
index d3dbee3fe1..1f4502f74d 100644
--- a/frontend/src/utils/v1/issue/search/advanced-search.ts
+++ b/frontend/src/utils/v1/issue/search/advanced-search.ts
@@ -1,12 +1,9 @@
import { useDatabaseV1Store } from "@/store";
-import { IssueFilter, UNKNOWN_ID } from "@/types";
+import type { IssueFilter } from "@/types";
+import { UNKNOWN_ID } from "@/types";
import { IssueStatus } from "@/types/proto/v1/issue_service";
-import {
- SearchParams,
- SemanticIssueStatus,
- getTsRangeFromSearchParams,
- getValueFromSearchParams,
-} from "./common";
+import type { SearchParams, SemanticIssueStatus } from "./common";
+import { getTsRangeFromSearchParams, getValueFromSearchParams } from "./common";
export const buildIssueFilterBySearchParams = (params: SearchParams) => {
const { query, scopes } = params;
diff --git a/frontend/src/utils/v1/issue/search/ui-filter.ts b/frontend/src/utils/v1/issue/search/ui-filter.ts
index 8fdc46a642..0a96ed6f3c 100644
--- a/frontend/src/utils/v1/issue/search/ui-filter.ts
+++ b/frontend/src/utils/v1/issue/search/ui-filter.ts
@@ -4,11 +4,12 @@ import {
useWrappedReviewStepsV1,
} from "@/components/IssueV1/logic";
import { useUserStore } from "@/store";
-import { ComposedIssue } from "@/types";
+import type { ComposedIssue } from "@/types";
import { Issue_Approver_Status } from "@/types/proto/v1/issue_service";
import { hasProjectPermissionV2 } from "@/utils";
import { extractUserResourceName } from "../../user";
-import { SearchParams, getValueFromSearchParams } from "./common";
+import type { SearchParams } from "./common";
+import { getValueFromSearchParams } from "./common";
export const IssueApprovalStatusList = ["pending", "approved"] as const;
export type IssueApprovalStatus = (typeof IssueApprovalStatusList)[number];
diff --git a/frontend/src/utils/v1/project.ts b/frontend/src/utils/v1/project.ts
index 64c889ab89..514a3dd04b 100644
--- a/frontend/src/utils/v1/project.ts
+++ b/frontend/src/utils/v1/project.ts
@@ -8,8 +8,8 @@ import {
} from "@/types";
import { User } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
-import { IamPolicy } from "@/types/proto/v1/iam_policy";
-import { Project } from "@/types/proto/v1/project_service";
+import type { IamPolicy } from "@/types/proto/v1/iam_policy";
+import type { Project } from "@/types/proto/v1/project_service";
export const extractProjectResourceName = (name: string) => {
const pattern = /(?:^|\/)projects\/([^/]+)(?:$|\/)/;
diff --git a/frontend/src/utils/v1/projectWebhook.ts b/frontend/src/utils/v1/projectWebhook.ts
index 9d39b3367d..1b4f354769 100644
--- a/frontend/src/utils/v1/projectWebhook.ts
+++ b/frontend/src/utils/v1/projectWebhook.ts
@@ -1,5 +1,5 @@
import slug from "slug";
-import { Webhook } from "@/types/proto/v1/project_service";
+import type { Webhook } from "@/types/proto/v1/project_service";
export const extractProjectWebhookID = (name: string) => {
const pattern = /(?:^|\/)webhooks\/([^/]+)(?:$|\/)/;
diff --git a/frontend/src/utils/v1/sheet.ts b/frontend/src/utils/v1/sheet.ts
index 3db28ae452..6d6123ce14 100644
--- a/frontend/src/utils/v1/sheet.ts
+++ b/frontend/src/utils/v1/sheet.ts
@@ -1,5 +1,5 @@
-import { Sheet } from "@/types/proto/v1/sheet_service";
-import { Worksheet } from "@/types/proto/v1/worksheet_service";
+import type { Sheet } from "@/types/proto/v1/sheet_service";
+import type { Worksheet } from "@/types/proto/v1/worksheet_service";
import { getStatementSize } from "@/utils";
export const extractSheetUID = (name: string) => {
diff --git a/frontend/src/utils/v1/sqlEditor.ts b/frontend/src/utils/v1/sqlEditor.ts
index 3bb5f6a2ec..839e379015 100644
--- a/frontend/src/utils/v1/sqlEditor.ts
+++ b/frontend/src/utils/v1/sqlEditor.ts
@@ -1,5 +1,6 @@
import slug from "slug";
-import { ComposedDatabase, ComposedInstance, UNKNOWN_ID } from "@/types";
+import type { ComposedDatabase, ComposedInstance } from "@/types";
+import { UNKNOWN_ID } from "@/types";
const databaseV1Slug = (db: ComposedDatabase) => {
return [slug(db.databaseName), db.uid].join("-");
diff --git a/frontend/src/utils/v1/vcs.ts b/frontend/src/utils/v1/vcs.ts
index d144015821..ebc751f8d8 100644
--- a/frontend/src/utils/v1/vcs.ts
+++ b/frontend/src/utils/v1/vcs.ts
@@ -1,8 +1,6 @@
-import { VCSUIType } from "@/types";
-import {
- VCSProvider,
- VCSProvider_Type,
-} from "@/types/proto/v1/vcs_provider_service";
+import type { VCSUIType } from "@/types";
+import type { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
+import { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";
export const getVCSUIType = (vcs: VCSProvider): VCSUIType => {
switch (vcs.type) {
diff --git a/frontend/src/utils/v1/worksheet.ts b/frontend/src/utils/v1/worksheet.ts
index e5ceaef732..433e65be2e 100644
--- a/frontend/src/utils/v1/worksheet.ts
+++ b/frontend/src/utils/v1/worksheet.ts
@@ -1,10 +1,8 @@
import { useCurrentUserV1, useProjectV1Store } from "@/store";
import { getUserEmailFromIdentifier } from "@/store/modules/v1/common";
import { PresetRoleType } from "@/types";
-import {
- Worksheet,
- Worksheet_Visibility,
-} from "@/types/proto/v1/worksheet_service";
+import type { Worksheet } from "@/types/proto/v1/worksheet_service";
+import { Worksheet_Visibility } from "@/types/proto/v1/worksheet_service";
import { isMemberOfProjectV1, isOwnerOfProjectV1 } from "@/utils";
export const extractWorksheetUID = (name: string) => {
diff --git a/frontend/src/utils/workspaceApprovalSetting.ts b/frontend/src/utils/workspaceApprovalSetting.ts
index 65221bb4ec..fcf4f8e169 100644
--- a/frontend/src/utils/workspaceApprovalSetting.ts
+++ b/frontend/src/utils/workspaceApprovalSetting.ts
@@ -1,36 +1,26 @@
import { cloneDeep, isNumber } from "lodash-es";
import { v4 as uuidv4 } from "uuid";
-import {
- buildCELExpr,
- EqualityExpr,
- LogicalExpr,
- resolveCELExpr,
- SimpleExpr,
-} from "@/plugins/cel";
+import type { EqualityExpr, LogicalExpr, SimpleExpr } from "@/plugins/cel";
+import { buildCELExpr, resolveCELExpr } from "@/plugins/cel";
import { t, te } from "@/plugins/i18n";
import { useSettingV1Store, useUserStore } from "@/store";
import { userNamePrefix } from "@/store/modules/v1/common";
+import type { ParsedApprovalRule, UnrecognizedApprovalRule } from "@/types";
import {
DEFAULT_RISK_LEVEL,
- ParsedApprovalRule,
SYSTEM_BOT_EMAIL,
unknownUser,
UNKNOWN_USER_NAME,
- UnrecognizedApprovalRule,
-} from "@/types";
-import {
- LocalApprovalConfig,
- LocalApprovalRule,
- PresetRiskLevelList,
- SupportedSourceList,
} from "@/types";
+import type { LocalApprovalConfig, LocalApprovalRule } from "@/types";
+import { PresetRiskLevelList, SupportedSourceList } from "@/types";
import {
ParsedExpr,
Expr as CELExpr,
} from "@/types/proto/google/api/expr/v1alpha1/syntax";
import { Expr } from "@/types/proto/google/type/expr";
+import type { ApprovalNode } from "@/types/proto/v1/issue_service";
import {
- ApprovalNode,
ApprovalNode_GroupValue,
approvalNode_GroupValueToJSON,
ApprovalNode_Type,
diff --git a/frontend/src/views/AnomalyCenterDashboard.vue b/frontend/src/views/AnomalyCenterDashboard.vue
index 0441d0660b..fba9bca52c 100644
--- a/frontend/src/views/AnomalyCenterDashboard.vue
+++ b/frontend/src/views/AnomalyCenterDashboard.vue
@@ -6,9 +6,8 @@
<script lang="ts" setup>
import { computed } from "vue";
-import AnomalyCenterDashboard, {
- AnomalyTabId,
-} from "@/components/AnomalyCenter/AnomalyCenterDashboard.vue";
+import type { AnomalyTabId } from "@/components/AnomalyCenter/AnomalyCenterDashboard.vue";
+import AnomalyCenterDashboard from "@/components/AnomalyCenter/AnomalyCenterDashboard.vue";
import { useCurrentUserV1 } from "@/store";
import { hasWorkspacePermissionV2 } from "@/utils";
diff --git a/frontend/src/views/Archive.vue b/frontend/src/views/Archive.vue
index 19b0b480d4..6260ca4e19 100644
--- a/frontend/src/views/Archive.vue
+++ b/frontend/src/views/Archive.vue
@@ -50,7 +50,7 @@ import {
useProjectV1List,
} from "@/store";
import { State } from "@/types/proto/v1/common";
-import { IdentityProvider } from "@/types/proto/v1/idp_service";
+import type { IdentityProvider } from "@/types/proto/v1/idp_service";
import {
filterProjectV1ListByKeyword,
hasWorkspacePermissionV2,
diff --git a/frontend/src/views/BannerUpgradeSubscription.vue b/frontend/src/views/BannerUpgradeSubscription.vue
index ab4ccbe03b..5777ec57fc 100644
--- a/frontend/src/views/BannerUpgradeSubscription.vue
+++ b/frontend/src/views/BannerUpgradeSubscription.vue
@@ -77,7 +77,8 @@ import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/router/dashboard/workspaceSetting";
import { useSubscriptionV1Store, useActuatorV1Store } from "@/store";
-import { FeatureType, planTypeToString } from "@/types";
+import type { FeatureType } from "@/types";
+import { planTypeToString } from "@/types";
import { PlanType } from "@/types/proto/v1/subscription_service";
interface LocalState {
diff --git a/frontend/src/views/ChangeHistoryDetail.vue b/frontend/src/views/ChangeHistoryDetail.vue
index 34a33403e8..e98dfcc45e 100644
--- a/frontend/src/views/ChangeHistoryDetail.vue
+++ b/frontend/src/views/ChangeHistoryDetail.vue
@@ -349,16 +349,17 @@ import {
databaseNamePrefix,
instanceNamePrefix,
} from "@/store/modules/v1/common";
-import { AffectedTable } from "@/types/changeHistory";
+import type { AffectedTable } from "@/types/changeHistory";
import { Engine } from "@/types/proto/v1/common";
+import type { ChangeHistory } from "@/types/proto/v1/database_service";
import {
- ChangeHistory,
ChangeHistory_Type,
changeHistory_SourceToJSON,
changeHistory_TypeToJSON,
ChangeHistoryView,
} from "@/types/proto/v1/database_service";
-import { PushEvent, VcsType, vcsTypeToJSON } from "@/types/proto/v1/vcs";
+import type { PushEvent } from "@/types/proto/v1/vcs";
+import { VcsType, vcsTypeToJSON } from "@/types/proto/v1/vcs";
import {
changeHistoryLink,
extractIssueUID,
diff --git a/frontend/src/views/DashboardSidebar.vue b/frontend/src/views/DashboardSidebar.vue
index 3d0f179982..3f142a7747 100644
--- a/frontend/src/views/DashboardSidebar.vue
+++ b/frontend/src/views/DashboardSidebar.vue
@@ -8,7 +8,8 @@
</template>
<script lang="ts" setup>
-import { Action, defineAction, useRegisterActions } from "@bytebase/vue-kbar";
+import type { Action } from "@bytebase/vue-kbar";
+import { defineAction, useRegisterActions } from "@bytebase/vue-kbar";
import {
LinkIcon,
HomeIcon,
@@ -23,8 +24,9 @@ import {
} from "lucide-vue-next";
import { computed, h } from "vue";
import { useI18n } from "vue-i18n";
-import { useRouter, useRoute, RouteRecordRaw } from "vue-router";
-import { SidebarItem } from "@/components/CommonSidebar.vue";
+import type { RouteRecordRaw } from "vue-router";
+import { useRouter, useRoute } from "vue-router";
+import type { SidebarItem } from "@/components/CommonSidebar.vue";
import { useGlobalDatabaseActions } from "@/components/KBar/useDatabaseActions";
import { useProjectActions } from "@/components/KBar/useProjectActions";
import workspaceRoutes from "@/router/dashboard/workspace";
@@ -49,7 +51,7 @@ import {
} from "@/router/dashboard/workspaceRoutes";
import { SETTING_ROUTE_WORKSPACE_GENERAL } from "@/router/dashboard/workspaceSetting";
import { useCurrentUserV1 } from "@/store";
-import { WorkspacePermission } from "@/types";
+import type { WorkspacePermission } from "@/types";
import { hasWorkspacePermissionV2, hasProjectPermissionV2 } from "@/utils";
interface DashboardSidebarItem extends SidebarItem {
diff --git a/frontend/src/views/DatabaseDashboard.vue b/frontend/src/views/DatabaseDashboard.vue
index 7ab50bfddc..5bb0596426 100644
--- a/frontend/src/views/DatabaseDashboard.vue
+++ b/frontend/src/views/DatabaseDashboard.vue
@@ -78,16 +78,14 @@ import {
useProjectV1List,
useUIStateStore,
} from "@/store";
+import type { ComposedDatabase, ComposedDatabaseGroup } from "@/types";
import {
UNKNOWN_ID,
UNKNOWN_USER_NAME,
- ComposedDatabase,
- ComposedDatabaseGroup,
DEFAULT_PROJECT_V1_NAME,
} from "@/types";
+import type { SearchScopeId, SearchParams } from "@/utils";
import {
- SearchScopeId,
- SearchParams,
filterDatabaseV1ByKeyword,
sortDatabaseV1List,
CommonFilterScopeIdList,
diff --git a/frontend/src/views/DatabaseDetail.vue b/frontend/src/views/DatabaseDetail.vue
index d818beacb3..9d97c0e4af 100644
--- a/frontend/src/views/DatabaseDetail.vue
+++ b/frontend/src/views/DatabaseDetail.vue
@@ -198,7 +198,7 @@
import { useTitle } from "@vueuse/core";
import dayjs from "dayjs";
import { NButton, NTabPane, NTabs } from "naive-ui";
-import { ClientError } from "nice-grpc-web";
+import type { ClientError } from "nice-grpc-web";
import { computed, reactive, watch, ref, onMounted } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
@@ -235,7 +235,7 @@ import {
instanceNamePrefix,
} from "@/store/modules/v1/common";
import { UNKNOWN_ID, unknownEnvironment } from "@/types";
-import { Anomaly } from "@/types/proto/v1/anomaly_service";
+import type { Anomaly } from "@/types/proto/v1/anomaly_service";
import { State } from "@/types/proto/v1/common";
import {
instanceV1HasAlterSchema,
diff --git a/frontend/src/views/DatabaseGroupDetail.vue b/frontend/src/views/DatabaseGroupDetail.vue
index f398cceaee..f1bd6e80ed 100644
--- a/frontend/src/views/DatabaseGroupDetail.vue
+++ b/frontend/src/views/DatabaseGroupDetail.vue
@@ -139,9 +139,10 @@ import DatabaseGroupPrevEditorModal from "@/components/AlterSchemaPrepForm/Datab
import DatabaseGroupPanel from "@/components/DatabaseGroup/DatabaseGroupPanel.vue";
import MatchedDatabaseView from "@/components/DatabaseGroup/MatchedDatabaseView.vue";
import SchemaGroupTable from "@/components/DatabaseGroup/SchemaGroupTable.vue";
-import { FactorList, ResourceType } from "@/components/DatabaseGroup/utils";
+import type { ResourceType } from "@/components/DatabaseGroup/utils";
+import { FactorList } from "@/components/DatabaseGroup/utils";
import ExprEditor from "@/components/ExprEditor";
-import { ConditionGroupExpr } from "@/plugins/cel";
+import type { ConditionGroupExpr } from "@/plugins/cel";
import {
useCurrentUserV1,
useDBGroupStore,
@@ -150,8 +151,11 @@ import {
} from "@/store";
import { databaseGroupNamePrefix } from "@/store/modules/v1/common";
import { projectNamePrefix } from "@/store/modules/v1/common";
-import { ComposedDatabase, ComposedDatabaseGroup } from "@/types";
-import { DatabaseGroup, SchemaGroup } from "@/types/proto/v1/project_service";
+import type { ComposedDatabase, ComposedDatabaseGroup } from "@/types";
+import type {
+ DatabaseGroup,
+ SchemaGroup,
+} from "@/types/proto/v1/project_service";
import { hasPermissionToCreateChangeDatabaseIssueInProject } from "@/utils";
interface LocalState {
diff --git a/frontend/src/views/EnvironmentDashboard.vue b/frontend/src/views/EnvironmentDashboard.vue
index a400827c2d..f5c78b8e51 100644
--- a/frontend/src/views/EnvironmentDashboard.vue
+++ b/frontend/src/views/EnvironmentDashboard.vue
@@ -75,14 +75,12 @@ import {
getEmptyRolloutPolicy,
} from "@/store/modules/v1/policy";
import { VirtualRoleType, emptyEnvironment } from "@/types";
-import {
+import type {
Environment,
EnvironmentTier,
} from "@/types/proto/v1/environment_service";
-import {
- Policy,
- PolicyResourceType,
-} from "@/types/proto/v1/org_policy_service";
+import type { Policy } from "@/types/proto/v1/org_policy_service";
+import { PolicyResourceType } from "@/types/proto/v1/org_policy_service";
import type { BBTabItem } from "../bbkit/types";
import EnvironmentForm from "../components/EnvironmentForm.vue";
import { arraySwap, extractEnvironmentResourceName } from "../utils";
diff --git a/frontend/src/views/EnvironmentDetail.vue b/frontend/src/views/EnvironmentDetail.vue
index a0a8ebc17d..22fcdb40ac 100644
--- a/frontend/src/views/EnvironmentDetail.vue
+++ b/frontend/src/views/EnvironmentDetail.vue
@@ -40,12 +40,12 @@ import {
} from "@/store/modules/v1/policy";
import { VirtualRoleType, unknownEnvironment } from "@/types";
import { State } from "@/types/proto/v1/common";
-import {
+import type {
Environment,
EnvironmentTier,
} from "@/types/proto/v1/environment_service";
+import type { Policy as PolicyV1 } from "@/types/proto/v1/org_policy_service";
import {
- Policy as PolicyV1,
PolicyType as PolicyTypeV1,
PolicyResourceType,
} from "@/types/proto/v1/org_policy_service";
diff --git a/frontend/src/views/ExportCenter/ExportDataButton.vue b/frontend/src/views/ExportCenter/ExportDataButton.vue
index 3f402d3209..bb71a38d15 100644
--- a/frontend/src/views/ExportCenter/ExportDataButton.vue
+++ b/frontend/src/views/ExportCenter/ExportDataButton.vue
@@ -13,12 +13,12 @@
</template>
<script lang="ts" setup>
-import { BinaryLike } from "node:crypto";
-import { ExportOption } from "@/components/DataExportButton.vue";
+import type { BinaryLike } from "node:crypto";
+import type { ExportOption } from "@/components/DataExportButton.vue";
import { useProjectIamPolicyStore } from "@/store";
import { useExportData } from "@/store/modules/export";
import { ExportFormat } from "@/types/proto/v1/common";
-import { ExportRecord } from "./types";
+import type { ExportRecord } from "./types";
const props = defineProps<{
exportRecord: ExportRecord;
diff --git a/frontend/src/views/ExportCenter/ExportRecordTable.vue b/frontend/src/views/ExportCenter/ExportRecordTable.vue
index 269060660e..037e258052 100644
--- a/frontend/src/views/ExportCenter/ExportRecordTable.vue
+++ b/frontend/src/views/ExportCenter/ExportRecordTable.vue
@@ -65,11 +65,11 @@
import dayjs from "dayjs";
import { computed, shallowRef } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGridColumn } from "@/bbkit";
+import type { BBGridColumn } from "@/bbkit";
import { InstanceV1Name } from "@/components/v2";
import { UNKNOWN_ID } from "@/types";
import ExportDataButton from "./ExportDataButton.vue";
-import { ExportRecord } from "./types";
+import type { ExportRecord } from "./types";
defineProps<{
exportRecords: ExportRecord[];
diff --git a/frontend/src/views/ExportCenter/index.vue b/frontend/src/views/ExportCenter/index.vue
index 7b0a47d6f6..c89792cf6d 100644
--- a/frontend/src/views/ExportCenter/index.vue
+++ b/frontend/src/views/ExportCenter/index.vue
@@ -63,10 +63,10 @@ import {
useProjectV1Store,
} from "@/store";
import { UNKNOWN_ID, PresetRoleType } from "@/types";
-import { SearchParams, SearchScopeId } from "@/utils";
+import type { SearchParams, SearchScopeId } from "@/utils";
import { convertFromExpr } from "@/utils/issue/cel";
import ExportRecordTable from "./ExportRecordTable.vue";
-import { ExportRecord } from "./types";
+import type { ExportRecord } from "./types";
interface LocalState {
exportRecords: ExportRecord[];
diff --git a/frontend/src/views/ExportCenter/types.ts b/frontend/src/views/ExportCenter/types.ts
index db11067ad9..bf2c5a6809 100644
--- a/frontend/src/views/ExportCenter/types.ts
+++ b/frontend/src/views/ExportCenter/types.ts
@@ -1,4 +1,4 @@
-import { ComposedDatabase, DatabaseResource } from "@/types";
+import type { ComposedDatabase, DatabaseResource } from "@/types";
export interface ExportRecord {
databaseResource: DatabaseResource;
diff --git a/frontend/src/views/Home.vue b/frontend/src/views/Home.vue
index 0722ce7df8..247311f534 100644
--- a/frontend/src/views/Home.vue
+++ b/frontend/src/views/Home.vue
@@ -150,16 +150,16 @@ import { useRoute, useRouter } from "vue-router";
import { IssueSearch } from "@/components/IssueV1/components";
import IssueTableV1 from "@/components/IssueV1/components/IssueTableV1.vue";
import PagedIssueTableV1 from "@/components/IssueV1/components/PagedIssueTableV1.vue";
-import { TabFilter, TabFilterItem } from "@/components/v2";
+import type { TabFilterItem } from "@/components/v2";
+import { TabFilter } from "@/components/v2";
import {
useSubscriptionV1Store,
useOnboardingStateStore,
useCurrentUserV1,
} from "@/store";
import { planTypeToString } from "@/types";
+import type { SearchParams, SearchScopeId } from "@/utils";
import {
- SearchParams,
- SearchScopeId,
buildIssueFilterBySearchParams,
buildSearchParamsBySearchText,
buildSearchTextBySearchParams,
diff --git a/frontend/src/views/InstanceDashboard.vue b/frontend/src/views/InstanceDashboard.vue
index 22dcbd80a5..0caa2874a9 100644
--- a/frontend/src/views/InstanceDashboard.vue
+++ b/frontend/src/views/InstanceDashboard.vue
@@ -34,11 +34,10 @@ import {
} from "@/store";
import { UNKNOWN_ID } from "@/types";
import { PlanType } from "@/types/proto/v1/subscription_service";
+import type { SearchParams, SearchScopeId } from "@/utils";
import {
sortInstanceV1ListByEnvironmentV1,
extractEnvironmentResourceName,
- SearchParams,
- SearchScopeId,
} from "@/utils";
interface LocalState {
diff --git a/frontend/src/views/InstanceDetail.vue b/frontend/src/views/InstanceDetail.vue
index 7d646a7879..7c5d689073 100644
--- a/frontend/src/views/InstanceDetail.vue
+++ b/frontend/src/views/InstanceDetail.vue
@@ -63,7 +63,7 @@
<script lang="ts" setup>
import { useTitle } from "@vueuse/core";
import { NButton, NTabPane, NTabs } from "naive-ui";
-import { ClientError } from "nice-grpc-web";
+import type { ClientError } from "nice-grpc-web";
import { computed, reactive, watchEffect } from "vue";
import { useI18n } from "vue-i18n";
import ArchiveBanner from "@/components/ArchiveBanner.vue";
diff --git a/frontend/src/views/IssueDashboard.vue b/frontend/src/views/IssueDashboard.vue
index 553c84ca83..390c1a46f1 100644
--- a/frontend/src/views/IssueDashboard.vue
+++ b/frontend/src/views/IssueDashboard.vue
@@ -37,8 +37,8 @@ import IssueSearch from "@/components/IssueV1/components/IssueSearch";
import IssueTableV1 from "@/components/IssueV1/components/IssueTableV1.vue";
import PagedIssueTableV1 from "@/components/IssueV1/components/PagedIssueTableV1.vue";
import { useProjectV1Store } from "@/store";
+import type { SearchParams } from "@/utils";
import {
- SearchParams,
buildSearchParamsBySearchText,
buildIssueFilterBySearchParams,
buildUIIssueFilterBySearchParams,
diff --git a/frontend/src/views/OAuthCallback.vue b/frontend/src/views/OAuthCallback.vue
index 1e80ce37fa..b61797c008 100644
--- a/frontend/src/views/OAuthCallback.vue
+++ b/frontend/src/views/OAuthCallback.vue
@@ -18,7 +18,7 @@ import { onMounted, reactive } from "vue";
import { useRoute, useRouter } from "vue-router";
import { AUTH_MFA_MODULE } from "@/router/auth";
import { useAuthStore } from "@/store";
-import { OAuthState, OAuthWindowEventPayload } from "../types";
+import type { OAuthState, OAuthWindowEventPayload } from "../types";
interface LocalState {
message: string;
diff --git a/frontend/src/views/ProfileDashboard.vue b/frontend/src/views/ProfileDashboard.vue
index 98c4ea0f2c..ef35188696 100644
--- a/frontend/src/views/ProfileDashboard.vue
+++ b/frontend/src/views/ProfileDashboard.vue
@@ -240,7 +240,8 @@
<script lang="ts" setup>
import { useTitle } from "@vueuse/core";
import { cloneDeep, isEmpty, isEqual } from "lodash-es";
-import { NButton, NInput, NDropdown, DropdownOption } from "naive-ui";
+import type { DropdownOption } from "naive-ui";
+import { NButton, NInput, NDropdown } from "naive-ui";
import { nextTick, computed, onMounted, onUnmounted, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
@@ -259,11 +260,8 @@ import {
useUserStore,
} from "@/store";
import { unknownUser } from "@/types";
-import {
- UpdateUserRequest,
- User,
- UserType,
-} from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
+import { UpdateUserRequest, UserType } from "@/types/proto/v1/auth_service";
import { displayRoleTitle, hasWorkspacePermissionV2, sortRoles } from "@/utils";
interface LocalState {
diff --git a/frontend/src/views/SchemaGroupDetail.vue b/frontend/src/views/SchemaGroupDetail.vue
index 79b005694b..cf2c6a8888 100644
--- a/frontend/src/views/SchemaGroupDetail.vue
+++ b/frontend/src/views/SchemaGroupDetail.vue
@@ -105,7 +105,7 @@ import MatchedTableView from "@/components/DatabaseGroup/MatchedTableView.vue";
import { FactorList } from "@/components/DatabaseGroup/utils";
import ExprEditor from "@/components/ExprEditor";
import DatabaseGroupName from "@/components/v2/Model/DatabaseGroupName.vue";
-import { ConditionGroupExpr } from "@/plugins/cel";
+import type { ConditionGroupExpr } from "@/plugins/cel";
import {
useDBGroupStore,
useProjectV1Store,
@@ -116,7 +116,7 @@ import {
schemaGroupNamePrefix,
} from "@/store/modules/v1/common";
import { projectNamePrefix } from "@/store/modules/v1/common";
-import { ComposedSchemaGroupTable } from "@/types";
+import type { ComposedSchemaGroupTable } from "@/types";
import { convertCELStringToExpr } from "@/utils/databaseGroup/cel";
interface LocalState {
diff --git a/frontend/src/views/SchemaTemplate/ColumnTypes.vue b/frontend/src/views/SchemaTemplate/ColumnTypes.vue
index cbd5669296..c8218a33fb 100644
--- a/frontend/src/views/SchemaTemplate/ColumnTypes.vue
+++ b/frontend/src/views/SchemaTemplate/ColumnTypes.vue
@@ -122,10 +122,10 @@ import { computed, onMounted, ref } from "vue";
import EngineIcon from "@/components/Icon/EngineIcon.vue";
import { pushNotification, useSettingV1Store } from "@/store";
import { Engine } from "@/types/proto/v1/common";
+import type { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";
import {
SchemaTemplateSetting,
SchemaTemplateSetting_ColumnType,
- SchemaTemplateSetting_FieldTemplate,
} from "@/types/proto/v1/setting_service";
import { getDataTypeSuggestionList } from "@/utils";
import ColumnTypesUpdateFailedModal from "./ColumnTypesUpdateFailedModal.vue";
diff --git a/frontend/src/views/SchemaTemplate/ColumnTypesUpdateFailedModal.vue b/frontend/src/views/SchemaTemplate/ColumnTypesUpdateFailedModal.vue
index b622746088..212082526d 100644
--- a/frontend/src/views/SchemaTemplate/ColumnTypesUpdateFailedModal.vue
+++ b/frontend/src/views/SchemaTemplate/ColumnTypesUpdateFailedModal.vue
@@ -41,7 +41,7 @@
<script lang="ts" setup>
import { computed } from "vue";
-import { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";
+import type { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";
const props = defineProps<{
fieldTemplates: SchemaTemplateSetting_FieldTemplate[];
diff --git a/frontend/src/views/SchemaTemplate/FieldTemplates.vue b/frontend/src/views/SchemaTemplate/FieldTemplates.vue
index 63bcf679f8..528e1abde0 100644
--- a/frontend/src/views/SchemaTemplate/FieldTemplates.vue
+++ b/frontend/src/views/SchemaTemplate/FieldTemplates.vue
@@ -76,7 +76,7 @@ import {
ColumnMetadata,
ColumnConfig,
} from "@/types/proto/v1/database_service";
-import { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";
+import type { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";
interface LocalState {
template: SchemaTemplateSetting_FieldTemplate;
diff --git a/frontend/src/views/SchemaTemplate/TableTemplates.vue b/frontend/src/views/SchemaTemplate/TableTemplates.vue
index 1f58e9f959..7a96496f06 100644
--- a/frontend/src/views/SchemaTemplate/TableTemplates.vue
+++ b/frontend/src/views/SchemaTemplate/TableTemplates.vue
@@ -73,7 +73,7 @@ import { Drawer, SearchBox } from "@/components/v2";
import { useSettingV1Store } from "@/store";
import { Engine } from "@/types/proto/v1/common";
import { TableMetadata, TableConfig } from "@/types/proto/v1/database_service";
-import { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";
+import type { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";
interface LocalState {
template: SchemaTemplateSetting_TableTemplate;
diff --git a/frontend/src/views/SettingSidebar.vue b/frontend/src/views/SettingSidebar.vue
index f738a275d0..a4e80608bd 100644
--- a/frontend/src/views/SettingSidebar.vue
+++ b/frontend/src/views/SettingSidebar.vue
@@ -11,8 +11,9 @@
import { UserCircle, Building, Archive } from "lucide-vue-next";
import { computed, h } from "vue";
import { useI18n } from "vue-i18n";
-import { RouteRecordRaw, useRoute, useRouter } from "vue-router";
-import { SidebarItem } from "@/components/CommonSidebar.vue";
+import type { RouteRecordRaw } from "vue-router";
+import { useRoute, useRouter } from "vue-router";
+import type { SidebarItem } from "@/components/CommonSidebar.vue";
import workspaceSettingRoutes, {
SETTING_ROUTE_PROFILE,
SETTING_ROUTE_PROFILE_TWO_FACTOR,
diff --git a/frontend/src/views/SettingWorkspaceAuditLog.vue b/frontend/src/views/SettingWorkspaceAuditLog.vue
index ba13f9c0de..1a5c0580b5 100644
--- a/frontend/src/views/SettingWorkspaceAuditLog.vue
+++ b/frontend/src/views/SettingWorkspaceAuditLog.vue
@@ -89,26 +89,26 @@
<script lang="ts" setup>
import dayjs from "dayjs";
import { NGrid, NGi, NDatePicker } from "naive-ui";
-import { BinaryLike } from "node:crypto";
+import type { BinaryLike } from "node:crypto";
import { reactive, ref, computed, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRoute, useRouter } from "vue-router";
import { BBDialog } from "@/bbkit";
-import { ExportOption } from "@/components/DataExportButton.vue";
+import type { ExportOption } from "@/components/DataExportButton.vue";
import { WORKSPACE_ROUTE_AUDIT_LOG } from "@/router/dashboard/workspaceRoutes";
import { featureToRef, useUserStore, useActivityV1Store } from "@/store";
+import type { FindActivityMessage } from "@/types";
import {
AuditActivityTypeList,
UNKNOWN_ID,
AuditActivityTypeI18nNameMap,
- FindActivityMessage,
} from "@/types";
import { ExportFormat } from "@/types/proto/v1/common";
-import {
+import type {
LogEntity,
LogEntity_Action,
- logEntity_LevelToJSON,
} from "@/types/proto/v1/logging_service";
+import { logEntity_LevelToJSON } from "@/types/proto/v1/logging_service";
const dialog = ref<InstanceType<typeof BBDialog> | null>(null);
const state = reactive({
diff --git a/frontend/src/views/SettingWorkspaceDebugLog.vue b/frontend/src/views/SettingWorkspaceDebugLog.vue
index beded51c60..c6bde1b65d 100644
--- a/frontend/src/views/SettingWorkspaceDebugLog.vue
+++ b/frontend/src/views/SettingWorkspaceDebugLog.vue
@@ -90,7 +90,7 @@ import {
useActuatorV1Store,
useNotificationStore,
} from "@/store";
-import { DebugLog } from "@/types/proto/v1/actuator_service";
+import type { DebugLog } from "@/types/proto/v1/actuator_service";
const dialog = ref<InstanceType<typeof BBDialog> | null>(null);
diff --git a/frontend/src/views/SettingWorkspaceMailDelivery.vue b/frontend/src/views/SettingWorkspaceMailDelivery.vue
index 89c3ee38cb..f586250cf6 100644
--- a/frontend/src/views/SettingWorkspaceMailDelivery.vue
+++ b/frontend/src/views/SettingWorkspaceMailDelivery.vue
@@ -183,14 +183,15 @@
<script lang="ts" setup>
import { cloneDeep, isEqual } from "lodash-es";
-import { SelectOption, NCheckbox } from "naive-ui";
-import { ClientError } from "nice-grpc-web";
+import type { SelectOption } from "naive-ui";
+import { NCheckbox } from "naive-ui";
+import type { ClientError } from "nice-grpc-web";
import { computed, onMounted, reactive } from "vue";
import { useI18n } from "vue-i18n";
import { pushNotification } from "@/store";
import { useWorkspaceMailDeliverySettingStore } from "@/store/modules/workspaceMailDeliverySetting";
+import type { SMTPMailDeliverySettingValue } from "@/types/proto/v1/setting_service";
import {
- SMTPMailDeliverySettingValue,
SMTPMailDeliverySettingValue_Authentication,
SMTPMailDeliverySettingValue_Encryption,
} from "@/types/proto/v1/setting_service";
diff --git a/frontend/src/views/SettingWorkspaceMember.vue b/frontend/src/views/SettingWorkspaceMember.vue
index 8870516535..d18549af6e 100644
--- a/frontend/src/views/SettingWorkspaceMember.vue
+++ b/frontend/src/views/SettingWorkspaceMember.vue
@@ -110,7 +110,8 @@ import {
useUserStore,
useUIStateStore,
} from "@/store";
-import { User, UserType } from "@/types/proto/v1/auth_service";
+import type { User } from "@/types/proto/v1/auth_service";
+import { UserType } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
import {
ALL_USERS_USER_EMAIL,
diff --git a/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue b/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue
index 89e3621274..f46ad9b402 100644
--- a/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue
+++ b/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue
@@ -145,7 +145,7 @@ import {
useSQLRuleFilter,
SQLRuleTable,
} from "@/components/SQLReview/components";
-import { PayloadForEngine } from "@/components/SQLReview/components/RuleConfigComponents";
+import type { PayloadForEngine } from "@/components/SQLReview/components/RuleConfigComponents";
import { EnvironmentV1Name } from "@/components/v2";
import { WORKSPACE_ROUTE_SQL_REVIEW } from "@/router/dashboard/workspaceRoutes";
import {
@@ -154,16 +154,15 @@ import {
useSQLReviewStore,
useSubscriptionV1Store,
} from "@/store";
+import type { RuleTemplate, SchemaPolicyRule } from "@/types";
import {
unknown,
- RuleTemplate,
- SchemaPolicyRule,
TEMPLATE_LIST,
convertPolicyRuleToRuleTemplate,
ruleIsAvailableInSubscription,
convertRuleTemplateToPolicyRule,
} from "@/types";
-import { Engine } from "@/types/proto/v1/common";
+import type { Engine } from "@/types/proto/v1/common";
import { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";
import { idFromSlug, hasWorkspacePermissionV2 } from "@/utils";
diff --git a/frontend/src/views/SettingWorkspaceSSO.vue b/frontend/src/views/SettingWorkspaceSSO.vue
index 34a079e7c8..46973626ad 100644
--- a/frontend/src/views/SettingWorkspaceSSO.vue
+++ b/frontend/src/views/SettingWorkspaceSSO.vue
@@ -95,7 +95,7 @@ import {
} from "@/router/dashboard/workspaceRoutes";
import { featureToRef, useCurrentUserV1 } from "@/store";
import { useIdentityProviderStore } from "@/store/modules/idp";
-import { IdentityProvider } from "@/types/proto/v1/idp_service";
+import type { IdentityProvider } from "@/types/proto/v1/idp_service";
import {
hasWorkspacePermissionV2,
identityProviderTypeToString,
diff --git a/frontend/src/views/SettingWorkspaceVCSDetail.vue b/frontend/src/views/SettingWorkspaceVCSDetail.vue
index cf5efa7ca0..98805a18b0 100644
--- a/frontend/src/views/SettingWorkspaceVCSDetail.vue
+++ b/frontend/src/views/SettingWorkspaceVCSDetail.vue
@@ -115,8 +115,8 @@ import {
useRepositoryV1Store,
useVCSV1Store,
} from "@/store";
-import { VCSUIType } from "@/types";
-import { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
+import type { VCSUIType } from "@/types";
+import type { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
import { getVCSUIType, hasWorkspacePermissionV2 } from "@/utils";
interface LocalState {
diff --git a/frontend/src/views/auth/Activate.vue b/frontend/src/views/auth/Activate.vue
index 9ded0f457e..0eb66f4567 100644
--- a/frontend/src/views/auth/Activate.vue
+++ b/frontend/src/views/auth/Activate.vue
@@ -81,7 +81,7 @@
import { defineComponent, reactive } from "vue";
import { useRouter } from "vue-router";
import { useAuthStore } from "@/store";
-import { ActivateInfo, RoleType } from "../../types";
+import type { ActivateInfo, RoleType } from "../../types";
interface LocalState {
email: string;
diff --git a/frontend/src/views/auth/Signin.vue b/frontend/src/views/auth/Signin.vue
index 0c29066d59..89e8412ff0 100644
--- a/frontend/src/views/auth/Signin.vue
+++ b/frontend/src/views/auth/Signin.vue
@@ -251,10 +251,8 @@ import {
useAuthStore,
useIdentityProviderStore,
} from "@/store";
-import {
- IdentityProvider,
- IdentityProviderType,
-} from "@/types/proto/v1/idp_service";
+import type { IdentityProvider } from "@/types/proto/v1/idp_service";
+import { IdentityProviderType } from "@/types/proto/v1/idp_service";
import { isValidEmail, openWindowForSSO } from "@/utils";
import AuthFooter from "./AuthFooter.vue";
diff --git a/frontend/src/views/auth/Signup.vue b/frontend/src/views/auth/Signup.vue
index 1b531b17f0..0dd2c91a92 100644
--- a/frontend/src/views/auth/Signup.vue
+++ b/frontend/src/views/auth/Signup.vue
@@ -220,7 +220,8 @@ import {
useAuthStore,
useOnboardingStateStore,
} from "@/store";
-import { SignupInfo, TEXT_VALIDATION_DELAY } from "@/types";
+import type { SignupInfo } from "@/types";
+import { TEXT_VALIDATION_DELAY } from "@/types";
import { isValidEmail } from "@/utils";
import AuthFooter from "./AuthFooter.vue";
diff --git a/frontend/src/views/branch/BranchDetail.vue b/frontend/src/views/branch/BranchDetail.vue
index 4ff4c31887..dc761685f7 100644
--- a/frontend/src/views/branch/BranchDetail.vue
+++ b/frontend/src/views/branch/BranchDetail.vue
@@ -31,7 +31,7 @@ import { PROJECT_V1_ROUTE_BRANCH_DETAIL } from "@/router/dashboard/projectV1";
import { useProjectV1Store } from "@/store";
import { useBranchStore } from "@/store/modules/branch";
import { projectNamePrefix } from "@/store/modules/v1/common";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
const props = defineProps<{
projectId: string;
diff --git a/frontend/src/views/branch/BranchMerge.vue b/frontend/src/views/branch/BranchMerge.vue
index 69dd8557fc..7954c21c82 100644
--- a/frontend/src/views/branch/BranchMerge.vue
+++ b/frontend/src/views/branch/BranchMerge.vue
@@ -22,7 +22,7 @@ import {
import { useProjectV1Store } from "@/store";
import { getProjectAndBranchId } from "@/store/modules/v1/common";
import { projectNamePrefix } from "@/store/modules/v1/common";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
const props = defineProps<{
projectId: string;
diff --git a/frontend/src/views/branch/BranchRebase.vue b/frontend/src/views/branch/BranchRebase.vue
index 5823305f97..5dc73cad3c 100644
--- a/frontend/src/views/branch/BranchRebase.vue
+++ b/frontend/src/views/branch/BranchRebase.vue
@@ -22,7 +22,7 @@ import {
import { useProjectV1Store } from "@/store";
import { getProjectAndBranchId } from "@/store/modules/v1/common";
import { projectNamePrefix } from "@/store/modules/v1/common";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
const props = defineProps<{
projectId: string;
diff --git a/frontend/src/views/branch/BranchRollout.vue b/frontend/src/views/branch/BranchRollout.vue
index 511c0573e8..c8617af7fd 100644
--- a/frontend/src/views/branch/BranchRollout.vue
+++ b/frontend/src/views/branch/BranchRollout.vue
@@ -19,7 +19,7 @@ import BranchRolloutView from "@/components/Branch/BranchRolloutView";
import { useProjectV1Store } from "@/store";
import { useBranchStore } from "@/store/modules/branch";
import { projectNamePrefix } from "@/store/modules/v1/common";
-import { Branch } from "@/types/proto/v1/branch_service";
+import type { Branch } from "@/types/proto/v1/branch_service";
const props = defineProps<{
projectId: string;
diff --git a/frontend/src/views/sql-editor/AsidePanel/DatabaseHoverPanel.vue b/frontend/src/views/sql-editor/AsidePanel/DatabaseHoverPanel.vue
index 4bf3496996..03d93cc1c9 100644
--- a/frontend/src/views/sql-editor/AsidePanel/DatabaseHoverPanel.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/DatabaseHoverPanel.vue
@@ -73,7 +73,7 @@ import {
ProjectV1Name,
} from "@/components/v2";
import { useSQLEditorTreeStore } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { useHoverStateContext } from "./hover-state";
const props = defineProps<{
diff --git a/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorItem.vue b/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorItem.vue
index 7754a0282c..400f5db289 100644
--- a/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorItem.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorItem.vue
@@ -14,10 +14,8 @@ import { NCheckbox } from "naive-ui";
import { storeToRefs } from "pinia";
import { computed } from "vue";
import { useSQLEditorTreeStore } from "@/store/modules";
-import {
- SQLEditorTreeFactor as Factor,
- readableSQLEditorTreeFactor,
-} from "@/types";
+import type { SQLEditorTreeFactor as Factor } from "@/types";
+import { readableSQLEditorTreeFactor } from "@/types";
const props = defineProps<{
factor: Factor;
diff --git a/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorPanel.vue b/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorPanel.vue
index c47a3deb6b..3dd6ede890 100644
--- a/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorPanel.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorPanel.vue
@@ -26,7 +26,7 @@ import { cloneDeep, orderBy, uniq } from "lodash-es";
import { storeToRefs } from "pinia";
import { computed } from "vue";
import { useSQLEditorTreeStore } from "@/store";
-import { SQLEditorTreeFactor as Factor } from "@/types";
+import type { SQLEditorTreeFactor as Factor } from "@/types";
import { useSQLEditorContext } from "../../context";
import FactorItem from "./FactorItem.vue";
import FactorTags from "./FactorTags.vue";
diff --git a/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorTag.vue b/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorTag.vue
index 4fe821b040..3236f43f5d 100644
--- a/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorTag.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorTag.vue
@@ -30,10 +30,8 @@
import { storeToRefs } from "pinia";
import { computed } from "vue";
import { useSQLEditorTreeStore } from "@/store";
-import {
- StatefulSQLEditorTreeFactor as StatefulFactor,
- readableSQLEditorTreeFactor,
-} from "@/types";
+import type { StatefulSQLEditorTreeFactor as StatefulFactor } from "@/types";
+import { readableSQLEditorTreeFactor } from "@/types";
const props = defineProps<{
factor: StatefulFactor;
diff --git a/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorTags.vue b/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorTags.vue
index 074e33e241..829f1b7711 100644
--- a/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorTags.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/GroupingBar/FactorTags.vue
@@ -14,7 +14,7 @@
<script lang="ts" setup>
import { storeToRefs } from "pinia";
import { useSQLEditorTreeStore } from "@/store";
-import { StatefulSQLEditorTreeFactor as StatefulFactor } from "@/types";
+import type { StatefulSQLEditorTreeFactor as StatefulFactor } from "@/types";
import { useSQLEditorContext } from "../../context";
import FactorTag from "./FactorTag.vue";
diff --git a/frontend/src/views/sql-editor/AsidePanel/SearchBox/index.vue b/frontend/src/views/sql-editor/AsidePanel/SearchBox/index.vue
index e9cd45be5b..d7b7a48630 100644
--- a/frontend/src/views/sql-editor/AsidePanel/SearchBox/index.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/SearchBox/index.vue
@@ -20,12 +20,14 @@
<script lang="ts" setup>
import { SearchIcon } from "lucide-vue-next";
-import { NAutoComplete, SelectOption } from "naive-ui";
+import type { SelectOption } from "naive-ui";
+import { NAutoComplete } from "naive-ui";
import { computed, watchEffect, h } from "vue";
import { useI18n } from "vue-i18n";
import { EnvironmentV1Name, InstanceV1EngineIcon } from "@/components/v2";
import { useDatabaseV1Store } from "@/store";
-import { CoreSQLEditorTab, DEFAULT_SQL_EDITOR_TAB_MODE } from "@/types";
+import type { CoreSQLEditorTab } from "@/types";
+import { DEFAULT_SQL_EDITOR_TAB_MODE } from "@/types";
import {
emptySQLEditorConnection,
tryConnectToCoreSQLEditorTab,
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/DatabaseNode.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/DatabaseNode.vue
index c326d82b02..4d45ef49e4 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/DatabaseNode.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/DatabaseNode.vue
@@ -35,7 +35,7 @@ import { computed } from "vue";
import DatabaseIcon from "~icons/heroicons-outline/circle-stack";
import { EnvironmentV1Name, InstanceV1EngineIcon } from "@/components/v2";
import { useSQLEditorTreeStore } from "@/store";
-import {
+import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
} from "@/types";
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/DummyNode.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/DummyNode.vue
index b54fb7d116..a2f6540698 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/DummyNode.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/DummyNode.vue
@@ -15,7 +15,7 @@
import { NPopover } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import {
+import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
} from "@/types";
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/EnvironmentNode.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/EnvironmentNode.vue
index f0d5d7972d..9262d52cf2 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/EnvironmentNode.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/EnvironmentNode.vue
@@ -8,7 +8,7 @@
<script setup lang="ts">
import { computed } from "vue";
import { ProductionEnvironmentV1Icon } from "@/components/v2";
-import {
+import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
} from "@/types";
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/ExternalTableNode.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/ExternalTableNode.vue
index 1ee4373490..cc67212fee 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/ExternalTableNode.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/ExternalTableNode.vue
@@ -12,7 +12,7 @@
<script setup lang="ts">
import { computed } from "vue";
import { TableIcon } from "@/components/Icon";
-import {
+import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
} from "@/types";
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/InstanceNode.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/InstanceNode.vue
index 866f1d8548..97d5bc1efd 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/InstanceNode.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/InstanceNode.vue
@@ -18,7 +18,7 @@
<script setup lang="ts">
import { computed } from "vue";
import { EnvironmentV1Name, InstanceV1EngineIcon } from "@/components/v2";
-import {
+import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
} from "@/types";
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/Label.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/Label.vue
index 82fe4b976b..c427f39b0f 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/Label.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/Label.vue
@@ -39,7 +39,7 @@
<script lang="ts" setup>
import { computed } from "vue";
-import {
+import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
} from "@/types";
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/LabelNode.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/LabelNode.vue
index 5289d87d64..92d09a8976 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/LabelNode.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/LabelNode.vue
@@ -15,7 +15,7 @@
<script setup lang="ts">
import { computed } from "vue";
-import {
+import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
} from "@/types";
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/PartitionTableNode.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/PartitionTableNode.vue
index e0c34981ce..d747002cad 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/PartitionTableNode.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/PartitionTableNode.vue
@@ -12,7 +12,7 @@
<script setup lang="ts">
import { computed } from "vue";
import { TableIcon } from "@/components/Icon";
-import {
+import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
} from "@/types";
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/ProjectNode.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/ProjectNode.vue
index f0ba9d0666..db60ce5321 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/ProjectNode.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/ProjectNode.vue
@@ -5,11 +5,11 @@
<script setup lang="ts">
import { computed } from "vue";
import { useI18n } from "vue-i18n";
-import {
+import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
- DEFAULT_PROJECT_ID,
} from "@/types";
+import { DEFAULT_PROJECT_ID } from "@/types";
import HighlightLabelText from "./HighlightLabelText.vue";
const props = defineProps<{
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/SchemaNode.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/SchemaNode.vue
index 57f3e4ff6e..f20045e1fe 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/SchemaNode.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/SchemaNode.vue
@@ -12,7 +12,7 @@
<script setup lang="ts">
import { computed } from "vue";
import SchemaIcon from "~icons/heroicons-outline/view-columns";
-import {
+import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
} from "@/types";
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/TableNode.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/TableNode.vue
index c62183ef72..f27f888132 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/TableNode.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/TableNode.vue
@@ -12,7 +12,7 @@
<script setup lang="ts">
import { computed } from "vue";
import { TableIcon } from "@/components/Icon";
-import {
+import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
} from "@/types";
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/TextNode.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/TextNode.vue
index 5842d6a11a..51283b9566 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/TextNode.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/TextNode.vue
@@ -14,7 +14,7 @@
import { isFunction } from "lodash-es";
import { computed } from "vue";
import { TableIcon, ViewIcon } from "@/components/Icon";
-import {
+import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
} from "@/types";
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/ViewNode.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/ViewNode.vue
index d85df8610e..7e75de292f 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/ViewNode.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/ViewNode.vue
@@ -12,7 +12,7 @@
<script setup lang="ts">
import { computed } from "vue";
import { ViewIcon } from "@/components/Icon";
-import {
+import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
} from "@/types";
diff --git a/frontend/src/views/sql-editor/AsidePanel/common.ts b/frontend/src/views/sql-editor/AsidePanel/common.ts
index be249908e9..6498aba718 100644
--- a/frontend/src/views/sql-editor/AsidePanel/common.ts
+++ b/frontend/src/views/sql-editor/AsidePanel/common.ts
@@ -1,4 +1,4 @@
-import { RenderFunction } from "vue";
+import type { RenderFunction } from "vue";
import { t } from "@/plugins/i18n";
import {
pushNotification,
@@ -6,13 +6,13 @@ import {
useDBSchemaV1Store,
mapTreeNodeByType,
} from "@/store";
-import {
+import type {
ComposedDatabase,
SQLEditorTreeNode,
SQLEditorTreeNodeType,
TextTarget,
} from "@/types";
-import {
+import type {
SchemaMetadata,
TableMetadata,
TablePartitionMetadata,
diff --git a/frontend/src/views/sql-editor/AsidePanel/hover-state.ts b/frontend/src/views/sql-editor/AsidePanel/hover-state.ts
index dc402ae797..5d55742189 100644
--- a/frontend/src/views/sql-editor/AsidePanel/hover-state.ts
+++ b/frontend/src/views/sql-editor/AsidePanel/hover-state.ts
@@ -1,6 +1,7 @@
-import { InjectionKey, Ref, inject, provide } from "vue";
+import type { InjectionKey, Ref } from "vue";
+import { inject, provide } from "vue";
import { useDelayedValue } from "@/composables/useDelayedValue";
-import { SQLEditorTreeNode } from "@/types";
+import type { SQLEditorTreeNode } from "@/types";
type UpdateFn = ReturnType<
typeof useDelayedValue<SQLEditorTreeNode | undefined>
diff --git a/frontend/src/views/sql-editor/EditorCommon/AdminModeButton.vue b/frontend/src/views/sql-editor/EditorCommon/AdminModeButton.vue
index a06373f2b1..3ca0978d9f 100644
--- a/frontend/src/views/sql-editor/EditorCommon/AdminModeButton.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/AdminModeButton.vue
@@ -20,7 +20,7 @@ import {
useSQLEditorTabStore,
useWebTerminalStore,
} from "@/store";
-import { CoreSQLEditorTab } from "@/types";
+import type { CoreSQLEditorTab } from "@/types";
import {
hasWorkspacePermissionV2,
suggestedTabTitleForSQLEditorConnection,
diff --git a/frontend/src/views/sql-editor/EditorCommon/BatchQueryDatabasesSelector.vue b/frontend/src/views/sql-editor/EditorCommon/BatchQueryDatabasesSelector.vue
index 2ee5129ab9..f8f45dc7bf 100644
--- a/frontend/src/views/sql-editor/EditorCommon/BatchQueryDatabasesSelector.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/BatchQueryDatabasesSelector.vue
@@ -95,14 +95,8 @@
</template>
<script lang="ts" setup>
-import {
- NPopover,
- NDivider,
- NDataTable,
- DataTableRowKey,
- NTag,
- DataTableColumn,
-} from "naive-ui";
+import type { DataTableRowKey, DataTableColumn } from "naive-ui";
+import { NPopover, NDivider, NDataTable, NTag } from "naive-ui";
import { computed, reactive, ref, watch } from "vue";
import { h } from "vue";
import { useI18n } from "vue-i18n";
@@ -115,7 +109,7 @@ import {
useDatabaseV1Store,
useSQLEditorTabStore,
} from "@/store/modules";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
interface LocalState {
databaseNameSearch: string;
diff --git a/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue b/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue
index b1ad580f30..9638835304 100644
--- a/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue
@@ -23,21 +23,16 @@
<script lang="ts" setup>
import { head, orderBy } from "lodash-es";
import { ChevronDown } from "lucide-vue-next";
-import {
- NButton,
- NEllipsis,
- NPopover,
- NSelect,
- SelectOption,
- SelectRenderLabel,
-} from "naive-ui";
+import type { SelectOption, SelectRenderLabel } from "naive-ui";
+import { NButton, NEllipsis, NPopover, NSelect } from "naive-ui";
import { computed, h, watch } from "vue";
import { useI18n } from "vue-i18n";
import {
useConnectionOfCurrentSQLEditorTab,
useSQLEditorTabStore,
} from "@/store";
-import { DataSource, DataSourceType } from "@/types/proto/v1/instance_service";
+import type { DataSource } from "@/types/proto/v1/instance_service";
+import { DataSourceType } from "@/types/proto/v1/instance_service";
interface DataSourceSelectOption extends SelectOption {
value: string;
diff --git a/frontend/src/views/sql-editor/EditorCommon/ReadonlyDatasourceHint.vue b/frontend/src/views/sql-editor/EditorCommon/ReadonlyDatasourceHint.vue
index 67b8cd3b60..dd4a7567ba 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ReadonlyDatasourceHint.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ReadonlyDatasourceHint.vue
@@ -27,7 +27,8 @@
<script setup lang="ts">
import { computed } from "vue";
import { useCurrentUserV1, useSQLEditorTabStore } from "@/store";
-import { ComposedInstance, UNKNOWN_ID } from "@/types";
+import type { ComposedInstance } from "@/types";
+import { UNKNOWN_ID } from "@/types";
import { DataSourceType } from "@/types/proto/v1/instance_service";
import { hasWorkspacePermissionV2 } from "@/utils";
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataBlock.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataBlock.vue
index 065971ac83..3e9a7a245c 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataBlock.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataBlock.vue
@@ -60,10 +60,10 @@
</template>
<script setup lang="ts">
-import { Table } from "@tanstack/vue-table";
+import type { Table } from "@tanstack/vue-table";
import { computed } from "vue";
import { useSubscriptionV1Store } from "@/store";
-import { QueryRow, RowValue } from "@/types/proto/v1/sql_service";
+import type { QueryRow, RowValue } from "@/types/proto/v1/sql_service";
import SensitiveDataIcon from "./DataTable/SensitiveDataIcon.vue";
import TableCell from "./DataTable/TableCell.vue";
import { useSQLResultViewContext } from "./context";
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/ColumnSortedIcon.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/ColumnSortedIcon.vue
index 390d0a5e92..8b6dece5d9 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/ColumnSortedIcon.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/ColumnSortedIcon.vue
@@ -10,7 +10,7 @@
</template>
<script lang="ts" setup>
-import { SortDirection } from "@tanstack/vue-table";
+import type { SortDirection } from "@tanstack/vue-table";
import { ArrowUpWideNarrow, ArrowDownWideNarrow } from "lucide-vue-next";
defineProps<{
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 e842a6962b..45c6916be1 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vue
@@ -105,7 +105,7 @@
</template>
<script lang="ts" setup>
-import { Table } from "@tanstack/vue-table";
+import type { Table } from "@tanstack/vue-table";
import { computed, nextTick, ref, watch } from "vue";
import { useSubscriptionV1Store } from "@/store";
import type { QueryRow, RowValue } from "@/types/proto/v1/sql_service";
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/TableCell.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/TableCell.vue
index 07bdf60e3e..a3d4e7aba5 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/TableCell.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/TableCell.vue
@@ -29,7 +29,7 @@ import { NButton } from "naive-ui";
import { computed, ref } from "vue";
import { useConnectionOfCurrentSQLEditorTab } from "@/store";
import { Engine } from "@/types/proto/v1/common";
-import { QueryRow, RowValue } from "@/types/proto/v1/sql_service";
+import type { QueryRow, RowValue } from "@/types/proto/v1/sql_service";
import { extractSQLRowValue, getHighlightHTMLByRegExp } from "@/utils";
import { useSQLResultViewContext } from "../context";
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/useTableResize.ts b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/useTableResize.ts
index 9be11558dd..2e29b6b42b 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/useTableResize.ts
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/useTableResize.ts
@@ -1,6 +1,7 @@
import { useEventListener, usePointer } from "@vueuse/core";
import { sumBy } from "lodash-es";
-import { computed, onBeforeUnmount, reactive, Ref, watch } from "vue";
+import type { Ref } from "vue";
+import { computed, onBeforeUnmount, reactive, watch } from "vue";
export type TableResizeOptions = {
tableRef: Ref<HTMLTableElement | undefined>;
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/DetailPanel.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/DetailPanel.vue
index 089e129e43..77e5f73d5f 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/DetailPanel.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/DetailPanel.vue
@@ -83,7 +83,7 @@ import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { DrawerContent } from "@/components/v2";
import { pushNotification } from "@/store";
-import { RowValue } from "@/types/proto/v1/sql_service";
+import type { RowValue } from "@/types/proto/v1/sql_service";
import { extractSQLRowValue } from "@/utils";
import { useSQLResultViewContext } from "./context";
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue
index 7b97a2b7e5..a6d7b3550f 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue
@@ -81,7 +81,8 @@
import { Info } from "lucide-vue-next";
import { darkTheme, NConfigProvider, NTabs, NTabPane } from "naive-ui";
import { Status } from "nice-grpc-common";
-import { computed, PropType, ref, toRef } from "vue";
+import type { PropType } from "vue";
+import { computed, ref, toRef } from "vue";
import { useI18n } from "vue-i18n";
import { darkThemeOverrides } from "@/../naive-ui.config";
import { Drawer } from "@/components/v2";
@@ -90,19 +91,20 @@ import {
useCurrentUserV1,
usePolicyV1Store,
} from "@/store";
-import {
+import type {
ComposedDatabase,
SQLEditorQueryParams,
SQLResultSetV1,
} from "@/types";
import { PolicyType } from "@/types/proto/v1/org_policy_service";
-import { QueryResult } from "@/types/proto/v1/sql_service";
+import type { QueryResult } from "@/types/proto/v1/sql_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import DetailPanel from "./DetailPanel.vue";
import EmptyView from "./EmptyView.vue";
import ErrorView from "./ErrorView.vue";
import RequestQueryButton from "./RequestQueryButton.vue";
-import { provideSQLResultViewContext, SQLResultViewContext } from "./context";
+import type { SQLResultViewContext } from "./context";
+import { provideSQLResultViewContext } from "./context";
const { default: SingleResultViewV1 } = await import(
"./SingleResultViewV1.vue"
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue
index 2a8713753b..7cf5a1aa53 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue
@@ -151,8 +151,8 @@
</template>
<script lang="ts" setup>
+import type { ColumnDef } from "@tanstack/vue-table";
import {
- ColumnDef,
getCoreRowModel,
getPaginationRowModel,
getSortedRowModel,
@@ -161,10 +161,10 @@ import {
import { useDebounceFn } from "@vueuse/core";
import { isEmpty } from "lodash-es";
import { NInput, NSwitch, NPagination, NTooltip } from "naive-ui";
-import { BinaryLike } from "node:crypto";
+import type { BinaryLike } from "node:crypto";
import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
-import { ExportOption } from "@/components/DataExportButton.vue";
+import type { ExportOption } from "@/components/DataExportButton.vue";
import RequestExportPanel from "@/components/Issue/panel/RequestExportPanel/index.vue";
import { DISMISS_PLACEHOLDER } from "@/plugins/ai/components/state";
import {
@@ -177,15 +177,19 @@ import {
useConnectionOfCurrentSQLEditorTab,
} from "@/store";
import { useExportData } from "@/store/modules/export";
-import {
+import type {
ComposedDatabase,
SQLEditorQueryParams,
SQLResultSetV1,
- UNKNOWN_ID,
} from "@/types";
+import { UNKNOWN_ID } from "@/types";
import { ExportFormat } from "@/types/proto/v1/common";
import { Engine } from "@/types/proto/v1/common";
-import { QueryResult, QueryRow, RowValue } from "@/types/proto/v1/sql_service";
+import type {
+ QueryResult,
+ QueryRow,
+ RowValue,
+} from "@/types/proto/v1/sql_service";
import {
compareQueryRowValues,
createExplainToken,
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/context.ts b/frontend/src/views/sql-editor/EditorCommon/ResultView/context.ts
index 66619b0d76..3509d12680 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/context.ts
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/context.ts
@@ -1,6 +1,6 @@
import { type Table } from "@tanstack/vue-table";
import { type Ref, type InjectionKey, provide, inject } from "vue";
-import { QueryRow } from "@/types/proto/v1/sql_service";
+import type { QueryRow } from "@/types/proto/v1/sql_service";
export type SQLResultViewContext = {
dark: Ref<boolean>;
diff --git a/frontend/src/views/sql-editor/EditorCommon/SaveSheetForm.vue b/frontend/src/views/sql-editor/EditorCommon/SaveSheetForm.vue
index 77723f1830..9242702cc6 100644
--- a/frontend/src/views/sql-editor/EditorCommon/SaveSheetForm.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/SaveSheetForm.vue
@@ -18,7 +18,7 @@
<script lang="ts" setup>
import { NButton, NInput } from "naive-ui";
import { ref, nextTick } from "vue";
-import { SQLEditorTab } from "@/types";
+import type { SQLEditorTab } from "@/types";
const props = defineProps<{
tab: SQLEditorTab;
diff --git a/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vue b/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vue
index 8e2fa60a7c..deb5de904e 100644
--- a/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vue
@@ -20,7 +20,8 @@ import {
useWorkSheetStore,
useSQLEditorTabStore,
} from "@/store";
-import { UNKNOWN_ID, SQLEditorTab } from "@/types";
+import type { SQLEditorTab } from "@/types";
+import { UNKNOWN_ID } from "@/types";
import {
Worksheet,
Worksheet_Visibility,
diff --git a/frontend/src/views/sql-editor/EditorCommon/SharePopover.vue b/frontend/src/views/sql-editor/EditorCommon/SharePopover.vue
index 7c390c4d5b..4c33374cf6 100644
--- a/frontend/src/views/sql-editor/EditorCommon/SharePopover.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/SharePopover.vue
@@ -103,7 +103,7 @@ import {
useWorkSheetStore,
useWorkSheetAndTabStore,
} from "@/store";
-import { AccessOption } from "@/types";
+import type { AccessOption } from "@/types";
import { Worksheet_Visibility } from "@/types/proto/v1/worksheet_service";
import { extractProjectResourceName, extractSheetUID } from "@/utils";
diff --git a/frontend/src/views/sql-editor/EditorCommon/SheetConnectionIcon.vue b/frontend/src/views/sql-editor/EditorCommon/SheetConnectionIcon.vue
index bc7ecd0bd4..e9c3159b13 100644
--- a/frontend/src/views/sql-editor/EditorCommon/SheetConnectionIcon.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/SheetConnectionIcon.vue
@@ -9,8 +9,8 @@
import { computed } from "vue";
import { EngineIcon } from "@/components/Icon";
import { useDatabaseV1Store } from "@/store";
-import { SQLEditorTab } from "@/types";
-import { Worksheet } from "@/types/proto/v1/worksheet_service";
+import type { SQLEditorTab } from "@/types";
+import type { Worksheet } from "@/types/proto/v1/worksheet_service";
import { connectionForSQLEditorTab } from "@/utils";
const props = defineProps<{
diff --git a/frontend/src/views/sql-editor/EditorCommon/useTableResize.ts b/frontend/src/views/sql-editor/EditorCommon/useTableResize.ts
index 9f86cc79d0..955cb60b58 100644
--- a/frontend/src/views/sql-editor/EditorCommon/useTableResize.ts
+++ b/frontend/src/views/sql-editor/EditorCommon/useTableResize.ts
@@ -1,6 +1,7 @@
import { useEventListener, usePointer } from "@vueuse/core";
import { sumBy } from "lodash-es";
-import { computed, onBeforeUnmount, reactive, Ref, watch } from "vue";
+import type { Ref } from "vue";
+import { computed, onBeforeUnmount, reactive, watch } from "vue";
export type TableResizeOptions = {
tableRef: Ref<HTMLTableElement | undefined>;
diff --git a/frontend/src/views/sql-editor/EditorPanel/SQLEditor.vue b/frontend/src/views/sql-editor/EditorPanel/SQLEditor.vue
index fa1062db61..1c4c6d9dfb 100644
--- a/frontend/src/views/sql-editor/EditorPanel/SQLEditor.vue
+++ b/frontend/src/views/sql-editor/EditorPanel/SQLEditor.vue
@@ -42,7 +42,8 @@ import {
useSQLEditorTabStore,
useConnectionOfCurrentSQLEditorTab,
} from "@/store";
-import { dialectOfEngineV1, SQLDialect, SQLEditorQueryParams } from "@/types";
+import type { SQLDialect, SQLEditorQueryParams } from "@/types";
+import { dialectOfEngineV1 } from "@/types";
import { useInstanceV1EditorLanguage } from "@/utils";
import { useSQLEditorContext } from "../context";
diff --git a/frontend/src/views/sql-editor/ResultPanel/ResultPanel.vue b/frontend/src/views/sql-editor/ResultPanel/ResultPanel.vue
index da6e04d3ca..e07d40182a 100644
--- a/frontend/src/views/sql-editor/ResultPanel/ResultPanel.vue
+++ b/frontend/src/views/sql-editor/ResultPanel/ResultPanel.vue
@@ -84,7 +84,7 @@ import { Info, X } from "lucide-vue-next";
import { NButton, NTooltip } from "naive-ui";
import { computed, ref, watch } from "vue";
import { useDatabaseV1Store, useSQLEditorTabStore } from "@/store";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { ResultViewV1 } from "../EditorCommon/";
const tabStore = useSQLEditorTabStore();
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/HistoryTabPane/HistoryConnectionIcon.vue b/frontend/src/views/sql-editor/SecondarySidebar/HistoryTabPane/HistoryConnectionIcon.vue
index fa455bb4ab..f895e5b9a3 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/HistoryTabPane/HistoryConnectionIcon.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/HistoryTabPane/HistoryConnectionIcon.vue
@@ -12,7 +12,7 @@ import { computed } from "vue";
import { InstanceV1EngineIcon } from "@/components/v2";
import { useInstanceV1Store } from "@/store";
import { UNKNOWN_ID } from "@/types";
-import { QueryHistory } from "@/types/proto/v1/sql_service";
+import type { QueryHistory } from "@/types/proto/v1/sql_service";
import { extractDatabaseResourceName } from "@/utils";
const props = defineProps<{
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/HistoryTabPane/HistoryTabPane.vue b/frontend/src/views/sql-editor/SecondarySidebar/HistoryTabPane/HistoryTabPane.vue
index c14369de1a..e55a206e80 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/HistoryTabPane/HistoryTabPane.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/HistoryTabPane/HistoryTabPane.vue
@@ -72,7 +72,7 @@ import {
useSQLEditorQueryHistoryStore,
useSQLEditorTabStore,
} from "@/store";
-import { QueryHistory } from "@/types/proto/v1/sql_service";
+import type { QueryHistory } from "@/types/proto/v1/sql_service";
import {
getHighlightHTMLByKeyWords,
extractDatabaseResourceName,
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/ColumnList.vue b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/ColumnList.vue
index 4a1f0cbfa3..7a55a35e53 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/ColumnList.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/ColumnList.vue
@@ -35,8 +35,8 @@ import { escape } from "lodash-es";
import { NEllipsis } from "naive-ui";
import { computed, nextTick } from "vue";
import { VirtualList } from "vueuc";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
SchemaMetadata,
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/DatabaseSchema.vue b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/DatabaseSchema.vue
index b487e6131f..25866783c3 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/DatabaseSchema.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/DatabaseSchema.vue
@@ -52,7 +52,7 @@ import { computed } from "vue";
import { useCurrentUserV1 } from "@/store";
import { UNKNOWN_ID, type ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import {
+import type {
DatabaseMetadata,
ExternalTableMetadata,
SchemaMetadata,
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/ColumnInfo.vue b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/ColumnInfo.vue
index 8cdf48892a..a46d2db465 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/ColumnInfo.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/ColumnInfo.vue
@@ -27,9 +27,9 @@
<script setup lang="ts">
import { computed } from "vue";
import { getColumnDefaultValuePlaceholder } from "@/components/SchemaEditorV1/utils/columnDefaultValue";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import {
+import type {
ColumnMetadata,
DatabaseMetadata,
SchemaMetadata,
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/ExternalTableInfo.vue b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/ExternalTableInfo.vue
index 2eafd2abcd..f004133dc6 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/ExternalTableInfo.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/ExternalTableInfo.vue
@@ -14,9 +14,9 @@
<script setup lang="ts">
import { computed } from "vue";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import {
+import type {
DatabaseMetadata,
SchemaMetadata,
ExternalTableMetadata,
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/TableInfo.vue b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/TableInfo.vue
index c3a9546f6c..49e2e304a9 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/TableInfo.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/TableInfo.vue
@@ -23,9 +23,9 @@
<script setup lang="ts">
import { computed } from "vue";
-import { ComposedDatabase } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import {
+import type {
DatabaseMetadata,
SchemaMetadata,
TableMetadata,
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/ViewInfo.vue b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/ViewInfo.vue
index 0aabdfa57e..f02193bd29 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/ViewInfo.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/ViewInfo.vue
@@ -26,9 +26,10 @@ import { NCheckbox } from "naive-ui";
import { computed } from "vue";
import { MonacoEditor } from "@/components/MonacoEditor";
import formatSQL from "@/components/MonacoEditor/sqlFormatter";
-import { ComposedDatabase, dialectOfEngineV1 } from "@/types";
+import type { ComposedDatabase } from "@/types";
+import { dialectOfEngineV1 } from "@/types";
import { Engine } from "@/types/proto/v1/common";
-import {
+import type {
DatabaseMetadata,
SchemaMetadata,
ViewMetadata,
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/hover-state.ts b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/hover-state.ts
index aa3595452c..0ea2d6085d 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/hover-state.ts
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/HoverPanel/hover-state.ts
@@ -1,7 +1,8 @@
-import { InjectionKey, Ref, inject, provide, ref } from "vue";
+import type { InjectionKey, Ref } from "vue";
+import { inject, provide, ref } from "vue";
import { useDelayedValue } from "@/composables/useDelayedValue";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
ColumnMetadata,
DatabaseMetadata,
ExternalTableMetadata,
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/SchemaPanel.vue b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/SchemaPanel.vue
index f2ee910327..b91d8a07b2 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/SchemaPanel.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/SchemaPanel.vue
@@ -66,12 +66,12 @@ import {
useConnectionOfCurrentSQLEditorTab,
useDBSchemaV1Store,
} from "@/store";
-import {
+import type {
SchemaMetadata,
TableMetadata,
- DatabaseMetadataView,
ExternalTableMetadata,
} from "@/types/proto/v1/database_service";
+import { DatabaseMetadataView } from "@/types/proto/v1/database_service";
import { useSQLEditorContext } from "@/views/sql-editor/context";
import DatabaseSchema from "./DatabaseSchema.vue";
import ExternalTableSchema from "./ExternalTableSchema.vue";
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/StringifyMetadataButton.vue b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/StringifyMetadataButton.vue
index 89e6b92e7f..0f35226c5e 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/StringifyMetadataButton.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/StringifyMetadataButton.vue
@@ -23,7 +23,7 @@ import { CodeIcon } from "lucide-vue-next";
import { NButton, NPopover } from "naive-ui";
import TableSchemaViewer from "@/components/TableSchemaViewer.vue";
import type { ComposedDatabase } from "@/types";
-import {
+import type {
SchemaMetadata,
TableMetadata,
} from "@/types/proto/v1/database_service";
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/TableList.vue b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/TableList.vue
index e74124f718..97463fd970 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/TableList.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/TableList.vue
@@ -45,8 +45,8 @@ import { escape } from "lodash-es";
import { computed, nextTick } from "vue";
import { VirtualList } from "vueuc";
import { TableIcon, ViewIcon } from "@/components/Icon";
-import { ComposedDatabase } from "@/types";
-import {
+import type { ComposedDatabase } from "@/types";
+import type {
DatabaseMetadata,
ExternalTableMetadata,
SchemaMetadata,
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/context.ts b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/context.ts
index 2b7d5b6b5b..08f79f1aef 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/context.ts
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/context.ts
@@ -1,4 +1,5 @@
-import { InjectionKey, inject, provide, Ref, ref } from "vue";
+import type { InjectionKey, Ref } from "vue";
+import { inject, provide, ref } from "vue";
export type SchemaPanelContext = {
keyword: Ref<string>;
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/SecondaryGutterBar/OpenAIButton.vue b/frontend/src/views/sql-editor/SecondarySidebar/SecondaryGutterBar/OpenAIButton.vue
index bc1370c0ca..e4fe9c8516 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/SecondaryGutterBar/OpenAIButton.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/SecondaryGutterBar/OpenAIButton.vue
@@ -34,7 +34,8 @@
</template>
<script setup lang="ts">
-import { ButtonProps, NButton, NTooltip } from "naive-ui";
+import type { ButtonProps } from "naive-ui";
+import { NButton, NTooltip } from "naive-ui";
import { computed } from "vue";
import { useSettingV1Store, useSQLEditorTabStore } from "@/store";
import { useSQLEditorContext } from "../../context";
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/SecondaryGutterBar/SecondaryGutterBar.vue b/frontend/src/views/sql-editor/SecondarySidebar/SecondaryGutterBar/SecondaryGutterBar.vue
index 363b5ee7bd..586e1b4825 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/SecondaryGutterBar/SecondaryGutterBar.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/SecondaryGutterBar/SecondaryGutterBar.vue
@@ -39,7 +39,8 @@ import {
} from "@/store";
import { UNKNOWN_ID } from "@/types";
import { hasProjectPermissionV2, instanceV1HasAlterSchema } from "@/utils";
-import { TabView, useSecondarySidebarContext } from "../context";
+import type { TabView } from "../context";
+import { useSecondarySidebarContext } from "../context";
import OpenAIButton from "./OpenAIButton.vue";
const { show, tab } = useSecondarySidebarContext();
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/SheetList.vue b/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/SheetList.vue
index f2b161ef0a..a8879821cd 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/SheetList.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/SheetList.vue
@@ -67,7 +67,8 @@
<script lang="ts" setup>
import { orderBy, escape } from "lodash-es";
-import { NButton, NInput, NTree, NEllipsis, TreeOption } from "naive-ui";
+import type { TreeOption } from "naive-ui";
+import { NButton, NInput, NTree, NEllipsis } from "naive-ui";
import { storeToRefs } from "pinia";
import scrollIntoView from "scroll-into-view-if-needed";
import { computed, nextTick, onMounted, ref, watch, h } from "vue";
@@ -82,10 +83,11 @@ import {
useDatabaseV1Store,
useSQLEditorTabStore,
} from "@/store";
-import { ComposedProject, ComposedDatabase, UNKNOWN_ID } from "@/types";
+import type { ComposedProject, ComposedDatabase } from "@/types";
+import { UNKNOWN_ID } from "@/types";
import { connectionForSQLEditorTab } from "@/utils";
+import type { SheetViewMode } from "@/views/sql-editor/Sheet";
import {
- SheetViewMode,
openWorksheetByName,
useSheetContextByView,
Dropdown,
@@ -93,14 +95,8 @@ import {
} from "@/views/sql-editor/Sheet";
import { useSQLEditorContext } from "@/views/sql-editor/context";
import UnsavedPrefix from "./UnsavedPrefix.vue";
-import {
- DropdownState,
- MergedItem,
- domIDForItem,
- isSheetItem,
- isTabItem,
- keyOfItem,
-} from "./common";
+import type { DropdownState, MergedItem } from "./common";
+import { domIDForItem, isSheetItem, isTabItem, keyOfItem } from "./common";
interface TreeNode extends TreeOption {
key: string;
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/common.ts b/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/common.ts
index 902c2b74c3..8cc11994d7 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/common.ts
+++ b/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/common.ts
@@ -1,6 +1,6 @@
import { escape } from "lodash-es";
-import { SQLEditorTab } from "@/types";
-import { Worksheet } from "@/types/proto/v1/worksheet_service";
+import type { SQLEditorTab } from "@/types";
+import type { Worksheet } from "@/types/proto/v1/worksheet_service";
import { extractWorksheetUID, getHighlightHTMLByRegExp } from "@/utils";
export type TabItem = {
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/context.ts b/frontend/src/views/sql-editor/SecondarySidebar/context.ts
index 21f9f560ff..1c70d6f873 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/context.ts
+++ b/frontend/src/views/sql-editor/SecondarySidebar/context.ts
@@ -1,5 +1,6 @@
import Emittery from "emittery";
-import { InjectionKey, inject, provide, Ref, ref } from "vue";
+import type { InjectionKey, Ref } from "vue";
+import { inject, provide, ref } from "vue";
type SecondarySidebarEvents = Emittery<{
// nothing by now
diff --git a/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue b/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue
index a139be958c..8990983276 100644
--- a/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue
+++ b/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue
@@ -15,12 +15,8 @@
</template>
<script lang="ts" setup>
-import {
- type DropdownOption,
- NDropdown,
- useDialog,
- DropdownProps,
-} from "naive-ui";
+import type { DropdownProps } from "naive-ui";
+import { type DropdownOption, NDropdown, useDialog } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import {
diff --git a/frontend/src/views/sql-editor/Sheet/context.ts b/frontend/src/views/sql-editor/Sheet/context.ts
index 902be7676c..43e9d0a25e 100644
--- a/frontend/src/views/sql-editor/Sheet/context.ts
+++ b/frontend/src/views/sql-editor/Sheet/context.ts
@@ -1,6 +1,7 @@
import Emittery from "emittery";
import { storeToRefs } from "pinia";
-import { InjectionKey, Ref, inject, provide, ref, computed } from "vue";
+import type { InjectionKey, Ref } from "vue";
+import { inject, provide, ref, computed } from "vue";
import { t } from "@/plugins/i18n";
import {
pushNotification,
@@ -9,16 +10,16 @@ import {
useSQLEditorTabStore,
useWorkSheetStore,
} from "@/store";
-import { SQLEditorTab } from "@/types";
-import { Worksheet } from "@/types/proto/v1/worksheet_service";
+import type { SQLEditorTab } from "@/types";
+import type { Worksheet } from "@/types/proto/v1/worksheet_service";
import {
emptySQLEditorConnection,
getSheetStatement,
isWorksheetReadableV1,
suggestedTabTitleForSQLEditorConnection,
} from "@/utils";
-import { SQLEditorContext } from "../context";
-import { SheetViewMode } from "./types";
+import type { SQLEditorContext } from "../context";
+import type { SheetViewMode } from "./types";
type SheetEvents = Emittery<{
refresh: { views: SheetViewMode[] };
diff --git a/frontend/src/views/sql-editor/SheetPanel/SheetPanel.vue b/frontend/src/views/sql-editor/SheetPanel/SheetPanel.vue
index ec08c8b4e1..29b51aca55 100644
--- a/frontend/src/views/sql-editor/SheetPanel/SheetPanel.vue
+++ b/frontend/src/views/sql-editor/SheetPanel/SheetPanel.vue
@@ -49,7 +49,7 @@ import { computed, ref } from "vue";
import MaskSpinner from "@/components/misc/MaskSpinner.vue";
import { SearchBox } from "@/components/v2";
import { usePageMode } from "@/store";
-import { Worksheet } from "@/types/proto/v1/worksheet_service";
+import type { Worksheet } from "@/types/proto/v1/worksheet_service";
import { useSheetContext, openWorksheetByName, addNewSheet } from "../Sheet";
import { useSQLEditorContext } from "../context";
import SheetTable from "./SheetTable";
diff --git a/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetConnection.vue b/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetConnection.vue
index 513b39d4bb..cb3df8d822 100644
--- a/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetConnection.vue
+++ b/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetConnection.vue
@@ -38,7 +38,7 @@ import {
} from "@/components/v2";
import { useDatabaseV1Store } from "@/store";
import { UNKNOWN_ID } from "@/types";
-import { Worksheet } from "@/types/proto/v1/worksheet_service";
+import type { Worksheet } from "@/types/proto/v1/worksheet_service";
const props = defineProps<{
sheet: Worksheet;
diff --git a/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetTable.vue b/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetTable.vue
index 379e78147c..2b9d6fd536 100644
--- a/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetTable.vue
+++ b/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetTable.vue
@@ -36,16 +36,16 @@
import { escape, orderBy } from "lodash-es";
import { computed, onMounted } from "vue";
import { useI18n } from "vue-i18n";
-import { BBGrid, BBGridRow, BBGridColumn } from "@/bbkit";
+import type { BBGridRow, BBGridColumn } from "@/bbkit";
+import { BBGrid } from "@/bbkit";
import HumanizeDate from "@/components/misc/HumanizeDate.vue";
import { ProjectV1Name } from "@/components/v2";
import { useUserStore, useProjectV1Store } from "@/store";
-import {
- Worksheet,
- Worksheet_Visibility,
-} from "@/types/proto/v1/worksheet_service";
+import type { Worksheet } from "@/types/proto/v1/worksheet_service";
+import { Worksheet_Visibility } from "@/types/proto/v1/worksheet_service";
import { getHighlightHTMLByRegExp } from "@/utils";
-import { SheetViewMode, useSheetContextByView, Dropdown } from "../../Sheet";
+import type { SheetViewMode } from "../../Sheet";
+import { useSheetContextByView, Dropdown } from "../../Sheet";
import SheetConnection from "./SheetConnection.vue";
const props = defineProps<{
diff --git a/frontend/src/views/sql-editor/TabList/ContextMenu.vue b/frontend/src/views/sql-editor/TabList/ContextMenu.vue
index abf0469830..d58b78a61b 100644
--- a/frontend/src/views/sql-editor/TabList/ContextMenu.vue
+++ b/frontend/src/views/sql-editor/TabList/ContextMenu.vue
@@ -14,11 +14,13 @@
</template>
<script setup lang="ts">
-import { NDropdown, DropdownOption } from "naive-ui";
+import type { DropdownOption } from "naive-ui";
+import { NDropdown } from "naive-ui";
import { computed, nextTick } from "vue";
import { useI18n } from "vue-i18n";
-import { SQLEditorTab } from "@/types";
-import { CloseTabAction, useTabListContext } from "./context";
+import type { SQLEditorTab } from "@/types";
+import type { CloseTabAction } from "./context";
+import { useTabListContext } from "./context";
const { t } = useI18n();
const { contextMenu: state, events } = useTabListContext();
diff --git a/frontend/src/views/sql-editor/TabList/TabItem/AdminLabel.vue b/frontend/src/views/sql-editor/TabList/TabItem/AdminLabel.vue
index 03540ea608..6367acce0e 100644
--- a/frontend/src/views/sql-editor/TabList/TabItem/AdminLabel.vue
+++ b/frontend/src/views/sql-editor/TabList/TabItem/AdminLabel.vue
@@ -17,7 +17,8 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { EnvironmentV1Name } from "@/components/v2";
import { useDatabaseV1Store, useInstanceV1Store } from "@/store";
import type { SQLEditorTab } from "@/types";
diff --git a/frontend/src/views/sql-editor/TabList/TabItem/Label.vue b/frontend/src/views/sql-editor/TabList/TabItem/Label.vue
index 21693fa44f..00b3e078b6 100644
--- a/frontend/src/views/sql-editor/TabList/TabItem/Label.vue
+++ b/frontend/src/views/sql-editor/TabList/TabItem/Label.vue
@@ -26,7 +26,8 @@
</template>
<script lang="ts" setup>
import { NEllipsis } from "naive-ui";
-import { computed, nextTick, PropType, reactive, ref, watch } from "vue";
+import type { PropType } from "vue";
+import { computed, nextTick, reactive, ref, watch } from "vue";
import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";
import { useSQLEditorTabStore, useWorkSheetStore } from "@/store";
import type { SQLEditorTab } from "@/types";
diff --git a/frontend/src/views/sql-editor/TabList/TabItem/Prefix.vue b/frontend/src/views/sql-editor/TabList/TabItem/Prefix.vue
index a5bcf76209..e9fdcaa579 100644
--- a/frontend/src/views/sql-editor/TabList/TabItem/Prefix.vue
+++ b/frontend/src/views/sql-editor/TabList/TabItem/Prefix.vue
@@ -13,7 +13,8 @@
</template>
<script lang="ts" setup>
-import { computed, PropType } from "vue";
+import type { PropType } from "vue";
+import { computed } from "vue";
import { useWorkSheetStore } from "@/store";
import type { SQLEditorTab } from "@/types";
import { Worksheet_Visibility } from "@/types/proto/v1/worksheet_service";
diff --git a/frontend/src/views/sql-editor/TabList/TabItem/Suffix.vue b/frontend/src/views/sql-editor/TabList/TabItem/Suffix.vue
index 7f31e25997..8170a3ca8f 100644
--- a/frontend/src/views/sql-editor/TabList/TabItem/Suffix.vue
+++ b/frontend/src/views/sql-editor/TabList/TabItem/Suffix.vue
@@ -22,7 +22,8 @@
</template>
<script lang="ts" setup>
-import { computed, PropType, reactive } from "vue";
+import type { PropType } from "vue";
+import { computed, reactive } from "vue";
import type { SQLEditorTab } from "@/types";
type LocalState = {
diff --git a/frontend/src/views/sql-editor/TabList/TabItem/TabItem.vue b/frontend/src/views/sql-editor/TabList/TabItem/TabItem.vue
index 72268809b6..3dc8cbc31f 100644
--- a/frontend/src/views/sql-editor/TabList/TabItem/TabItem.vue
+++ b/frontend/src/views/sql-editor/TabList/TabItem/TabItem.vue
@@ -30,7 +30,8 @@
</template>
<script lang="ts" setup>
-import { computed, PropType, reactive } from "vue";
+import type { PropType } from "vue";
+import { computed, reactive } from "vue";
import { useSQLEditorTabStore } from "@/store";
import type { SQLEditorTab } from "@/types";
import AdminLabel from "./AdminLabel.vue";
diff --git a/frontend/src/views/sql-editor/TabList/context.ts b/frontend/src/views/sql-editor/TabList/context.ts
index dc5c8900d9..ce4bcb4939 100644
--- a/frontend/src/views/sql-editor/TabList/context.ts
+++ b/frontend/src/views/sql-editor/TabList/context.ts
@@ -1,6 +1,7 @@
import Emittery from "emittery";
-import { InjectionKey, Ref, inject, provide, ref } from "vue";
-import { SQLEditorTab } from "@/types";
+import type { InjectionKey, Ref } from "vue";
+import { inject, provide, ref } from "vue";
+import type { SQLEditorTab } from "@/types";
export type CloseTabAction =
| "CLOSE"
diff --git a/frontend/src/views/sql-editor/TerminalPanel/CompactSQLEditor.vue b/frontend/src/views/sql-editor/TerminalPanel/CompactSQLEditor.vue
index ffe737c237..0a93ba4cdf 100644
--- a/frontend/src/views/sql-editor/TerminalPanel/CompactSQLEditor.vue
+++ b/frontend/src/views/sql-editor/TerminalPanel/CompactSQLEditor.vue
@@ -39,7 +39,8 @@ import {
useSQLEditorTabStore,
useConnectionOfCurrentSQLEditorTab,
} from "@/store";
-import { dialectOfEngineV1, SQLDialect, SQLEditorQueryParams } from "@/types";
+import type { SQLDialect, SQLEditorQueryParams } from "@/types";
+import { dialectOfEngineV1 } from "@/types";
import { useInstanceV1EditorLanguage } from "@/utils";
import { useSQLEditorContext } from "../context";
import {
diff --git a/frontend/src/views/sql-editor/TerminalPanel/TerminalPanelV1.vue b/frontend/src/views/sql-editor/TerminalPanel/TerminalPanelV1.vue
index cf6d48fc7e..8709533d48 100644
--- a/frontend/src/views/sql-editor/TerminalPanel/TerminalPanelV1.vue
+++ b/frontend/src/views/sql-editor/TerminalPanel/TerminalPanelV1.vue
@@ -79,9 +79,9 @@
import { useElementSize } from "@vueuse/core";
import { computed, defineAsyncComponent, ref, unref, watch } from "vue";
import { BBSpin } from "@/bbkit";
-import { IStandaloneCodeEditor } from "@/components/MonacoEditor";
+import type { IStandaloneCodeEditor } from "@/components/MonacoEditor";
import { useSQLEditorTabStore, useWebTerminalStore } from "@/store";
-import { SQLEditorQueryParams, WebTerminalQueryItemV1 } from "@/types";
+import type { SQLEditorQueryParams, WebTerminalQueryItemV1 } from "@/types";
import {
EditorAction,
ConnectionPathBar,
diff --git a/frontend/src/views/sql-editor/TerminalPanel/useHistory.ts b/frontend/src/views/sql-editor/TerminalPanel/useHistory.ts
index 7399d7e703..3324d45829 100644
--- a/frontend/src/views/sql-editor/TerminalPanel/useHistory.ts
+++ b/frontend/src/views/sql-editor/TerminalPanel/useHistory.ts
@@ -1,6 +1,6 @@
import { computed, unref, watch } from "vue";
import { useSQLEditorTabStore, useWebTerminalStore } from "@/store";
-import { WebTerminalQueryItemV1 } from "@/types";
+import type { WebTerminalQueryItemV1 } from "@/types";
import { minmax } from "@/utils";
const MAX_HISTORY_ITEM_COUNT = 1000;
diff --git a/frontend/src/views/sql-editor/context.ts b/frontend/src/views/sql-editor/context.ts
index 34a9172305..9b76e17798 100644
--- a/frontend/src/views/sql-editor/context.ts
+++ b/frontend/src/views/sql-editor/context.ts
@@ -1,8 +1,9 @@
import Emittery from "emittery";
-import { InjectionKey, inject, provide, Ref, ref } from "vue";
+import type { InjectionKey, Ref } from "vue";
+import { inject, provide, ref } from "vue";
import { useSQLEditorStore } from "@/store";
-import { ComposedDatabase, SQLEditorTab } from "@/types";
-import {
+import type { ComposedDatabase, SQLEditorTab } from "@/types";
+import type {
DatabaseMetadata,
ExternalTableMetadata,
SchemaMetadata,
diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json
index acd15c646e..26cbd93114 100644
--- a/frontend/tsconfig.app.json
+++ b/frontend/tsconfig.app.json
@@ -6,7 +6,8 @@
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
- "verbatimModuleSyntax": false,
+ "module": "ES2022",
+ "verbatimModuleSyntax": true,
"baseUrl": ".",
"lib": ["WebWorker", "ES2022"],
"types": ["unplugin-icons/types/vue", "vite/client"],
diff --git a/frontend/tsconfig.vitest.json b/frontend/tsconfig.vitest.json
index 31d561536c..dd5957a0ad 100644
--- a/frontend/tsconfig.vitest.json
+++ b/frontend/tsconfig.vitest.json
@@ -5,7 +5,7 @@
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo",
- "verbatimModuleSyntax": false,
+ "verbatimModuleSyntax": true,
"lib": ["WebWorker", "ES2022"],
"types": ["node", "jsdom", "unplugin-icons/types/vue", "vite/client"]
}