@lendi/integrations-transform 1.8.5 → 1.8.6

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/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 1.8.6
2
+
3
+ Changes
4
+ * Update `merge-application` to merge the company applicant directors
5
+
1
6
  # 1.8.5
2
7
 
3
8
  Changes
@@ -54,6 +54,8 @@ function deepMergeApplication(existingApplication, newApplication, options = {})
54
54
  const listsWithXBeneficiary = ['Beneficiary'];
55
55
  // Array fields with @x_BeneficialOwner
56
56
  const listsWithXBeneficialOwner = ['BeneficialOwner'];
57
+ // Array fields with @x_Director
58
+ const listsWithXDirector = ['Director'];
57
59
  // Curried function which takes a uniqueKey and returns a function which will either replace
58
60
  // or merge the item in the array based on the uniqueKey
59
61
  const mergeItems = (uniqueKey) => {
@@ -94,6 +96,9 @@ function deepMergeApplication(existingApplication, newApplication, options = {})
94
96
  if (listsWithXBeneficialOwner.find((item) => item === key)) {
95
97
  return mergeItems('@x_BeneficialOwner');
96
98
  }
99
+ if (listsWithXDirector.find((item) => item === key)) {
100
+ return mergeItems('@x_Director');
101
+ }
97
102
  return mergeItems(key);
98
103
  },
99
104
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/integrations-transform",
3
- "version": "1.8.5",
3
+ "version": "1.8.6",
4
4
  "description": "Library for kafka event data transforming",
5
5
  "author": "Integrations <integrations@lendi.com.au>",
6
6
  "homepage": "https://bitbucket.org/lendi-dev/integrations-shared-packages#readme",