import type { AgentIntegrationConfig, ListAgentsQueryDto } from '@n8n/api-types'; import { DataSource, Repository, type EntityManager } from '@n8n/typeorm'; import { Agent } from '../entities/agent.entity'; export type AgentSummary = Pick; export type AgentIntegrationState = Pick; export type AgentSummaryFilters = { query?: string; publishedOnly?: boolean; excludeAgentId?: string; limit?: number; }; export declare class AgentRepository extends Repository { constructor(dataSource: DataSource); insertNew(agent: Agent): Promise; findByProjectId(projectId: string): Promise; findSummariesByProjectIds(projectIds: string[] | null, options?: AgentSummaryFilters): Promise; findByProjectIdsPaginated(projectIds: string[] | null, options: ListAgentsQueryDto, { withProject }?: { withProject?: boolean; }): Promise<{ count: number; data: Agent[]; }>; private applyFilters; private applySorting; findByIdAndProjectId(id: string, projectId: string): Promise; findById(id: string): Promise; findDependencyIndexAgentIdsBatch(afterId: string | null, batchSize: number): Promise>>; findSummariesByIds(ids: string[]): Promise>>; findByIdInProjects(id: string, projectIds: string[]): Promise; existsByIdAndProjectId(id: string, projectId: string): Promise; findByIdsAndProjectId(ids: string[], projectId: string): Promise>>; findMcpAvailabilityCandidates(where: { ids: string[]; } | { projectIds: string[]; } | { all: true; }): Promise>>; setAvailableInMCP(agentIds: string[], availableInMCP: boolean): Promise; claimSetupCompleted(id: string, completedAt: Date): Promise; findIntegrationState(id: string): Promise; updateIntegrations(id: string, integrations: AgentIntegrationConfig[], expected: Pick, versionId: string | null): Promise; findPublished(): Promise; findPublishedAgentIds(): Promise; findActiveVersionId(agentId: string): Promise; findPublishedIds(agentIds: string[]): Promise>; findByIntegrationCredential(type: string, credentialId: string, projectId: string, excludeAgentId: string): Promise; setActiveVersionFenced(id: string, expectedRevision: number, next: { activeVersionId: string | null; versionId: string; }, trx?: EntityManager): Promise; saveDraftFenced(agent: Agent, trx?: EntityManager): Promise; }