import type { z } from 'zod'; import type { QUERY_ACTIONS, QUERY_MODES, QUERY_SYNTAX, STATISTICS_MODES, TRACING_LEVELS, TRANSACTION_MODES, querySettingsValidationSchema } from '../../utils/query'; import type { IResponseError, NetworkError } from '../api/error'; import type { ColumnType, KeyValueRow, ErrorResponse as QueryErrorResponseData, QueryPlan, ScriptPlan, TKqpStatsQuery } from '../api/query'; import type { ValueOf } from '../common'; export interface ParsedResultSet { columns?: ColumnType[]; result?: KeyValueRow[]; truncated?: boolean; } export interface IQueryResult { resultSets?: ParsedResultSet[]; columns?: ColumnType[]; stats?: TKqpStatsQuery; plan?: ScriptPlan | QueryPlan; ast?: string; traceId?: string; truncated?: boolean; } export interface QueryRequestParams { database: string; query: string; } export type QuerySettings = z.infer; export type QueryErrorResponse = IResponseError; export type QueryError = NetworkError | QueryErrorResponse; export type QueryAction = ValueOf; export type QueryMode = ValueOf; export type QuerySyntax = ValueOf; export type TransactionMode = ValueOf; export type StatisticsMode = ValueOf; export type TracingLevel = ValueOf; export interface SavedQuery { name: string; body: string; updatedAt?: number; }