diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/governance/createWorkflowDefinition.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/governance/createWorkflowDefinition.ts index 161fd9b3c6c..8927372bc85 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/api/governance/createWorkflowDefinition.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/governance/createWorkflowDefinition.ts @@ -314,9 +314,10 @@ export interface TriggerConfiguration { */ batchSize?: number; /** - * Select the Search Filters to filter down the entities fetched. + * Search filters for entities. Can be a string (applied to all entity types) or an object + * mapping entity types to their specific filters. */ - filters?: string; + filters?: FiltersObject | string; /** * Defines the schedule of the Periodic Trigger. */ @@ -331,6 +332,17 @@ export enum Event { Updated = "Updated", } +/** + * Entity-specific filters with optional default + */ +export interface FiltersObject { + /** + * Default filter for entity types not explicitly configured + */ + default?: string; + [property: string]: string; +} + export interface AppScheduleClass { /** * Cron Expression in case of Custom scheduled Trigger diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/mcp/mcpSearchResponse.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/mcp/mcpSearchResponse.ts new file mode 100644 index 00000000000..fc5dac1373d --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/mcp/mcpSearchResponse.ts @@ -0,0 +1,651 @@ +/* + * Copyright 2025 Collate. + * 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. + */ +/** + * Response object for MCP search tool containing search results and metadata + */ +export interface MCPSearchResponse { + /** + * Whether there are more results available + */ + hasMore?: boolean; + /** + * Informational message about the search results + */ + message?: string; + /** + * The original search query used + */ + query: string; + /** + * Array of search result entities + */ + results: SearchResultEntity[]; + /** + * Number of entities returned in this response + */ + returnedCount: number; + /** + * Total number of entities found matching the search criteria + */ + totalFound: number; +} + +/** + * Individual search result entity with configurable fields + */ +export interface SearchResultEntity { + /** + * List of column names (for table entities) + */ + columnNames?: string[]; + /** + * Detailed column information (when requested) + */ + columns?: Column[]; + /** + * Database reference (for table entities) + */ + database?: EntityReference; + /** + * Database schema reference (for table entities) + */ + databaseSchema?: EntityReference; + /** + * Description of the entity + */ + description?: string; + /** + * Display name of the entity + */ + displayName?: string; + /** + * Entity relationships (when requested) + */ + entityRelationship?: { [key: string]: any }; + /** + * Type of the entity (table, topic, dashboard, etc.) + */ + entityType?: string; + /** + * Fully qualified name of the entity + */ + fullyQualifiedName?: string; + /** + * Link to the entity in OpenMetadata UI + */ + href?: string; + /** + * Name of the entity + */ + name?: string; + /** + * Owners of the entity + */ + owners?: EntityReference[]; + /** + * Sample queries (when requested) + */ + queries?: string[]; + /** + * Schema definition (when requested) + */ + schemaDefinition?: string; + /** + * Service reference containing the entity + */ + service?: EntityReference; + /** + * Type of the service + */ + serviceType?: string; + /** + * Type of table (for table entities) + */ + tableType?: string; + /** + * Tags associated with the entity + */ + tags?: TagLabel[]; + /** + * Tier information for the entity + */ + tier?: TagLabel; + /** + * Upstream lineage information (when requested) + */ + upstreamLineage?: { [key: string]: any }; +} + +/** + * This schema defines the type for a column in a table. + */ +export interface Column { + /** + * Data type used array in dataType. For example, `array` has dataType as `array` and + * arrayDataType as `int`. + */ + arrayDataType?: DataType; + /** + * Child columns if dataType or arrayDataType is `map`, `struct`, or `union` else `null`. + */ + children?: Column[]; + /** + * Column level constraint. + */ + constraint?: Constraint; + /** + * List of Custom Metrics registered for a table. + */ + customMetrics?: CustomMetric[]; + /** + * Length of `char`, `varchar`, `binary`, `varbinary` `dataTypes`, else null. For example, + * `varchar(20)` has dataType as `varchar` and dataLength as `20`. + */ + dataLength?: number; + /** + * Data type of the column (int, date etc.). + */ + dataType: DataType; + /** + * Display name used for dataType. This is useful for complex types, such as `array`, + * `map`, `struct<>`, and union types. + */ + dataTypeDisplay?: string; + /** + * Description of the column. + */ + description?: string; + /** + * Display Name that identifies this column name. + */ + displayName?: string; + fullyQualifiedName?: string; + /** + * Json schema only if the dataType is JSON else null. + */ + jsonSchema?: string; + name: string; + /** + * Ordinal position of the column. + */ + ordinalPosition?: number; + /** + * The precision of a numeric is the total count of significant digits in the whole number, + * that is, the number of digits to both sides of the decimal point. Precision is applicable + * Integer types, such as `INT`, `SMALLINT`, `BIGINT`, etc. It also applies to other Numeric + * types, such as `NUMBER`, `DECIMAL`, `DOUBLE`, `FLOAT`, etc. + */ + precision?: number; + /** + * Latest Data profile for a Column. + */ + profile?: ColumnProfile; + /** + * The scale of a numeric is the count of decimal digits in the fractional part, to the + * right of the decimal point. For Integer types, the scale is `0`. It mainly applies to non + * Integer Numeric types, such as `NUMBER`, `DECIMAL`, `DOUBLE`, `FLOAT`, etc. + */ + scale?: number; + /** + * Tags associated with the column. + */ + tags?: TagLabel[]; +} + +/** + * Data type used array in dataType. For example, `array` has dataType as `array` and + * arrayDataType as `int`. + * + * This enum defines the type of data stored in a column. + * + * Data type of the column (int, date etc.). + */ +export enum DataType { + AggState = "AGG_STATE", + Aggregatefunction = "AGGREGATEFUNCTION", + Array = "ARRAY", + Bigint = "BIGINT", + Binary = "BINARY", + Bit = "BIT", + Bitmap = "BITMAP", + Blob = "BLOB", + Boolean = "BOOLEAN", + Bytea = "BYTEA", + Byteint = "BYTEINT", + Bytes = "BYTES", + CIDR = "CIDR", + Char = "CHAR", + Clob = "CLOB", + Date = "DATE", + Datetime = "DATETIME", + Datetimerange = "DATETIMERANGE", + Decimal = "DECIMAL", + Double = "DOUBLE", + Enum = "ENUM", + Error = "ERROR", + Fixed = "FIXED", + Float = "FLOAT", + Geography = "GEOGRAPHY", + Geometry = "GEOMETRY", + Heirarchy = "HEIRARCHY", + Hll = "HLL", + Hllsketch = "HLLSKETCH", + Image = "IMAGE", + Inet = "INET", + Int = "INT", + Interval = "INTERVAL", + Ipv4 = "IPV4", + Ipv6 = "IPV6", + JSON = "JSON", + Kpi = "KPI", + Largeint = "LARGEINT", + Long = "LONG", + Longblob = "LONGBLOB", + Lowcardinality = "LOWCARDINALITY", + Macaddr = "MACADDR", + Map = "MAP", + Measure = "MEASURE", + MeasureHidden = "MEASURE HIDDEN", + MeasureVisible = "MEASURE VISIBLE", + Mediumblob = "MEDIUMBLOB", + Mediumtext = "MEDIUMTEXT", + Money = "MONEY", + Ntext = "NTEXT", + Null = "NULL", + Number = "NUMBER", + Numeric = "NUMERIC", + PGLsn = "PG_LSN", + PGSnapshot = "PG_SNAPSHOT", + Point = "POINT", + Polygon = "POLYGON", + QuantileState = "QUANTILE_STATE", + Record = "RECORD", + Rowid = "ROWID", + Set = "SET", + Smallint = "SMALLINT", + Spatial = "SPATIAL", + String = "STRING", + Struct = "STRUCT", + Super = "SUPER", + Table = "TABLE", + Text = "TEXT", + Time = "TIME", + Timestamp = "TIMESTAMP", + Timestampz = "TIMESTAMPZ", + Tinyint = "TINYINT", + Tsquery = "TSQUERY", + Tsvector = "TSVECTOR", + Tuple = "TUPLE", + TxidSnapshot = "TXID_SNAPSHOT", + UUID = "UUID", + Uint = "UINT", + Union = "UNION", + Unknown = "UNKNOWN", + Varbinary = "VARBINARY", + Varchar = "VARCHAR", + Variant = "VARIANT", + XML = "XML", + Year = "YEAR", +} + +/** + * Column level constraint. + * + * This enum defines the type for column constraint. + */ +export enum Constraint { + NotNull = "NOT_NULL", + Null = "NULL", + PrimaryKey = "PRIMARY_KEY", + Unique = "UNIQUE", +} + +/** + * Custom Metric definition that we will associate with a column. + */ +export interface CustomMetric { + /** + * Name of the column in a table. + */ + columnName?: string; + /** + * Description of the Metric. + */ + description?: string; + /** + * SQL expression to compute the Metric. It should return a single numerical value. + */ + expression: string; + /** + * Unique identifier of this Custom Metric instance. + */ + id?: string; + /** + * Name that identifies this Custom Metric. + */ + name: string; + /** + * Owners of this Custom Metric. + */ + owners?: EntityReference[]; + /** + * Last update time corresponding to the new version of the entity in Unix epoch time + * milliseconds. + */ + updatedAt?: number; + /** + * User who made the update. + */ + updatedBy?: string; +} + +/** + * Owners of this Custom Metric. + * + * This schema defines the EntityReferenceList type used for referencing an entity. + * EntityReference is used for capturing relationships from one entity to another. For + * example, a table has an attribute called database of type EntityReference that captures + * the relationship of a table `belongs to a` database. + * + * This schema defines the EntityReference type used for referencing an entity. + * EntityReference is used for capturing relationships from one entity to another. For + * example, a table has an attribute called database of type EntityReference that captures + * the relationship of a table `belongs to a` database. + * + * Database reference (for table entities) + * + * Database schema reference (for table entities) + * + * Service reference containing the entity + */ +export interface EntityReference { + /** + * If true the entity referred to has been soft-deleted. + */ + deleted?: boolean; + /** + * Optional description of entity. + */ + description?: string; + /** + * Display Name that identifies this entity. + */ + displayName?: string; + /** + * Fully qualified name of the entity instance. For entities such as tables, databases + * fullyQualifiedName is returned in this field. For entities that don't have name hierarchy + * such as `user` and `team` this will be same as the `name` field. + */ + fullyQualifiedName?: string; + /** + * Link to the entity resource. + */ + href?: string; + /** + * Unique identifier that identifies an entity instance. + */ + id: string; + /** + * If true the relationship indicated by this entity reference is inherited from the parent + * entity. + */ + inherited?: boolean; + /** + * Name of the entity instance. + */ + name?: string; + /** + * Entity type/class name - Examples: `database`, `table`, `metrics`, `databaseService`, + * `dashboardService`... + */ + type: string; +} + +/** + * Latest Data profile for a Column. + * + * This schema defines the type to capture the table's column profile. + */ +export interface ColumnProfile { + /** + * Custom Metrics profile list bound to a column. + */ + customMetrics?: CustomMetricProfile[]; + /** + * Number of values that contain distinct values. + */ + distinctCount?: number; + /** + * Proportion of distinct values in a column. + */ + distinctProportion?: number; + /** + * No.of Rows that contain duplicates in a column. + */ + duplicateCount?: number; + /** + * First quartile of a column. + */ + firstQuartile?: number; + /** + * Histogram of a column. + */ + histogram?: any[] | boolean | HistogramClass | number | number | null | string; + /** + * Inter quartile range of a column. + */ + interQuartileRange?: number; + /** + * Maximum value in a column. + */ + max?: number | string; + /** + * Maximum string length in a column. + */ + maxLength?: number; + /** + * Avg value in a column. + */ + mean?: number; + /** + * Median of a column. + */ + median?: number; + /** + * Minimum value in a column. + */ + min?: number | string; + /** + * Minimum string length in a column. + */ + minLength?: number; + /** + * Missing count is calculated by subtracting valuesCount - validCount. + */ + missingCount?: number; + /** + * Missing Percentage is calculated by taking percentage of validCount/valuesCount. + */ + missingPercentage?: number; + /** + * Column Name. + */ + name: string; + /** + * Non parametric skew of a column. + */ + nonParametricSkew?: number; + /** + * No.of null values in a column. + */ + nullCount?: number; + /** + * No.of null value proportion in columns. + */ + nullProportion?: number; + /** + * Standard deviation of a column. + */ + stddev?: number; + /** + * Median value in a column. + */ + sum?: number; + /** + * First quartile of a column. + */ + thirdQuartile?: number; + /** + * Timestamp on which profile is taken. + */ + timestamp: number; + /** + * No. of unique values in the column. + */ + uniqueCount?: number; + /** + * Proportion of number of unique values in a column. + */ + uniqueProportion?: number; + /** + * Total count of valid values in this column. + */ + validCount?: number; + /** + * Total count of the values in this column. + */ + valuesCount?: number; + /** + * Percentage of values in this column with respect to row count. + */ + valuesPercentage?: number; + /** + * Variance of a column. + */ + variance?: number; +} + +/** + * Profiling results of a Custom Metric. + */ +export interface CustomMetricProfile { + /** + * Custom metric name. + */ + name?: string; + /** + * Profiling results for the metric. + */ + value?: number; +} + +export interface HistogramClass { + /** + * Boundaries of Histogram. + */ + boundaries?: any[]; + /** + * Frequencies of Histogram. + */ + frequencies?: any[]; +} + +/** + * This schema defines the type for labeling an entity with a Tag. + * + * Tier information for the entity + */ +export interface TagLabel { + /** + * Description for the tag label. + */ + description?: string; + /** + * Display Name that identifies this tag. + */ + displayName?: string; + /** + * Link to the tag resource. + */ + href?: string; + /** + * Label type describes how a tag label was applied. 'Manual' indicates the tag label was + * applied by a person. 'Derived' indicates a tag label was derived using the associated tag + * relationship (see Classification.json for more details). 'Propagated` indicates a tag + * label was propagated from upstream based on lineage. 'Automated' is used when a tool was + * used to determine the tag label. + */ + labelType: LabelType; + /** + * Name of the tag or glossary term. + */ + name?: string; + /** + * Label is from Tags or Glossary. + */ + source: TagSource; + /** + * 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the + * entity must confirm the suggested labels before it is marked as 'Confirmed'. + */ + state: State; + style?: Style; + tagFQN: string; +} + +/** + * Label type describes how a tag label was applied. 'Manual' indicates the tag label was + * applied by a person. 'Derived' indicates a tag label was derived using the associated tag + * relationship (see Classification.json for more details). 'Propagated` indicates a tag + * label was propagated from upstream based on lineage. 'Automated' is used when a tool was + * used to determine the tag label. + */ +export enum LabelType { + Automated = "Automated", + Derived = "Derived", + Generated = "Generated", + Manual = "Manual", + Propagated = "Propagated", +} + +/** + * Label is from Tags or Glossary. + */ +export enum TagSource { + Classification = "Classification", + Glossary = "Glossary", +} + +/** + * 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the + * entity must confirm the suggested labels before it is marked as 'Confirmed'. + */ +export enum State { + Confirmed = "Confirmed", + Suggested = "Suggested", +} + +/** + * UI Style is used to associate a color code and/or icon to entity to customize the look of + * that entity in UI. + */ +export interface Style { + /** + * Hex Color Code to mark an entity such as GlossaryTerm, Tag, Domain or Data Product. + */ + color?: string; + /** + * An icon to associate with GlossaryTerm, Tag, Domain or Data Product. + */ + iconURL?: string; +} diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/governance/workflows/elements/triggers/periodicBatchEntityTrigger.ts b/openmetadata-ui/src/main/resources/ui/src/generated/governance/workflows/elements/triggers/periodicBatchEntityTrigger.ts index e8aad8e68c1..5ba6fed01c3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/governance/workflows/elements/triggers/periodicBatchEntityTrigger.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/governance/workflows/elements/triggers/periodicBatchEntityTrigger.ts @@ -38,15 +38,27 @@ export interface TriggerConfiguration { */ entityTypes?: string[]; /** - * Select the Search Filters to filter down the entities fetched. + * Search filters for entities. Can be a string (applied to all entity types) or an object + * mapping entity types to their specific filters. */ - filters: string; + filters: FiltersObject | string; /** * Defines the schedule of the Periodic Trigger. */ schedule: any[] | boolean | AppScheduleClass | number | number | null | string; } +/** + * Entity-specific filters with optional default + */ +export interface FiltersObject { + /** + * Default filter for entity types not explicitly configured + */ + default?: string; + [property: string]: string; +} + export interface AppScheduleClass { /** * Cron Expression in case of Custom scheduled Trigger