n8n
Version:
n8n Workflow Automation Tool
18 lines (17 loc) • 892 B
TypeScript
import type { ListAgentsQueryDto } from '@n8n/api-types';
import { DataSource, Repository } from '@n8n/typeorm';
import { Agent } from '../entities/agent.entity';
export declare class AgentRepository extends Repository<Agent> {
constructor(dataSource: DataSource);
findByProjectId(projectId: string): Promise<Agent[]>;
findByProjectIdsPaginated(projectIds: string[], options: ListAgentsQueryDto): Promise<{
count: number;
data: Agent[];
}>;
private applyFilters;
private applySorting;
findByIdAndProjectId(id: string, projectId: string): Promise<Agent | null>;
findByIdsAndProjectId(ids: string[], projectId: string): Promise<Array<Pick<Agent, 'id' | 'activeVersionId'>>>;
findPublished(): Promise<Agent[]>;
findByIntegrationCredential(type: string, credentialId: string, projectId: string, excludeAgentId: string): Promise<Agent[]>;
}