index.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { AnyAction } from 'redux';
  2. import { ActionType } from 'typesafe-actions';
  3. import { ThunkAction } from 'redux-thunk';
  4. import * as actions from 'redux/actions/actions';
  5. import { TopicsState } from './topic';
  6. import { ClusterState } from './cluster';
  7. import { BrokersState } from './broker';
  8. import { LoaderState } from './loader';
  9. import { ConsumerGroupsState } from './consumerGroup';
  10. import { SchemasState } from './schema';
  11. export * from './topic';
  12. export * from './cluster';
  13. export * from './broker';
  14. export * from './consumerGroup';
  15. export * from './schema';
  16. export * from './loader';
  17. export enum FetchStatus {
  18. notFetched = 'notFetched',
  19. fetching = 'fetching',
  20. fetched = 'fetched',
  21. errorFetching = 'errorFetching',
  22. }
  23. export interface RootState {
  24. topics: TopicsState;
  25. clusters: ClusterState;
  26. brokers: BrokersState;
  27. consumerGroups: ConsumerGroupsState;
  28. schemas: SchemasState;
  29. loader: LoaderState;
  30. }
  31. export type Action = ActionType<typeof actions>;
  32. export type PromiseThunk<T> = ThunkAction<
  33. Promise<T>,
  34. RootState,
  35. undefined,
  36. AnyAction
  37. >;