UNPKG

@o3r/rules-engine

Version:

This module provides a rule engine that can be executed on your Otter application to customize your application (translations, placeholders and configs) based on a json file generated by your CMS.

119 lines 5.06 kB
import { Operator, SupportedSimpleTypes } from '../operator.interface'; /** * Check if any of the variable's value is equal to a specific value * @title contains */ export declare const arrayContains: Operator<SupportedSimpleTypes[], SupportedSimpleTypes>; /** * Check if the specified text value is included in the text variable * @title contains */ export declare const stringContains: Operator<string, string>; /** * Check if every value of the variable is different from a specific value * @title does not contain */ export declare const notArrayContains: Operator<SupportedSimpleTypes[], SupportedSimpleTypes>; /** * Check if the specified text value is not included in the text variable * @title does not contain */ export declare const notStringContains: Operator<string, string>; /** * Check if every value of the variable equals a specific value * @title all equal to */ export declare const allEqual: Operator<SupportedSimpleTypes[], SupportedSimpleTypes>; /** * Check if every numerical value of the variable is greater than a specific value * @title all > */ export declare const allGreater: Operator<SupportedSimpleTypes[], number | string>; /** * Check if every value of the variable is in a specific list * @title all in */ export declare const allIn: Operator<SupportedSimpleTypes[], SupportedSimpleTypes[]>; /** * Check if every value of the variable is not in a specific list * @title none in */ export declare const allNotIn: Operator<SupportedSimpleTypes[], SupportedSimpleTypes[]>; /** * Check if every numerical value of the variable is lower than a specific value * @title all < */ export declare const allLower: Operator<number[], number | string>; /** * Check if every string value of the variable matches a specific pattern * @title all match */ export declare const allMatch: Operator<string[], string>; /** * Check if every value of the variable is included in a specified range * @title all between */ export declare const allRangeNumber: Operator<number[], [number | string, number | string]>; /** * Check if at least one of the values of the variable equals a specific value * @title one equal to */ export declare const oneEquals: Operator<SupportedSimpleTypes[], SupportedSimpleTypes>; /** * Check if one of the values of the variable is greater than a specific value * @title one > */ export declare const oneGreater: Operator<number[], number | string>; /** * Check if at least one of the values of the variable is equal to one in a specified list * @title one in */ export declare const oneIn: Operator<SupportedSimpleTypes[], SupportedSimpleTypes[]>; /** * Check if one of the values of the variable is lower than a specific value * @title one < */ export declare const oneLower: Operator<number[], number | string>; /** * Check if one of the values of the variable matches a specific pattern * @title one matches */ export declare const oneMatches: Operator<string[], string>; /** * Check if one of the values of the variable is included in a specified range * @title one between */ export declare const oneRangeNumber: Operator<number[], [number | string, number | string]>; /** * Check if the number of values of the variable is equal to a specific value * @title number of = */ export declare const lengthEquals: Operator<any[], number | string>; /** * Check if the number of values of the variable is different from a specific value * @title number of ≠ */ export declare const lengthNotEquals: Operator<any[], number | string>; /** * Check if the number of values of the variable is lower or equal to a specific value * @title number of ≤ */ export declare const lengthLessThanOrEquals: Operator<any[], number | string>; /** * Check if the number of values of the variable is lower than a specific value * @title number of < */ export declare const lengthLessThan: Operator<any[], number | string>; /** * Check if the number of values of the variable is greater or equal to a specific value * @title number of ≥ */ export declare const lengthGreaterThanOrEquals: Operator<any[], number | string>; /** * Check if the number of values of the variable is greater than a specific value * @title number of > */ export declare const lengthGreaterThan: Operator<any[], number | string>; /** List of all default array operators */ export declare const arrayBasedOperators: (Operator<SupportedSimpleTypes[], SupportedSimpleTypes, SupportedSimpleTypes[], SupportedSimpleTypes> | Operator<string, string, string, string> | Operator<SupportedSimpleTypes[], string | number, SupportedSimpleTypes[], string | number> | Operator<SupportedSimpleTypes[], SupportedSimpleTypes[], SupportedSimpleTypes[], SupportedSimpleTypes[]> | Operator<number[], string | number, number[], string | number> | Operator<string[], string, string[], string> | Operator<number[], [string | number, string | number], number[], [string | number, string | number]> | Operator<any[], string | number, any[], string | number>)[]; //# sourceMappingURL=array-based.operators.d.ts.map