summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/demoApp/src/handlers/demoAppRootHandler.ts
blob: ee21a9c908f9373adfed5b8b3f8a0167104ffbc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { combineActionHandler } from '../../../../framework/src/flux/middleware';

import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore';

import { listAuthorsHandler, IListAuthors } from './listAuthorsHandler';
import { editAuthorHandler, IEditAuthor } from './editAuthorHandler';

export interface IDemoAppStoreState {
  listAuthors: IListAuthors;
  editAuthor: IEditAuthor;
}

declare module '../../../../framework/src/store/applicationStore' {
  interface IApplicationStoreState {
    demoApp: IDemoAppStoreState
  }
}

const actionHandlers = {
  listAuthors: listAuthorsHandler,
  editAuthor: editAuthorHandler,
};

export const demoAppRootHandler = combineActionHandler <IDemoAppStoreState>(actionHandlers);
export default demoAppRootHandler;