n8n
Version:
n8n Workflow Automation Tool
39 lines (38 loc) • 1.82 kB
TypeScript
import { type AgentVersionListItemDto, PaginationDto, PublishAgentDto, RevertAgentToVersionDto } from '@n8n/api-types';
import type { AuthenticatedRequest } from '@n8n/db';
import type { Response } from 'express';
import { AgentPublishService } from './agent-publish.service';
import { AgentRunnableStateService } from './agent-runnable-state.service';
export declare class AgentPublishController {
private readonly agentPublishService;
private readonly agentRunnableStateService;
constructor(agentPublishService: AgentPublishService, agentRunnableStateService: AgentRunnableStateService);
publish(req: AuthenticatedRequest<{
projectId: string;
}>, _res: Response, agentId: string, payload: PublishAgentDto): Promise<import("./entities/agent.entity").Agent & {
isRunnable: boolean;
hasPublishHistory: boolean;
}>;
unpublish(req: AuthenticatedRequest<{
projectId: string;
}>, _res: Response, agentId: string): Promise<import("./entities/agent.entity").Agent & {
isRunnable: boolean;
hasPublishHistory: boolean;
}>;
revertToPublished(req: AuthenticatedRequest<{
projectId: string;
}>, _res: Response, agentId: string): Promise<import("./entities/agent.entity").Agent & {
isRunnable: boolean;
hasPublishHistory: boolean;
}>;
revertToVersion(req: AuthenticatedRequest<{
projectId: string;
}>, _res: Response, agentId: string, payload: RevertAgentToVersionDto): Promise<import("./entities/agent.entity").Agent & {
isRunnable: boolean;
hasPublishHistory: boolean;
}>;
listVersions(req: AuthenticatedRequest<{
projectId: string;
agentId: string;
}>, _res: Response, agentId: string, query: PaginationDto): Promise<AgentVersionListItemDto[]>;
}