import { createAction, isAnyOf } from '@reduxjs/toolkit'; import type { WorkflowV3 } from 'features/nodes/types/workflow'; import type { Graph, GraphAndWorkflowResponse } from 'services/api/types'; const textToImageGraphBuilt = createAction('nodes/textToImageGraphBuilt'); const imageToImageGraphBuilt = createAction('nodes/imageToImageGraphBuilt'); const canvasGraphBuilt = createAction('nodes/canvasGraphBuilt'); const nodesGraphBuilt = createAction('nodes/nodesGraphBuilt'); export const isAnyGraphBuilt = isAnyOf( textToImageGraphBuilt, imageToImageGraphBuilt, canvasGraphBuilt, nodesGraphBuilt ); export const workflowLoadRequested = createAction<{ data: GraphAndWorkflowResponse; asCopy: boolean; }>('nodes/workflowLoadRequested'); export const updateAllNodesRequested = createAction('nodes/updateAllNodesRequested'); export const workflowLoaded = createAction('workflow/workflowLoaded');