refs #13610 Merge branch '13610-projects-hierarchy'
[arvados-workbench2.git] / src / store / project / project-action.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { Project } from "../../models/project";
6 import { default as unionize, ofType, UnionOf } from "unionize";
7
8 const actions = unionize({
9     CREATE_PROJECT: ofType<Project>(),
10     REMOVE_PROJECT: ofType<string>(),
11     PROJECTS_REQUEST: {},
12     PROJECTS_SUCCESS: ofType<{ projects: Project[], parentItemId?: string }>(),
13     TOGGLE_PROJECT_TREE_ITEM: ofType<string>()
14 }, {
15     tag: 'type',
16     value: 'payload'
17 });
18
19 export type ProjectAction = UnionOf<typeof actions>;
20 export default actions;