n8n
Version:
n8n Workflow Automation Tool
65 lines (64 loc) • 2.25 kB
TypeScript
import type { IPushDataType, IPushDataWorkerStatusPayload, IWorkflowDb } from '../../Interfaces';
export type RedisServiceCommand = 'getStatus' | 'getId' | 'restartEventBus' | 'stopWorker' | 'reloadLicense' | 'reloadExternalSecretsProviders' | 'community-package-install' | 'community-package-update' | 'community-package-uninstall' | 'display-workflow-activation' | 'display-workflow-deactivation' | 'add-webhooks-triggers-and-pollers' | 'remove-triggers-and-pollers' | 'workflow-failed-to-activate' | 'relay-execution-lifecycle-event' | 'clear-test-webhooks';
export type RedisServiceBaseCommand = {
senderId: string;
command: Exclude<RedisServiceCommand, 'relay-execution-lifecycle-event' | 'clear-test-webhooks' | 'community-package-install' | 'community-package-update' | 'community-package-uninstall'>;
payload?: {
[key: string]: string | number | boolean | string[] | number[] | boolean[];
};
} | {
senderId: string;
command: 'relay-execution-lifecycle-event';
payload: {
type: IPushDataType;
args: Record<string, unknown>;
pushRef: string;
};
} | {
senderId: string;
command: 'clear-test-webhooks';
payload: {
webhookKey: string;
workflowEntity: IWorkflowDb;
pushRef: string;
};
} | {
senderId: string;
command: 'community-package-install' | 'community-package-update' | 'community-package-uninstall';
payload: {
packageName: string;
packageVersion: string;
};
};
export type RedisServiceWorkerResponseObject = {
workerId: string;
} & (RedisServiceBaseCommand | {
command: 'getStatus';
payload: IPushDataWorkerStatusPayload;
} | {
command: 'getId';
} | {
command: 'restartEventBus';
payload: {
result: 'success' | 'error';
error?: string;
};
} | {
command: 'reloadExternalSecretsProviders';
payload: {
result: 'success' | 'error';
error?: string;
};
} | {
command: 'stopWorker';
} | {
command: 'workflowActiveStateChanged';
payload: {
oldState: boolean;
newState: boolean;
workflowId: string;
};
});
export type RedisServiceCommandObject = {
targets?: string[];
} & RedisServiceBaseCommand;