2020-05-05 07:50:30 +00:00
|
|
|
import { ReduxActionTypes, ReduxAction } from "constants/ReduxActionConstants";
|
2021-01-12 04:17:28 +00:00
|
|
|
import { Action } from "entities/Action";
|
2020-05-05 07:50:30 +00:00
|
|
|
|
2021-01-12 04:17:28 +00:00
|
|
|
export const createQueryRequest = (payload: Partial<Action>) => {
|
2020-05-05 07:50:30 +00:00
|
|
|
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-08-12 06:27:35 +00:00
|
|
|
export const changeQuery = (
|
|
|
|
|
id: string,
|
2022-04-07 16:18:49 +00:00
|
|
|
isSaas: boolean,
|
2020-08-12 06:27:35 +00:00
|
|
|
newQuery?: boolean,
|
2021-12-07 09:45:18 +00:00
|
|
|
action?: Action,
|
2022-04-07 16:18:49 +00:00
|
|
|
): ReduxAction<{
|
|
|
|
|
id: string;
|
|
|
|
|
isSaas: boolean;
|
|
|
|
|
newQuery?: boolean;
|
|
|
|
|
action?: any;
|
|
|
|
|
}> => {
|
2020-05-05 07:50:30 +00:00
|
|
|
return {
|
|
|
|
|
type: ReduxActionTypes.QUERY_PANE_CHANGE,
|
2022-04-07 16:18:49 +00:00
|
|
|
payload: { id, newQuery, action, isSaas },
|
2020-05-05 07:50:30 +00:00
|
|
|
};
|
|
|
|
|
};
|