/* * 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 */ /** * Operator parameters definition. Documented here - https://elyra-ai.github.io/canvas/04.01-parameter-definition/#parameter-definitions */ export type OperatorParameterDefinition = { [k: string]: unknown; } & { /** * A unique name for the parameter. */ id?: string; /** * Indication whether parameter is required or optional */ required?: boolean; /** * Role of parameter */ role?: "column" | "new_column" | "expression"; /** * Field type. Can be a primitive type (string, integer, double, date, time, timestamp, or custom), an array, or map containing those types(note arrays and maps can contain complex_types) */ type?: string; /** * List of valid values. Can be used instead of specifying type. */ enum?: unknown[]; /** * default value based on type of parameter */ default?: | ParameterRefDefinition | ( | string | number | boolean | unknown[] | { [k: string]: unknown; } | null ); [k: string]: unknown; }; /** * List of parameters */ export type Parameters = OperatorParameterDefinition[]; /** * List of complex types */ export type ComplexTypes = OperatorComplexTypeDefinition[]; /** * External name of operator */ export type ResourceDefinition = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * Description of operator */ export type ResourceDefinition1 = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * Group label */ export type ResourceDefinition2 = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * Group description. Used in a textPanel and tearsheetPanel */ export type ResourceDefinition3 = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * External name for parameter */ export type ResourceDefinition4 = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * Localizable string resource */ export type ResourceDefinition5 = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * Localizable string resource */ export type ResourceDefinition6 = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * Localizable string resource */ export type ResourceDefinition7 = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * Static text to be displayed before the control */ export type TextDefinition = ResourceDefinition5 & { /** * Type of text message to display */ type?: "info"; [k: string]: unknown; }; /** * Static text to be displayed after the control */ export type TextDefinition1 = ResourceDefinition5 & { /** * Type of text message to display */ type?: "info"; [k: string]: unknown; }; /** * Localizable string resource */ export type ResourceDefinition8 = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * Localizable string resource */ export type ResourceDefinition9 = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * Button to be displayed after the table's search bar */ export type ButtonDefinition = { [k: string]: unknown; } & { /** * Button identifier used to idenify the button in the callback function */ id?: string; label?: ResourceDefinition10; description?: ResourceDefinition11; /** * URL to .svg image to display */ icon?: string; /** * Host provided name of Carbon icon to display. A callback function is required for the host application to return the jsx icon object imported from @carbon/icons-react library */ carbon_icon?: string; /** * Button will be enabled if true, disabled if false */ enabled?: boolean; /** * Display a divider before or after this button */ divider?: "before" | "after"; /** * The 'kind' of button to use. This must align with the 'kind' from Carbon buttons */ kind?: "default" | "primary" | "danger" | "secondary" | "tertiary" | "ghost"; [k: string]: unknown; }; /** * Localizable string resource */ export type ResourceDefinition10 = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * Localizable string resource */ export type ResourceDefinition11 = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * Localizable string resource */ export type ResourceDefinition12 = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * Localizable string resource */ export type ResourceDefinition13 = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; export type ConditionsDefinition = | ValidationDefinition | EnabledDefinition | VisibleDefinition | FilterDefinition | EnumFilterDefinition | AllowChangeDefinition | DefaultValueDefinition; /** * User message */ export type MessageDefinition = { [k: string]: unknown; } & { default?: string; resource_key?: string; [k: string]: unknown; }; /** * Evaluates to a boolean result */ export type EvaluateDefinition = AndDefinition | OrDefinition | ConditionDefinition | FilterConditionDefinition; /** * Evaluates to return values included in an enumeration control */ export type EvaluateDefinition1 = AndDefinition | OrDefinition | ConditionDefinition | FilterConditionDefinition; /** * Evaluates to a boolean result */ export type EvaluateDefinition2 = AndDefinition | OrDefinition | ConditionDefinition | FilterConditionDefinition; /** * Evaluates to a boolean result */ export type EvaluateDefinition3 = AndDefinition | OrDefinition | ConditionDefinition | FilterConditionDefinition; export type Conditions = ConditionsDefinition[]; /** * Parameter Definition Schema for the Common Properties editor */ export interface ParameterDefinitions { titleDefinition?: { title?: string; /** * True if the title can be edited. False if the title should be readonly. */ editable?: boolean; [k: string]: unknown; }; /** * Current parameter set upon input. Keys are parameter names, values are their values. */ current_parameters?: { [k: string]: unknown; }; /** * Current UI only parameter set upon input. Keys are parameter names, values are their values. */ current_ui_parameters?: { [k: string]: unknown; }; parameters?: Parameters; complex_types?: ComplexTypes; uihints?: UIHints; conditions?: Conditions; dataset_metadata?: DatarecordMetadataSchema | DatarecordMetadataSchema1[]; /** * Map of string resources. */ resources?: { [k: string]: unknown; }; [k: string]: unknown; } /** * Structure for parameter refs */ export interface ParameterRefDefinition { /** * Reference to another parameter. */ parameter_ref: string; [k: string]: unknown; } /** * Structure for complex parameters */ export interface OperatorComplexTypeDefinition { /** * Identifier of complex type, can be referenced in other places. */ id: string; /** * Used to determine how parameters in the complex_type stored. Valid values are array and object. */ type?: string; key_definition?: OperatorParameterDefinition; /** * List of parameters */ parameters: (OperatorParameterDefinition | OperatorComplexTypeDefinition)[]; [k: string]: unknown; } /** * UI Hints schema */ export interface UIHints { /** * Operator identifier */ id: string; /** * Refers to the JSON schema used to validate documents of this type */ json_schema?: "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json"; label?: ResourceDefinition; description?: ResourceDefinition1; /** * URL to operation icon */ icon?: string; title_info?: { /** * List of actions to be displayed in the title section */ action_refs?: string[]; [k: string]: unknown; }; group_info?: GroupDefinition[]; /** * Editor size for node edits */ editor_size?: "small" | "medium" | "large"; /** * Gives more control of editor panel width. The panel is shown at min size if editor_size is small and max size if editor_size is medium. If min and max are the same no sizing button is displayed. */ pixel_width?: { /** * Minimum size in pixels for the right side editor flyout */ min?: number; /** * Maximum size in pixels for the right side editor flyout */ max?: number; [k: string]: unknown; }; parameter_info?: ParameterDefinition[]; complex_type_info?: ComplexTypeDefinition[]; /** * List of UI only parameters */ ui_parameters?: OperatorParameterDefinition[]; action_info?: ActionDefinition[]; /** * Help information */ help?: { /** * Data passed in the helpClickHandler. */ data?: { [k: string]: unknown; }; [k: string]: unknown; }; [k: string]: unknown; } /** * Grouping for parameters and groups */ export interface GroupDefinition { /** * Identifier for this group */ id: string; /** * The group type to be displayed */ type?: | "controls" | "tabs" | "subTabs" | "panels" | "columnSelection" | "columnSelectionRecursive" | "panelSelector" | "customPanel" | "summaryPanel" | "actionPanel" | "textPanel" | "twistyPanel" | "tearsheetPanel" | "columnPanel"; /** * Parameter name this group depends upon. Valid for panelSelector groups only. */ depends_on_ref?: string; /** * Indicates whether panels, contained with a panelSelector, should be inserted between the radio buttons of a radio button set indicated by the depends_on_ref parameter. */ insert_panels?: boolean; /** * Indicate whether panel should be nested. Nested panels are indented by 16px from the left and display left border. Default is false. */ nested_panel?: boolean; /** * Used to determine if a panel is open or closed when UI is displayed. Currenty only supported with twistyPanel. Default is false. */ open?: boolean; label?: ResourceDefinition2; description?: ResourceDefinition3; /** * List of parameters to be displayed */ parameter_refs?: string[]; /** * List of actions to be displayed. Used with an actionPanel */ action_refs?: string[]; /** * Data passed to custom panel when group type is 'customPanel' */ data?: | { [k: string]: unknown; } | unknown[]; group_info?: GroupDefinition[]; /** * Optional class name to set for this group */ class_name?: string; [k: string]: unknown; } /** * UI Hint Parameter Definition */ export interface ParameterDefinition { /** * Parameter reference to base operator parameter definition */ parameter_ref: string; label?: ResourceDefinition4; /** * Whether to display the label or not. If not displayed, the label can still be used by screen readers */ label_visible?: boolean; /** * Description of parameter with optional placement context and optional link */ description?: ResourceDefinition5 & { /** * Optional placement context for the text */ placement?: "as_tooltip" | "on_panel"; /** * Optional link in the description. tooltipLinkHandler callback must be defined whenever link object is added in uiHints. */ link?: { /** * link id */ id: string; /** * Data passed to the tooltipLinkHandler callback */ data?: { [k: string]: unknown; }; [k: string]: unknown; }; [k: string]: unknown; }; /** * Which control to use. In most cases the control gets to be determined and should not be set */ control?: | "readonly" | "readonlyTable" | "textfield" | "passwordfield" | "textarea" | "expression" | "numberfield" | "spinner" | "checkbox" | "radioset" | "checkboxset" | "toggletext" | "toggle" | "oneofselect" | "multiselect" | "someofselect" | "selectcolumn" | "selectcolumns" | "selectschema" | "structuretable" | "structurelisteditor" | "structureeditor" | "custom" | "datefield" | "datepicker" | "datepickerRange" | "timefield" | "timestampfield" | "slider" | "code" | "list" | "hidden"; /** * Determines the step value to increment/decrement for spinner and slider controls */ increment?: number; /** * Determines the minimum value for the slider control only */ min_value?: number; /** * Determines the max value for the slider control only */ max_value?: number; /** * Determines how the control is displayed */ orientation?: "vertical" | "horizontal"; /** * A number as percentage of group width the control should use, or a string specifying the number of pixels wide the column should be. */ width?: number | string; /** * Limits the number of characters a user can enter into the control for string parameters only */ char_limit?: number; /** * This has been deprecated and is subject to removal. Limits the number of characters displayed for a text field in a column in a table. The text will have an ellipsis appended at this limit. */ display_chars?: number; /** * Determines where to put a separator relative to the current control */ separator?: "before" | "after"; /** * Determines whether to display parameter in control. Used in complex structures */ visible?: boolean; place_holder_text?: ResourceDefinition6; helper_text?: ResourceDefinition7; /** * Determines whether the control should be readonly or can be edited */ read_only?: boolean; text_before?: TextDefinition; text_after?: TextDefinition1; /** * Used as a key for enum value labels */ resource_key?: string; /** * Editing style of elements in a table */ edit_style?: "subpanel" | "inline" | "on_panel"; /** * For enumerated types, this defines the set of icons for the valid values. The ordering must be consistent with the order in the parameter enum attribute. */ value_icons?: string[]; /** * Determines if this column values can be sorted into ascending/descending order in a table. Applies to structure parameters only. */ sortable?: boolean; /** * Determines if this column values can be filtered so that only rows that match the filter in column values are shown in the table. Applies to structure parameters and multiselect control only. */ filterable?: boolean; /** * Determines if this column can be resized in a table. When a column is resized, width of all the columns to the right of resized column is adjusted. Applies to structure parameters only. */ resizable?: boolean; /** * The language for the expression editor syntax highlight and autocomplete workds. Applies to expression control type. */ language?: "CLEM" | "javascript" | "text/x-hive" | "text/x-rsrc" | "text/x-python" | "text/x-sql"; /** * Determines if this column values will be shown in the summaryPanel */ summary?: boolean; /** * Generates values for a column in a 'readonly' parameter. */ generated_values?: { /** * Currently only 'index' is supported which will auto-increment the integer column value starting at 1. The start value can be configured by setting a start_value. */ operation: "index"; /** * Optional start value to increment from when the 'type' is 'index'. If the start_value is not set, it will default to 1. */ start_value?: number; [k: string]: unknown; }; /** * Adds a number generation button beside the numeric control */ number_generator?: { label: ResourceDefinition8; /** * Number generator range */ range?: { /** * Maximum value for generated numbers */ min: number; [k: string]: unknown; }; [k: string]: unknown; }; /** * Used within complex structures containing 'column' key_definition fields. This associates the subControl parameter with a field attribute in the current record schema. */ dm_default?: "type" | "description" | "measure" | "modeling_role"; /** * This can be set to display an icon of the corresponding dm type in the `role`:`column' field of a table. */ dm_icon?: "measure" | "none"; /** * Used to determine which custom control to use when control=custom. */ custom_control_id?: string; /** * Data passed to custom control when control=custom */ data?: { [k: string]: unknown; }; /** * A format string such as YYYY-MM-DD which describes the display and entry format for a date field. */ date_format?: string; /** * A format string such as HH:mm:ss which describes the display and entry format for a time field. */ time_format?: string; /** * Determines if rows can be moved up or down in a table or array of strings */ moveable_rows?: boolean; /** * Number of rows to display in tables */ rows?: number; /** * Determines an action should be added to the control */ action_ref?: string; /** * Determines if a dropdown, outside of a table, can allow a custom value to be entered */ custom_value_allowed?: boolean; /** * Determines if a dropdown, outside of a table, can allow the dropdown items to be filtered by the custom value entered */ should_filter_item?: boolean; /** * Optional class name to set for this control */ class_name?: string; /** * Determines if maximize/minimze buttons are shown for code control */ enable_maximize?: boolean; [k: string]: unknown; } /** * Complex parameters */ export interface ComplexTypeDefinition { /** * Name of complex type, can be referenced in other places. */ complex_type_ref: string; label?: ResourceDefinition9; key_definition?: ParameterDefinition; /** * Array of rows containing structure element names */ layout?: string[][]; /** * List of parameters */ parameters: (ParameterDefinition | ComplexTypeDefinition)[]; /** * Determines if the table can have rows added and removed */ add_remove_rows?: boolean; /** * Determines how many rows can be selected at a time. 'multiple-edit': select multiple rows and allow the editing of column values for all selected rows. */ row_selection?: "single" | "multiple" | "multiple-edit"; /** * Determines if the table header should be displayed */ header?: boolean; /** * Use when `add_remove_rows` is false. Ensures the control contains a record for each field in the data model. */ include_all_fields?: boolean; /** * Display custom buttons in place of any buttons from the table. Will override 'add_remove_rows' and readonlyTable edit buttons. */ buttons?: ButtonDefinition[]; [k: string]: unknown; } /** * Actions that callback to application */ export interface ActionDefinition { /** * Identifier for this action */ id: string; description?: ResourceDefinition12; /** * The action type to be displayed */ control?: "button" | "image" | "custom"; /** * Optional class name to set for this action */ class_name?: string; label?: ResourceDefinition13; /** * Properties for button kind and size. Use when control=button. */ button?: { /** * button kind */ kind?: "primary" | "secondary" | "tertiary" | "ghost" | "danger" | "danger--tertiary" | "danger--ghost"; /** * button size */ size?: "sm" | "md" | "lg" | "xl"; [k: string]: unknown; }; /** * Properties for how the image will look. Use when control=image. */ image?: { /** * image url to be used for action */ url?: string; /** * placement of the action image */ placement?: "right" | "left"; /** * pixel size of the image. */ size?: { /** * image height in pixels */ height?: number; /** * image width in pixels */ width?: number; [k: string]: unknown; }; /** * Action image tooltip direction. */ tooltip_direction?: "right" | "left" | "top" | "bottom"; [k: string]: unknown; }; /** * Used to determine which custom action to use when control=custom. */ custom_action_id?: string; /** * Data returned when action called */ data?: { [k: string]: unknown; }; [k: string]: unknown; } export interface ValidationDefinition { /** * A single validation. The fail_message is displayed upon validation failure. */ validation: { /** * Unique identifier. Required when multiple fail_message sections have the same focus_parameter_ref value. */ id?: string; fail_message: FailMessageDefinition; evaluate: EvaluateDefinition; [k: string]: unknown; }; [k: string]: unknown; } /** * Error/warning */ export interface FailMessageDefinition { /** * The parameter control to get the error/warning message. */ focus_parameter_ref: string; message: MessageDefinition; type?: "error" | "warning" | "info"; [k: string]: unknown; } /** * Container for 'and' operations */ export interface AndDefinition { /** * The 'and' condition. All sub-conditions evaluate to true. Can nest any number of additional conditional types. */ and: (AndDefinition | OrDefinition | ConditionDefinition | FilterConditionDefinition)[]; [k: string]: unknown; } /** * Container for 'or' operations */ export interface OrDefinition { /** * The 'or' condition. Any sub-condition evaluates to true. Can nest any number of additional conditional types. */ or: (AndDefinition | OrDefinition | ConditionDefinition | FilterConditionDefinition)[]; [k: string]: unknown; } /** * A parameter condition. Evaluates to true or false. */ export interface ConditionDefinition { /** * The condition that is evaluated */ condition: { /** * A single operator for the properties of the condition. */ op: | ( | "isEmpty" | "isNotEmpty" | "greaterThan" | "lessThan" | "equals" | "notEquals" | "contains" | "notContains" | "colNotExists" | "cellNotEmpty" | "colDoesExist" | "isDateTime" | "dmTypeEquals" | "dmTypeNotEquals" | "dmMeasurementEquals" | "dmMeasurementNotEquals" | "dmRoleEquals" | "dmRoleNotEquals" | "matches" | "notMatches" ) | string; /** * The primary parameter - must be present */ parameter_ref: string; /** * Optional second parameter for multi-parameter validation */ parameter_2_ref?: string; /** * Optional value against which to compare the primary parameter value */ value?: string | number | boolean | unknown[] | null; [k: string]: unknown; }; [k: string]: unknown; } /** * Allows for filtering available fields in the data record schema(s) */ export interface FilterConditionDefinition { /** * The condition that is evaluated */ condition: | { /** * A single operator for comparing data record schema field attributes and sharing source fields */ op: "dmMeasurement" | "dmType" | "dmModelingRole" | "dmSharedFields"; /** * Value to compare against data record schema field attribute */ value?: string; [k: string]: unknown; } | { /** * A single operator for comparing data record schema field attributes and sharing source fields */ op: "dmMeasurement" | "dmType" | "dmModelingRole" | "dmSharedFields"; /** * Array of values which are compared to a data record schema field attribute * * @minItems 1 */ values: [string, ...string[]]; [k: string]: unknown; }; [k: string]: unknown; } export interface EnabledDefinition { /** * Enablement test. Disables controls if evaluate is false. */ enabled: { [k: string]: unknown; }; [k: string]: unknown; } export interface VisibleDefinition { /** * Visibility test. Hides controls if evaluate is false. */ visible: { [k: string]: unknown; }; [k: string]: unknown; } export interface FilterDefinition { /** * Filter test. Includes support for filtering the values to be displayed in a control */ filter: { [k: string]: unknown; }; [k: string]: unknown; } export interface EnumFilterDefinition { /** * Allows filtering of available enumeration options */ enum_filter: { /** * The target parameter information */ target: { /** * The enumeration parameter affected by this operation */ parameter_ref: string; /** * Array of available enumeration options when the condition evaluates to 'true' * * @minItems 1 */ values: [unknown, ...unknown[]]; [k: string]: unknown; }; evaluate: EvaluateDefinition1; [k: string]: unknown; }; [k: string]: unknown; } export interface AllowChangeDefinition { /** * Allow change test. Allows a field value to be changed if evaluates to true. */ allow_change: { /** * Array of parameter names who values changes are allowed by this operation * * @minItems 1 */ parameter_refs: [string, ...string[]]; evaluate: EvaluateDefinition2; [k: string]: unknown; }; [k: string]: unknown; } export interface DefaultValueDefinition { /** * Set default value of the parameter_ref if condition evaluates to true. */ default_value: { /** * Parameter whose default value is to be set. */ parameter_ref: string; /** * This will be the default value of parameter_ref if condition evaluates to true. */ value: | number | string | boolean | { [k: string]: unknown; } | unknown[]; evaluate: EvaluateDefinition3; [k: string]: unknown; }; [k: string]: unknown; } /** * A single datarecord object. Deprecated. */ export interface DatarecordMetadataSchema { [k: string]: unknown; } /** * Metadata schema for datarecords */ export interface DatarecordMetadataSchema1 { [k: string]: unknown; }