@lendi/integrations-transform 1.2.8 → 1.3.2
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/lib/schemas/application-workflow-event.json +1 -6
- package/lib/transform-events/transform-application-workflow.d.ts +3 -3
- package/lib/transform-events/transform-application-workflow.js +2 -2
- package/lib/transform-events/transform-income.js +1 -1
- package/lib/transform-events/transform-liability.js +1 -0
- package/lib/types/events/application-workflow.d.ts +2 -2
- package/package.json +2 -2
|
@@ -218,12 +218,7 @@
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
},
|
|
221
|
-
"
|
|
222
|
-
{ "required": ["applicationId", "stage", "status", "brokerAuditReview"] },
|
|
223
|
-
{
|
|
224
|
-
"required": ["applicationId", "stage", "status", "applicationStage", "applicationStatus", "brokerAuditReview"]
|
|
225
|
-
}
|
|
226
|
-
]
|
|
221
|
+
"required": ["applicationId", "stage", "status", "brokerAuditReview"]
|
|
227
222
|
}
|
|
228
223
|
},
|
|
229
224
|
"type": "object",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PayloadClass as ApplicationWorkflow } from '../types/events/application-workflow';
|
|
2
2
|
/**
|
|
3
|
-
* Generates a partial internal request from a partial
|
|
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.
|
|
7
7
|
*/
|
|
8
|
-
export declare function transformApplicationWorkflow(applicationWorkflow:
|
|
8
|
+
export declare function transformApplicationWorkflow(applicationWorkflow: ApplicationWorkflow): {};
|
|
@@ -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
|
|
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"),
|
|
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"),
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Application workflow
|
|
3
3
|
*/
|
|
4
4
|
export interface ApplicationWorkflow {
|
|
5
|
-
payload:
|
|
5
|
+
payload: PayloadClass;
|
|
6
6
|
type: Type;
|
|
7
7
|
/**
|
|
8
8
|
* schema version
|
|
9
9
|
*/
|
|
10
10
|
version: string;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface PayloadClass {
|
|
13
13
|
/**
|
|
14
14
|
* UUID of the Application
|
|
15
15
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lendi/integrations-transform",
|
|
3
|
-
"version": "1.2
|
|
3
|
+
"version": "1.3.2",
|
|
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.
|
|
24
|
+
"@lendi/integrations-credit-protocol": "1.15.6",
|
|
25
25
|
"@lendi/integrations-protocol": "2.5.4",
|
|
26
26
|
"clean-deep": "^3.4.0",
|
|
27
27
|
"date-fns": "2.19.0",
|