UNPKG

n8n

Version:

n8n Workflow Automation Tool

22 lines (21 loc) 1.03 kB
import type { AgentJsonConfig } from '@n8n/api-types'; import { User } from '@n8n/db'; import type { EntityManager } from '@n8n/typeorm'; import { DataSource, Repository } from '@n8n/typeorm'; import { AgentHistory } from '../entities/agent-history.entity'; import type { Agent } from '../entities/agent.entity'; export declare function renderAuthor(user: User): string; export declare class AgentHistoryRepository extends Repository<AgentHistory> { constructor(dataSource: DataSource); saveVersion(data: { versionId: string; agentId: string; schema: AgentJsonConfig | null; tools: Agent['tools'] | null; skills: Agent['skills'] | null; publishedBy: User | string; }, trx?: EntityManager): Promise<AgentHistory>; findByVersionAndAgentId(versionId: string, agentId: string, trx?: EntityManager): Promise<AgentHistory | null>; findByAgentId(agentId: string, take: number, skip: number): Promise<AgentHistory[]>; existsForAgent(agentId: string): Promise<boolean>; }