Create tests for main app bar
[arvados.git] / src / store / auth / auth-action.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { ofType, default as unionize, UnionOf } from "unionize";
6 import { UserDetailsResponse } from "../../services/auth-service/auth-service";
7
8 const actions = unionize({
9     SAVE_API_TOKEN: ofType<string>(),
10     LOGIN: {},
11     LOGOUT: {},
12     INIT: {},
13     USER_DETAILS_REQUEST: {},
14     USER_DETAILS_SUCCESS: ofType<UserDetailsResponse>()
15 }, {
16     tag: 'type',
17     value: 'payload'
18 });
19
20 export type AuthAction = UnionOf<typeof actions>;
21 export default actions;