import { z } from 'zod'; import type { ArrayRow, ColumnType, ErrorResponse, ExecuteResponse, ExplainResponse, KeyValueRow, QueryPlan, ScriptPlan } from '../types/api/query'; import type { IQueryResult, QueryAction, QueryMode, StatisticsMode, TracingLevel, TransactionMode } from '../types/store/query'; export declare function getQueryShortText(queryText: string | undefined): string; export declare const TRANSACTION_MODES: { readonly serializable: "serializable-read-write"; readonly stalero: "stale-read-only"; readonly onlinero: "online-read-only"; readonly snapshot: "snapshot-read-only"; readonly snapshotrw: "snapshot-read-write"; readonly implicit: "implicit"; }; export declare const TRANSACTION_MODES_TITLES: Record; export declare const STATISTICS_MODES: { readonly none: "none"; readonly basic: "basic"; readonly full: "full"; readonly profile: "profile"; }; export declare const STATISTICS_MODES_TITLES: Record; export declare const STATISTICS_MODES_WITH_SVG: readonly StatisticsMode[]; export declare const TRACING_LEVELS: { readonly off: "off"; readonly toplevel: "toplevel"; readonly basic: "basic"; readonly detailed: "detailed"; readonly diagnostic: "diagnostic"; readonly trace: "trace"; }; export declare const TRACING_LEVELS_TITLES: Record; export declare const QUERY_ACTIONS: { readonly execute: "execute"; readonly explain: "explain"; readonly explainAnalyze: "explain-analyze"; }; export declare function isExecutionQueryAction(actionType: QueryAction): boolean; export declare const QUERY_MODES: { readonly scan: "scan"; readonly script: "script"; readonly data: "data"; readonly query: "query"; }; export declare const QUERY_MODES_TITLES: Record; export declare const QUERY_SYNTAX: { readonly yql: "yql_v1"; }; export declare const getColumnType: (type: string) => "string" | "number" | "boolean" | "date" | "binary-string" | undefined; /** parse response result from ArrayRow to KeyValueRow and format values */ export declare const parseResult: (rows: ArrayRow[], columns: ColumnType[]) => KeyValueRow[]; type UnsupportedQueryResponseFormat = Array | string | null | undefined | { result: string | Record; }; export declare function isQueryErrorResponse(data: unknown): data is ErrorResponse; export declare function isErrorResponse(data: unknown): data is ErrorResponse; export declare function parseIssuesData(raw: unknown): ErrorResponse | string | undefined; export declare function parseQueryAPIResponse(data: ExecuteResponse | ExplainResponse | UnsupportedQueryResponseFormat): IQueryResult; export declare const parseQueryExplainPlan: (plan: ScriptPlan | QueryPlan) => QueryPlan; export declare const parseQueryError: (error: unknown) => ErrorResponse | string | undefined; export declare function isQueryCancelledError(error: unknown): boolean; export declare const defaultPragma = "PRAGMA OrderedColumns;"; export declare const MAX_QUERY_TIMEOUT_SECONDS = 4294967; export declare const RESOURCE_POOL_NO_OVERRIDE_VALUE = "__no_pool_override__"; export type ResourcePoolValue = typeof RESOURCE_POOL_NO_OVERRIDE_VALUE | string; export declare const DEFAULT_QUERY_SETTINGS: { queryMode: "query"; transactionMode: "implicit"; timeout: null; limitRows: number; outputChunkMaxSize: undefined; statisticsMode: "none"; tracingLevel: "off"; pragmas: string; resourcePool: string; }; export declare const queryModeSchema: z.ZodEnum<{ readonly scan: "scan"; readonly script: "script"; readonly data: "data"; readonly query: "query"; }>; export declare const transactionModeSchema: z.ZodEnum<{ readonly serializable: "serializable-read-write"; readonly stalero: "stale-read-only"; readonly onlinero: "online-read-only"; readonly snapshot: "snapshot-read-only"; readonly snapshotrw: "snapshot-read-write"; readonly implicit: "implicit"; }>; export declare const statisticsModeSchema: z.ZodEnum<{ readonly none: "none"; readonly basic: "basic"; readonly full: "full"; readonly profile: "profile"; }>; export declare const tracingLevelSchema: z.ZodEnum<{ readonly off: "off"; readonly toplevel: "toplevel"; readonly basic: "basic"; readonly detailed: "detailed"; readonly diagnostic: "diagnostic"; readonly trace: "trace"; }>; export declare const querySettingsValidationSchema: z.ZodObject<{ timeout: z.ZodPreprocess>>>; limitRows: z.ZodPreprocess>>; outputChunkMaxSize: z.ZodPreprocess>>; queryMode: z.ZodEnum<{ readonly scan: "scan"; readonly script: "script"; readonly data: "data"; readonly query: "query"; }>; transactionMode: z.ZodEnum<{ readonly serializable: "serializable-read-write"; readonly stalero: "stale-read-only"; readonly onlinero: "online-read-only"; readonly snapshot: "snapshot-read-only"; readonly snapshotrw: "snapshot-read-write"; readonly implicit: "implicit"; }>; statisticsMode: z.ZodEnum<{ readonly none: "none"; readonly basic: "basic"; readonly full: "full"; readonly profile: "profile"; }>; tracingLevel: z.ZodEnum<{ readonly off: "off"; readonly toplevel: "toplevel"; readonly basic: "basic"; readonly detailed: "detailed"; readonly diagnostic: "diagnostic"; readonly trace: "trace"; }>; pragmas: z.ZodString; resourcePool: z.ZodString; }, z.core.$strip>; export declare const querySettingsRestoreSchema: z.ZodCatch, z.ZodTransform>>>>>; limitRows: z.ZodCatch>>>; outputChunkMaxSize: z.ZodCatch>>>; queryMode: z.ZodCatch>; transactionMode: z.ZodCatch>; statisticsMode: z.ZodCatch>; tracingLevel: z.ZodCatch>; pragmas: z.ZodCatch; resourcePool: z.ZodCatch; }, z.core.$strip>>; export declare function isStreamingSupportedForMode(mode: QueryMode): mode is "query"; export {};