mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
⚡ Restructure IPushData union types (#1836)
* ✨ Send console.log messages to editor-UI * ⚡ Send message only to session which started workflow * ⚡ Made it also work in own process * ⚡ Add support for console.log UI forward also to FunctionItem Node * 👕 Fix lint issue * 👕 Fix linting issue * ⚡ Restructure IPushData unions in /cli * ⚡ Restructure IPushData unions in /editor-ui * 🔥 Remove unneeded castings * 🔥 Remove commented code * ⚡ Improve code Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Jan <janober@users.noreply.github.com>
This commit is contained in:
@@ -355,12 +355,45 @@ export interface IExecutionDeleteFilter {
|
||||
ids?: string[];
|
||||
}
|
||||
|
||||
export interface IPushData {
|
||||
data: IPushDataExecutionFinished | IPushDataNodeExecuteAfter | IPushDataNodeExecuteBefore | IPushDataTestWebhook | IPushDataConsoleMessage;
|
||||
type: IPushDataType;
|
||||
}
|
||||
export type IPushDataType = IPushData['type'];
|
||||
|
||||
export type IPushDataType = 'executionFinished' | 'executionStarted' | 'nodeExecuteAfter' | 'nodeExecuteBefore' | 'sendConsoleMessage' | 'testWebhookDeleted' | 'testWebhookReceived';
|
||||
export type IPushData =
|
||||
| PushDataExecutionFinished
|
||||
| PushDataExecutionStarted
|
||||
| PushDataExecuteAfter
|
||||
| PushDataExecuteBefore
|
||||
| PushDataConsoleMessage
|
||||
| PushDataTestWebhook;
|
||||
|
||||
type PushDataExecutionFinished = {
|
||||
data: IPushDataExecutionFinished;
|
||||
type: 'executionFinished';
|
||||
};
|
||||
|
||||
type PushDataExecutionStarted = {
|
||||
data: IPushDataExecutionStarted;
|
||||
type: 'executionStarted';
|
||||
};
|
||||
|
||||
type PushDataExecuteAfter = {
|
||||
data: IPushDataNodeExecuteAfter;
|
||||
type: 'nodeExecuteAfter';
|
||||
};
|
||||
|
||||
type PushDataExecuteBefore = {
|
||||
data: IPushDataNodeExecuteBefore;
|
||||
type: 'nodeExecuteBefore';
|
||||
};
|
||||
|
||||
type PushDataConsoleMessage = {
|
||||
data: IPushDataConsoleMessage;
|
||||
type: 'sendConsoleMessage';
|
||||
};
|
||||
|
||||
type PushDataTestWebhook = {
|
||||
data: IPushDataTestWebhook;
|
||||
type: 'testWebhookDeleted' | 'testWebhookReceived';
|
||||
};
|
||||
|
||||
export interface IPushDataExecutionStarted {
|
||||
executionId: string;
|
||||
|
||||
Reference in New Issue
Block a user