Repository navigation
Expand file tree
/
Copy pathtypes.ts
More file actions
79 lines (70 loc) · 1.95 KB
/
Copy pathtypes.ts
File metadata and controls
79 lines (70 loc) · 1.95 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import { MapStateToProps as ReduxMapStateToProps } from 'react-redux';
import { Store, AnyAction } from 'redux';
import { ThunkAction, ThunkDispatch } from 'redux-thunk';
import { RouterAction } from 'react-router-redux';
import { RAEvents } from './components/Services/Events/types';
import reducer from './reducer';
export type FixMe = any;
export type ApiExplorer = {
authApiExpanded: string;
currentTab: number;
headerFocus: boolean;
loading: boolean;
mode: string;
modalState: Record<string, string>;
explorerData: Record<string, string>;
displayedApi: DisplayedApiState;
};
export type DisplayedApiState = {
details: Record<string, string>;
id: string;
request: ApiExplorerRequest;
};
export type ApiExplorerRequest = {
bodyType: string;
headers: ApiExplorerHeader[];
headersInitialised: boolean;
method: string;
params: string;
url: string;
};
export type ApiExplorerHeader = {
key: string;
value: string;
isActive: boolean;
isNewHeader: boolean;
isDisabled: boolean;
};
// Redux Utils
export type ReduxState = ReturnType<typeof reducer>;
export type ReduxAction = RAEvents | RouterAction;
export type MapStateToProps<
StateProps = unknown,
OwnProps = unknown
> = ReduxMapStateToProps<StateProps, OwnProps, ReduxState>;
export type GetReduxState = () => ReduxState;
export type Thunk<
ReturnType = void,
A extends AnyAction = ReduxAction
> = ThunkAction<ReturnType, ReduxState, unknown, A>;
export type Dispatch = ThunkDispatch<ReduxState, unknown, ReduxAction>;
export type ConnectInjectedProps = {
dispatch: Dispatch;
};
export type ReduxStore = Store<ReduxState, ReduxAction>;
// Router Utils
export type ReplaceRouterState = (route: string) => void;
// HGE common types
export type RunSqlType = {
type: string;
version?: number;
args: {
cascade?: boolean;
read_only?: boolean;
sql: string;
};
};
declare global {
// eslint-disable-next-line no-underscore-dangle
const __DEVELOPMENT__: boolean;
}