## Description Splitting analytic events as part of adding events for SCIM #### PR fixes following issue(s) Fixes [#25891](https://github.com/appsmithorg/appsmith/issues/25891) #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing #### How Has This Been Tested? - [x] Manual - [ ] Jest - [ ] Cypress ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
110 lines
2.9 KiB
TypeScript
110 lines
2.9 KiB
TypeScript
import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants";
|
|
import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants";
|
|
import type { EventLocation } from "@appsmith/utils/analyticsUtilTypes";
|
|
import type { SlashCommandPayload } from "entities/Action";
|
|
|
|
export const changeApi = (
|
|
id: string,
|
|
isSaas: boolean,
|
|
newApi?: boolean,
|
|
): ReduxAction<{ id: string; isSaas: boolean; newApi?: boolean }> => {
|
|
return {
|
|
type: ReduxActionTypes.API_PANE_CHANGE_API,
|
|
payload: { id, isSaas, newApi },
|
|
};
|
|
};
|
|
|
|
export const initApiPane = (urlId?: string): ReduxAction<{ id?: string }> => {
|
|
return {
|
|
type: ReduxActionTypes.INIT_API_PANE,
|
|
payload: { id: urlId },
|
|
};
|
|
};
|
|
|
|
export const setCurrentCategory = (
|
|
category: string,
|
|
): ReduxAction<{ category: string }> => {
|
|
return {
|
|
type: ReduxActionTypes.SET_CURRENT_CATEGORY,
|
|
payload: { category },
|
|
};
|
|
};
|
|
|
|
export const setLastUsedEditorPage = (
|
|
path: string,
|
|
): ReduxAction<{ path: string }> => {
|
|
return {
|
|
type: ReduxActionTypes.SET_LAST_USED_EDITOR_PAGE,
|
|
payload: { path },
|
|
};
|
|
};
|
|
|
|
export const setLastSelectedPage = (
|
|
selectedPageId: string,
|
|
): ReduxAction<{ selectedPageId: string }> => {
|
|
return {
|
|
type: ReduxActionTypes.SET_LAST_SELECTED_PAGE_PAGE,
|
|
payload: { selectedPageId },
|
|
};
|
|
};
|
|
|
|
export const createNewApiAction = (
|
|
pageId: string,
|
|
from: EventLocation,
|
|
apiType?: string,
|
|
): ReduxAction<{ pageId: string; from: EventLocation; apiType?: string }> => ({
|
|
type: ReduxActionTypes.CREATE_NEW_API_ACTION,
|
|
payload: { pageId, from, apiType },
|
|
});
|
|
|
|
export const createNewQueryAction = (
|
|
pageId: string,
|
|
from: EventLocation,
|
|
datasourceId: string,
|
|
): ReduxAction<{
|
|
pageId: string;
|
|
from: EventLocation;
|
|
datasourceId: string;
|
|
}> => ({
|
|
type: ReduxActionTypes.CREATE_NEW_QUERY_ACTION,
|
|
payload: { pageId, from, datasourceId },
|
|
});
|
|
|
|
export const updateBodyContentType = (
|
|
title: string,
|
|
apiId: string,
|
|
): ReduxAction<{ title: string; apiId: string }> => ({
|
|
type: ReduxActionTypes.UPDATE_API_ACTION_BODY_CONTENT_TYPE,
|
|
payload: { title, apiId },
|
|
});
|
|
|
|
export const redirectToNewIntegrations = (
|
|
pageId: string,
|
|
params?: any,
|
|
): ReduxAction<{
|
|
pageId: string;
|
|
params: any;
|
|
}> => ({
|
|
type: ReduxActionTypes.REDIRECT_TO_NEW_INTEGRATIONS,
|
|
payload: { pageId, params },
|
|
});
|
|
|
|
export const executeCommandAction = (payload: SlashCommandPayload) => ({
|
|
type: ReduxActionTypes.EXECUTE_COMMAND,
|
|
payload: payload,
|
|
});
|
|
|
|
export const setApiPaneConfigSelectedTabIndex: (
|
|
payload: number,
|
|
) => ReduxAction<{ selectedTabIndex: number }> = (payload: number) => ({
|
|
type: ReduxActionTypes.SET_API_PANE_CONFIG_SELECTED_TAB,
|
|
payload: { selectedTabIndex: payload },
|
|
});
|
|
|
|
export const setApiRightPaneSelectedTab: (
|
|
payload: string,
|
|
) => ReduxAction<{ selectedTab: string }> = (payload: string) => ({
|
|
type: ReduxActionTypes.SET_API_RIGHT_PANE_SELECTED_TAB,
|
|
payload: { selectedTab: payload },
|
|
});
|