5bc8076d64f015170fb62bba7f8f5ca99131cc08
[arvados-workbench2.git] / src / store / workflow-tree-picker / workflow-tree-picker-actions.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { unionize, ofType, UnionOf } from "~/common/unionize";
6
7 import { TreePickerNode } from "./workflow-tree-picker";
8
9 export const fileTreePickerActions = unionize({
10     LOAD_TREE_PICKER_NODE: ofType<{ nodeId: string, pickerId: string }>(),
11     LOAD_TREE_PICKER_NODE_SUCCESS: ofType<{ nodeId: string, nodes: Array<TreePickerNode>, pickerId: string }>(),
12     TOGGLE_TREE_PICKER_NODE_COLLAPSE: ofType<{ nodeId: string, pickerId: string }>(),
13     TOGGLE_TREE_PICKER_NODE_SELECT: ofType<{ nodeId: string, pickerId: string }>(),
14     EXPAND_TREE_PICKER_NODES: ofType<{ nodeIds: string[], pickerId: string }>(),
15     RESET_TREE_PICKER: ofType<{ pickerId: string }>()
16 });
17
18 export type FileTreePickerAction = UnionOf<typeof fileTreePickerActions>;