@lendi/integrations-transform 1.2.2 → 1.2.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.
@@ -22,7 +22,7 @@ export declare function transformIncome(payload: IncomePayload, applicantId?: st
22
22
  * @param frequency Frequency
23
23
  * @param ownership Owners.
24
24
  */
25
- export declare function createRentalIncome(amount: number, frequency: Frequency, ownership: Ownership[]): RentalIncome[];
25
+ export declare function createRentalIncome(amount: number, frequency: Frequency, ownership?: Ownership[]): RentalIncome[];
26
26
  export interface SelfEmploymentIncomeMapping {
27
27
  year: string;
28
28
  companyProfitBeforeTax: string;
@@ -194,6 +194,7 @@ exports.transformIncome = transformIncome;
194
194
  * @param ownership Owners.
195
195
  */
196
196
  function createRentalIncome(amount, frequency, ownership) {
197
+ if (ownership === void 0) { ownership = []; }
197
198
  if (frequency === public_income_1.Frequency.Quarterly) {
198
199
  amount = Math.ceil(amount / 3);
199
200
  frequency = public_income_1.Frequency.Monthly;
@@ -93,6 +93,10 @@ function findArrayItemAndMerge(existingItem, newItem, uniqueKey, options) {
93
93
  // Income array in CompanyApplicant
94
94
  return newItem;
95
95
  }
96
+ if (uniqueKey === 'Income' && existingItem && existingItem.some(function (item) { return item.BusinessActivityStatement; })) {
97
+ // Income array in CompanyApplicant for Low Doc applications
98
+ return newItem;
99
+ }
96
100
  // Copying existing array
97
101
  var mergedArray = existingItem.slice();
98
102
  // Searching whether item in the new array exists in existing array
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/integrations-transform",
3
- "version": "1.2.2",
3
+ "version": "1.2.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",
@@ -21,11 +21,10 @@
21
21
  "url": "git+ssh://git@bitbucket.org/lendi-dev/integrations-shared-packages.git"
22
22
  },
23
23
  "dependencies": {
24
- "@lendi/integrations-credit-protocol": "1.14.9",
25
- "@lendi/integrations-protocol": "2.5.3",
24
+ "@lendi/integrations-credit-protocol": "1.15.4",
25
+ "@lendi/integrations-protocol": "2.5.4",
26
26
  "clean-deep": "^3.4.0",
27
27
  "date-fns": "2.19.0",
28
- "dd-trace": "^0.28.1",
29
28
  "lodash": "^4.17.15",
30
29
  "pino": "^6.7.0"
31
30
  },
@@ -34,7 +33,6 @@
34
33
  "@lendi/tslint-config": "^1.1.0",
35
34
  "@lendi/typescript-config": "^2.0.0",
36
35
  "@types/convict": "^4.2.1",
37
- "@types/dd-trace": "^0.9.0",
38
36
  "@types/delay": "^3.1.0",
39
37
  "@types/jest": "^24.0.21",
40
38
  "@types/lodash": "^4.14.141",