[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:
+2
-1
@@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user