UNPKG

angular-odata

Version:

Client side OData typescript library for Angular

126 lines (125 loc) 4.57 kB
import { Parser, ParserOptions } from '../../../types'; import { QueryCustomType } from '../builder'; import { Expression } from './base'; import { FilterConnector, FilterExpression } from './filter'; import { SearchConnector, SearchExpression } from './search'; import { ODataFunctions, ODataOperators, Renderable, AggregateMethod } from './syntax'; export declare class GroupByTransformations<T> extends Expression<T> { protected methods: (AggregateMethod | string)[]; protected aliases: string[]; constructor({ children, methods, aliases, }?: { children?: Renderable[]; methods?: (AggregateMethod | string)[]; aliases?: string[]; }); get [Symbol.toStringTag](): string; toJson(): { $type: string; children: any[]; } & { methods: string[]; aliases: string[]; }; static fromJson<T>(json: { [name: string]: any; }): GroupByTransformations<T>; render({ aliases, escape, prefix, parser, options, }?: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser<T>; options?: ParserOptions; }): string; clone(): GroupByTransformations<T>; private _add; aggregate(value: any, method: AggregateMethod | string, alias: string): GroupByTransformations<T>; sum(value: any, alias: string): GroupByTransformations<T>; min(value: any, alias: string): GroupByTransformations<T>; max(value: any, alias: string): GroupByTransformations<T>; average(value: any, alias: string): GroupByTransformations<T>; countdistinct(value: any, alias: string): GroupByTransformations<T>; count(alias: string): GroupByTransformations<T>; } export type ApplyExpressionBuilder<T> = { t: Required<T>; e: () => ApplyExpression<T>; }; export declare class ApplyExpression<T> extends Expression<T> { constructor({ children, }?: { children?: Renderable[]; }); get [Symbol.toStringTag](): string; static factory<T>(opts: (builder: ApplyExpressionBuilder<T>, current?: ApplyExpression<T>) => ApplyExpression<T>, current?: ApplyExpression<T>): ApplyExpression<T>; toJson(): { $type: string; children: any[]; }; static fromJson<T>(json: { [name: string]: any; }): ApplyExpression<T>; render({ aliases, escape, prefix, parser, options, }?: { aliases?: QueryCustomType[]; escape?: boolean; prefix?: string; parser?: Parser<T>; options?: ParserOptions; }): string; clone(): ApplyExpression<T>; private _add; aggregate(value: any, method: AggregateMethod, alias: string): ApplyExpression<T>; topCount(opts: (e: { o: ODataOperators<T>; f: ODataFunctions<T>; }) => Renderable): ApplyExpression<T>; topSum(opts: (e: { o: ODataOperators<T>; f: ODataFunctions<T>; }) => Renderable): ApplyExpression<T>; topPercent(opts: (e: { o: ODataOperators<T>; f: ODataFunctions<T>; }) => Renderable): ApplyExpression<T>; bottomCount(opts: (e: { o: ODataOperators<T>; f: ODataFunctions<T>; }) => Renderable): ApplyExpression<T>; bottomSum(opts: (e: { o: ODataOperators<T>; f: ODataFunctions<T>; }) => Renderable): ApplyExpression<T>; bottomPercent(opts: (e: { o: ODataOperators<T>; f: ODataFunctions<T>; }) => Renderable): ApplyExpression<T>; identity(opts: (e: { o: ODataOperators<T>; f: ODataFunctions<T>; }) => Renderable): ApplyExpression<T>; concat(opts: (e: { o: ODataOperators<T>; f: ODataFunctions<T>; }) => Renderable): ApplyExpression<T>; groupBy(props: (e: { rollup: (f: any) => any; }) => any | any[], opts?: (e: GroupByTransformations<T>) => GroupByTransformations<T>): ApplyExpression<T>; filter(opts: (e: { t: T; e: (connector?: FilterConnector) => FilterExpression<T>; o: ODataOperators<T>; f: ODataFunctions<T>; }) => FilterExpression<T>): ApplyExpression<T>; expand(opts: (e: { o: ODataOperators<T>; f: ODataFunctions<T>; }) => Renderable): ApplyExpression<T>; search(opts: (e: { t: T; e: (connector?: SearchConnector) => SearchExpression<T>; o: ODataOperators<T>; f: ODataFunctions<T>; }) => SearchExpression<T>): ApplyExpression<T>; compute(opts: (e: { o: ODataOperators<T>; f: ODataFunctions<T>; }) => Renderable): ApplyExpression<T>; }