@getjones/test-infra 2.10.7 → 2.10.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getjones/test-infra",
3
- "version": "2.10.7",
3
+ "version": "2.10.8",
4
4
  "description": "Providing internal and openapi interface",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -39,8 +39,7 @@ const POLICY_NAMES_MAP = {
39
39
  agreement: 'Agreement',
40
40
  certificateHolder: 'Certificate Holder',
41
41
  additionalInformation: 'Additional Information',
42
- additionalInsured: 'Additional Insured',
43
- businessInterruptionIncomeInsurance: 'Business Interruption / Income Insurance'
42
+ additionalInsured: 'Additional Insured'
44
43
  };
45
44
 
46
45
  const ATTRIBUTE_NAMES_MAP = {
@@ -58,10 +57,7 @@ const ATTRIBUTE_NAMES_MAP = {
58
57
  amRating: 'AMBestRating',
59
58
  cancellationTerms: 'cancellationTerms',
60
59
  coiAuthentication: 'COIauthentication',
61
- signature: 'signature',
62
- indemnityPeriod: 'Indemnity Period',
63
- actualLossSustained: 'Actual Loss Sustained',
64
- extraExpense: 'Extra Expense'
60
+ signature: 'signature'
65
61
  };
66
62
 
67
63
  const auditTriggerType = {
@@ -4,6 +4,10 @@ const { UpdateRequirementModel } = require('../models/update.requirement.model')
4
4
  const { AttributeModel, PolicyModel, AttributeTypes } = require('../models/policy.model');
5
5
  const { CreateRequirementModel } = require('../models/create.requirement.model');
6
6
 
7
+ const customAttributes = {
8
+ Including: 'multiple'
9
+ };
10
+
7
11
  const convertNumericValuesToNumberType = function(value) {
8
12
  if (dataTypeUtils.isString(value) && value.startsWith('$')) {
9
13
  return Number(value.replace(/[$,]/g, ''));
@@ -46,10 +50,12 @@ const parseRequirementConfig = function(config) {
46
50
 
47
51
  if (dataTypeUtils.isObject(config[policy])) {
48
52
  for (const attribute in config[policy]) {
53
+ const attributeName = customAttributes[attribute] || attribute;
54
+
49
55
  attributes.push({
50
- name: attribute,
56
+ name: attributeName,
51
57
  type: preparePolicyAttributesTypes(config[policy][attribute]),
52
- values: attribute === 'Including' ?
58
+ values: attributeName === customAttributes.Including ?
53
59
  config[policy][attribute].split(', ') :
54
60
  [convertNumericValuesToNumberType(config[policy][attribute])]
55
61
  });