@lendi/integrations-transform 1.8.0 → 1.8.1
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
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.transformApplicationWorkflow = void 0;
|
|
4
4
|
const application_paths_1 = require("@lendi/integrations-protocol/lib/utils/application-paths");
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
|
+
const application_workflow_1 = require("../types/events/application-workflow");
|
|
6
7
|
/**
|
|
7
8
|
* Generates a partial application from an ApplicationWorkflow event
|
|
8
9
|
*
|
|
@@ -10,14 +11,20 @@ const lodash_1 = require("lodash");
|
|
|
10
11
|
* @returns A partial application
|
|
11
12
|
*/
|
|
12
13
|
function transformApplicationWorkflow(applicationWorkflowEventPayload) {
|
|
13
|
-
const { stage, applicationStage, applicationId } = applicationWorkflowEventPayload
|
|
14
|
+
const { stage, applicationStage, applicationId, applicationStatus, status } = applicationWorkflowEventPayload;
|
|
15
|
+
const partialApplication = {};
|
|
14
16
|
(0, lodash_1.set)(partialApplication, application_paths_1.paths.ApplicationId, applicationId);
|
|
15
17
|
// The stage being defaulted to Unknown caters for LGSF application workflow events having stage as an optional attribute in the future
|
|
16
|
-
const
|
|
18
|
+
const stageInstructionDetails = {
|
|
17
19
|
'@UniqueID': `${applicationId}-stage`,
|
|
18
20
|
'@Details': applicationStage || stage || 'Unknown',
|
|
19
21
|
};
|
|
20
|
-
|
|
22
|
+
const statusInstructionDetails = {
|
|
23
|
+
'@UniqueID': `${applicationId}-status`,
|
|
24
|
+
'@Details': applicationStatus || status || application_workflow_1.Status.Unknown,
|
|
25
|
+
};
|
|
26
|
+
(0, lodash_1.set)(partialApplication, application_paths_1.paths.Instructions, stageInstructionDetails);
|
|
27
|
+
(0, lodash_1.set)(partialApplication, application_paths_1.paths.InstructionsStatus, statusInstructionDetails);
|
|
21
28
|
return partialApplication;
|
|
22
29
|
}
|
|
23
30
|
exports.transformApplicationWorkflow = transformApplicationWorkflow;
|
|
@@ -25,7 +25,7 @@ export interface PayloadClass {
|
|
|
25
25
|
/**
|
|
26
26
|
* Application status in Lendi Group Salesforce
|
|
27
27
|
*/
|
|
28
|
-
applicationStatus?:
|
|
28
|
+
applicationStatus?: ApplicationStatus;
|
|
29
29
|
brokerAuditReview: BrokerAuditReview[];
|
|
30
30
|
/**
|
|
31
31
|
* Intention for applying a loan
|
|
@@ -54,6 +54,37 @@ export declare enum ApplicationStage {
|
|
|
54
54
|
SubmissionReview = "SUBMISSION_REVIEW",
|
|
55
55
|
SubmittedToLender = "SUBMITTED_TO_LENDER"
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Application status in Lendi Group Salesforce
|
|
59
|
+
*/
|
|
60
|
+
export declare enum ApplicationStatus {
|
|
61
|
+
PreContact = "PRE_CONTACT",
|
|
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",
|
|
68
|
+
ApplicationError = "APPLICATION_ERROR",
|
|
69
|
+
OnHold = "ON_HOLD",
|
|
70
|
+
Lodgement = "LODGEMENT",
|
|
71
|
+
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
|
+
ApprovedInPrinciple = "APPROVED_IN_PRINCIPLE",
|
|
79
|
+
UnconditionallyApproved = "UNCONDITIONALLY_APPROVED",
|
|
80
|
+
DocumentsReceived = "DOCUMENTS_RECEIVED",
|
|
81
|
+
DocumentsIssued = "DOCUMENTS_ISSUED",
|
|
82
|
+
ReadyForSettlement = "READY_FOR_SETTLEMENT",
|
|
83
|
+
SettlementBooked = "SETTLEMENT_BOOKED",
|
|
84
|
+
Lost = "LOST",
|
|
85
|
+
Settled = "SETTLED",
|
|
86
|
+
Discharged = "DISCHARGED"
|
|
87
|
+
}
|
|
57
88
|
export interface BrokerAuditReview {
|
|
58
89
|
/**
|
|
59
90
|
* ISO date time when Broker Audit Review was completed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Type = exports.Status = exports.Stage = exports.ConfirmedPrimaryPurpose = exports.ApplicationStage = void 0;
|
|
3
|
+
exports.Type = exports.Status = exports.Stage = exports.ConfirmedPrimaryPurpose = exports.ApplicationStatus = exports.ApplicationStage = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Application stage in Lendi Group Salesforce
|
|
6
6
|
*/
|
|
@@ -14,6 +14,38 @@ var ApplicationStage;
|
|
|
14
14
|
ApplicationStage["SubmissionReview"] = "SUBMISSION_REVIEW";
|
|
15
15
|
ApplicationStage["SubmittedToLender"] = "SUBMITTED_TO_LENDER";
|
|
16
16
|
})(ApplicationStage = exports.ApplicationStage || (exports.ApplicationStage = {}));
|
|
17
|
+
/**
|
|
18
|
+
* Application status in Lendi Group Salesforce
|
|
19
|
+
*/
|
|
20
|
+
var ApplicationStatus;
|
|
21
|
+
(function (ApplicationStatus) {
|
|
22
|
+
ApplicationStatus["PreContact"] = "PRE_CONTACT";
|
|
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";
|
|
29
|
+
ApplicationStatus["ApplicationError"] = "APPLICATION_ERROR";
|
|
30
|
+
ApplicationStatus["OnHold"] = "ON_HOLD";
|
|
31
|
+
ApplicationStatus["Lodgement"] = "LODGEMENT";
|
|
32
|
+
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
|
+
ApplicationStatus["ApprovedInPrinciple"] = "APPROVED_IN_PRINCIPLE";
|
|
40
|
+
ApplicationStatus["UnconditionallyApproved"] = "UNCONDITIONALLY_APPROVED";
|
|
41
|
+
ApplicationStatus["DocumentsReceived"] = "DOCUMENTS_RECEIVED";
|
|
42
|
+
ApplicationStatus["DocumentsIssued"] = "DOCUMENTS_ISSUED";
|
|
43
|
+
ApplicationStatus["ReadyForSettlement"] = "READY_FOR_SETTLEMENT";
|
|
44
|
+
ApplicationStatus["SettlementBooked"] = "SETTLEMENT_BOOKED";
|
|
45
|
+
ApplicationStatus["Lost"] = "LOST";
|
|
46
|
+
ApplicationStatus["Settled"] = "SETTLED";
|
|
47
|
+
ApplicationStatus["Discharged"] = "DISCHARGED";
|
|
48
|
+
})(ApplicationStatus = exports.ApplicationStatus || (exports.ApplicationStatus = {}));
|
|
17
49
|
/**
|
|
18
50
|
* Intention for applying a loan
|
|
19
51
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lendi/integrations-transform",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
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",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@lendi/integrations-credit-protocol": "1.18.5",
|
|
25
|
-
"@lendi/integrations-protocol": "2.7.
|
|
25
|
+
"@lendi/integrations-protocol": "2.7.2",
|
|
26
26
|
"@lendi/logging": "^1.0.0",
|
|
27
27
|
"clean-deep": "^3.4.0",
|
|
28
28
|
"date-fns": "2.19.0",
|