export interface Position {
    x: number;
    y: number;
}
export interface Dimensions {
    width: number;
    height: number;
}
export interface Bounds {
    x: number;
    y: number;
    width: number;
    height: number;
}
export type NodeStatus = "idle" | "running" | "success" | "error" | "warning" | "disabled";
export type NodeKind = "trigger" | "action" | "condition" | "transform";
export type ConfigStatus = "valid" | "warning" | "error" | "unconfigured" | "hidden";
export interface NodePort {
    id: string;
    type: "input" | "output";
    position: "top" | "right" | "bottom" | "left";
    label?: string;
    connected: boolean;
    maxConnections?: number;
}
export interface DataSchema {
    type: "object" | "array" | "string" | "number" | "boolean" | "null";
    properties?: Record<string, DataSchema>;
    items?: DataSchema;
    required?: string[];
    description?: string;
    example?: unknown;
}
export interface WorkflowNode<TData = unknown> {
    id: string;
    type: NodeKind;
    /** Optional reference to an action-definition id in the consumer's registry. */
    actionDefinitionId?: string;
    name?: string;
    label: string;
    description?: string;
    /**
     * Icon — a ReactNode rendered inside the node chrome. Consumer provides it
     * (Lucide, Carbon, custom SVG, whatever). The DS doesn't bundle icons.
     */
    icon?: unknown;
    color?: string;
    position: Position;
    dimensions?: Dimensions;
    config: Record<string, unknown>;
    data?: TData;
    configStatus?: ConfigStatus;
    ports: {
        input: NodePort[];
        output: NodePort[];
    };
    inputSchema?: DataSchema;
    outputSchema?: DataSchema;
    status: NodeStatus;
    selected: boolean;
    dragging: boolean;
    isValid: boolean;
    validationErrors?: string[];
    expanded: boolean;
    minimized: boolean;
    locked: boolean;
    executionData?: {
        lastRun?: string;
        duration?: number;
        output?: unknown;
        error?: string;
    };
    createdAt: string;
    updatedAt: string;
    notes?: string;
}
export type EdgeType = "default" | "conditional" | "loop" | "error";
export interface EdgeStyle {
    stroke?: string;
    strokeWidth?: number;
    strokeDasharray?: string;
    animated?: boolean;
}
export interface WorkflowEdge {
    id: string;
    type: EdgeType;
    source: string;
    sourcePort: string;
    target: string;
    targetPort: string;
    style?: EdgeStyle;
    label?: string;
    condition?: string;
    selected: boolean;
    animated: boolean;
    createdAt: string;
}
export interface CanvasViewport {
    x: number;
    y: number;
    zoom: number;
}
export interface CanvasSettings {
    snapToGrid: boolean;
    gridSize: number;
    showGrid: boolean;
    showMinimap: boolean;
    autoLayout: boolean;
    useAdvancedLayout: boolean;
    theme: "light" | "dark";
}
export interface WorkflowCanvasState {
    nodes: WorkflowNode[];
    edges: WorkflowEdge[];
    viewport: CanvasViewport;
    selectedNodes: string[];
    selectedEdges: string[];
    isDragging: boolean;
    isPanning: boolean;
    isConnecting: boolean;
    connectingFrom?: {
        nodeId: string;
        portId: string;
        portType: "input" | "output";
    };
    settings: CanvasSettings;
    history: {
        past: Array<Pick<WorkflowCanvasState, "nodes" | "edges">>;
        future: Array<Pick<WorkflowCanvasState, "nodes" | "edges">>;
    };
}
export type WorkflowAction = {
    type: "ADD_NODE";
    payload: WorkflowNode;
} | {
    type: "UPDATE_NODE";
    payload: {
        id: string;
        updates: Partial<WorkflowNode>;
    };
} | {
    type: "DELETE_NODE";
    payload: string;
} | {
    type: "DELETE_NODES";
    payload: string[];
} | {
    type: "ADD_EDGE";
    payload: WorkflowEdge;
} | {
    type: "DELETE_EDGE";
    payload: string;
} | {
    type: "DELETE_EDGES";
    payload: string[];
} | {
    type: "SELECT_NODE";
    payload: string;
} | {
    type: "SELECT_NODES";
    payload: string[];
} | {
    type: "SELECT_EDGE";
    payload: string;
} | {
    type: "DESELECT_ALL";
} | {
    type: "UPDATE_VIEWPORT";
    payload: Partial<CanvasViewport>;
} | {
    type: "UPDATE_SETTINGS";
    payload: Partial<CanvasSettings>;
} | {
    type: "START_CONNECTING";
    payload: {
        nodeId: string;
        portId: string;
        portType: "input" | "output";
    };
} | {
    type: "END_CONNECTING";
} | {
    type: "UNDO";
} | {
    type: "REDO";
} | {
    type: "REPLACE_NODES";
    payload: WorkflowNode[];
} | {
    type: "REPLACE_EDGES";
    payload: WorkflowEdge[];
} | {
    type: "RESET";
};
export interface ConnectionPolicies {
    allowSelfLoop: boolean;
    allowMultipleOutputs: boolean;
    allowMultipleInputs: boolean;
    strictTypeChecking: boolean;
    maxConnectionsPerNode?: number;
    preventCircularDependencies: boolean;
    allowConditionalConnections: boolean;
    requireAllInputsConnected: boolean;
}
export interface NodePolicies {
    minNodes: number;
    maxNodes?: number;
    allowDuplicateTypes: boolean;
    requiredNodeTypes?: string[];
    forbiddenNodeTypes?: string[];
    allowOrphanNodes: boolean;
    snapToGrid: boolean;
    gridSize: number;
}
export interface ExecutionPolicies {
    allowParallelExecution: boolean;
    maxExecutionTime?: number;
    retryFailedNodes: boolean;
    maxRetries: number;
    continueOnError: boolean;
    requireApproval: boolean;
}
export interface ValidationPolicies {
    validateOnChange: boolean;
    validateBeforeExecution: boolean;
    blockExecutionOnValidationError: boolean;
    showValidationWarnings: boolean;
    strictMode: boolean;
}
export interface WorkflowPolicies {
    connection: ConnectionPolicies;
    node: NodePolicies;
    execution: ExecutionPolicies;
    validation: ValidationPolicies;
}
export declare const DEFAULT_WORKFLOW_POLICIES: WorkflowPolicies;
export interface ValidationIssue {
    id: string;
    type: "node" | "edge" | "workflow";
    severity: "error" | "warning";
    message: string;
    nodeId?: string;
    edgeId?: string;
}
export interface ValidationResult {
    isValid: boolean;
    errors: ValidationIssue[];
    warnings: ValidationIssue[];
}
export interface WorkflowMetadata {
    id: string;
    name: string;
    description?: string;
    projectId?: string;
    version: string;
    status: "draft" | "published" | "archived";
    createdAt: string;
    updatedAt: string;
    createdBy?: string;
    tags: string[];
}
export interface Workflow {
    metadata: WorkflowMetadata;
    canvas: WorkflowCanvasState;
    policies: WorkflowPolicies;
    validation: ValidationResult;
}
export interface ConnectionValidation {
    valid: boolean;
    reason?: string;
}
//# sourceMappingURL=types.d.ts.map