/* * Copyright 2025 Elyra Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the ../script/generateTS.sh script to regenerate all TS files. */ /* eslint-disable */ /** * Decoration used to decorate a link */ export type LinkDecorationDef = (ImageDecorationDef | LabelDecorationDef | ShapeDecorationDef | JsxDecorationDef) & { /** * Indicates an anchor point on the link at which the decoration will be displayed. */ position?: "source" | "middle" | "target"; /** * Only applicable to straight link lines. Will move the decoration the specified number of pixels from its 'position'. */ distance?: number; [k: string]: unknown; }; /** * Image decoration properties including shared properties. */ export type ImageDecorationDef = { /** * Image displayed at the decoration position. Provide either this or a label. */ image?: string; /** * If true and outline is drawn around the image. */ outline?: boolean; [k: string]: unknown; } & DecorationSharedProperties; /** * Label decoration properties including shared properties. */ export type LabelDecorationDef = { /** * Label displayed at the decoration position. Provide either this or an image. */ label?: string; /** * If true, the label decoration can be edited. It displays an edit icon which can be clicked to enter edit mode. */ label_editable?: boolean; /** * The alignment of the label. */ label_align?: "left" | "center"; /** * If true, the label is displayed as a single line and is truncated at the width. */ label_single_line?: boolean; /** * The maximum number of characters that can be entered in the label decoration when it is editable. */ label_max_characters?: number; /** * If false, pressing the return key in edit mode will not do anything: label will wrap at width. If true, return will enter a newline character. */ label_allow_return_key?: boolean; [k: string]: unknown; } & DecorationSharedProperties; /** * Shape decoration properties including shared properties. */ export type ShapeDecorationDef = { /** * An SVG path that describes a shape to be drawn at the decoration position. */ path?: string; [k: string]: unknown; } & DecorationSharedProperties; /** * JSX decoration properties including shared properties These are never serialized in the pipeline flow. */ export type JsxDecorationDef = { /** * A JSX expression that will be used to display the content of the decoration. */ jsx?: { [k: string]: unknown; }; [k: string]: unknown; } & DecorationSharedProperties; /** * @minItems 0 */ export type PortsDef = PortDef[]; /** * Decoration used to decorate a node */ export type NodeDecorationDef = (ImageDecorationDef | LabelDecorationDef | ShapeDecorationDef | JsxDecorationDef) & { /** * Indicates an anchor point on the node at which the decoration will be displayed. */ position?: | "topLeft" | "topCenter" | "topRight" | "middleLeft" | "middleCenter" | "middleRight" | "bottomLeft" | "bottomCenter" | "bottomRight"; [k: string]: unknown; }; /** * @minItems 0 */ export type BoundPortsDef = BoundPortDef[]; /** * Common Canvas palette schema */ export interface PipelineFlowPalette { /** * Palette schema version */ version?: "3.0"; /** * Array of palette categories * * @minItems 0 */ categories?: CategoryDef[]; } /** * Palette Category */ export interface CategoryDef { /** * ID of the category */ id: string; /** * Category label */ label: string; /** * Category description */ description?: string; /** * Boolean to indicate if the category is open (true) or not (false). */ is_open?: boolean; /** * When set to a non-empty string and node_types is empty, is used to indicate that no nodes exist */ empty_text?: string; /** * When set to a non-empty string, causes a loading indicator to appear with this text as a label */ loading_text?: string; /** * Encoded image or image reference for the category */ image?: string; /** * Array of pipeline node types * * @minItems 0 */ node_types?: (ExecutionNodeDef | SupernodeDef | BindingEntryNodeDef | BindingExitNodeDef | ModelNodeDef)[]; } /** * Definition of a single execution pipeline node */ export interface ExecutionNodeDef { /** * Unique identifier for node within the current pipeline */ id: string; /** * @deprecated * Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def instead. */ description?: string; /** * Node type - always 'execution_node' for non-model pipeline elements */ type: "execution_node"; /** * Operator type identifier */ op: string; inputs?: PortsDef; outputs?: PortsDef; /** * Input parameters for the operator */ parameters?: { [k: string]: unknown; }; /** * Optional reference to the id of the runtime associated with the current node */ runtime_ref?: string; /** * Object containing app-specific data */ app_data?: { ui_data?: NodeUiDef; [k: string]: unknown; }; } /** * Port definition (input/output) on a node */ export interface PortDef { /** * Unique identifier */ id: string; /** * Optional data record schema reference associated with the port */ schema_ref?: string; /** * Array of links going into the node. Applies to input ports and exit bindings only. * * @minItems 0 */ links?: NodeLinkDef[]; /** * Parameters for the port */ parameters?: { [k: string]: unknown; }; /** * Object containing app-specific data */ app_data?: { ui_data?: PortUiDef; [k: string]: unknown; }; } /** * Node link definition */ export interface NodeLinkDef { /** * Unique id of this link within the pipelineFlow. If omitted a new link id will be generated. */ id?: string; /** * id of a node this link connects to */ node_id_ref: string; /** * optional port id of a node this link connects to */ port_id_ref?: string; /** * optional link name (used in parameter sets when there are multiple input sources) */ link_name?: string; /** * Link type attribute */ type_attr?: string; /** * Parameters for the link */ parameters?: { [k: string]: unknown; }; /** * @deprecated * Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_link_ui_def instead. */ description?: string; /** * Object containing app-specific data */ app_data?: { ui_data?: NodeLinkUiDef; [k: string]: unknown; }; } /** * Node link UI properties. */ export interface NodeLinkUiDef { /** * User-defined description */ description?: string; /** * CSS class name */ class_name?: string; /** * A 'style spec' object containing CSS strings to be applied to the SVG objects of the node to node link. */ style?: | string | { [k: string]: unknown; }; /** * Array of decorations used to decorate node links * * @minItems 0 */ decorations?: LinkDecorationDef[]; [k: string]: unknown; } /** * Shared properties across all types of decoration. */ export interface DecorationSharedProperties { /** * A unique identifier used to identify the decoration */ id: string; /** * X position of the decorator relative to the decorations's position field. */ x_pos?: number; /** * Y position of the decorator relative to the decorations's position field. */ y_pos?: number; /** * Display width of decoration. */ width?: number; /** * Display height of decoration. */ height?: number; /** * Indicates whether the decorator is a hotspot or not. If true, it calls sends an event to the host app. when clicked */ hotspot?: boolean; /** * CSS class name for decoration styling. It can be a space-separated list of classes. */ class_name?: string; /** * Tooltip text for the decoration. */ tooltip?: string; /** * If set to true, the decoration will not be serialized in the pipeline flow. */ temporary?: boolean; /** * Indicates whether the decoration can receive keyboard focus or not. */ focusable?: boolean; [k: string]: unknown; } /** * Port UI properties */ export interface PortUiDef { /** * Property to capture how many data assets are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of data assets. The default value is 1:1 for inputs and 1:-1 for outputs. */ cardinality?: { /** * Minimum data sets that are required for this port */ min?: number; /** * Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs. */ max?: number; }; /** * CSS class name */ class_name?: string; /** * A 'style spec' object containing CSS strings to be applied to the SVG objects of the port. */ style?: | string | { [k: string]: unknown; }; /** * Port name */ label?: string; [k: string]: unknown; } /** * Node UI properties. */ export interface NodeUiDef { /** * User-defined label */ label?: string; /** * User-defined description */ description?: string; /** * CSS class name */ class_name?: string; /** * A 'style spec' object containing CSS strings to be applied to the SVG objects of the node. */ style?: | string | { [k: string]: unknown; }; /** * URL to image source. Although a data URL can be used to embed an image inline, it is not recommended. The 'image' property can also be a JSX object that displays an image using an element however, JSX images must be set programmatically and cannot be stringified into JSON. */ image?: | string | { [k: string]: unknown; }; /** * x-position */ x_pos?: number; /** * y-position */ y_pos?: number; /** * Indicates whether a supernode is shown in expanded state or as a regular node. */ is_expanded?: boolean; /** * Height of expanded supernode. If not provided an appropriate height is calculated. */ expanded_height?: number; /** * Width of expanded supernode. If not provided an appropriate width is calculated. */ expanded_width?: number; /** * Indicates whether a node has been resized or not. If true, resize_width and resize_height are used for node display. If false, the default width and height are used. */ is_resized?: boolean; /** * Height of resized node. The node will be displayed with this height, when is_resized is true, in preference to its default height. */ resize_height?: number; /** * Width of resized node. The node will be displayed with this width, when is_resized is true, in preference to its default width. */ resize_width?: number; /** * An array of pipelines referenced when this node is a supernode. This field is only used when the supernode is in a palette or on the clipboard. It will be an empty array when the supernode references an external pipeline. * * @minItems 0 */ sub_pipelines?: unknown[]; /** * additional attributes */ attributes?: string; /** * Array of non-data node linkage * * @minItems 0 */ associations?: AssociationLinkDef[]; /** * An array of messages for the node * * @minItems 0 */ messages?: MessageDef[]; /** * UI only parameter values for the node */ ui_parameters?: { [k: string]: unknown; }; /** * Image name for the node displayed in palette. If omitted the image from 'image' field will be used. */ palette_image?: string; /** * CSS class name applied to the
shown in palette for the node */ palette_class_name?: string; /** * Indicates whether the node in the palette is disabled. If true, prevents the node being dragged or double-clicked from palette. */ palette_disabled?: boolean; /** * Array of decorations used to decorate nodes * * @minItems 0 */ decorations?: NodeDecorationDef[]; [k: string]: unknown; } /** * Association link properties */ export interface AssociationLinkDef { /** * Association identifier */ id: string; /** * Target node id */ node_ref: string; /** * CSS class name for link styling */ class_name?: string; /** * A 'style spec' object containing CSS strings to be applied to the SVG objects of the association link. */ style?: | string | { [k: string]: unknown; }; /** * Array of decorations used to decorate association links * * @minItems 0 */ decorations?: LinkDecorationDef[]; } /** * Node message definition */ export interface MessageDef { /** * Name of the parameter that has the message */ id_ref: string; /** * Validation identifier from the fail_message validation section. */ validation_id?: string; /** * Type of message */ type: "info" | "error" | "warning"; /** * Message string */ text: string; [k: string]: unknown; } /** * Definition of a supernode which serves as the entry point for a sub-pipeline */ export interface SupernodeDef { /** * Unique identifier for the supernode within the current pipeline */ id: string; /** * @deprecated * Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def instead. */ description?: string; /** * Node type - always 'super_node' for supernode elements */ type: "super_node"; /** * Name of the tool which can be used to view or edit the sub-flow for this supernode. The default is 'canvas' */ open_with_tool?: string; /** * Refers to the sub-flow associated with this supernode */ subflow_ref: { /** * Reference to an external sub-flow. When not present the sub-flow is assumed to be in the current document. A value of 'app_defined' indicates a sub-flow identifier is present, but the controlling application will serve up the sub-pipeline in the form of a new pipeline-flow document (no sub-flow is present in the document). */ url?: string; /** * Sub-flow identifier reference */ pipeline_id_ref: string; [k: string]: unknown; }; inputs?: BoundPortsDef; outputs?: BoundPortsDef; /** * Input parameters for the supernode */ parameters?: { [k: string]: unknown; }; /** * Object containing app-specific data */ app_data?: { ui_data?: NodeUiDef; [k: string]: unknown; }; } /** * Port definition (input/output) on a node with optional pipeline port binding for supernodes */ export interface BoundPortDef { /** * Unique identifier */ id: string; /** * Optional data record schema associated with the port */ schema_ref?: string; /** * Array of links going into the node. Applies to input ports and exit bindings only. * * @minItems 1 */ links?: [NodeLinkDef, ...NodeLinkDef[]]; /** * Optional node id binding within the current document. */ subflow_node_ref?: string; /** * Parameters for the binding port */ parameters?: { [k: string]: unknown; }; /** * Object containing app-specific data */ app_data?: { ui_data?: PortUiDef; [k: string]: unknown; }; } /** * Defines an entry point (source) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document. */ export interface BindingEntryNodeDef { /** * Unique identifier for the binding within the current pipeline */ id: string; /** * @deprecated * Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def instead. */ description?: string; /** * Node type - always 'binding' for binding elements */ type: "binding"; outputs: PortsDef; /** * Object containing app-specific data */ app_data?: { ui_data?: NodeUiDef; [k: string]: unknown; }; connection?: CommonPipelineConnectionDef; data_asset?: CommonPipelineDataAssetDef; /** * Binding node type identifier */ op?: string; /** * Parameters for the binding entry node */ parameters?: { [k: string]: unknown; }; } /** * Details of the connection to use for a pipeline binding node. */ export interface CommonPipelineConnectionDef { /** * A name tag for disambiguating connections */ name?: string; app_data?: AppDataDef; /** * A reference to a connection by ID. */ ref: string; /** * If ref is set, this refers to the ID of the catalog which contains the connection. If neither this attribute nor project_ref are specified, the connection will be assumed to exist in the project, space, or catalog which contains the pipeline. */ catalog_ref?: string; /** * If ref is set, this refers to the ID of the project which contains the connection. If neither this attribute nor catalog_ref are specified, the connection will be assumed to exist in the project, space, or catalog which contains the pipeline. */ project_ref?: string; /** * If ref is set, this refers to the ID of the space which contains the connection. If neither this attribute nor space_ref are specified, the connection will be assumed to exist in the project, space, or catalog which contains the pipeline. */ space_ref?: string; /** * The properties for the connection. The specific properties allowed depend on the type of connection referenced. */ properties?: { [k: string]: unknown; }; [k: string]: unknown; } /** * Object containing app-specific data */ export interface AppDataDef { [k: string]: unknown; } /** * Details of the data asset contained in a catalog or project to use for a pipeline binding node. */ export interface CommonPipelineDataAssetDef { app_data?: AppDataDef; /** * A reference to a data asset by ID. */ ref?: string; /** * If ref is set, this refers to the ID of the catalog which contains the data asset. If neither this attribute nor project_ref are specified, the data asset will be assumed to exist in the project, space, or catalog which contains the pipeline. */ catalog_ref?: string; /** * If ref is set, this refers to the ID of the project which contains the data asset. If neither this attribute nor catalog_ref are specified, the data asset will be assumed to exist in the project, space, or catalog which contains the pipeline. */ project_ref?: string; /** * If ref is set, this refers to the ID of the space which contains the data asset. If neither this attribute nor space_ref are specified, the data asset will be assumed to exist in the project, space, or catalog which contains the pipeline. */ space_ref?: string; /** * Properties controlling how the data asset is used. */ properties?: { /** * The ID of the data asset attachment to use. If not specified and used as a source, the first suitable attachment found will be used. If not specified and used as a target, a new attachment will be created. */ attachment_ref?: string; /** * Specifies the name of the data asset to read, create or update if ref is unset. */ name?: boolean & string; /** * When used as a target, whether to update the data asset with the schema when a run completes or not (will be automatically updated if not supplied by caller). */ no_write_schema?: boolean; /** * When used as a target, whether to update the data asset with the status when a run completes or not (will be automatically updated if not supplied by caller). */ no_write_status?: boolean; [k: string]: unknown; }; [k: string]: unknown; } /** * Defines an exit point (sink) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document. */ export interface BindingExitNodeDef { /** * Unique identifier for the binding within the current pipeline */ id: string; /** * @deprecated * Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def instead. */ description?: string; /** * Node type - always 'binding' for binding elements */ type: "binding"; inputs: PortsDef; outputs?: PortsDef; /** * Object containing app-specific data */ app_data?: { ui_data?: NodeUiDef; [k: string]: unknown; }; connection?: CommonPipelineConnectionDef; data_asset?: CommonPipelineDataAssetDef; /** * Binding node type identifier */ op?: string; /** * Parameters for the binding exit node */ parameters?: { [k: string]: unknown; }; } /** * Definition of a single predictive model node */ export interface ModelNodeDef { /** * Unique identifier for the model within the current pipeline */ id: string; /** * @deprecated * Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def instead. */ description?: string; /** * Node type - always 'model_node' for model pipeline elements */ type: "model_node"; /** * Reference to the binary model */ model_ref?: string; inputs: PortsDef; outputs?: PortsDef; /** * Node type identifier of modeling node that created this model. */ op?: string; /** * Input parameters for the operator */ parameters?: { [k: string]: unknown; }; /** * Reference to the runtime associated with the current node */ runtime_ref?: string; /** * Object containing app-specific data */ app_data?: { ui_data?: NodeUiDef; [k: string]: unknown; }; }