export declare type PlainObject = { [property: string]: any; }; export declare type Select = string | string[] | keyof T | Array; export declare type NestedOrderBy = { [P in keyof T]?: T[P] extends Array ? OrderBy : OrderBy; }; export declare type OrderBy = string | OrderByOptions | Array> | NestedOrderBy; export declare type TypedFilter = { [P in keyof T]?: any; }; export declare type Filter = string | PlainObject | TypedFilter | Array>; export declare type NestedExpandOptions = { [P in keyof T]?: (T[P] extends Array ? Partial> : Partial>); }; export declare type Expand = string | keyof T | NestedExpandOptions | Array> | Array>; export declare enum StandardAggregateMethods { sum = "sum", min = "min", max = "max", average = "average", countdistinct = "countdistinct" } export declare type Aggregate = string | { [propertyName: string]: { with: StandardAggregateMethods; as: string; }; }; export declare type OrderByOptions = keyof T | [keyof T, 'asc' | 'desc']; export declare type ExpandOptions = { select: Select; filter: Filter; orderBy: OrderBy; skip: number; top: number; levels: number | 'max'; count: boolean | Filter; expand: Expand; }; export declare type Transform = { aggregate?: Aggregate | Array; filter?: Filter; groupBy?: GroupBy; }; export declare type GroupBy = { properties: Array; transform?: Transform; }; export declare type Raw = { type: 'raw'; value: any; }; export declare type Guid = { type: 'guid'; value: any; }; export declare type Duration = { type: 'duration'; value: any; }; export declare type Binary = { type: 'binary'; value: any; }; export declare type Json = { type: 'json'; value: any; }; export declare type Alias = { type: 'alias'; name: string; value: any; }; export declare type Decimal = { type: 'decimal'; value: any; }; export declare type Value = string | Date | number | boolean | Raw | Guid | Duration | Binary | Json | Alias | Decimal; export declare const raw: (value: string) => Raw; export declare const guid: (value: string) => Guid; export declare const duration: (value: string) => Duration; export declare const binary: (value: string) => Binary; export declare const json: (value: PlainObject) => Json; export declare const alias: (name: string, value: PlainObject) => Alias; export declare const decimal: (value: string) => Decimal; export declare type QueryOptions = ExpandOptions & { search: string; transform: PlainObject | PlainObject[]; skip: number; skiptoken: string; key: string | number | PlainObject; count: boolean | Filter; action: string; func: string | { [functionName: string]: { [parameterName: string]: any; }; }; format: string; aliases: Alias[]; }; export declare const ITEM_ROOT = ""; export default function ({ select: $select, search: $search, skiptoken: $skiptoken, format: $format, top, skip, filter, transform, orderBy, key, count, expand, action, func }?: Partial>): string;