* migration from organization to workspace on code level * updated a few more files * fixed runtime errors * update org settings URL * Renamed organizationId in domain objects * changed field named from organization to workspace * Reverted AppsmithRole changes * fixed migrations * recreating indexes * migration update * seed data runs before migration, undo changes * mock commit * seedmongo to populate upgraded data, datasource upgrade * fixed two test cases * updated migrations * updated prop name * Upgraded AclPermission * comment * migrated AppsmithRole * more changes * final set of changes * variable name changes * update cypress variable name * Update app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/ApplicationControllerCE.java * Update app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/Datasource.java Co-authored-by: Trisha Anand <trisha@appsmith.com> * reverting encryption handler change * migrated a few missed out org to workspace * migrated a few missed out org to workspace * migration changes * Removed Permission import * fixed AppsmithRole * mongodb version update * fixed compile error * fixed compile issue * fixed some tests * simplified embedded mongodb config * updated a cypress test Co-authored-by: Sidhant Goel <sidhant@appsmith.com> Co-authored-by: Trisha Anand <trisha@appsmith.com> Co-authored-by: Sidhant Goel <sidhant@hexcod.in>
87 lines
1.8 KiB
TypeScript
87 lines
1.8 KiB
TypeScript
import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants";
|
|
import { SaveWorkspaceLogo, SaveWorkspaceRequest } from "api/WorkspaceApi";
|
|
|
|
export const fetchWorkspace = (
|
|
workspaceId: string,
|
|
skipValidation?: boolean,
|
|
) => {
|
|
return {
|
|
type: ReduxActionTypes.FETCH_CURRENT_WORKSPACE,
|
|
payload: {
|
|
workspaceId,
|
|
skipValidation,
|
|
},
|
|
};
|
|
};
|
|
|
|
export const deleteWorkspace = (workspaceId: string) => {
|
|
return {
|
|
type: ReduxActionTypes.DELETE_WORKSPACE_INIT,
|
|
payload: workspaceId,
|
|
};
|
|
};
|
|
|
|
export const changeWorkspaceUserRole = (
|
|
workspaceId: string,
|
|
role: string,
|
|
username: string,
|
|
) => {
|
|
return {
|
|
type: ReduxActionTypes.CHANGE_WORKSPACE_USER_ROLE_INIT,
|
|
payload: {
|
|
workspaceId,
|
|
role,
|
|
username,
|
|
},
|
|
};
|
|
};
|
|
|
|
export const deleteWorkspaceUser = (workspaceId: string, username: string) => {
|
|
return {
|
|
type: ReduxActionTypes.DELETE_WORKSPACE_USER_INIT,
|
|
payload: {
|
|
workspaceId,
|
|
username,
|
|
},
|
|
};
|
|
};
|
|
export const fetchUsersForWorkspace = (workspaceId: string) => {
|
|
return {
|
|
type: ReduxActionTypes.FETCH_ALL_USERS_INIT,
|
|
payload: {
|
|
workspaceId,
|
|
},
|
|
};
|
|
};
|
|
export const fetchRolesForWorkspace = (workspaceId: string) => {
|
|
return {
|
|
type: ReduxActionTypes.FETCH_ALL_ROLES_INIT,
|
|
payload: {
|
|
workspaceId,
|
|
},
|
|
};
|
|
};
|
|
|
|
export const saveWorkspace = (workspaceSettings: SaveWorkspaceRequest) => {
|
|
return {
|
|
type: ReduxActionTypes.SAVE_WORKSPACE_INIT,
|
|
payload: workspaceSettings,
|
|
};
|
|
};
|
|
|
|
export const uploadWorkspaceLogo = (workspaceLogo: SaveWorkspaceLogo) => {
|
|
return {
|
|
type: ReduxActionTypes.UPLOAD_WORKSPACE_LOGO,
|
|
payload: workspaceLogo,
|
|
};
|
|
};
|
|
|
|
export const deleteWorkspaceLogo = (id: string) => {
|
|
return {
|
|
type: ReduxActionTypes.REMOVE_WORKSPACE_LOGO,
|
|
payload: {
|
|
id: id,
|
|
},
|
|
};
|
|
};
|