fix: type safety, O(1) isAvailable query, remove unused CacheScope

This commit is contained in:
DarkPhoenix2704
2026-03-31 13:03:01 +00:00
parent ee80d3e433
commit b00c45c808
4 changed files with 18 additions and 13 deletions

View File

@@ -1,6 +1,11 @@
<script setup lang="ts">
import type { IntegrationType } from 'nocodb-sdk'
interface IntegrationLinkedBaseListResponse {
all_bases: boolean
bases: { id: string; title: string }[]
}
interface Props {
visible: boolean
integration: IntegrationType
@@ -67,14 +72,14 @@ async function loadCurrentState() {
const result = (await $api.internal.getOperation(activeWorkspaceId.value, NO_SCOPE, {
operation: 'integrationLinkedBaseList',
integrationId: integration.value.id,
})) as any
})) as IntegrationLinkedBaseListResponse
if (result?.all_bases) {
if (result.all_bases) {
allBases.value = true
selectedBaseIds.value = new Set()
} else {
allBases.value = false
selectedBaseIds.value = new Set((result?.bases || []).map((b: any) => b.id))
selectedBaseIds.value = new Set((result.bases || []).map((b) => b.id))
}
initialAllBases.value = allBases.value