UNPKG

@trlogic/tracker-web

Version:
13 lines (12 loc) 792 B
/** * Filter operations for tracker validation */ export type FilterOperator = "isEquals" | "isEqualsIgnoreCase" | "notEquals" | "notEqualsIgnoreCase" | "isContains" | "isContainsIgnoreCase" | "notContains" | "notContainsIgnoreCase" | "isStartsWith" | "isStartsWithIgnoreCase" | "notStartsWith" | "notStartsWithIgnoreCase" | "isEndsWith" | "isEndsWithIgnoreCase" | "notEndsWith" | "notEndsWithIgnoreCase" | "isRegexMatch" | "isRegexMatchIgnoreCase" | "notRegexMatch" | "notRegexMatchIgnoreCase" | "lessThan" | "lessThanOrEquals" | "greaterThan" | "greaterThanOrEquals"; export interface Filter { left: string; operator: FilterOperator; right: string; } export declare class FilterCalculator { static calculate(filter: Filter, variables: Record<string, unknown>): boolean; }