@lendi/integrations-transform 1.8.3 → 1.8.5
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 +10 -0
- package/lib/schemas/application-workflow-event.json +28 -1
- package/lib/schemas/public-applicant-event.json +1 -0
- package/lib/transform-events/transform-funding-position.js +13 -0
- package/lib/types/enum-mappings/trust.js +1 -0
- package/lib/types/events/application-workflow.d.ts +20 -20
- package/lib/types/events/application-workflow.js +20 -20
- package/lib/types/events/public-applicant.d.ts +1 -0
- package/lib/types/events/public-applicant.js +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# 1.8.5
|
|
2
|
+
|
|
3
|
+
Changes
|
|
4
|
+
* Update `transfrom-funding-position` to set pledge amount on application if it exists in property
|
|
5
|
+
|
|
6
|
+
# 1.8.4
|
|
7
|
+
|
|
8
|
+
Changes
|
|
9
|
+
* Update `applicant-event` to include SIMPLE_OR_BARE trust type and update mapping in transform
|
|
10
|
+
|
|
1
11
|
# 1.8.3
|
|
2
12
|
|
|
3
13
|
Changes
|
|
@@ -155,7 +155,34 @@
|
|
|
155
155
|
]
|
|
156
156
|
},
|
|
157
157
|
"applicationStatus": {
|
|
158
|
-
"
|
|
158
|
+
"enum": [
|
|
159
|
+
"AMENDMENT_IN_PROGRESS",
|
|
160
|
+
"APPLICATION_ERROR",
|
|
161
|
+
"APPLICATION_RECEIVED",
|
|
162
|
+
"APPROVED_IN_PRINCIPLE",
|
|
163
|
+
"CONDITIONALLY_APPROVED",
|
|
164
|
+
"DECLINED",
|
|
165
|
+
"DISCHARGED",
|
|
166
|
+
"DOCUMENTS_ISSUED",
|
|
167
|
+
"DOCUMENTS_RECEIVED",
|
|
168
|
+
"INFORMATION_PROVIDED_TO_LENDER",
|
|
169
|
+
"LODGEMENT",
|
|
170
|
+
"LOST",
|
|
171
|
+
"MORE_INFORMATION_REQUESTED",
|
|
172
|
+
"ON_HOLD",
|
|
173
|
+
"POST_CONTACT",
|
|
174
|
+
"PRE_CONTACT",
|
|
175
|
+
"PROCESS_PENDING",
|
|
176
|
+
"READY_FOR_SETTLEMENT",
|
|
177
|
+
"REFERRED",
|
|
178
|
+
"REVIEW_INCOMPLETE",
|
|
179
|
+
"SELF_SUBMITTED",
|
|
180
|
+
"SETTLED",
|
|
181
|
+
"SETTLEMENT_BOOKED",
|
|
182
|
+
"UNCONDITIONALLY_APPROVED",
|
|
183
|
+
"UNDER_REVIEW",
|
|
184
|
+
"WAITING_ON_EXCEPTION"
|
|
185
|
+
],
|
|
159
186
|
"description": "Application status in Lendi Group Salesforce"
|
|
160
187
|
},
|
|
161
188
|
"confirmedPrimaryPurpose": {
|
|
@@ -4,6 +4,7 @@ exports.getFees = exports.transformFundingPosition = void 0;
|
|
|
4
4
|
const lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
|
|
5
5
|
const application_paths_1 = require("@lendi/integrations-protocol/lib/utils/application-paths");
|
|
6
6
|
const lodash_1 = require("lodash");
|
|
7
|
+
const uuid_1 = require("uuid");
|
|
7
8
|
const enum_mappings_1 = require("../types/enum-mappings");
|
|
8
9
|
/**
|
|
9
10
|
* GenerateFundingPosition
|
|
@@ -24,6 +25,7 @@ function transformFundingPosition(fundingPosition, uniqueIdSuffix = 'loanDetails
|
|
|
24
25
|
totalDeposit: application_paths_1.paths.ContributionFunds,
|
|
25
26
|
totalCashOut: `${application_paths_1.paths.EquityRelease}.Amount.@LumpSum`,
|
|
26
27
|
fundsRequiredBreakdown: application_paths_1.paths.SummaryFee,
|
|
28
|
+
properties: 'properties',
|
|
27
29
|
};
|
|
28
30
|
for (const [key, value] of Object.entries(fundingPosition)) {
|
|
29
31
|
if (fundingPositionMapping[key]) {
|
|
@@ -46,6 +48,17 @@ function transformFundingPosition(fundingPosition, uniqueIdSuffix = 'loanDetails
|
|
|
46
48
|
case 'fundsRequested':
|
|
47
49
|
(0, lodash_1.set)(partialApplication, fundingPositionMapping[key], Math.round(value));
|
|
48
50
|
break;
|
|
51
|
+
case 'properties':
|
|
52
|
+
const securities = value
|
|
53
|
+
.filter((property) => property.pledgeAmount)
|
|
54
|
+
.map((property) => ({
|
|
55
|
+
'@Limit': property.pledgeAmount,
|
|
56
|
+
'@UniqueID': (0, uuid_1.v4)(),
|
|
57
|
+
'@x_Security': property.id,
|
|
58
|
+
}));
|
|
59
|
+
if (securities.length > 0)
|
|
60
|
+
(0, lodash_1.set)(partialApplication, 'Package.Content.Application.LendingGuarantee[0].Security', securities);
|
|
61
|
+
break;
|
|
49
62
|
default:
|
|
50
63
|
(0, lodash_1.set)(partialApplication, fundingPositionMapping[key], value);
|
|
51
64
|
break;
|
|
@@ -8,6 +8,7 @@ exports.trustTypeMapping = {
|
|
|
8
8
|
[public_applicant_1.TrustType.DiscretionaryTrust]: lixi_internal_request_1.TrustStructureList.Discretionary,
|
|
9
9
|
[public_applicant_1.TrustType.Fixed]: lixi_internal_request_1.TrustStructureList.Fixed,
|
|
10
10
|
[public_applicant_1.TrustType.Hybrid]: lixi_internal_request_1.TrustStructureList.Hybrid,
|
|
11
|
+
[public_applicant_1.TrustType.SimpleOrBare]: lixi_internal_request_1.TrustStructureList.Simple,
|
|
11
12
|
[public_applicant_1.TrustType.SuperannuationTrusts]: lixi_internal_request_1.TrustStructureList.SuperannuationFund,
|
|
12
13
|
[public_applicant_1.TrustType.Unit]: lixi_internal_request_1.TrustStructureList.Unit,
|
|
13
14
|
};
|
|
@@ -58,32 +58,32 @@ export declare enum ApplicationStage {
|
|
|
58
58
|
* Application status in Lendi Group Salesforce
|
|
59
59
|
*/
|
|
60
60
|
export declare enum ApplicationStatus {
|
|
61
|
-
|
|
62
|
-
PostContact = "POST_CONTACT",
|
|
63
|
-
SelfSubmitted = "SELF_SUBMITTED",
|
|
64
|
-
UnderReview = "UNDER_REVIEW",
|
|
65
|
-
ReviewInComplete = "REVIEW_INCOMPLETE",
|
|
66
|
-
ProcessPending = "PROCESS_PENDING",
|
|
67
|
-
WaitingOnException = "WAITING_ON_EXCEPTION",
|
|
61
|
+
AmendmentInProgress = "AMENDMENT_IN_PROGRESS",
|
|
68
62
|
ApplicationError = "APPLICATION_ERROR",
|
|
69
|
-
OnHold = "ON_HOLD",
|
|
70
|
-
Lodgement = "LODGEMENT",
|
|
71
63
|
ApplicationReceived = "APPLICATION_RECEIVED",
|
|
72
|
-
Referred = "REFERRED",
|
|
73
|
-
MoreInformationRequested = "MORE_INFORMATION_REQUESTED",
|
|
74
|
-
InformationProvidedToLender = "INFORMATION_PROVIDED_TO_LENDER",
|
|
75
|
-
Declined = "DECLINED",
|
|
76
|
-
ConditionallyApproved = "CONDITIONALLY_APPROVED",
|
|
77
|
-
AmendmentInProgress = "AMENDMENT_IN_PROGRESS",
|
|
78
64
|
ApprovedInPrinciple = "APPROVED_IN_PRINCIPLE",
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
ConditionallyApproved = "CONDITIONALLY_APPROVED",
|
|
66
|
+
Declined = "DECLINED",
|
|
67
|
+
Discharged = "DISCHARGED",
|
|
81
68
|
DocumentsIssued = "DOCUMENTS_ISSUED",
|
|
82
|
-
|
|
83
|
-
|
|
69
|
+
DocumentsReceived = "DOCUMENTS_RECEIVED",
|
|
70
|
+
InformationProvidedToLender = "INFORMATION_PROVIDED_TO_LENDER",
|
|
71
|
+
Lodgement = "LODGEMENT",
|
|
84
72
|
Lost = "LOST",
|
|
73
|
+
MoreInformationRequested = "MORE_INFORMATION_REQUESTED",
|
|
74
|
+
OnHold = "ON_HOLD",
|
|
75
|
+
PostContact = "POST_CONTACT",
|
|
76
|
+
PreContact = "PRE_CONTACT",
|
|
77
|
+
ProcessPending = "PROCESS_PENDING",
|
|
78
|
+
ReadyForSettlement = "READY_FOR_SETTLEMENT",
|
|
79
|
+
Referred = "REFERRED",
|
|
80
|
+
ReviewIncomplete = "REVIEW_INCOMPLETE",
|
|
81
|
+
SelfSubmitted = "SELF_SUBMITTED",
|
|
85
82
|
Settled = "SETTLED",
|
|
86
|
-
|
|
83
|
+
SettlementBooked = "SETTLEMENT_BOOKED",
|
|
84
|
+
UnconditionallyApproved = "UNCONDITIONALLY_APPROVED",
|
|
85
|
+
UnderReview = "UNDER_REVIEW",
|
|
86
|
+
WaitingOnException = "WAITING_ON_EXCEPTION"
|
|
87
87
|
}
|
|
88
88
|
export interface BrokerAuditReview {
|
|
89
89
|
/**
|
|
@@ -19,32 +19,32 @@ var ApplicationStage;
|
|
|
19
19
|
*/
|
|
20
20
|
var ApplicationStatus;
|
|
21
21
|
(function (ApplicationStatus) {
|
|
22
|
-
ApplicationStatus["
|
|
23
|
-
ApplicationStatus["PostContact"] = "POST_CONTACT";
|
|
24
|
-
ApplicationStatus["SelfSubmitted"] = "SELF_SUBMITTED";
|
|
25
|
-
ApplicationStatus["UnderReview"] = "UNDER_REVIEW";
|
|
26
|
-
ApplicationStatus["ReviewInComplete"] = "REVIEW_INCOMPLETE";
|
|
27
|
-
ApplicationStatus["ProcessPending"] = "PROCESS_PENDING";
|
|
28
|
-
ApplicationStatus["WaitingOnException"] = "WAITING_ON_EXCEPTION";
|
|
22
|
+
ApplicationStatus["AmendmentInProgress"] = "AMENDMENT_IN_PROGRESS";
|
|
29
23
|
ApplicationStatus["ApplicationError"] = "APPLICATION_ERROR";
|
|
30
|
-
ApplicationStatus["OnHold"] = "ON_HOLD";
|
|
31
|
-
ApplicationStatus["Lodgement"] = "LODGEMENT";
|
|
32
24
|
ApplicationStatus["ApplicationReceived"] = "APPLICATION_RECEIVED";
|
|
33
|
-
ApplicationStatus["Referred"] = "REFERRED";
|
|
34
|
-
ApplicationStatus["MoreInformationRequested"] = "MORE_INFORMATION_REQUESTED";
|
|
35
|
-
ApplicationStatus["InformationProvidedToLender"] = "INFORMATION_PROVIDED_TO_LENDER";
|
|
36
|
-
ApplicationStatus["Declined"] = "DECLINED";
|
|
37
|
-
ApplicationStatus["ConditionallyApproved"] = "CONDITIONALLY_APPROVED";
|
|
38
|
-
ApplicationStatus["AmendmentInProgress"] = "AMENDMENT_IN_PROGRESS";
|
|
39
25
|
ApplicationStatus["ApprovedInPrinciple"] = "APPROVED_IN_PRINCIPLE";
|
|
40
|
-
ApplicationStatus["
|
|
41
|
-
ApplicationStatus["
|
|
26
|
+
ApplicationStatus["ConditionallyApproved"] = "CONDITIONALLY_APPROVED";
|
|
27
|
+
ApplicationStatus["Declined"] = "DECLINED";
|
|
28
|
+
ApplicationStatus["Discharged"] = "DISCHARGED";
|
|
42
29
|
ApplicationStatus["DocumentsIssued"] = "DOCUMENTS_ISSUED";
|
|
43
|
-
ApplicationStatus["
|
|
44
|
-
ApplicationStatus["
|
|
30
|
+
ApplicationStatus["DocumentsReceived"] = "DOCUMENTS_RECEIVED";
|
|
31
|
+
ApplicationStatus["InformationProvidedToLender"] = "INFORMATION_PROVIDED_TO_LENDER";
|
|
32
|
+
ApplicationStatus["Lodgement"] = "LODGEMENT";
|
|
45
33
|
ApplicationStatus["Lost"] = "LOST";
|
|
34
|
+
ApplicationStatus["MoreInformationRequested"] = "MORE_INFORMATION_REQUESTED";
|
|
35
|
+
ApplicationStatus["OnHold"] = "ON_HOLD";
|
|
36
|
+
ApplicationStatus["PostContact"] = "POST_CONTACT";
|
|
37
|
+
ApplicationStatus["PreContact"] = "PRE_CONTACT";
|
|
38
|
+
ApplicationStatus["ProcessPending"] = "PROCESS_PENDING";
|
|
39
|
+
ApplicationStatus["ReadyForSettlement"] = "READY_FOR_SETTLEMENT";
|
|
40
|
+
ApplicationStatus["Referred"] = "REFERRED";
|
|
41
|
+
ApplicationStatus["ReviewIncomplete"] = "REVIEW_INCOMPLETE";
|
|
42
|
+
ApplicationStatus["SelfSubmitted"] = "SELF_SUBMITTED";
|
|
46
43
|
ApplicationStatus["Settled"] = "SETTLED";
|
|
47
|
-
ApplicationStatus["
|
|
44
|
+
ApplicationStatus["SettlementBooked"] = "SETTLEMENT_BOOKED";
|
|
45
|
+
ApplicationStatus["UnconditionallyApproved"] = "UNCONDITIONALLY_APPROVED";
|
|
46
|
+
ApplicationStatus["UnderReview"] = "UNDER_REVIEW";
|
|
47
|
+
ApplicationStatus["WaitingOnException"] = "WAITING_ON_EXCEPTION";
|
|
48
48
|
})(ApplicationStatus = exports.ApplicationStatus || (exports.ApplicationStatus = {}));
|
|
49
49
|
/**
|
|
50
50
|
* Intention for applying a loan
|
|
@@ -390,6 +390,7 @@ var TrustType;
|
|
|
390
390
|
TrustType["Fixed"] = "FIXED";
|
|
391
391
|
TrustType["Hybrid"] = "HYBRID";
|
|
392
392
|
TrustType["Other"] = "OTHER";
|
|
393
|
+
TrustType["SimpleOrBare"] = "SIMPLE_OR_BARE";
|
|
393
394
|
TrustType["SuperannuationTrusts"] = "SUPERANNUATION_TRUSTS";
|
|
394
395
|
TrustType["Unit"] = "UNIT";
|
|
395
396
|
})(TrustType = exports.TrustType || (exports.TrustType = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lendi/integrations-transform",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.5",
|
|
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.18.
|
|
24
|
+
"@lendi/integrations-credit-protocol": "1.18.7",
|
|
25
25
|
"@lendi/integrations-protocol": "2.7.4",
|
|
26
26
|
"@lendi/logging": "^1.0.0",
|
|
27
27
|
"clean-deep": "^3.4.0",
|