@trlogic/tracker-web
Version:
Formica Tracker Web
13 lines (12 loc) • 792 B
TypeScript
/**
* 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;
}