@lendi/integrations-transform 1.3.0 → 1.3.4

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.
@@ -1,6 +1,6 @@
1
1
  import { PayloadClass as ApplicationWorkflow } from '../types/events/application-workflow';
2
2
  /**
3
- * Generates a partial internal request from a partial opportunity event.
3
+ * Generates a partial internal request from a partial application workflow event.
4
4
  *
5
5
  * @return partialApplication: A partial internal request.
6
6
  * @param applicationWorkflow: ApplicationWorkflow object.
@@ -4,7 +4,7 @@ exports.transformApplicationWorkflow = void 0;
4
4
  var application_paths_1 = require("@lendi/integrations-protocol/lib/utils/application-paths");
5
5
  var lodash_1 = require("lodash");
6
6
  /**
7
- * Generates a partial internal request from a partial opportunity event.
7
+ * Generates a partial internal request from a partial application workflow event.
8
8
  *
9
9
  * @return partialApplication: A partial internal request.
10
10
  * @param applicationWorkflow: ApplicationWorkflow object.
@@ -20,7 +20,7 @@ function transformApplicationWorkflow(applicationWorkflow) {
20
20
  if (opportunityMapping[key]) {
21
21
  if (key === 'stage') {
22
22
  (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.Instructions, ".@UniqueID"), "".concat(applicationWorkflow.applicationId, "-stage"));
23
- (0, lodash_1.set)(partialApplication, "".concat(opportunityMapping[key], ".@Details"), (0, lodash_1.capitalize)(value) || 'Unknown');
23
+ (0, lodash_1.set)(partialApplication, "".concat(opportunityMapping[key], ".@Details"), value || 'Unknown');
24
24
  }
25
25
  else {
26
26
  (0, lodash_1.set)(partialApplication, opportunityMapping[key], value);
@@ -203,7 +203,7 @@ function createRentalIncome(amount, frequency, ownership) {
203
203
  for (var _i = 0, ownership_1 = ownership; _i < ownership_1.length; _i++) {
204
204
  var owner = ownership_1[_i];
205
205
  var percent = owner.percent, applicantId = owner.applicantId;
206
- var ownerAmount = amount * percent;
206
+ var ownerAmount = (0, round_decimal_1.roundDecimal)(amount * percent);
207
207
  rentalIncome.push({
208
208
  '@Frequency': enum_mappings_1.rentalIncomeFrequencyMapping[frequency],
209
209
  '@RentalAmount': ownerAmount,
@@ -26,6 +26,7 @@ function transformLiability(_a) {
26
26
  annualInterestRate: "".concat(application_paths_1.paths.Liability, ".@AnnualInterestRate"),
27
27
  id: "".concat(application_paths_1.paths.Liability, ".@UniqueID"),
28
28
  clearingFromThisLoan: "".concat(application_paths_1.paths.Liability, ".@ClearingFromThisLoan"),
29
+ clearingFromOtherSource: "".concat(application_paths_1.paths.Liability, ".@ClearingFromOtherSource"),
29
30
  description: "".concat(application_paths_1.paths.Liability, ".@Description"),
30
31
  financialInstitution: "".concat(application_paths_1.paths.Liability, ".AccountNumber.@FinancialInstitution"),
31
32
  financialInstitutionAccountNumber: "".concat(application_paths_1.paths.Liability, ".AccountNumber.@AccountNumber"),
@@ -49,7 +50,7 @@ function transformLiability(_a) {
49
50
  // Currently repayments is not captured for store cards and credit cards, default the monthly repayment amount to
50
51
  // the credit limit with interest rate of 3%.
51
52
  if ([public_liability_1.LiabilityType.CreditCard, public_liability_1.LiabilityType.StoreCard].includes(liability.type) && liability.creditLimit) {
52
- (0, lodash_1.set)(partialApplication, liabilityMapping.repaymentAmount, liability.creditLimit * 0.03);
53
+ (0, lodash_1.set)(partialApplication, liabilityMapping.repaymentAmount, (0, round_decimal_1.roundDecimal)(liability.creditLimit * 0.03));
53
54
  (0, lodash_1.set)(partialApplication, liabilityMapping.repaymentFrequency, lixi_internal_request_1.List.Monthly);
54
55
  }
55
56
  // Default clearingFromThisLoan to No if the value is not present in the event.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/integrations-transform",
3
- "version": "1.3.0",
3
+ "version": "1.3.4",
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,7 +21,7 @@
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.15.6",
24
+ "@lendi/integrations-credit-protocol": "1.15.8",
25
25
  "@lendi/integrations-protocol": "2.5.4",
26
26
  "clean-deep": "^3.4.0",
27
27
  "date-fns": "2.19.0",
@@ -30,11 +30,8 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@lendi/prettier-config": "^1.0.0",
33
- "@lendi/tslint-config": "^1.1.0",
34
33
  "@lendi/typescript-config": "^2.0.0",
35
- "@types/convict": "^4.2.1",
36
- "@types/delay": "^3.1.0",
37
- "@types/jest": "^24.0.21",
34
+ "@types/jest": "^26.0.14",
38
35
  "@types/lodash": "^4.14.141",
39
36
  "@types/node": "^12.12.5",
40
37
  "@types/pino": "^6.3.3",
@@ -50,7 +47,6 @@
50
47
  "jest": "^26.6.3",
51
48
  "jest-buildkite-reporter": "^0.2.8",
52
49
  "jest-sonar-reporter": "^2.0.0",
53
- "lint-staged": "^9.4.1",
54
50
  "path": "^0.12.7",
55
51
  "prettier": "^2.2.1",
56
52
  "prettier-check": "^2.0.0",
@@ -59,8 +55,6 @@
59
55
  "sinon": "^7.4.2",
60
56
  "ts-jest": "^26.5.0",
61
57
  "ts-node": "^8.4.1",
62
- "tslint": "^5.20.0",
63
- "tslint-config-prettier": "^1.18.0",
64
58
  "typedoc": "^0.20.36",
65
59
  "typescript": "^4.1.3"
66
60
  },