[COMMAND MENU ITEMS] Create union type for command menu item payload (#19432)

Replace generic JSON scalar with a typed GraphQL union
CommandMenuItemPayload (PathNavigationPayload |
ObjectMetadataNavigationPayload) for the CommandMenuItem.payload field
This commit is contained in:
Raphaël Bosi
2026-04-08 14:47:34 +02:00
committed by GitHub
parent 265d859c6e
commit d07c27a907
28 changed files with 673 additions and 305 deletions
@@ -8,6 +8,7 @@ import { isDefined } from 'twenty-shared/utils';
import {
type CommandMenuItemAvailabilityType,
type EngineComponentKey,
type CommandMenuItemPayload,
} from '~/generated-metadata/graphql';
type MountCommandParams = {
@@ -18,7 +19,7 @@ type MountCommandParams = {
workflowVersionId?: string;
availabilityType?: CommandMenuItemAvailabilityType;
availabilityObjectMetadataId?: string | null;
payload?: Record<string, unknown> | null;
payload?: CommandMenuItemPayload | null;
};
export const useMountCommand = () => {