import moment from 'moment'; import { Field, StringFilterFunction, BooleanFilterFunction, NumberFilterFunction, FilterFunctionPrimitiveParameterType, FieldType, CollectionField } from '../odata-common'; import { CollectionFilterFunction } from '../odata-common/filter/collection-filter-function'; import { Entity } from './entity'; /** * Build a filter function to test whether a string is a substring of the other. Evaluates to boolean. * @param substr - The substring to test for. This can either be a string, a reference to a field or another filter function. * @param str - The string to test. This can either be a string, a reference to a field or another filter function. * * @returns The newly created filter function */ export declare function contains(substr: string | Field | StringFilterFunction, str: string | Field | StringFilterFunction): BooleanFilterFunction; /** * Build a filter function to test whether a string matches a pattern. Evaluates to boolean. * @param str - The string to get the index from. This can either be a string, a reference to a field or another filter function. * @param regex - The pattern to test against. This should be a regular expression as a string. * @returns The newly created filter function */ export declare function matchesPattern(str: string | Field | StringFilterFunction, regex: string): BooleanFilterFunction; /** * Build a filter function to get the fractional seconds of a date. Evaluates to decimal. * @param date - The date to get the fractional seconds for. This can either be a date (Moment) or a reference to a field. * @returns The newly created filter function */ export declare function fractionalSeconds(date: moment.Moment | Field): NumberFilterFunction; /** * Build a filter function to get the signed number of minutes in the time zone offset. Evaluates to int. * @param date - The date to get the offset minutes for. This can either be a date (Moment) or a reference to a field. * @returns The newly created filter function */ export declare function totalOffsetMinutes(date: moment.Moment | Field): NumberFilterFunction; /** * Build a filter function to get the latest possible point in time. Evaluates to DateTimeOffset. * @returns The newly created filter function */ export declare function maxDateTime(): NumberFilterFunction; /** * Build a filter function to get the earliest possible point in time. Evaluates to DateTimeOffset. * @returns The newly created filter function */ export declare function minDateTime(): NumberFilterFunction; /** * Build a filter function to get the current point in time. Evaluates to DateTimeOffset. * @returns The newly created filter function */ export declare function now(): NumberFilterFunction; /** * Build a filter function to test whether a set is a subset of the other, i. e. whether the second parameter can be transformed into the first by reordering and / or removing items. Evaluates to boolean. * @param subset - The subset to test for. This can either be an array, a reference to a field or another filter function. * @param set - The set to test. This can either be an array, a reference to a field or another filter function. * * @returns The newly created filter function */ export declare function hasSubset(subset: ParamT[] | CollectionField | CollectionFilterFunction, set: ParamT[] | CollectionField | CollectionFilterFunction): BooleanFilterFunction; /** * Build a filter function to test whether a set is a subsequence of the other, i. e. whether the second parameter can be transformed into the first by removing items. Evaluates to boolean. * @param subsequence - The subsequence to test for. This can either be an array, a reference to a field or another filter function. * @param sequence - The sequence to test. This can either be an array, a reference to a field or another filter function. * * @returns The newly created filter function */ export declare function hasSubsequence(subsequence: ParamT[] | Field | CollectionFilterFunction, sequence: ParamT[] | Field | CollectionFilterFunction): BooleanFilterFunction; /** * TODO: totalseconds, time */ /** * OData v4 specific filter functions */ export declare const filterFunctions: { contains: typeof contains; matchesPattern: typeof matchesPattern; fractionalSeconds: typeof fractionalSeconds; totalOffsetMinutes: typeof totalOffsetMinutes; maxDateTime: typeof maxDateTime; minDateTime: typeof minDateTime; now: typeof now; hasSubset: typeof hasSubset; hasSubsequence: typeof hasSubsequence; endsWith: typeof import("../odata-common").endsWith; startsWith: typeof import("../odata-common").startsWith; length: typeof import("../odata-common").length; indexOf: typeof import("../odata-common").indexOf; substring: typeof import("../odata-common").substring; toLower: typeof import("../odata-common").toLower; toUpper: typeof import("../odata-common").toUpper; trim: typeof import("../odata-common").trim; concat: typeof import("../odata-common").concat; round: typeof import("../odata-common").round; floor: typeof import("../odata-common").floor; ceiling: typeof import("../odata-common").ceiling; day: typeof import("../odata-common").day; hour: typeof import("../odata-common").hour; minute: typeof import("../odata-common").minute; month: typeof import("../odata-common").month; second: typeof import("../odata-common").second; year: typeof import("../odata-common").year; isOf: typeof import("../odata-common").isOf; }; export { filterFunctions as filterFunctionsV4 }; //# sourceMappingURL=filter-functions.d.ts.map