1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { Dispatch } from 'redux';
6 import { RootState } from "~/store/store";
7 import { loadDetailsPanel } from '~/store/details-panel/details-panel-action';
8 import { snackbarActions } from '~/store/snackbar/snackbar-actions';
9 import { loadFavoritePanel } from '~/store/favorite-panel/favorite-panel-action';
10 import { openProjectPanel, projectPanelActions, setIsProjectPanelTrashed } from '~/store/project-panel/project-panel-action';
11 import { activateSidePanelTreeItem, initSidePanelTree, SidePanelTreeCategory, loadSidePanelTreeProjects } from '~/store/side-panel-tree/side-panel-tree-actions';
12 import { loadResource, updateResources } from '~/store/resources/resources-actions';
13 import { favoritePanelActions } from '~/store/favorite-panel/favorite-panel-action';
14 import { projectPanelColumns } from '~/views/project-panel/project-panel';
15 import { favoritePanelColumns } from '~/views/favorite-panel/favorite-panel';
16 import { matchRootRoute } from '~/routes/routes';
17 import { setSidePanelBreadcrumbs, setProcessBreadcrumbs, setSharedWithMeBreadcrumbs, setTrashBreadcrumbs, setBreadcrumbs, setGroupDetailsBreadcrumbs, setGroupsBreadcrumbs } from '~/store/breadcrumbs/breadcrumbs-actions';
18 import { navigateToProject } from '~/store/navigation/navigation-action';
19 import { MoveToFormDialogData } from '~/store/move-to-dialog/move-to-dialog';
20 import { ServiceRepository } from '~/services/services';
21 import { getResource } from '~/store/resources/resources';
22 import { getProjectPanelCurrentUuid } from '~/store/project-panel/project-panel-action';
23 import * as projectCreateActions from '~/store/projects/project-create-actions';
24 import * as projectMoveActions from '~/store/projects/project-move-actions';
25 import * as projectUpdateActions from '~/store/projects/project-update-actions';
26 import * as collectionCreateActions from '~/store/collections/collection-create-actions';
27 import * as collectionCopyActions from '~/store/collections/collection-copy-actions';
28 import * as collectionUpdateActions from '~/store/collections/collection-update-actions';
29 import * as collectionMoveActions from '~/store/collections/collection-move-actions';
30 import * as processesActions from '~/store/processes/processes-actions';
31 import * as processMoveActions from '~/store/processes/process-move-actions';
32 import * as processUpdateActions from '~/store/processes/process-update-actions';
33 import * as processCopyActions from '~/store/processes/process-copy-actions';
34 import { trashPanelColumns } from "~/views/trash-panel/trash-panel";
35 import { loadTrashPanel, trashPanelActions } from "~/store/trash-panel/trash-panel-action";
36 import { initProcessLogsPanel } from '~/store/process-logs-panel/process-logs-panel-actions';
37 import { loadProcessPanel } from '~/store/process-panel/process-panel-actions';
38 import { sharedWithMePanelActions } from '~/store/shared-with-me-panel/shared-with-me-panel-actions';
39 import { loadSharedWithMePanel } from '~/store/shared-with-me-panel/shared-with-me-panel-actions';
40 import { CopyFormDialogData } from '~/store/copy-dialog/copy-dialog';
41 import { loadWorkflowPanel, workflowPanelActions } from '~/store/workflow-panel/workflow-panel-actions';
42 import { loadSshKeysPanel } from '~/store/auth/auth-action';
43 import { loadMyAccountPanel } from '~/store/my-account/my-account-panel-actions';
44 import { workflowPanelColumns } from '~/views/workflow-panel/workflow-panel-view';
45 import { progressIndicatorActions } from '~/store/progress-indicator/progress-indicator-actions';
46 import { getProgressIndicator } from '~/store/progress-indicator/progress-indicator-reducer';
47 import { ResourceKind, extractUuidKind } from '~/models/resource';
48 import { FilterBuilder } from '~/services/api/filter-builder';
49 import { GroupContentsResource } from '~/services/groups-service/groups-service';
50 import { unionize, ofType, UnionOf, MatchCases } from '~/common/unionize';
51 import { loadRunProcessPanel } from '~/store/run-process-panel/run-process-panel-actions';
52 import { loadCollectionFiles } from '~/store/collection-panel/collection-panel-files/collection-panel-files-actions';
53 import { SnackbarKind } from '~/store/snackbar/snackbar-actions';
54 import { collectionPanelActions } from "~/store/collection-panel/collection-panel-action";
55 import { CollectionResource } from "~/models/collection";
56 import { searchResultsPanelActions, loadSearchResultsPanel } from '~/store/search-results-panel/search-results-panel-actions';
57 import { searchResultsPanelColumns } from '~/views/search-results-panel/search-results-panel-view';
58 import { loadVirtualMachinesPanel } from '~/store/virtual-machines/virtual-machines-actions';
59 import { loadRepositoriesPanel } from '~/store/repositories/repositories-actions';
60 import { loadKeepServicesPanel } from '~/store/keep-services/keep-services-actions';
61 import { loadUsersPanel, userBindedActions } from '~/store/users/users-actions';
62 import { loadLinkPanel, linkPanelActions } from '~/store/link-panel/link-panel-actions';
63 import { loadComputeNodesPanel, computeNodesActions } from '~/store/compute-nodes/compute-nodes-actions';
64 import { linkPanelColumns } from '~/views/link-panel/link-panel-root';
65 import { userPanelColumns } from '~/views/user-panel/user-panel';
66 import { computeNodePanelColumns } from '~/views/compute-node-panel/compute-node-panel-root';
67 import { loadApiClientAuthorizationsPanel } from '~/store/api-client-authorizations/api-client-authorizations-actions';
68 import * as groupPanelActions from '~/store/groups-panel/groups-panel-actions';
69 import { groupsPanelColumns } from '~/views/groups-panel/groups-panel';
70 import * as groupDetailsPanelActions from '~/store/group-details-panel/group-details-panel-actions';
71 import { groupDetailsPanelColumns } from '~/views/group-details-panel/group-details-panel';
73 export const WORKBENCH_LOADING_SCREEN = 'workbenchLoadingScreen';
75 export const isWorkbenchLoading = (state: RootState) => {
76 const progress = getProgressIndicator(WORKBENCH_LOADING_SCREEN)(state.progressIndicator);
77 return progress ? progress.working : false;
80 const handleFirstTimeLoad = (action: any) =>
81 async (dispatch: Dispatch<any>, getState: () => RootState) => {
83 await dispatch(action);
85 if (isWorkbenchLoading(getState())) {
86 dispatch(progressIndicatorActions.STOP_WORKING(WORKBENCH_LOADING_SCREEN));
91 export const loadWorkbench = () =>
92 async (dispatch: Dispatch, getState: () => RootState) => {
93 dispatch(progressIndicatorActions.START_WORKING(WORKBENCH_LOADING_SCREEN));
94 const { auth, router } = getState();
95 const { user } = auth;
97 const userResource = await dispatch<any>(loadResource(user.uuid));
99 dispatch(projectPanelActions.SET_COLUMNS({ columns: projectPanelColumns }));
100 dispatch(favoritePanelActions.SET_COLUMNS({ columns: favoritePanelColumns }));
101 dispatch(trashPanelActions.SET_COLUMNS({ columns: trashPanelColumns }));
102 dispatch(sharedWithMePanelActions.SET_COLUMNS({ columns: projectPanelColumns }));
103 dispatch(workflowPanelActions.SET_COLUMNS({ columns: workflowPanelColumns }));
104 dispatch(searchResultsPanelActions.SET_COLUMNS({ columns: searchResultsPanelColumns }));
105 dispatch(userBindedActions.SET_COLUMNS({ columns: userPanelColumns }));
106 dispatch(groupPanelActions.GroupsPanelActions.SET_COLUMNS({ columns: groupsPanelColumns }));
107 dispatch(groupDetailsPanelActions.GroupDetailsPanelActions.SET_COLUMNS({columns: groupDetailsPanelColumns}));
108 dispatch(linkPanelActions.SET_COLUMNS({ columns: linkPanelColumns }));
109 dispatch(computeNodesActions.SET_COLUMNS({ columns: computeNodePanelColumns }));
110 dispatch<any>(initSidePanelTree());
111 if (router.location) {
112 const match = matchRootRoute(router.location.pathname);
114 dispatch(navigateToProject(userResource.uuid));
118 dispatch(userIsNotAuthenticated);
121 dispatch(userIsNotAuthenticated);
125 export const loadFavorites = () =>
127 (dispatch: Dispatch) => {
128 dispatch<any>(activateSidePanelTreeItem(SidePanelTreeCategory.FAVORITES));
129 dispatch<any>(loadFavoritePanel());
130 dispatch<any>(setSidePanelBreadcrumbs(SidePanelTreeCategory.FAVORITES));
133 export const loadTrash = () =>
135 (dispatch: Dispatch) => {
136 dispatch<any>(activateSidePanelTreeItem(SidePanelTreeCategory.TRASH));
137 dispatch<any>(loadTrashPanel());
138 dispatch<any>(setSidePanelBreadcrumbs(SidePanelTreeCategory.TRASH));
141 export const loadProject = (uuid: string) =>
143 async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
144 const userUuid = services.authService.getUuid();
145 dispatch(setIsProjectPanelTrashed(false));
147 if (extractUuidKind(uuid) === ResourceKind.USER && userUuid !== uuid) {
148 // Load another users home projects
149 dispatch(finishLoadingProject(uuid));
150 } else if (userUuid !== uuid) {
151 const match = await loadGroupContentsResource({ uuid, userUuid, services });
153 OWNED: async project => {
154 await dispatch(activateSidePanelTreeItem(uuid));
155 dispatch<any>(setSidePanelBreadcrumbs(uuid));
156 dispatch(finishLoadingProject(project));
159 dispatch<any>(setSharedWithMeBreadcrumbs(uuid));
160 dispatch(activateSidePanelTreeItem(uuid));
161 dispatch(finishLoadingProject(project));
163 TRASHED: project => {
164 dispatch<any>(setTrashBreadcrumbs(uuid));
165 dispatch(setIsProjectPanelTrashed(true));
166 dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.TRASH));
167 dispatch(finishLoadingProject(project));
171 await dispatch(activateSidePanelTreeItem(userUuid));
172 dispatch<any>(setSidePanelBreadcrumbs(userUuid));
173 dispatch(finishLoadingProject(userUuid));
178 export const createProject = (data: projectCreateActions.ProjectCreateFormDialogData) =>
179 async (dispatch: Dispatch) => {
180 const newProject = await dispatch<any>(projectCreateActions.createProject(data));
182 dispatch(snackbarActions.OPEN_SNACKBAR({
183 message: "Project has been successfully created.",
186 await dispatch<any>(loadSidePanelTreeProjects(newProject.ownerUuid));
187 dispatch<any>(reloadProjectMatchingUuid([newProject.ownerUuid]));
191 export const moveProject = (data: MoveToFormDialogData) =>
192 async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
194 const oldProject = getResource(data.uuid)(getState().resources);
195 const oldOwnerUuid = oldProject ? oldProject.ownerUuid : '';
196 const movedProject = await dispatch<any>(projectMoveActions.moveProject(data));
198 dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Project has been moved', hideDuration: 2000 }));
200 await dispatch<any>(loadSidePanelTreeProjects(oldProject.ownerUuid));
202 dispatch<any>(reloadProjectMatchingUuid([oldOwnerUuid, movedProject.ownerUuid, movedProject.uuid]));
205 dispatch(snackbarActions.OPEN_SNACKBAR({ message: e.message, hideDuration: 2000 }));
209 export const updateProject = (data: projectUpdateActions.ProjectUpdateFormDialogData) =>
210 async (dispatch: Dispatch) => {
211 const updatedProject = await dispatch<any>(projectUpdateActions.updateProject(data));
212 if (updatedProject) {
213 dispatch(snackbarActions.OPEN_SNACKBAR({
214 message: "Project has been successfully updated.",
217 await dispatch<any>(loadSidePanelTreeProjects(updatedProject.ownerUuid));
218 dispatch<any>(reloadProjectMatchingUuid([updatedProject.ownerUuid, updatedProject.uuid]));
222 export const loadCollection = (uuid: string) =>
224 async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
225 const userUuid = services.authService.getUuid();
227 const match = await loadGroupContentsResource({ uuid, userUuid, services });
229 OWNED: async collection => {
230 dispatch(collectionPanelActions.SET_COLLECTION(collection as CollectionResource));
231 dispatch(updateResources([collection]));
232 await dispatch(activateSidePanelTreeItem(collection.ownerUuid));
233 dispatch(setSidePanelBreadcrumbs(collection.ownerUuid));
234 dispatch(loadCollectionFiles(collection.uuid));
236 SHARED: collection => {
237 dispatch(collectionPanelActions.SET_COLLECTION(collection as CollectionResource));
238 dispatch(updateResources([collection]));
239 dispatch<any>(setSharedWithMeBreadcrumbs(collection.ownerUuid));
240 dispatch(activateSidePanelTreeItem(collection.ownerUuid));
241 dispatch(loadCollectionFiles(collection.uuid));
243 TRASHED: collection => {
244 dispatch(collectionPanelActions.SET_COLLECTION(collection as CollectionResource));
245 dispatch(updateResources([collection]));
246 dispatch(setTrashBreadcrumbs(''));
247 dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.TRASH));
248 dispatch(loadCollectionFiles(collection.uuid));
255 export const createCollection = (data: collectionCreateActions.CollectionCreateFormDialogData) =>
256 async (dispatch: Dispatch) => {
257 const collection = await dispatch<any>(collectionCreateActions.createCollection(data));
259 dispatch(snackbarActions.OPEN_SNACKBAR({
260 message: "Collection has been successfully created.",
263 dispatch<any>(updateResources([collection]));
264 dispatch<any>(reloadProjectMatchingUuid([collection.ownerUuid]));
268 export const updateCollection = (data: collectionUpdateActions.CollectionUpdateFormDialogData) =>
269 async (dispatch: Dispatch) => {
270 const collection = await dispatch<any>(collectionUpdateActions.updateCollection(data));
272 dispatch(snackbarActions.OPEN_SNACKBAR({
273 message: "Collection has been successfully updated.",
276 dispatch<any>(updateResources([collection]));
277 dispatch<any>(reloadProjectMatchingUuid([collection.ownerUuid]));
281 export const copyCollection = (data: CopyFormDialogData) =>
282 async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
284 const copyToProject = getResource(data.ownerUuid)(getState().resources);
285 const collection = await dispatch<any>(collectionCopyActions.copyCollection(data));
286 if (copyToProject && collection) {
287 dispatch<any>(reloadProjectMatchingUuid([copyToProject.uuid]));
288 dispatch(snackbarActions.OPEN_SNACKBAR({
289 message: 'Collection has been copied.',
291 kind: SnackbarKind.SUCCESS,
292 link: collection.ownerUuid
296 dispatch(snackbarActions.OPEN_SNACKBAR({ message: e.message, hideDuration: 2000, kind: SnackbarKind.ERROR }));
300 export const moveCollection = (data: MoveToFormDialogData) =>
301 async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
303 const collection = await dispatch<any>(collectionMoveActions.moveCollection(data));
304 dispatch<any>(updateResources([collection]));
305 dispatch<any>(reloadProjectMatchingUuid([collection.ownerUuid]));
306 dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Collection has been moved.', hideDuration: 2000, kind: SnackbarKind.SUCCESS }));
308 dispatch(snackbarActions.OPEN_SNACKBAR({ message: e.message, hideDuration: 2000 }));
312 export const loadProcess = (uuid: string) =>
314 async (dispatch: Dispatch, getState: () => RootState) => {
315 dispatch<any>(loadProcessPanel(uuid));
316 const process = await dispatch<any>(processesActions.loadProcess(uuid));
317 await dispatch<any>(activateSidePanelTreeItem(process.containerRequest.ownerUuid));
318 dispatch<any>(setProcessBreadcrumbs(uuid));
319 dispatch(loadDetailsPanel(uuid));
322 export const updateProcess = (data: processUpdateActions.ProcessUpdateFormDialogData) =>
323 async (dispatch: Dispatch) => {
325 const process = await dispatch<any>(processUpdateActions.updateProcess(data));
327 dispatch(snackbarActions.OPEN_SNACKBAR({
328 message: "Process has been successfully updated.",
331 dispatch<any>(updateResources([process]));
332 dispatch<any>(reloadProjectMatchingUuid([process.ownerUuid]));
335 dispatch(snackbarActions.OPEN_SNACKBAR({ message: e.message, hideDuration: 2000 }));
339 export const moveProcess = (data: MoveToFormDialogData) =>
340 async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
342 const process = await dispatch<any>(processMoveActions.moveProcess(data));
343 dispatch<any>(updateResources([process]));
344 dispatch<any>(reloadProjectMatchingUuid([process.ownerUuid]));
345 dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Process has been moved.', hideDuration: 2000 }));
347 dispatch(snackbarActions.OPEN_SNACKBAR({ message: e.message, hideDuration: 2000 }));
351 export const copyProcess = (data: CopyFormDialogData) =>
352 async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
354 const process = await dispatch<any>(processCopyActions.copyProcess(data));
355 dispatch<any>(updateResources([process]));
356 dispatch<any>(reloadProjectMatchingUuid([process.ownerUuid]));
357 dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Process has been copied.', hideDuration: 2000 }));
359 dispatch(snackbarActions.OPEN_SNACKBAR({ message: e.message, hideDuration: 2000 }));
363 export const loadProcessLog = (uuid: string) =>
365 async (dispatch: Dispatch) => {
366 const process = await dispatch<any>(processesActions.loadProcess(uuid));
367 dispatch<any>(setProcessBreadcrumbs(uuid));
368 dispatch<any>(initProcessLogsPanel(uuid));
369 await dispatch<any>(activateSidePanelTreeItem(process.containerRequest.ownerUuid));
372 export const resourceIsNotLoaded = (uuid: string) =>
373 snackbarActions.OPEN_SNACKBAR({
374 message: `Resource identified by ${uuid} is not loaded.`
377 export const userIsNotAuthenticated = snackbarActions.OPEN_SNACKBAR({
378 message: 'User is not authenticated'
381 export const couldNotLoadUser = snackbarActions.OPEN_SNACKBAR({
382 message: 'Could not load user'
385 export const reloadProjectMatchingUuid = (matchingUuids: string[]) =>
386 async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
387 const currentProjectPanelUuid = getProjectPanelCurrentUuid(getState());
388 if (currentProjectPanelUuid && matchingUuids.some(uuid => uuid === currentProjectPanelUuid)) {
389 dispatch<any>(loadProject(currentProjectPanelUuid));
393 export const loadSharedWithMe = handleFirstTimeLoad(async (dispatch: Dispatch) => {
394 dispatch<any>(loadSharedWithMePanel());
395 await dispatch<any>(activateSidePanelTreeItem(SidePanelTreeCategory.SHARED_WITH_ME));
396 await dispatch<any>(setSidePanelBreadcrumbs(SidePanelTreeCategory.SHARED_WITH_ME));
399 export const loadRunProcess = handleFirstTimeLoad(
400 async (dispatch: Dispatch) => {
401 await dispatch<any>(loadRunProcessPanel());
405 export const loadWorkflow = handleFirstTimeLoad(async (dispatch: Dispatch<any>) => {
406 dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.WORKFLOWS));
407 await dispatch(loadWorkflowPanel());
408 dispatch(setSidePanelBreadcrumbs(SidePanelTreeCategory.WORKFLOWS));
411 export const loadSearchResults = handleFirstTimeLoad(
412 async (dispatch: Dispatch<any>) => {
413 await dispatch(loadSearchResultsPanel());
416 export const loadLinks = handleFirstTimeLoad(
417 async (dispatch: Dispatch<any>) => {
418 await dispatch(loadLinkPanel());
421 export const loadVirtualMachines = handleFirstTimeLoad(
422 async (dispatch: Dispatch<any>) => {
423 await dispatch(loadVirtualMachinesPanel());
424 dispatch(setBreadcrumbs([{ label: 'Virtual Machines' }]));
427 export const loadRepositories = handleFirstTimeLoad(
428 async (dispatch: Dispatch<any>) => {
429 await dispatch(loadRepositoriesPanel());
430 dispatch(setBreadcrumbs([{ label: 'Repositories' }]));
433 export const loadSshKeys = handleFirstTimeLoad(
434 async (dispatch: Dispatch<any>) => {
435 await dispatch(loadSshKeysPanel());
438 export const loadMyAccount = handleFirstTimeLoad(
439 (dispatch: Dispatch<any>) => {
440 dispatch(loadMyAccountPanel());
443 export const loadKeepServices = handleFirstTimeLoad(
444 async (dispatch: Dispatch<any>) => {
445 await dispatch(loadKeepServicesPanel());
448 export const loadUsers = handleFirstTimeLoad(
449 async (dispatch: Dispatch<any>) => {
450 await dispatch(loadUsersPanel());
451 dispatch(setBreadcrumbs([{ label: 'Users' }]));
454 export const loadComputeNodes = handleFirstTimeLoad(
455 async (dispatch: Dispatch<any>) => {
456 await dispatch(loadComputeNodesPanel());
459 export const loadApiClientAuthorizations = handleFirstTimeLoad(
460 async (dispatch: Dispatch<any>) => {
461 await dispatch(loadApiClientAuthorizationsPanel());
464 export const loadGroupsPanel = handleFirstTimeLoad(
465 (dispatch: Dispatch<any>) => {
466 dispatch(setGroupsBreadcrumbs());
467 dispatch(groupPanelActions.loadGroupsPanel());
471 export const loadGroupDetailsPanel = (groupUuid: string) =>
473 (dispatch: Dispatch<any>) => {
474 dispatch(setGroupDetailsBreadcrumbs(groupUuid));
475 dispatch(groupDetailsPanelActions.loadGroupDetailsPanel(groupUuid));
478 const finishLoadingProject = (project: GroupContentsResource | string) =>
479 async (dispatch: Dispatch<any>) => {
480 const uuid = typeof project === 'string' ? project : project.uuid;
481 dispatch(openProjectPanel(uuid));
482 dispatch(loadDetailsPanel(uuid));
483 if (typeof project !== 'string') {
484 dispatch(updateResources([project]));
488 const loadGroupContentsResource = async (params: {
491 services: ServiceRepository
493 const filters = new FilterBuilder()
494 .addEqual('uuid', params.uuid)
496 const { items } = await params.services.groupsService.contents(params.userUuid, {
501 const resource = items.shift();
502 let handler: GroupContentsHandler;
504 handler = (resource.kind === ResourceKind.COLLECTION || resource.kind === ResourceKind.PROJECT) && resource.isTrashed
505 ? groupContentsHandlers.TRASHED(resource)
506 : groupContentsHandlers.OWNED(resource);
508 const kind = extractUuidKind(params.uuid);
509 let resource: GroupContentsResource;
510 if (kind === ResourceKind.COLLECTION) {
511 resource = await params.services.collectionService.get(params.uuid);
512 } else if (kind === ResourceKind.PROJECT) {
513 resource = await params.services.projectService.get(params.uuid);
515 resource = await params.services.containerRequestService.get(params.uuid);
517 handler = groupContentsHandlers.SHARED(resource);
519 return (cases: MatchCases<typeof groupContentsHandlersRecord, GroupContentsHandler, void>) =>
520 groupContentsHandlers.match(handler, cases);
524 const groupContentsHandlersRecord = {
525 TRASHED: ofType<GroupContentsResource>(),
526 SHARED: ofType<GroupContentsResource>(),
527 OWNED: ofType<GroupContentsResource>(),
530 const groupContentsHandlers = unionize(groupContentsHandlersRecord);
532 type GroupContentsHandler = UnionOf<typeof groupContentsHandlers>;