n8n
Version:
n8n Workflow Automation Tool
20 lines (19 loc) • 1.15 kB
TypeScript
import { Logger } from '@n8n/backend-common';
import { WorkflowPublishedVersionRepository, type PublishedWorkflowDataForExecution, type WorkflowEntity, type WorkflowHistory } from '@n8n/db';
import { CacheService } from '../services/cache/cache.service';
export type { PublishedWorkflowDataForExecution };
export type PublishedWorkflowData = {
workflow: WorkflowEntity;
publishedVersion: WorkflowHistory;
};
export declare class WorkflowPublishedDataService {
private readonly logger;
private readonly workflowPublishedVersionRepository;
private readonly cacheService;
constructor(logger: Logger, workflowPublishedVersionRepository: WorkflowPublishedVersionRepository, cacheService: CacheService);
getPublishedWorkflowData(workflowId: string): Promise<PublishedWorkflowData | null>;
getPublishedWorkflowDataForExecution(workflowId: string): Promise<PublishedWorkflowDataForExecution | null>;
getCachedPublishedWorkflowDataForExecution(workflowId: string): Promise<PublishedWorkflowDataForExecution | null>;
invalidateCache(workflowId: string): Promise<void>;
refreshCache(workflowId: string): Promise<void>;
}