import Joi from 'joi'; declare const schema: Joi.ObjectSchema; type TimeGranularity = 'hour' | 'day' | 'week' | 'month' | 'year' | 'hourOfTheDay' | 'dayOfTheWeek' | 'monthOfTheYear'; type Comparison = '=' | '>=' | '<=' | '>' | '<' | 'like' | '<>' | 'isNull' | 'isNotNull' | 'isNamedRange' | 'notLike'; type Value = string | number | boolean; type Field = string | { expression: string; }; interface Constraint { left: Field | number; comparison: Comparison; right?: { field: string | number; } | { value: Value; }; } interface Condition { type: 'or' | 'and'; restrictions: (Constraint | Condition)[]; } interface Limit { limitedTo: number; per: { columnIndex: number; }[]; sortedBy: { columnIndex: number; descending: boolean; }[]; } type AggregatedColumn = { type: 'count' | 'share'; condition?: Condition; name?: string; } | { type: 'sum' | 'mean' | 'min' | 'max' | 'any'; condition?: Condition; field: Field; name?: string; dataTypeHint?: undefined | 'string' | 'integer' | 'boolean' | 'number' | 'hashId'; }; type TimeGroupColumn = { type: 'timeGroup'; field: string; granularity: TimeGranularity; name?: string; }; type UnaggregatedColumn = { type: undefined; field: Field; name?: string; dataTypeHint?: undefined | 'string' | 'integer' | 'boolean' | 'number' | 'hashId'; }; type Column = UnaggregatedColumn | AggregatedColumn | TimeGroupColumn; declare function isUnaggregatedColumn(column: Column): column is UnaggregatedColumn; declare function isTimeGroupColumn(column: Column): column is TimeGroupColumn; interface AnalyticsQuery { source: string; columns: (Column)[]; filter?: Condition; limitBy?: Limit; offset?: string; sort: { columnIndex: number; descending: boolean; }[]; rowsPerPage?: number; } export { schema, AnalyticsQuery, Constraint, Condition, Limit, TimeGranularity, Field, AggregatedColumn, UnaggregatedColumn, isUnaggregatedColumn, TimeGroupColumn, isTimeGroupColumn, };