libs/ngx-pfe/pfe-conditions/rules-evaluator/condition.model.ts
A questionAdvanced config allows it to choose the operator for the list of conditions.
Do not use this type directly. Use the Conditions instead.
Please, use the "PfeAndCondition" or the "PfeOrCondition"
IntelliJ IDEA note:
If your JSON Schema defines conditions as Array<BaseOrExpressionCondition>
(instead of ConditionAdvanced), you can safely ignore the false-positive deprecation
warning emitted by the schema tooling.
No results matching.
Properties |
| conditions |
conditions:
|
Type : ExpressionCondition[]
|
| operator |
operator:
|
Type : OPERATORS
|
import { JsonPathExpression } from '../../models/jsonpath-expression-type.model';
export type RulesEvaluatorConditions = ConditionAdvanced | ExpressionCondition[];
/**
* @deprecated
* @deprecationMessage Please, use the "PfeAndCondition" or the "PfeOrCondition"
*/
export enum OPERATORS {
AND = 'AND',
OR = 'OR',
}
/**
* A questionAdvanced config allows it to choose the operator for the list of conditions.
*
* Do not use this type directly. Use the {@link Conditions} instead.
*
* @deprecated
* @deprecationMessage Please, use the "PfeAndCondition" or the "PfeOrCondition"
*
* IntelliJ IDEA note:
* If your JSON Schema defines `conditions` as `Array<BaseOrExpressionCondition>`
* (instead of `ConditionAdvanced`), you can safely ignore the false-positive deprecation
* warning emitted by the schema tooling.
*/
export interface ConditionAdvanced {
operator: OPERATORS;
conditions: ExpressionCondition[];
}
/**
* A condition to be evaluated by the {@link PfeRulesEvaluator}
*
* Do not use this type directly. Use the {@link Conditions} instead.
*/
export interface ExpressionCondition {
/**
*
* To evaluate a JsonPath expression, put curly braces {} around the expression, like {$.bffCreateClaim.claimNumber}.
* After the JsonPath evaluation the complete expressions is evaluated. Examples:
*
* !{$.undefinedKey}
* {$.nine} > {$.negativeValue} || {$.KeyWest} == 99999
* {$.questionContainerTest..[?(@.value == "LEFT_Q1")].value} == "LEFT_Q1"
*
* If the expression evaluates to an object, a random number is generated instead which then evaluates to true.
*/
expression: JsonPathExpression | boolean | number;
}