/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { AffectedNode, ChangeEventType, ErrorRejection, GraphChangeEvent, GraphChangeRejectEvent, GraphDescriptor, GraphIdentifier, NoChangeRejection, NodeIdentifier } from "@breadboard-ai/types"; /** * This event is dispatched whenever the graph changes due to edits. */ export declare class ChangeEvent extends Event implements GraphChangeEvent { readonly graph: GraphDescriptor; readonly visualOnly: boolean; readonly changeType: ChangeEventType; readonly affectedNodes: AffectedNode[]; readonly affectedModules: NodeIdentifier[]; readonly affectedGraphs: GraphIdentifier[]; readonly label: string | null; static eventName: string; constructor(graph: GraphDescriptor, visualOnly: boolean, changeType: ChangeEventType, affectedNodes: AffectedNode[], affectedModules: NodeIdentifier[], affectedGraphs: GraphIdentifier[], label: string | null); } /** * This event is dispatched whenever a proposed change to the graph is * rejected. The rejection may happen for two reasons * - error: the change would create an invalid graph. For instance, adding an edge to a non-existent node. * - nochange: the change is unnecessary, because it results in no actual change to the graph. For example, adding an edge that already exists. */ export declare class ChangeRejectEvent extends Event implements GraphChangeRejectEvent { graph: GraphDescriptor; reason: ErrorRejection | NoChangeRejection; static eventName: string; constructor(graph: GraphDescriptor, reason: ErrorRejection | NoChangeRejection); } //# sourceMappingURL=events.d.ts.map