libs/ngx-pfe/pfe-service-activator/params/params.model.ts
Properties |
|
| conditions |
conditions:
|
Type : Conditions
|
| Optional |
ExpressionCondition SyntaxThe conditions use jsonPath (https://github.com/dchester/jsonpath) expressions to select data from the state. There is tooling support available to create and test jsonpath expression. The PFE dev tools also contain a possibility to test and debug expressions against a JSON. The conditions to be evaluated can either be an array of ExpressionCondition or an ConditionAdvanced object. They are an optional attribute. If they are omitted, the result of true is assumed. The selected data can then be compared with certain operators to a second value or a literal. Possible operators are Checks if the two values are equal. Checks that the two values are not equal. Compares the numerical value, to check if one of them is larger or smaller than the other one. The jsonpath syntax has the following basic format: For example: Keys, that contain special characters can be accessed in the following way: Example configuration. |
| id |
id:
|
Type : string
|
|
Id of the path placeholder to replace.
Example: use |
| value |
value:
|
Type : JsonPathExpression
|
|
The jsonpath expression, where the retrieved data should be retrieved from the state. |
import { Conditions } from '../../pfe-conditions/public-api';
import { JsonPathExpression } from '../../models/jsonpath-expression-type.model';
export interface PathParams {
/**
* Id of the path placeholder to replace.
* Example: use `partyId` for `parties/{partyId}/bank-details`.
*/
id: string;
/**
* The jsonpath expression, where the retrieved data should
* be retrieved from the state.
*/
value: JsonPathExpression;
/**
* # ExpressionCondition Syntax
*
* The conditions use jsonPath (https://github.com/dchester/jsonpath) expressions to select data from the state.
* There is tooling support available to create and test jsonpath expression.
* The PFE dev tools also contain a possibility to test and debug expressions against a JSON.
*
* The conditions to be evaluated can either be an array of {@link ExpressionCondition} or an {@link ConditionAdvanced} object.
*
* They are an optional attribute. If they are omitted, the result of true is assumed.
*
* The selected data can then be compared with certain operators to a second value or a literal.
*
* Possible operators are
*
* ```
* ==
* ```
* Checks if the two values are equal.
*
* ```
* !=
* ```
* Checks that the two values are not equal.
*
* ```
* < and >
* ```
* Compares the numerical value, to check if one of them is larger or
* smaller than the other one.
*
* The jsonpath syntax has the following basic format:
*
* ```
* $.<attribute or expression>
* ```
*
* For example:
*
* ```
* $.myCustomTextAreaID
* ```
*
* Keys, that contain special characters can be accessed in the following way:
*
* ```
* $['some-attribute-name']
* ```
*
* Example configuration.
*
*
* ```json
* "pathParams": [
{
"id": "myParam",
"value": "$.some.state.value",
"conditions": [{
"expression": "{$.booleanValueInTheState}"
}]
}
]
* ```
*/
conditions?: Conditions;
}
export interface PfeQueryParam {
/**
* Query parameter name (key) to append to the URL.
*/
name: string;
/**
* The jsonpath expression, from where the data should
* be retrieved in the state.
*/
value: JsonPathExpression;
/**
* # ExpressionCondition Syntax
*
* The conditions use jsonPath (https://github.com/dchester/jsonpath) expressions to select data from the state.
* There is tooling support available to create and test jsonpath expression.
* The PFE dev tools also contain a possibility to test and debug expressions against a JSON.
*
* The conditions to be evaluated can either be an array of {@link ExpressionCondition} or an {@link ConditionAdvanced} object.
*
* They are an optional attribute. If they are omitted, the result of true is assumed.
*
* The selected data can then be compared with certain operators to a second value or a literal.
*
* Possible operators are
*
* ```
* ==
* ```
* Checks if the two values are equal.
*
* ```
* !=
* ```
* Checks that the two values are not equal.
*
* ```
* < and >
* ```
* Compares the numerical value, to check if one of them is larger or
* smaller than the other one.
*
* The jsonpath syntax has the following basic format:
*
* ```
* $.<attribute or expression>
* ```
*
* For example:
*
* ```
* $.myCustomTextAreaId
* ```
*
* Keys, that contain special characters can be accessed in the following way:
*
* ```
* $['some-attribute-name']
* ```
*
* Example configuration.
*
*
* ```json
* "queryParams": [
{
"name": "myParam",
"value": "$.some.state.value",
"conditions": [{
"expression": "{$.booleanValueInTheState}"
}]
}
]
* ```
*/
conditions?: Conditions;
}