Result Templates Helpers

A collection of helpers that can retrieve result properties and create result template conditions to assist in creating result templates.

ResultTemplatesHelpers

getResultProperty

Extract a property from a result object.

Parameters

  • result: Result

  • property: string

Returns unknown

fieldsMustBeDefined

Returns a condition that verifies if a list of fields are defined.

Parameters

  • fieldNames: string[]

    List of the fields that have to be defined.

Returns ResultTemplateCondition

fieldMustMatch

Returns a condition that verifies if a field value contains any of the specified values.

Parameters

  • fieldName: string

    Name of the field to match against.

  • valuesToMatch: string[]

    List of possible values to match.

Returns ResultTemplateCondition

fieldMustNotMatch

Returns a condition that verifies that a field value does not contains any of the specified values.

Parameters

  • fieldName: string

    Name of the field to verify against.

  • blacklistedValues: string[]

    List of all values to blacklist.

Returns ResultTemplateCondition

Recommended Articles