String Array Property Condition
A string array property condition is meant to evaluate a Property of type stringArray
– so an array of string values.
Schema
{
"propertyId": "23jfsaa6ads",
// Type specific attributes
"type": "stringArray",
"propertyArrayQuantifier": "some",
"operator": "endsWith",
"operandsQuantifier": "some",
"operands": ["@acme.com", "@internal.acme.com"]
}
Attributes
type
- Type:
"stringArray"
- Required
Denotes the condition object as a string array property condition.
propertyArrayQuantifier
- Type:
Quantifier
- Required
Tells the system how many of the property array values need to evaluate to true based on the operator
, operandsQuantifier
, and operands
.
operator
- Type:
StringArrayConditionOperators
- Required
The operator to use when comparing an operand of the operands
array against one of the property array values.
operandsQuantifier
- Type:
Quantifier
- Required
Tells the system how many operands of the operands
array one of the property array values has to match against.
operands
- Type:
string[]
- Required
The operands/values to compare a property array value against based on the propertyArrayQuantifier
, operator
and operandsQuantifier
.
Utility Types
StringArrayConditionOperator
Type: "equals" | "doesNotEqual" | "startsWith" | "doesNotStartWith" | "endsWith" | "doesNotEndWith" | "isBlank" | "isNotBlank" | "matchesRegex" | "doesNotMatchRegex" | "hasElements" | "hasNoElements"
Operators and what they do:
"equals"
: Checks if a property array value equals an operand based on strict equality (JS===
)."doesNotEqual"
: Negation of"equals"
."startsWith"
: Checks if a property array value starts with an operand (JSvalue.startsWith(operand)
)."doesNotStartWith"
: Negation of"startsWith"
."endsWith"
: Checks if a property array value ends with an operand (JSvalue.endsWith(operand)
)."doesNotEndWith"
: Negation of"endsWith"
."isBlank"
: Checks if a trimmed property array value has a length of 0 (JSvalue.trim().length === 0
)."isNotBlank"
: Negation of"isBlank"
."matchesRegex"
: Checks if a property array value matches a regex denoted by an operand (JSnew RegExp (operand).test(value)
)."doesNotMatchRegex"
: Negation of"matchesRegex"
."hasElements"
: Evaluates totrue
, if the property array has at least one element/value. Does not look atpropertyArrayQuantifier
,operandsQuantifier
, andoperands
."hasNoElements"
: Evaluates totrue
, if the property array no elements/values. Does not look atpropertyArrayQuantifier
,operandsQuantifier
, andoperands
.
Quantifier
Type: "some" | "every" | "notAny" | "notEvery"
Quantifiers and what they do:
"some"
: Applies JS arraysome
logic to property array values or operands array values. Example:operands.some(operand => /* ... */)
"every"
: Applies JS arrayevery
logic to property array values or operands array values. Example:operands.every(operand => /* ... */)
"notAny"
: Applies negation to JS arraysome
logic to property array values or operands array values. Example:!operands.some(operand => /* ... */)
"notEvery"
: Applies negation to JS arrayevery
logic to property array values or operands array values. Example:!operands.every(operand => /* ... */)