mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-25 06:36:37 +00:00
Major additions: - Complete Next.js studio application with 1600+ components - Docker support (Dockerfile.combined, docker-compose.yml) - GCP deployment documentation and benchmarks - SQL benchmark scripts for performance testing - Sentry integration for monitoring - Comprehensive test suite and mocks Studio features: - Dashboard and admin interfaces - Data visualization components - Authentication and user management - API integration with RuVector backend - Static data and public assets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
54 lines
1.6 KiB
TypeScript
54 lines
1.6 KiB
TypeScript
import type { IntegrationsData } from 'data/integrations/integrations-query'
|
|
import type { IntegrationName } from 'data/integrations/integrations.types'
|
|
import type { Organization } from 'types'
|
|
|
|
export function getHasInstalledObject({
|
|
integrationName,
|
|
integrationData,
|
|
organizationsData,
|
|
installationId,
|
|
}: {
|
|
integrationName: IntegrationName
|
|
integrationData: IntegrationsData
|
|
organizationsData: Organization[]
|
|
installationId?: string | number
|
|
}): { [orgSlug: string]: boolean } {
|
|
if (integrationName === 'Vercel') {
|
|
return Object.fromEntries(
|
|
organizationsData
|
|
.map((org) => [
|
|
org.slug,
|
|
Boolean(
|
|
integrationData.find(
|
|
(integration) =>
|
|
integration.organization.slug === org.slug &&
|
|
integration.integration.name === 'Vercel'
|
|
)
|
|
),
|
|
])
|
|
.filter(([, v]) => Boolean(v))
|
|
)
|
|
}
|
|
|
|
if (integrationName === 'GitHub') {
|
|
return Object.fromEntries(
|
|
organizationsData
|
|
.map((org) => [
|
|
org.slug,
|
|
Boolean(
|
|
integrationData.find(
|
|
(integration) =>
|
|
integration.organization.slug === org.slug &&
|
|
integration.integration.name === 'GitHub' &&
|
|
integration.metadata !== undefined &&
|
|
'installation_id' in (integration.metadata as any) &&
|
|
String((integration.metadata as any).installation_id) === String(installationId)
|
|
)
|
|
),
|
|
])
|
|
.filter(([, v]) => Boolean(v))
|
|
)
|
|
}
|
|
|
|
return {}
|
|
}
|