mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-15 01:35:12 -05:00
25 lines
952 B
TypeScript
25 lines
952 B
TypeScript
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<Graph>('nodes/textToImageGraphBuilt');
|
|
const imageToImageGraphBuilt = createAction<Graph>('nodes/imageToImageGraphBuilt');
|
|
const canvasGraphBuilt = createAction<Graph>('nodes/canvasGraphBuilt');
|
|
const nodesGraphBuilt = createAction<Graph>('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<WorkflowV3>('workflow/workflowLoaded');
|