import { IZFilterMetadata, IZFilterSubject } from './filter-subject.mjs'; /** * The operators for a {@link IZFilterBinary} filter. */ export declare enum ZOperatorBinary { /** * Equals */ Equal = "eq", /** * Not equals. */ NotEqual = "neq", /** * Less than or equal to. */ LessThanEqualTo = "lteq", /** * Less than. */ LessThan = "lt", /** * Greater than or equal to. */ GreaterThanEqualTo = "gteq", /** * Greater than. */ GreaterThan = "gt", /** * Like (Contains) */ Like = "like", /** * Starts with */ StartsWith = "sw", /** * Ends with */ EndsWith = "ew" } /** * Represents a standard comparison filter between a subject field and a wanted value. */ export interface IZFilterBinary extends IZFilterSubject { /** * The value to sort by. */ value: any; } /** * Represents an object that can build up a binary filter. */ export declare class ZFilterBinaryBuilder { /** * The __type__ identifier for an {@link IZFilterBinary} object. */ static readonly Type = "binary"; private _filter; /** * Initializes a new instance of this object. */ constructor(); /** * Sets the subject. * * @param val - * The value to set. * * @returns * This object. */ subject(val: string): this; /** * Overrides the value. * * @param val - * The value to set. * * @returns * This object. */ value(val: any): this; /** * Sets the operator. * * @param val - * The value to set. * * @returns * This object. */ operator(val: ZOperatorBinary): this; /** * Constructs an equal relationship. * * @returns * This object */ equal: () => this; /** * Constructs a not equal filter. * * @returns * This object */ notEqual: () => this; /** * Constructs a less than filter. * * @returns * This object */ lessThan: () => this; /** * Constructs a greater than filter. * * @returns * This object. */ greaterThan: () => this; /** * Constructs a less than or equal to filter. * * @returns * This object. */ lessThanEqualTo: () => this; /** * Constructs a greater than or equal to filter. * * @returns * This object. */ greaterThanEqualTo: () => this; /** * Constructs a like filter. * * @returns * This object. */ like: () => this; /** * Constructs a starts with filter. * * @returns * This object. */ startsWith: () => this; /** * Constructs an ends with filter. * * @returns * This object. */ endsWith: () => this; /** * Returns a copy of the currently built filter. * * @returns * A copy of the currently built filter. */ build(): IZFilterBinary; } /** * Type guard for determining if a target filter is a binary filter. * * @param filter - * The filter to test. * * @returns * True if filters type is a binary filter. False otherwise. */ export declare function isBinaryFilter(filter: IZFilterMetadata | null | undefined): filter is IZFilterBinary; /** * The possible operators as a constant list. */ export declare const ZOperatorsBinary: ZOperatorBinary[]; /** * Gets whether a candidate string represents a binary operator. * * @returns * Type guard true if candidate is a binary operator, false * otherwise. */ export declare function isBinaryOperator(candidate: string | null | undefined): candidate is ZOperatorBinary; /** * A mapping of comparators that relates a data to a value. */ export declare const ZBinaryComparators: Record boolean>;