Added collection service, reorganized components structure
[arvados.git] / src / store / collection / collection-action.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { Collection } from "../../models/collection";
6 import { default as unionize, ofType, UnionOf } from "unionize";
7
8 const actions = unionize({
9     CREATE_COLLECTION: ofType<Collection>(),
10     REMOVE_COLLECTION: ofType<string>(),
11     COLLECTIONS_REQUEST: ofType<any>(),
12     COLLECTIONS_SUCCESS: ofType<{ collections: Collection[] }>(),
13 }, {
14     tag: 'type',
15     value: 'payload'
16 });
17
18 export type CollectionAction = UnionOf<typeof actions>;
19 export default actions;