import { AxiosRequestConfig, AxiosInstance } from 'axios'; declare enum AggregatorType { avg = "AVG", AVG = "AVG", count = "COUNT", COUNT = "COUNT", max = "MAX", MAX = "MAX", min = "MIN", MIN = "MIN", sum = "SUM", SUM = "SUM", unknown = "UNKNOWN", UNKNOWN = "UNKNOWN" } declare enum Calculation { growth = "growth", GROWTH = "growth", rate = "rate", RATE = "rate", rca = "rca", RCA = "rca", topk = "topk", TOPK = "topk" } declare enum Comparison { "!=" = "neq", "<" = "lt", "<=" = "lte", "<>" = "neq", "=" = "eq", ">" = "gt", ">=" = "gte", eq = "eq", EQ = "eq", gt = "gt", GT = "gt", gte = "gte", GTE = "gte", lt = "lt", LT = "lt", lte = "lte", LTE = "lte", NEQ = "neq", neq = "neq" } declare enum DimensionType { geo = "geo", Geographic = "geo", std = "std", Standard = "std", time = "time", Time = "time" } declare enum Format { csv = "csv", json = "json", jsonarrays = "jsonarrays", jsonrecords = "jsonrecords", parquet = "parquet", tsv = "tsv", xls = "xls", xlsx = "xlsx" } declare enum Direction { asc = "asc", ASC = "asc", desc = "desc", DESC = "desc" } declare enum TimePrecision { day = "day", DAY = "day", month = "month", MONTH = "month", quarter = "quarter", QUARTER = "quarter", time = "time", TIME = "time", week = "week", WEEK = "week", year = "year", YEAR = "year" } declare enum TimeValue { latest = "latest", LATEST = "latest", oldest = "oldest", OLDEST = "oldest" } type TimeValuePoint = TimeValue | number; interface Annotations { [key: string]: string | undefined; } interface IAnnotated { readonly annotations: Annotations; } interface IFullNamed extends INamed { readonly caption?: string; readonly fullName?: string; } interface INamed { readonly name: string; } interface ISerializable { readonly uri: string; } interface PlainCube extends IAnnotated, INamed, ISerializable { readonly _type: "cube"; readonly caption?: string; readonly dimensions: PlainDimension[]; readonly measures: PlainMeasure[]; readonly namedsets: PlainNamedSet[]; } interface PlainDimension extends IAnnotated, IFullNamed, ISerializable { readonly _type: "dimension"; readonly cube: string; readonly defaultHierarchy: string; readonly dimensionType: DimensionType; readonly hierarchies: PlainHierarchy[]; } interface PlainHierarchy extends IAnnotated, IFullNamed, ISerializable { readonly _type: "hierarchy"; readonly cube: string; readonly dimension: string; readonly levels: PlainLevel[]; } interface PlainLevel extends IAnnotated, IFullNamed, ISerializable { readonly _type: "level"; readonly cube: string; readonly depth: number; readonly dimension: string; readonly hierarchy: string; readonly properties: PlainProperty[]; readonly uniqueName?: string; } interface PlainMeasure extends IAnnotated, IFullNamed, ISerializable { readonly _type: "measure"; readonly aggregatorType: AggregatorType; readonly cube: string; } interface PlainMember extends IFullNamed, ISerializable { readonly _type: "member"; readonly ancestors: PlainMember[]; readonly children: PlainMember[]; readonly depth?: number; readonly key: string | number; readonly level: string; readonly numChildren?: number; readonly parentName?: string; } interface PlainNamedSet extends IAnnotated, INamed, ISerializable { readonly _type: "namedset"; readonly cube: string; readonly dimension: string; readonly hierarchy: string; readonly level: string; } interface PlainProperty extends IAnnotated, INamed, ISerializable { readonly _type: "property"; readonly captionSet?: string; readonly uniqueName?: string; } interface CalculationGrowthDescriptor { kind: "growth"; category: LevelDescriptor; value: string; } interface CalculationRCADescriptor { kind: "rca"; location: LevelDescriptor; category: LevelDescriptor; value: string; } interface CalculationTopkDescriptor { kind: "topk"; amount: number; category: LevelDescriptor; value: string | Calculation; order: string; } type CalculationDescriptor = CalculationGrowthDescriptor | CalculationRCADescriptor | CalculationTopkDescriptor; interface CutDescriptor extends LevelDescriptor { members: string[] | number[]; exclusive?: boolean; for_match?: boolean; } interface FilterDescriptor { server?: string; cube?: string; measure: string; constraint: [Comparison, number]; joint?: "and" | "or"; constraint2?: [Comparison, number]; } interface LevelDescriptor { server?: string; cube?: string; dimension?: string; hierarchy?: string; level: string; } interface PropertyDescriptor { server?: string; cube?: string; dimension?: string; hierarchy?: string; level?: string; property: string; } interface QueryDescriptor { server?: string; cube?: string; calculations: CalculationDescriptor[]; captions: PropertyDescriptor[]; cuts: CutDescriptor[]; drilldowns: LevelDescriptor[]; filters: FilterDescriptor[]; format: string; locale: string; measures: string[]; options: Record; page_limit: number; page_offset: number; properties: PropertyDescriptor[]; sort_direction: Direction | string | undefined; sort_property: PropertyDescriptor | string | undefined; time: [TimePrecision | string, TimeValuePoint | string] | undefined; } declare class Annotated { readonly _source: IAnnotated; get annotations(): Annotations; getAnnotation(key: string, defaultValue?: string): string; getLocaleAnnotation(key: string, locale: string, defaultValue?: string): string; } declare class FullNamed { readonly _source: IFullNamed; get caption(): string; get fullName(): string; get name(): string; } declare class Named { readonly _source: INamed; get name(): string; } declare class Serializable { readonly _source: T; toJSON(): T; toString(): string; } type PropertyReference = string | PropertyDescriptor | Property; interface Property extends Annotated, Named, Serializable { } declare class Property { readonly _source: PlainProperty; private readonly _parent?; static isProperty(obj: unknown): obj is Property; static isPropertyDescriptor(obj: unknown): obj is PropertyDescriptor; constructor(source: PlainProperty, parent?: Level); get captionSet(): string; get cube(): Cube; get descriptor(): PropertyDescriptor; get fullName(): string; get level(): Level; get uniqueName(): string; matches(ref: PropertyReference): boolean; } type LevelReference = string | LevelDescriptor | Level; interface Level extends Annotated, FullNamed, Serializable { } declare class Level { private readonly _parent?; readonly _source: PlainLevel; readonly properties: Property[]; readonly propertiesByName: Readonly>; static isLevel(obj: unknown): obj is Level; static isLevelDescriptor(obj: unknown): obj is LevelDescriptor; constructor(source: PlainLevel, parent?: Hierarchy); get cube(): Cube; get depth(): number; get descriptor(): LevelDescriptor; get dimension(): Dimension; get hierarchy(): Hierarchy; get displayName(): string; get uniqueName(): string; hasProperty(propertyName: string): boolean; matches(ref: LevelReference): boolean; } interface Hierarchy extends Annotated, FullNamed, Serializable { } declare class Hierarchy { private readonly _parent?; readonly _source: PlainHierarchy; readonly levels: Level[]; readonly levelsByName: Readonly>; static isHierarchy(obj: unknown): obj is Hierarchy; constructor(source: PlainHierarchy, parent?: Dimension); get cube(): Cube; get dimension(): Dimension; get displayName(): string; getLevel(ref: LevelReference): Level; } interface Dimension extends Annotated, FullNamed, Serializable { } declare class Dimension { private readonly _parent?; readonly _source: PlainDimension; readonly hierarchies: Hierarchy[]; readonly hierarchiesByName: Readonly>; static isDimension(obj: unknown): obj is Dimension; constructor(source: PlainDimension, parent?: Cube); get caption(): string; get cube(): Cube; get defaultHierarchy(): Hierarchy | undefined; get dimensionType(): DimensionType; get displayName(): string; get levelIterator(): IterableIterator; get propertyIterator(): IterableIterator; getHierarchy(ref: string | Hierarchy): Hierarchy; getLevel(ref: LevelReference): Level; getProperty(ref: PropertyReference): Property; private levelIteratorFactory; private propertyIteratorFactory; } interface Member extends FullNamed, Serializable { } declare class Member { private readonly _parent?; readonly _source: PlainMember; readonly ancestors: Member[]; readonly children: Member[]; constructor(source: PlainMember, parent?: Level); get cube(): Cube; get key(): string | number; get level(): Level; get parentName(): string | undefined; } type CalcOrMeasure = Calculation | Measure; interface Measure extends Annotated, FullNamed, Serializable { } declare class Measure { private readonly _parent?; readonly _source: PlainMeasure; static isCalcOrMeasure(obj: unknown): obj is CalcOrMeasure; static isMeasure(obj: unknown): obj is Measure; constructor(source: PlainMeasure, parent?: Cube); get aggregatorType(): AggregatorType; get cube(): Cube; get displayName(): string; } interface NamedSet extends Annotated, FullNamed, Serializable { } declare class NamedSet { private readonly _parent?; readonly _source: PlainNamedSet; readonly level?: Level; static isNamedset(obj: unknown): obj is NamedSet; constructor(source: PlainNamedSet, parent?: Cube); get cube(): Cube; } type Drillable = Level | NamedSet; type DrillableReference = LevelReference | Drillable; type QueryCalc = QueryCalcGrowth | QueryCalcRca | QueryCalcTopk; interface QueryCalcGrowth { kind: "growth"; category: Level; value: Measure; } interface QueryCalcRca { kind: "rca"; location: Level; category: Level; value: Measure; } interface QueryCalcTopk { kind: "topk"; amount: number; category: Level; value: CalcOrMeasure; order: Direction; } interface QueryCut { drillable: Drillable; members: string[]; isExclusive?: boolean; isForMatch?: boolean; } interface QueryFilter { measure: CalcOrMeasure; const1: [Comparison, number]; joint?: "and" | "or"; const2?: [Comparison, number]; } type QueryOptions = Record; interface QueryPagination { limit: number; offset: number; } interface QuerySorting { direction?: Direction; property?: CalcOrMeasure | Property; } interface QueryTimeframe { precision?: TimePrecision; value?: TimeValuePoint; } declare class Query { readonly cube: Cube; private calculations; private captions; private cuts; private drilldowns; private filters; private format; private locale; private measures; private options; private pageLimit; private pageOffset; private properties; private sortDirection; private sortProperty; private timePrecision; private timeValue; constructor(cube: Cube); addCalculation(kind: "growth", params: { category: LevelReference; value: string | Measure; }): this; addCalculation(kind: "rca", params: { location: LevelReference; category: LevelReference; value: string | Measure; }): this; addCalculation(kind: "topk", params: { amount: number; category: LevelReference; value: string | CalcOrMeasure; order?: string; }): this; addCaption(propertyRef: PropertyReference): this; addCut(drillableRef: DrillableReference, memberList?: string[] | number[], options?: { exclusive?: boolean; forMatch?: boolean; }): this; addDrilldown(drillableRef: DrillableReference): this; addFilter(calcRef: string | Measure, constraint: [Comparison, number], joint?: "and" | "or", constraint2?: [Comparison, number]): this; addMeasure(measureRef: string | Measure): this; addProperty(propertyRef: PropertyReference): this; fromJSON(params: Partial): this; getParam(key: "calculations"): QueryCalc[]; getParam(key: "captions"): Property[]; getParam(key: "cuts"): QueryCut[]; getParam(key: "drilldowns"): Drillable[]; getParam(key: "filters"): QueryFilter[]; getParam(key: "format"): Format; getParam(key: "locale"): string; getParam(key: "measures"): Measure[]; getParam(key: "options"): QueryOptions; getParam(key: "pagination"): QueryPagination; getParam(key: "properties"): Property[]; getParam(key: "sorting"): QuerySorting; getParam(key: "time"): QueryTimeframe; setFormat(format: Format | `${Format}`): this; setLocale(locale: string): this; setOption(option: string, value: boolean): this; setPagination(limit: number, offset?: number): this; setSorting(sortProperty: string | CalcOrMeasure | PropertyReference, direction?: boolean | Direction | "asc" | "desc"): this; setTime(precision?: TimePrecision, value?: TimeValuePoint): this; toJSON(): QueryDescriptor; toSource(): string; toString(kind?: string): string; } interface ParseURLOptions { anyServer: boolean; exclude: string[]; include: string[]; filter: (key: string, value: string | boolean | string[]) => boolean; } type ServerConfig = string | AxiosRequestConfig; interface Aggregation { data: T; headers: Record; query: Query; status?: number; url?: string; } interface IClient { execQuery(query: Query, endpoint?: string): Promise; getCube(cubeName: string, selectorFn?: (cubes: Cube[]) => Cube): Promise; getCubes(): Promise; getMember(parent: Level | LevelDescriptor, key: string | number, options?: any): Promise; getMembers(parent: Level | LevelDescriptor, options?: any): Promise; parseQueryURL(url: string, options?: Partial): Promise; setRequestConfig(config: AxiosRequestConfig): void; } interface IDataSource { axiosInstance: AxiosInstance; checkStatus(): Promise; execQuery(query: Query, endpoint?: string): Promise; fetchCube(cubeName: string): Promise; fetchCubes(): Promise; fetchMember(parent: Level, key: string | number, options?: any): Promise; fetchMembers(parent: Level, options?: any): Promise; parseQueryURL(query: Query, url: string, options: Partial): Query; serverOnline: boolean; serverSoftware: string; serverUrl: string; serverVersion: string; setRequestConfig(config: AxiosRequestConfig): void; stringifyQueryURL(query: Query, kind: string): string; } interface ServerStatus { software: string; online: boolean; url: string; version: string; } interface Cube extends Annotated, FullNamed, Serializable { } declare class Cube { private readonly _parent?; readonly _source: PlainCube; readonly dimensions: Dimension[]; readonly dimensionsByName: Readonly>; readonly measures: Measure[]; readonly measuresByName: Readonly>; readonly namedsets: NamedSet[]; readonly namedsetsByName: Readonly>; static isCube(obj: unknown): obj is Cube; constructor(source: PlainCube, parent?: IDataSource); get caption(): string; get datasource(): IDataSource; get defaultMeasure(): Measure; get geoDimension(): Dimension | undefined; get query(): Query; get server(): string; get serverSoftware(): string; get standardDimensions(): Dimension[]; get timeDimension(): Dimension | undefined; get levelIterator(): IterableIterator; get propertyIterator(): IterableIterator; findDimensionsByType(type: DimensionType): Dimension[]; getDimension(ref: string | Dimension): Dimension; getDrillable(ref: DrillableReference): Drillable; getLevel(ref: LevelReference): Level; getMeasure(ref: string | Measure): Measure; getNamedSet(ref: string | NamedSet): NamedSet; getProperty(ref: PropertyReference): Property; private levelIteratorFactory; private propertyIteratorFactory; } declare class Client implements IClient { private _cache; private _ds; static dataSourceFromURL(config: ServerConfig): Promise; static fromURL(config: ServerConfig): Promise; constructor(datasource?: IDataSource); checkStatus(): Promise; get datasource(): IDataSource; execQuery(query: Query, endpoint?: string): Promise; getCube(cubeName: string): Promise; getCubes(): Promise; getMember(levelRef: LevelReference, key: string | number, options?: any): Promise; getMembers(levelRef: LevelReference, options?: any): Promise; parseQueryURL(url: string, options?: Partial): Promise; setDataSource(datasource: IDataSource): void; setRequestConfig(config: AxiosRequestConfig): void; } interface MondrianAggregateURLSearchParams { caption: string[]; cut: string[]; debug: boolean; distinct: boolean; drilldown: string[]; filter: string[]; limit: number; measures: string[]; nonempty: boolean; offset: number; order: string; order_desc: boolean; parents: boolean; properties: string[]; sparse: boolean; } declare function hydrateQueryFromAggregateSearchParams$1(query: Query, params: Partial): Query; declare enum MondrianEndpoint { aggregate = "" } declare class MondrianDataSource implements IDataSource { axiosInstance: AxiosInstance; serverOnline: boolean; serverSoftware: string; serverUrl: string; serverVersion: string; static endpoints: MondrianEndpoint[]; static formats: Format[]; static softwareName: string; constructor(serverUrl: string); checkStatus(): Promise; execQuery(query: Query): Promise; fetchCube(cubeName: string): Promise; fetchCubes(): Promise; fetchMember(parent: Level, key: number | string, options?: any): Promise; fetchMembers(parent: Level, options?: any): Promise; parseQueryURL(query: Query, url: string, options: Partial): Query; setRequestConfig(config: AxiosRequestConfig): void; stringifyQueryURL(query: Query): string; static queryAggregate: typeof hydrateQueryFromAggregateSearchParams$1; static urlAggregate(query: Query): string; } declare class MultiClient implements IClient { private _cache; private datasources; static dataSourcesFromURL(...configs: ServerConfig[]): Promise; static fromURL(...configs: ServerConfig[]): Promise; constructor(...datasources: IDataSource[]); addDataSource(...datasources: IDataSource[]): void; checkStatus(): Promise; get dataSourceList(): IDataSource[]; execQuery(query: Query, endpoint?: string): Promise; getCube(cubeName: string, selectorFn?: (cubes: Cube[]) => Cube): Promise; getCubes(): Promise; getMember(levelRef: Level | LevelDescriptor, key: string | number, options?: any): Promise; getMembers(levelRef: Level | LevelDescriptor, options?: any): Promise; parseQueryURL(url: string, options?: Partial): Promise; setRequestConfig(config: AxiosRequestConfig): void; } declare enum PyTesseractEndpoint { logiclayer = "" } declare class PyTesseractDataSource implements IDataSource { axiosInstance: AxiosInstance; serverOnline: boolean; serverSoftware: string; serverUrl: string; serverVersion: string; static endpoints: PyTesseractEndpoint[]; static formats: Format[]; static softwareName: string; constructor(url: string); checkStatus(): Promise; execQuery(query: Query): Promise; fetchCube(cubeName: string): Promise; fetchCubes(): Promise; fetchMember(parent: Level, key: string | number, options?: Record): Promise; fetchMembers(parent: Level, options?: Record): Promise; parseQueryURL(query: Query, url: string, options?: Partial): Query; setRequestConfig(config: AxiosRequestConfig): void; stringifyQueryURL(query: Query): string; } interface TesseractAggregateURLSearchParams { captions: string[]; cuts: string[]; debug: boolean; distinct: boolean; drilldowns: string[]; exclude_default_members: boolean; filters: string[]; growth: string; limit: string | number; measures: string[]; nonempty: boolean; parents: boolean; properties: string[]; rate: string; rca: string; sort: string; sparse: boolean; top_where: string; top: string; } interface TesseractLogicLayerURLSearchParams { cube: string; debug: boolean; drilldowns: string; exclude_default_members: boolean; exclude: string; filters: string; growth: string; limit: string; locale: string; measures: string; parents: boolean; properties: string; rate: string; rca: string; sort: string; sparse: boolean; time: string; top_where: string; top: string; [cut: string]: string | boolean; } declare function hydrateQueryFromAggregateSearchParams(query: Query, params: Partial): Query; declare function hydrateQueryFromLogicLayerSearchParams(query: Query, params: Partial): Query; declare enum TesseractEndpoint { aggregate = "aggregate", logiclayer = "logiclayer" } declare class TesseractDataSource implements IDataSource { axiosInstance: AxiosInstance; serverOnline: boolean; serverSoftware: string; serverVersion: string; serverUrl: string; static endpoints: TesseractEndpoint[]; static formats: Format[]; static softwareName: string; constructor(serverUrl: string); checkStatus(): Promise; execQuery(query: Query, endpoint?: TesseractEndpoint | `${TesseractEndpoint}`): Promise; private execQueryAggregate; private execQueryLogicLayer; fetchCube(cubeName: string): Promise; fetchCubes(): Promise; fetchMembers(parent: Level, options?: any): Promise; fetchMember(parent: Level, key: string | number, options?: any): Promise; parseQueryURL(query: Query, url: string, options: Partial): Query; setRequestConfig(config: AxiosRequestConfig): void; stringifyQueryURL(query: Query, kind: string): string; static queryAggregate: typeof hydrateQueryFromAggregateSearchParams; static queryLogicLayer: typeof hydrateQueryFromLogicLayerSearchParams; static urlAggregate(query: Query): string; static urlLogicLayer(query: Query): string; } export { type Aggregation, AggregatorType, Calculation, type CalculationDescriptor, type CalculationGrowthDescriptor, type CalculationRCADescriptor, type CalculationTopkDescriptor, Client, Comparison, Cube, type CutDescriptor, Dimension, DimensionType, Direction, type Drillable, type DrillableReference, type FilterDescriptor, Format, Hierarchy, type IClient, type IDataSource, Level, type LevelDescriptor, Measure, Member, MondrianDataSource, MultiClient, NamedSet, Direction as Order, type PlainCube, type PlainDimension, type PlainHierarchy, type PlainLevel, type PlainMeasure, type PlainMember, type PlainNamedSet, type PlainProperty, Property, type PropertyDescriptor, PyTesseractDataSource, Query, type QueryCalc, type QueryCalcGrowth, type QueryCalcRca, type QueryCalcTopk, type QueryCut, type QueryDescriptor, type QueryFilter, type QueryOptions, type QueryPagination, type QuerySorting, type QueryTimeframe, type ServerConfig, type ServerStatus, TesseractDataSource, TimePrecision, TimeValue };