2020-05-05 07:50:30 +00:00
|
|
|
import { ReduxActionTypes, ReduxAction } from "constants/ReduxActionConstants";
|
2020-06-04 13:49:22 +00:00
|
|
|
import { RestAction } from "entities/Action";
|
2020-05-05 07:50:30 +00:00
|
|
|
|
|
|
|
|
export const createQueryRequest = (payload: Partial<RestAction>) => {
|
|
|
|
|
return {
|
|
|
|
|
type: ReduxActionTypes.CREATE_QUERY_INIT,
|
|
|
|
|
payload,
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const initQueryPane = (
|
|
|
|
|
pluginType: string,
|
|
|
|
|
urlId?: string,
|
|
|
|
|
): ReduxAction<{ pluginType: string; id?: string }> => {
|
|
|
|
|
return {
|
|
|
|
|
type: ReduxActionTypes.INIT_QUERY_PANE,
|
|
|
|
|
payload: { id: urlId, pluginType },
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2020-07-07 08:07:37 +00:00
|
|
|
export const changeQuery = (id: string): ReduxAction<{ id: string }> => {
|
2020-05-05 07:50:30 +00:00
|
|
|
return {
|
|
|
|
|
type: ReduxActionTypes.QUERY_PANE_CHANGE,
|
2020-07-07 08:07:37 +00:00
|
|
|
payload: { id },
|
2020-05-05 07:50:30 +00:00
|
|
|
};
|
|
|
|
|
};
|