fix(canvas): align connection hook mutation types
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
|||||||
} from "@/lib/canvas-utils";
|
} from "@/lib/canvas-utils";
|
||||||
import type { CanvasConnectionValidationReason } from "@/lib/canvas-connection-policy";
|
import type { CanvasConnectionValidationReason } from "@/lib/canvas-connection-policy";
|
||||||
import type { CanvasNodeTemplate } from "@/lib/canvas-node-templates";
|
import type { CanvasNodeTemplate } from "@/lib/canvas-node-templates";
|
||||||
|
import type { CanvasNodeType } from "@/lib/canvas-node-types";
|
||||||
|
|
||||||
import { getConnectEndClientPoint, isOptimisticNodeId } from "./canvas-helpers";
|
import { getConnectEndClientPoint, isOptimisticNodeId } from "./canvas-helpers";
|
||||||
import {
|
import {
|
||||||
@@ -44,7 +45,7 @@ type UseCanvasConnectionsParams = {
|
|||||||
runRemoveEdgeMutation: (args: { edgeId: Id<"edges"> }) => Promise<unknown>;
|
runRemoveEdgeMutation: (args: { edgeId: Id<"edges"> }) => Promise<unknown>;
|
||||||
runCreateNodeWithEdgeFromSourceOnlineOnly: (args: {
|
runCreateNodeWithEdgeFromSourceOnlineOnly: (args: {
|
||||||
canvasId: Id<"canvases">;
|
canvasId: Id<"canvases">;
|
||||||
type: string;
|
type: CanvasNodeType;
|
||||||
positionX: number;
|
positionX: number;
|
||||||
positionY: number;
|
positionY: number;
|
||||||
width: number;
|
width: number;
|
||||||
@@ -52,14 +53,14 @@ type UseCanvasConnectionsParams = {
|
|||||||
data: Record<string, unknown>;
|
data: Record<string, unknown>;
|
||||||
clientRequestId?: string;
|
clientRequestId?: string;
|
||||||
sourceNodeId: string;
|
sourceNodeId: string;
|
||||||
parentId?: string;
|
parentId?: Id<"nodes">;
|
||||||
zIndex?: number;
|
zIndex?: number;
|
||||||
sourceHandle?: string;
|
sourceHandle?: string;
|
||||||
targetHandle?: string;
|
targetHandle?: string;
|
||||||
}) => Promise<Id<"nodes"> | string>;
|
}) => Promise<Id<"nodes"> | string>;
|
||||||
runCreateNodeWithEdgeToTargetOnlineOnly: (args: {
|
runCreateNodeWithEdgeToTargetOnlineOnly: (args: {
|
||||||
canvasId: Id<"canvases">;
|
canvasId: Id<"canvases">;
|
||||||
type: string;
|
type: CanvasNodeType;
|
||||||
positionX: number;
|
positionX: number;
|
||||||
positionY: number;
|
positionY: number;
|
||||||
width: number;
|
width: number;
|
||||||
@@ -67,7 +68,7 @@ type UseCanvasConnectionsParams = {
|
|||||||
data: Record<string, unknown>;
|
data: Record<string, unknown>;
|
||||||
clientRequestId?: string;
|
clientRequestId?: string;
|
||||||
targetNodeId: string;
|
targetNodeId: string;
|
||||||
parentId?: string;
|
parentId?: Id<"nodes">;
|
||||||
zIndex?: number;
|
zIndex?: number;
|
||||||
sourceHandle?: string;
|
sourceHandle?: string;
|
||||||
targetHandle?: string;
|
targetHandle?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user