mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
refactor(editor): Type node view event bus (no-changelog) (#10396)
This commit is contained in:
parent
58408719c4
commit
5e1f4cf778
|
@ -1,3 +1,28 @@
|
|||
import { createEventBus } from 'n8n-design-system/utils';
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export const nodeViewEventBus = createEventBus();
|
||||
/** Callback function called after workflow has been save */
|
||||
export type OnSaveWorkflowFn = () => void;
|
||||
|
||||
export interface NodeViewEventBusEvents {
|
||||
/** Command to create a new workflow */
|
||||
newWorkflow: never;
|
||||
|
||||
/** Command to open the chat */
|
||||
openChat: never;
|
||||
|
||||
/** Command to save the current workflow */
|
||||
saveWorkflow: OnSaveWorkflowFn;
|
||||
|
||||
/** Command to import a workflow from given data */
|
||||
importWorkflowData: IDataObject;
|
||||
|
||||
/** Command to import a workflow from given URL */
|
||||
importWorkflowUrl: IDataObject;
|
||||
|
||||
'runWorkflowButton:mouseenter': never;
|
||||
|
||||
'runWorkflowButton:mouseleave': never;
|
||||
}
|
||||
|
||||
export const nodeViewEventBus = createEventBus<NodeViewEventBusEvents>();
|
||||
|
|
Loading…
Reference in a new issue