Kronos-Integration / interceptor-object-data-processor-row

checks object stream coming from a data import
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

npm License bundlejs downloads GitHub Issues Build Status Styled with prettier Commitizen friendly Known Vulnerabilities Coverage Status

API

Table of Contents

stream

This module will turn an array of tokens into an object.

constructor

Parameters

addChecks

Add checks to the array of checks to be executed

Parameters

_transform

Reads the stream data and split it into lines.

Parameters

getCheckInfo

Extracts the type value and the severity of a given check name from the checkProperty

Parameters

Returns any infoObject An object containing the boolean value and the severity

createChecks

Creates the field splitter for a field, if this field is a multi field

Parameters

createSplitterForField

Create the field spliter for a given field definition The field must be a multiField.

Parameters

createChecks

Creates the checks for checking boolean values

Parameters

createChecks

Create a function which checks that the value in a field is a valid boolean value. If the value is boolean value, the boolean equivalent will be stored in the content hash. Otherwise, the default value for this field will be stored in the content hash instead.

Parameters

createChecks

Checks a given string value. Checks the length and if it matches a given regular expression

Parameters

Returns any checks A list of checks to be perfomred

getProperty

Some of the values may be directly the value or could be an object with different addidtional properties. So to get the expected value it must be checked if the property is an object or not. If it is an object the real value is stored in the object under the property 'val'. See the json fieldDefinition.

Parameters

getSeverity

Returns the severity for a check property. The severity may be defined globaly for the complete field, but also may be defined on a per check basis

Parameters

getFieldType

Returns the severity for a check property. The severity may be defined globaly for the complete field, but also may be defined on a per check basis

Parameters

createChecks

Creates the checks which are common to each file type

Parameters

content

Just check if for mandatory fields the value is given

Parameters

createChecks

Creates the date checks for a date field

Parameters

createDateChecks

Create a function which checks that the value in a field is a valid boolean value. If the value is boolean value, the boolean equivalent will be stored in the content hash. Otherwise, the default value for this field will be stored in the content hash instead.

Parameters

Returns any function A function which will check a given content hash.

errorInfo


Checks that the given value is a valid date

Parameters

Returns any error an error object if the given value is not a valid date***

push

Checks that the given value is not before the given min date

Parameters

Returns any error an error object if the given value is not a valid date

push

Checks that the given value is not before the given min date

Parameters

Returns any error an error object if the given value is not a valid date

push


Checks that the given value is a valid number in the right type (number, integer, float)

Parameters

Returns any error an error object if the given value is not a valid number***

push

Checks that the given value is not before the given min value

Parameters

Returns any error an error object if the given value is not a valid date

push

Checks that the given value is not before the given min date

Parameters

Returns any error an error object if the given value is not a valid date

push

Changes the case of a string to the given value (upper, lower)

push

Checks that the given string has a minimum length

Parameters

Returns any error an error object if the given value is too short

push

Checks that the given string does not exeed the maximum length

Parameters

Returns any error an error object if the given value is too long

push

Checks that the given string has a minimum length

Parameters

Returns any error an error object if the given value is not a valid date

createChecks

Creates the field splitter for a field, if this field is a multi field

Parameters

parseNumberString

Parses a string and try to convert it in a valid number. If the string does not match a valid number it will return the error message, else the parsed number.

Parameters

createChecks

Creates the field splitter for a field, if this field is a multi field

Parameters

createCheckEmail

Checks if a given string looks like a valid email.

Parameters

Returns any The check

createCheckDefaultValue

Set the default value if no value is there

Parameters

Returns any checks A list of checks to be perfomred

createChecksString

Checks a given string value. Checks the length and if it matches a given regular expression

Parameters

Returns any checks A list of checks to be perfomred

RowProcessorInterceptor

Extends Interceptor

This interceptor cares about the handling of the messages. It will add the hops and copies the messages

Parameters