import Joi from 'joi'; import { CacheMode } from '@cubejs-backend/shared'; import type { QueryType } from './types/strings'; import type { InputMemberExpression, NormalizedQuery, Query } from './types/query'; declare const getQueryGranularity: (queries: NormalizedQuery[]) => string[]; declare const getPivotQuery: (queryType: QueryType, queries: NormalizedQuery[]) => any; export declare const cubeSqlRequestSchema: Joi.ObjectSchema; export declare const preAggsJobsRequestSchema: Joi.ObjectSchema; export declare function resolveDateRange(input: string | string[], timezone: string): string[]; export declare function resolveDateRange(input: unknown, timezone: string): unknown; export declare const normalizeDateFilterValues: (filter: T, timezone: string) => T; /** @throws {UserError} */ declare function parseInputMemberExpression(expression: unknown): InputMemberExpression; type GranularitySplit = { dimension: string; granularity: string; }; /** * @param splitGranularity Splits the granularity off a dimension path: `null` * when the path has none, `undefined` when the data model doesn't know the path. * @throws {UserError} */ declare const normalizeQuery: (query: Query, persistent?: boolean, cacheMode?: CacheMode, splitGranularity?: (path: string) => GranularitySplit | null | undefined) => NormalizedQuery; declare const remapToQueryAdapterFormat: (query: NormalizedQuery) => NormalizedQuery; type PreAggregationsQueryItem = { id: string; cacheOnly?: boolean; metaOnly?: boolean; partitions?: string[]; refreshRange?: [string, string]; }; type PreAggregationVersionEntry = { content_version?: string; last_updated_at?: number; naming_version?: number; structure_version?: string; table_name?: string; build_range_end?: string; }; type PreAggregationPreviewQuery = { preAggregationId: string; timezone: string; versionEntry: PreAggregationVersionEntry; }; type CancelPreAggregationsQuery = { dataSource?: string; queryKeys?: string[]; }; declare const normalizeQueryPreAggregations: (query: unknown, defaultValues?: { timezones?: string[]; }) => { metadata: Record | undefined; timezones: string[]; preAggregations: PreAggregationsQueryItem[] | undefined; expand: string[] | undefined; }; declare const normalizeQueryPreAggregationPreview: (query: unknown) => PreAggregationPreviewQuery; declare const normalizeQueryCancelPreAggregations: (query: unknown) => CancelPreAggregationsQuery; export { getQueryGranularity, getPivotQuery, normalizeQuery, normalizeQueryPreAggregations, normalizeQueryPreAggregationPreview, normalizeQueryCancelPreAggregations, parseInputMemberExpression, remapToQueryAdapterFormat, }; //# sourceMappingURL=query.d.ts.map