@lendi/integrations-transform 1.7.9 → 1.8.0

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.
@@ -33,6 +33,7 @@ function deepMergeApplication(existingApplication, newApplication, options = {})
33
33
  'RealEstateAsset',
34
34
  'RelatedCompany',
35
35
  'RelatedPerson',
36
+ 'TrustApplicant',
36
37
  ];
37
38
  if (secondIDEnabled) {
38
39
  listsWithUniqueIds.push('ProofOfIdentity');
@@ -47,6 +48,12 @@ function deepMergeApplication(existingApplication, newApplication, options = {})
47
48
  const listsWithXResidentialAddress = ['PriorAddress'];
48
49
  // Array fields with @x_Guarantor
49
50
  const listsWithXGuarantor = ['Guarantor'];
51
+ // Array fields with @x_Trustee
52
+ const listsWithXTrustee = ['Trustee'];
53
+ // Array fields with @x_Beneficiary
54
+ const listsWithXBeneficiary = ['Beneficiary'];
55
+ // Array fields with @x_BeneficialOwner
56
+ const listsWithXBeneficialOwner = ['BeneficialOwner'];
50
57
  // Curried function which takes a uniqueKey and returns a function which will either replace
51
58
  // or merge the item in the array based on the uniqueKey
52
59
  const mergeItems = (uniqueKey) => {
@@ -78,6 +85,15 @@ function deepMergeApplication(existingApplication, newApplication, options = {})
78
85
  if (listsWithXGuarantor.find((item) => item === key)) {
79
86
  return mergeItems('@x_Guarantor');
80
87
  }
88
+ if (listsWithXTrustee.find((item) => item === key)) {
89
+ return mergeItems('@x_Trustee');
90
+ }
91
+ if (listsWithXBeneficiary.find((item) => item === key)) {
92
+ return mergeItems('@x_Beneficiary');
93
+ }
94
+ if (listsWithXBeneficialOwner.find((item) => item === key)) {
95
+ return mergeItems('@x_BeneficialOwner');
96
+ }
81
97
  return mergeItems(key);
82
98
  },
83
99
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/integrations-transform",
3
- "version": "1.7.9",
3
+ "version": "1.8.0",
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",