n8n
Version:
n8n Workflow Automation Tool
36 lines (35 loc) • 997 B
TypeScript
export type PublicationSkipReason = 'workflow-not-found';
import type { WorkflowPublicationTriggerKind } from '@n8n/db';
type ActivatedTriggerPublicationStatus = {
nodeId: string;
nodeName: string;
status: 'activated';
triggerKind: WorkflowPublicationTriggerKind;
};
export type FailedTriggerPublicationStatus = {
nodeId: string;
nodeName: string;
status: 'failed';
triggerKind: WorkflowPublicationTriggerKind;
errorMessage: string;
};
export type TriggerPublicationStatus = ActivatedTriggerPublicationStatus | FailedTriggerPublicationStatus;
export type PublicationResult = {
type: 'completed';
triggerStatuses: TriggerPublicationStatus[];
} | {
type: 'unpublished';
} | {
type: 'skipped';
reason: PublicationSkipReason;
} | {
type: 'version-missing';
} | {
type: 'partial';
triggerStatuses: TriggerPublicationStatus[];
} | {
type: 'failed';
error: Error;
triggerStatuses?: TriggerPublicationStatus[];
};
export {};