@lendi/integrations-transform 1.2.6 → 1.3.0
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/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/schemas/application-workflow-event.json +242 -0
- package/lib/schemas/public-liability-event.json +25 -1
- package/lib/transform-events/transform-application-workflow.d.ts +8 -0
- package/lib/transform-events/{generate-opportunity.js → transform-application-workflow.js} +8 -8
- package/lib/transform-events/transform-asset-address.d.ts +2 -2
- package/lib/transform-events/{generate-liability.d.ts → transform-liability.d.ts} +2 -1
- package/lib/transform-events/{generate-liability.js → transform-liability.js} +29 -6
- package/lib/types/events/application-workflow.d.ts +234 -0
- package/lib/types/events/application-workflow.js +173 -0
- package/lib/types/events/public-liability.d.ts +4 -1
- package/package.json +2 -2
- package/lib/transform-events/generate-opportunity.d.ts +0 -8
package/lib/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export * from './transform-events/transform-applicant';
|
|
2
2
|
export * from './transform-events/transform-application';
|
|
3
|
+
export * from './transform-events/transform-application-workflow';
|
|
3
4
|
export * from './transform-events/transform-income';
|
|
4
5
|
export * from './transform-events/transform-asset';
|
|
5
6
|
export * from './transform-events/transform-expenses';
|
|
6
|
-
export * from './transform-events/
|
|
7
|
+
export * from './transform-events/transform-liability';
|
|
7
8
|
export * from './transform-events/generate-required-document';
|
|
8
9
|
export * from './transform-events/generate-funding-position';
|
|
9
10
|
export * from './update-application/merge-application';
|
package/lib/index.js
CHANGED
|
@@ -13,10 +13,11 @@ exports.__esModule = true;
|
|
|
13
13
|
/* istanbul ignore file */
|
|
14
14
|
__exportStar(require("./transform-events/transform-applicant"), exports);
|
|
15
15
|
__exportStar(require("./transform-events/transform-application"), exports);
|
|
16
|
+
__exportStar(require("./transform-events/transform-application-workflow"), exports);
|
|
16
17
|
__exportStar(require("./transform-events/transform-income"), exports);
|
|
17
18
|
__exportStar(require("./transform-events/transform-asset"), exports);
|
|
18
19
|
__exportStar(require("./transform-events/transform-expenses"), exports);
|
|
19
|
-
__exportStar(require("./transform-events/
|
|
20
|
+
__exportStar(require("./transform-events/transform-liability"), exports);
|
|
20
21
|
__exportStar(require("./transform-events/generate-required-document"), exports);
|
|
21
22
|
__exportStar(require("./transform-events/generate-funding-position"), exports);
|
|
22
23
|
__exportStar(require("./update-application/merge-application"), exports);
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
{
|
|
2
|
+
"definitions": {
|
|
3
|
+
"brokerAuditReview": {
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"properties": {
|
|
7
|
+
"requestedAt": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"format": "date-time",
|
|
10
|
+
"description": "ISO date time when Broker Audit Review was created"
|
|
11
|
+
},
|
|
12
|
+
"reviewType": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The Broker Audit Review record type"
|
|
15
|
+
},
|
|
16
|
+
"status": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The Broker Audit Review status"
|
|
19
|
+
},
|
|
20
|
+
"outcome": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The Broker Audit Review outcome"
|
|
23
|
+
},
|
|
24
|
+
"completedBy": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"format": "uuid",
|
|
27
|
+
"description": "UUID of the Team Member that completed the Broker Audit Review"
|
|
28
|
+
},
|
|
29
|
+
"completedAt": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"format": "date-time",
|
|
32
|
+
"description": "ISO date time when Broker Audit Review was completed"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"applicationWorkflow": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"properties": {
|
|
40
|
+
"applicationId": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"format": "uuid",
|
|
43
|
+
"description": "UUID of the Application"
|
|
44
|
+
},
|
|
45
|
+
"applicationOwner": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"format": "uuid",
|
|
48
|
+
"description": "UUID of the Application Owner (Team Member)"
|
|
49
|
+
},
|
|
50
|
+
"stage": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "Opportunity stage name. This is a legacy field and will be deprecated after Lendi Group salesforce goes live",
|
|
53
|
+
"enum": [
|
|
54
|
+
"APPLICATION_TAKEN",
|
|
55
|
+
"APPOINTED",
|
|
56
|
+
"APPROVAL",
|
|
57
|
+
"APPROVED",
|
|
58
|
+
"AT_RISK",
|
|
59
|
+
"CL_FUTURE_CONTACT_DATE",
|
|
60
|
+
"CLOSED_LOST",
|
|
61
|
+
"CLOSED_WON_POLICY_ACTIVE",
|
|
62
|
+
"CLOSED_WON_SIGNED",
|
|
63
|
+
"CLOSED_WON",
|
|
64
|
+
"CONFIRMED_APPOINTMENT",
|
|
65
|
+
"IN_APPLICATION",
|
|
66
|
+
"IN_ASSESSMENT",
|
|
67
|
+
"LOAN_DOCUMENT",
|
|
68
|
+
"POST_CONTACT",
|
|
69
|
+
"POST_SETTLEMENT",
|
|
70
|
+
"PRE_CONTACT",
|
|
71
|
+
"QUALIFICATION",
|
|
72
|
+
"QUOTE",
|
|
73
|
+
"SETTLED",
|
|
74
|
+
"SETTLEMENT",
|
|
75
|
+
"SUBMITTED",
|
|
76
|
+
"UNKNOWN"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"applicationStage": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "Application stage in Lendi Group Salesforce",
|
|
82
|
+
"enum": [
|
|
83
|
+
"PRE_SUBMISSION",
|
|
84
|
+
"SUBMISSION_REVIEW",
|
|
85
|
+
"SUBMITTED_TO_LENDER",
|
|
86
|
+
"PRE_APPROVED",
|
|
87
|
+
"SETTLEMENT",
|
|
88
|
+
"POST_SETTLEMENT",
|
|
89
|
+
"CLOSED_LOST"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"status": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "Opportunity status. This is a legacy field and will be deprecated after Lendi Group salesforce goes live",
|
|
95
|
+
"enum": [
|
|
96
|
+
"APPLICATION",
|
|
97
|
+
"APPLICATION_COMPLETED",
|
|
98
|
+
"APPLICATION_STARTED",
|
|
99
|
+
"APPROVED_AND_PENDING_SETTLEMENT",
|
|
100
|
+
"APPROVED_WITH_PENDING_DOCUMENTS",
|
|
101
|
+
"COMPLIANCE",
|
|
102
|
+
"CONDITIONALLY_APPROVED",
|
|
103
|
+
"CONTACT_ATTEMPTED",
|
|
104
|
+
"CONTACT_MADE",
|
|
105
|
+
"DASHBOARD",
|
|
106
|
+
"DOCS_GENERATED",
|
|
107
|
+
"DOCUMENTS_RECEIVED",
|
|
108
|
+
"E_CONSENT_COMPLETE",
|
|
109
|
+
"FORMALLY_APPROVED",
|
|
110
|
+
"IN_APPLICATION",
|
|
111
|
+
"LOAN_DOCUMENTS_RECEIVED",
|
|
112
|
+
"LOAN_DOCUMENTS_SENT",
|
|
113
|
+
"LOAN_DOCUMENTS_VERIFIED",
|
|
114
|
+
"LOST",
|
|
115
|
+
"MIR",
|
|
116
|
+
"NO_ANSWER_1",
|
|
117
|
+
"NO_ANSWER_2",
|
|
118
|
+
"NO_ANSWER_3",
|
|
119
|
+
"NO_ANSWER_4",
|
|
120
|
+
"NO_ANSWER_5",
|
|
121
|
+
"OPP_CREATED_NEW",
|
|
122
|
+
"PENDING_SETTLEMENT",
|
|
123
|
+
"PENDING_SETTLEMENT_CONFIRMATION",
|
|
124
|
+
"PLATFORM_COMPLETE",
|
|
125
|
+
"PRE_APPROVAL",
|
|
126
|
+
"PRODUCT_SELECTION_COMPLETE",
|
|
127
|
+
"QUARANTINED",
|
|
128
|
+
"READY_TO_SUBMIT",
|
|
129
|
+
"REQUIRED_DOCS_UPLOADED",
|
|
130
|
+
"SELF_SUBMITTED",
|
|
131
|
+
"SERVICING_PASSED",
|
|
132
|
+
"SETTLED",
|
|
133
|
+
"SETTLED_NOT_PAID",
|
|
134
|
+
"SETTLED_AND_DISCHARGED",
|
|
135
|
+
"SETTLED_AND_RECONCILED",
|
|
136
|
+
"SETTLEMENT_BOOKED",
|
|
137
|
+
"SIGNED_ADDITIONAL_DOCS_REQUIRED",
|
|
138
|
+
"STP",
|
|
139
|
+
"STP_EXCEPTIONS",
|
|
140
|
+
"SUBMIT_TO_PRODUCTION",
|
|
141
|
+
"SUBMIT_TO_PRODUCTION_INCOMPLETE",
|
|
142
|
+
"SUBMIT_TO_PRODUCTION_QA",
|
|
143
|
+
"SUBMITTED",
|
|
144
|
+
"SUBMITTED_CLOSED_LOST",
|
|
145
|
+
"SUBMITTED_DECLINED",
|
|
146
|
+
"SUBMITTED_ON_HOLD",
|
|
147
|
+
"SUBMITTED_RESOLVED",
|
|
148
|
+
"SUBMITTED_MIR",
|
|
149
|
+
"UNCONDITIONAL_APPROVAL",
|
|
150
|
+
"SUBMITTED_TO_LENDER",
|
|
151
|
+
"SUBMIT_CHANGES_TO_LENDER",
|
|
152
|
+
"SIGNED_CLOSED_LOST",
|
|
153
|
+
"REFERRED",
|
|
154
|
+
"UNKNOWN"
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"applicationStatus": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "Application status in Lendi Group Salesforce",
|
|
160
|
+
"enum": [
|
|
161
|
+
"PRE_CONTACT",
|
|
162
|
+
"POST_CONTACT",
|
|
163
|
+
"SELF_SUBMITTED",
|
|
164
|
+
"UNDER_REVIEW",
|
|
165
|
+
"REVIEW_INCOMPLETE",
|
|
166
|
+
"PROCESS_PENDING",
|
|
167
|
+
"WAITING_ON_EXCEPTION",
|
|
168
|
+
"APPLICATION_ERROR",
|
|
169
|
+
"ON_HOLD",
|
|
170
|
+
"SUBMITTED_TO_LENDER",
|
|
171
|
+
"APPLICATION_RECEIVED",
|
|
172
|
+
"REFERRED",
|
|
173
|
+
"MORE_INFORMATION_REQUESTED",
|
|
174
|
+
"INFORMATION_PROVIDED_TO_LENDER",
|
|
175
|
+
"DECLINED",
|
|
176
|
+
"CONDITIONALLY_APPROVED",
|
|
177
|
+
"AMENDMENT_IN_PROGRESS",
|
|
178
|
+
"PRE_APPROVED",
|
|
179
|
+
"UNCONDITIONALLY_APPROVED",
|
|
180
|
+
"PENDING_SETTLEMENT",
|
|
181
|
+
"DOCUMENTS_ISSUED",
|
|
182
|
+
"SOLICITOR_INSTRUCTED",
|
|
183
|
+
"READY_FOR_SETTLEMENT",
|
|
184
|
+
"LOST",
|
|
185
|
+
"SETTLED",
|
|
186
|
+
"DISCHARGED",
|
|
187
|
+
"CANCELLED"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
"confirmedPrimaryPurpose": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"description": "Intention for applying a loan",
|
|
193
|
+
"enum": [
|
|
194
|
+
"CHATTEL_MORTGAGE",
|
|
195
|
+
"COMMERCIAL",
|
|
196
|
+
"CONSTRUCTION_AND_PURCHASE",
|
|
197
|
+
"CONSTRUCTION_AND_REFINANCE",
|
|
198
|
+
"CONSTRUCTION",
|
|
199
|
+
"HIRE_PURCHASE",
|
|
200
|
+
"INTERNAL_REFI_SWITCH",
|
|
201
|
+
"LEASE",
|
|
202
|
+
"LOAN",
|
|
203
|
+
"NEW_PURCHASE",
|
|
204
|
+
"PRE_APPROVAL",
|
|
205
|
+
"PURCHASE_AND_REFINANCE",
|
|
206
|
+
"PURCHASE",
|
|
207
|
+
"REFINANCE",
|
|
208
|
+
"SLR",
|
|
209
|
+
"TOP_UP",
|
|
210
|
+
"VARIATION",
|
|
211
|
+
"UNKNOWN"
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
"brokerAuditReview": {
|
|
215
|
+
"type": "array",
|
|
216
|
+
"items": {
|
|
217
|
+
"$ref": "#/definitions/brokerAuditReview"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"required": ["applicationId", "stage", "status", "brokerAuditReview"]
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"type": "object",
|
|
225
|
+
"title": "The application workflow event schema",
|
|
226
|
+
"description": "Application workflow",
|
|
227
|
+
"additionalProperties": false,
|
|
228
|
+
"properties": {
|
|
229
|
+
"version": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"description": "schema version"
|
|
232
|
+
},
|
|
233
|
+
"type": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"enum": ["ApplicationWorkflowUpdated"]
|
|
236
|
+
},
|
|
237
|
+
"payload": {
|
|
238
|
+
"$ref": "#/definitions/applicationWorkflow"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"required": ["version", "payload", "type"]
|
|
242
|
+
}
|
|
@@ -61,6 +61,21 @@
|
|
|
61
61
|
"financialInstitution": {
|
|
62
62
|
"type": "string"
|
|
63
63
|
},
|
|
64
|
+
"financialInstitutionShortName": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"FinancialInstitutionBsb": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"pattern": "^\\d{6}$",
|
|
70
|
+
"description": "The BSB number identifying where the account is held within the Financial Institution",
|
|
71
|
+
"example": "123456"
|
|
72
|
+
},
|
|
73
|
+
"FinancialInstitutionAccountNumber": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"pattern": "^\\d{0,10}$",
|
|
76
|
+
"description": "The unique number assigned to the Financial Institution account",
|
|
77
|
+
"example": "999994"
|
|
78
|
+
},
|
|
64
79
|
"repaymentAmount": {
|
|
65
80
|
"type": "number"
|
|
66
81
|
},
|
|
@@ -145,6 +160,15 @@
|
|
|
145
160
|
"financialInstitution": {
|
|
146
161
|
"$ref": "#/definitions/financialInstitution"
|
|
147
162
|
},
|
|
163
|
+
"financialInstitutionShortName": {
|
|
164
|
+
"$ref": "#/definitions/financialInstitutionShortName"
|
|
165
|
+
},
|
|
166
|
+
"financialInstitutionBsb": {
|
|
167
|
+
"$ref": "#/definitions/FinancialInstitutionBsb"
|
|
168
|
+
},
|
|
169
|
+
"financialInstitutionAccountNumber": {
|
|
170
|
+
"$ref": "#/definitions/FinancialInstitutionAccountNumber"
|
|
171
|
+
},
|
|
148
172
|
"repaymentAmount": {
|
|
149
173
|
"$ref": "#/definitions/repaymentAmount"
|
|
150
174
|
},
|
|
@@ -191,7 +215,7 @@
|
|
|
191
215
|
"$ref": "#/definitions/description"
|
|
192
216
|
}
|
|
193
217
|
},
|
|
194
|
-
"required": ["
|
|
218
|
+
"required": ["type", "outstandingBalance"]
|
|
195
219
|
},
|
|
196
220
|
"LiabilityPayload": {
|
|
197
221
|
"type": "object",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PayloadClass as ApplicationWorkflow } from '../types/events/application-workflow';
|
|
2
|
+
/**
|
|
3
|
+
* Generates a partial internal request from a partial opportunity event.
|
|
4
|
+
*
|
|
5
|
+
* @return partialApplication: A partial internal request.
|
|
6
|
+
* @param applicationWorkflow: ApplicationWorkflow object.
|
|
7
|
+
*/
|
|
8
|
+
export declare function transformApplicationWorkflow(applicationWorkflow: ApplicationWorkflow): {};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
|
-
exports.
|
|
3
|
+
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
7
|
* Generates a partial internal request from a partial opportunity event.
|
|
8
8
|
*
|
|
9
|
-
* @param opportunity: Partial opportunity event.
|
|
10
9
|
* @return partialApplication: A partial internal request.
|
|
10
|
+
* @param applicationWorkflow: ApplicationWorkflow object.
|
|
11
11
|
*/
|
|
12
|
-
function
|
|
12
|
+
function transformApplicationWorkflow(applicationWorkflow) {
|
|
13
13
|
var partialApplication = {};
|
|
14
14
|
var opportunityMapping = {
|
|
15
|
-
|
|
15
|
+
applicationId: application_paths_1.paths.ApplicationId,
|
|
16
16
|
stage: application_paths_1.paths.Instructions
|
|
17
17
|
};
|
|
18
|
-
for (var _i = 0, _a = Object.entries(
|
|
18
|
+
for (var _i = 0, _a = Object.entries(applicationWorkflow); _i < _a.length; _i++) {
|
|
19
19
|
var _b = _a[_i], key = _b[0], value = _b[1];
|
|
20
20
|
if (opportunityMapping[key]) {
|
|
21
21
|
if (key === 'stage') {
|
|
22
|
-
(0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.Instructions, ".@UniqueID"), "".concat(
|
|
23
|
-
(0, lodash_1.set)(partialApplication, "".concat(opportunityMapping[key], ".@Details"), value || 'Unknown');
|
|
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');
|
|
24
24
|
}
|
|
25
25
|
else {
|
|
26
26
|
(0, lodash_1.set)(partialApplication, opportunityMapping[key], value);
|
|
@@ -29,4 +29,4 @@ function generateOpportunity(opportunity) {
|
|
|
29
29
|
}
|
|
30
30
|
return partialApplication;
|
|
31
31
|
}
|
|
32
|
-
exports.
|
|
32
|
+
exports.transformApplicationWorkflow = transformApplicationWorkflow;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AddressType, Standard } from
|
|
2
|
-
import { Address, AddressStandard } from
|
|
1
|
+
import { AddressType, Standard } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
|
|
2
|
+
import { Address, AddressStandard } from '../types/events/public-asset';
|
|
3
3
|
export declare function getAddressMapping(address: Address): Record<string, string>;
|
|
4
4
|
export declare const standardMapping: Record<string, string>;
|
|
5
5
|
/**
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { LiabilityPayload } from '../types/events/public-liability';
|
|
2
|
+
import { PartialApplication } from '../types/partial-application';
|
|
2
3
|
/**
|
|
3
4
|
* Generates a partial internal request from a liability event payload.
|
|
4
5
|
*
|
|
5
6
|
* @param liabilityPayload: A liability event payload.
|
|
6
7
|
* @return A partial InternalRequest.
|
|
7
8
|
*/
|
|
8
|
-
export declare function
|
|
9
|
+
export declare function transformLiability({ applicationId, id, liability }: LiabilityPayload): PartialApplication;
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
|
-
exports.
|
|
3
|
+
exports.transformLiability = 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
|
var alieo_frequency_1 = require("../types/enum-mappings/alieo-frequency");
|
|
7
7
|
var liability_payment_type_1 = require("../types/enum-mappings/liability-payment-type");
|
|
8
8
|
var liability_type_1 = require("../types/enum-mappings/liability-type");
|
|
9
|
+
var public_liability_1 = require("../types/events/public-liability");
|
|
9
10
|
var get_financial_institution_1 = require("../utils/get-financial-institution");
|
|
10
11
|
var round_decimal_1 = require("../utils/round-decimal");
|
|
11
12
|
var transform_percent_owned_1 = require("./transform-percent-owned");
|
|
12
13
|
var lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
|
|
14
|
+
var lixi_internal_request_2 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
|
|
13
15
|
/**
|
|
14
16
|
* Generates a partial internal request from a liability event payload.
|
|
15
17
|
*
|
|
16
18
|
* @param liabilityPayload: A liability event payload.
|
|
17
19
|
* @return A partial InternalRequest.
|
|
18
20
|
*/
|
|
19
|
-
function
|
|
21
|
+
function transformLiability(_a) {
|
|
20
22
|
var applicationId = _a.applicationId, id = _a.id, liability = _a.liability;
|
|
21
23
|
var partialApplication = {};
|
|
22
24
|
var liabilityMapping = {
|
|
@@ -26,7 +28,11 @@ function generateLiability(_a) {
|
|
|
26
28
|
clearingFromThisLoan: "".concat(application_paths_1.paths.Liability, ".@ClearingFromThisLoan"),
|
|
27
29
|
description: "".concat(application_paths_1.paths.Liability, ".@Description"),
|
|
28
30
|
financialInstitution: "".concat(application_paths_1.paths.Liability, ".AccountNumber.@FinancialInstitution"),
|
|
29
|
-
|
|
31
|
+
financialInstitutionAccountNumber: "".concat(application_paths_1.paths.Liability, ".AccountNumber.@AccountNumber"),
|
|
32
|
+
financialInstitutionBsb: "".concat(application_paths_1.paths.Liability, ".AccountNumber.@BSB"),
|
|
33
|
+
interestOnlyRemainingTerm: "".concat(application_paths_1.paths.Liability, ".OriginalTerm.@PaymentTypeDuration"),
|
|
34
|
+
creditLimit: "".concat(application_paths_1.paths.Liability, ".@CreditLimit"),
|
|
35
|
+
newLimit: "".concat(application_paths_1.paths.Liability, ".@NewLimit"),
|
|
30
36
|
repaymentAmount: "".concat(application_paths_1.paths.Liability, ".Repayment[0].@RepaymentAmount"),
|
|
31
37
|
repaymentFrequency: "".concat(application_paths_1.paths.Liability, ".Repayment[0].@RepaymentFrequency"),
|
|
32
38
|
remainingTermDuration: "".concat(application_paths_1.paths.Liability, ".RemainingTerm.@Duration"),
|
|
@@ -40,6 +46,12 @@ function generateLiability(_a) {
|
|
|
40
46
|
// Default repayments to 0 and repaymentFrequency to weekly.
|
|
41
47
|
(0, lodash_1.set)(partialApplication, liabilityMapping.repaymentAmount, 0);
|
|
42
48
|
(0, lodash_1.set)(partialApplication, liabilityMapping.repaymentFrequency, lixi_internal_request_1.List.Weekly);
|
|
49
|
+
// Currently repayments is not captured for store cards and credit cards, default the monthly repayment amount to
|
|
50
|
+
// the credit limit with interest rate of 3%.
|
|
51
|
+
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.repaymentFrequency, lixi_internal_request_1.List.Monthly);
|
|
54
|
+
}
|
|
43
55
|
// Default clearingFromThisLoan to No if the value is not present in the event.
|
|
44
56
|
(0, lodash_1.set)(partialApplication, liabilityMapping.clearingFromThisLoan, lixi_internal_request_1.YesNoList.No);
|
|
45
57
|
for (var _i = 0, _b = Object.entries(liability); _i < _b.length; _i++) {
|
|
@@ -47,16 +59,26 @@ function generateLiability(_a) {
|
|
|
47
59
|
if (liabilityMapping[key]) {
|
|
48
60
|
switch (key) {
|
|
49
61
|
case 'outstandingBalance':
|
|
62
|
+
case 'creditLimit':
|
|
50
63
|
case 'newLimit':
|
|
51
64
|
case 'repaymentAmount':
|
|
52
65
|
(0, lodash_1.set)(partialApplication, liabilityMapping[key], (0, round_decimal_1.roundDecimal)(value));
|
|
53
66
|
break;
|
|
67
|
+
case 'interestOnlyRemainingTerm':
|
|
68
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], (0, round_decimal_1.roundDecimal)(value));
|
|
69
|
+
(0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.Liability, ".OriginalTerm.@PaymentType"), lixi_internal_request_1.PaymentTypeList.InterestOnly);
|
|
70
|
+
(0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.Liability, ".OriginalTerm.@PaymentTypeUnits"), lixi_internal_request_1.LoanTermUnitsList.Years);
|
|
71
|
+
break;
|
|
54
72
|
case 'type':
|
|
55
73
|
(0, lodash_1.set)(partialApplication, liabilityMapping[key], liability_type_1.liabilityTypeMapping[value]);
|
|
56
74
|
break;
|
|
57
75
|
case 'clearingFromThisLoan':
|
|
58
76
|
(0, lodash_1.set)(partialApplication, liabilityMapping[key], value ? lixi_internal_request_1.YesNoList.Yes : lixi_internal_request_1.YesNoList.No);
|
|
59
77
|
break;
|
|
78
|
+
case 'clearingFromOtherSource':
|
|
79
|
+
if (value === public_liability_1.ClearingFromOtherSource.PayingOut)
|
|
80
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], lixi_internal_request_1.YesNoList.Yes);
|
|
81
|
+
break;
|
|
60
82
|
case 'repaymentFrequency':
|
|
61
83
|
(0, lodash_1.set)(partialApplication, liabilityMapping[key], alieo_frequency_1.liabilityFrequencyMapping[value]);
|
|
62
84
|
break;
|
|
@@ -64,10 +86,11 @@ function generateLiability(_a) {
|
|
|
64
86
|
(0, lodash_1.set)(partialApplication, liabilityMapping[key], liability_payment_type_1.liabilityPaymentTypeMapping[value]);
|
|
65
87
|
break;
|
|
66
88
|
case 'remainingTermDuration':
|
|
67
|
-
(0, lodash_1.set)(partialApplication, liabilityMapping[key], Math.round(
|
|
89
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], Math.round(value * 12));
|
|
90
|
+
(0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.Liability, ".RemainingTerm.@Units"), lixi_internal_request_2.UnitsList.Months);
|
|
68
91
|
break;
|
|
69
92
|
case 'financialInstitution':
|
|
70
|
-
var financialInstitution = (0, get_financial_institution_1.getFinancialInstitution)(value.toString());
|
|
93
|
+
var financialInstitution = (0, get_financial_institution_1.getFinancialInstitution)(value.toString()) || lixi_internal_request_2.FinancialInstitutionList.Other;
|
|
71
94
|
(0, lodash_1.set)(partialApplication, liabilityMapping[key], financialInstitution);
|
|
72
95
|
break;
|
|
73
96
|
case 'percentOwned':
|
|
@@ -84,4 +107,4 @@ function generateLiability(_a) {
|
|
|
84
107
|
}
|
|
85
108
|
return partialApplication;
|
|
86
109
|
}
|
|
87
|
-
exports.
|
|
110
|
+
exports.transformLiability = transformLiability;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application workflow
|
|
3
|
+
*/
|
|
4
|
+
export interface ApplicationWorkflow {
|
|
5
|
+
payload: PayloadClass;
|
|
6
|
+
type: Type;
|
|
7
|
+
/**
|
|
8
|
+
* schema version
|
|
9
|
+
*/
|
|
10
|
+
version: string;
|
|
11
|
+
}
|
|
12
|
+
export interface PayloadClass {
|
|
13
|
+
/**
|
|
14
|
+
* UUID of the Application
|
|
15
|
+
*/
|
|
16
|
+
applicationId: string;
|
|
17
|
+
/**
|
|
18
|
+
* UUID of the Application Owner (Team Member)
|
|
19
|
+
*/
|
|
20
|
+
applicationOwner?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Application stage in Lendi Group Salesforce
|
|
23
|
+
*/
|
|
24
|
+
applicationStage?: ApplicationStage;
|
|
25
|
+
/**
|
|
26
|
+
* Application status in Lendi Group Salesforce
|
|
27
|
+
*/
|
|
28
|
+
applicationStatus?: ApplicationStatus;
|
|
29
|
+
brokerAuditReview: BrokerAuditReview[];
|
|
30
|
+
/**
|
|
31
|
+
* Intention for applying a loan
|
|
32
|
+
*/
|
|
33
|
+
confirmedPrimaryPurpose?: ConfirmedPrimaryPurpose;
|
|
34
|
+
/**
|
|
35
|
+
* Opportunity stage name. This is a legacy field and will be deprecated after Lendi Group
|
|
36
|
+
* salesforce goes live
|
|
37
|
+
*/
|
|
38
|
+
stage: Stage;
|
|
39
|
+
/**
|
|
40
|
+
* Opportunity status. This is a legacy field and will be deprecated after Lendi Group
|
|
41
|
+
* salesforce goes live
|
|
42
|
+
*/
|
|
43
|
+
status: Status;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Application stage in Lendi Group Salesforce
|
|
47
|
+
*/
|
|
48
|
+
export declare enum ApplicationStage {
|
|
49
|
+
ClosedLost = "CLOSED_LOST",
|
|
50
|
+
PostSettlement = "POST_SETTLEMENT",
|
|
51
|
+
PreApproved = "PRE_APPROVED",
|
|
52
|
+
PreSubmission = "PRE_SUBMISSION",
|
|
53
|
+
Settlement = "SETTLEMENT",
|
|
54
|
+
SubmissionReview = "SUBMISSION_REVIEW",
|
|
55
|
+
SubmittedToLender = "SUBMITTED_TO_LENDER"
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Application status in Lendi Group Salesforce
|
|
59
|
+
*/
|
|
60
|
+
export declare enum ApplicationStatus {
|
|
61
|
+
AmendmentInProgress = "AMENDMENT_IN_PROGRESS",
|
|
62
|
+
ApplicationError = "APPLICATION_ERROR",
|
|
63
|
+
ApplicationReceived = "APPLICATION_RECEIVED",
|
|
64
|
+
Cancelled = "CANCELLED",
|
|
65
|
+
ConditionallyApproved = "CONDITIONALLY_APPROVED",
|
|
66
|
+
Declined = "DECLINED",
|
|
67
|
+
Discharged = "DISCHARGED",
|
|
68
|
+
DocumentsIssued = "DOCUMENTS_ISSUED",
|
|
69
|
+
InformationProvidedToLender = "INFORMATION_PROVIDED_TO_LENDER",
|
|
70
|
+
Lost = "LOST",
|
|
71
|
+
MoreInformationRequested = "MORE_INFORMATION_REQUESTED",
|
|
72
|
+
OnHold = "ON_HOLD",
|
|
73
|
+
PendingSettlement = "PENDING_SETTLEMENT",
|
|
74
|
+
PostContact = "POST_CONTACT",
|
|
75
|
+
PreApproved = "PRE_APPROVED",
|
|
76
|
+
PreContact = "PRE_CONTACT",
|
|
77
|
+
ProcessPending = "PROCESS_PENDING",
|
|
78
|
+
ReadyForSettlement = "READY_FOR_SETTLEMENT",
|
|
79
|
+
Referred = "REFERRED",
|
|
80
|
+
ReviewIncomplete = "REVIEW_INCOMPLETE",
|
|
81
|
+
SelfSubmitted = "SELF_SUBMITTED",
|
|
82
|
+
Settled = "SETTLED",
|
|
83
|
+
SolicitorInstructed = "SOLICITOR_INSTRUCTED",
|
|
84
|
+
SubmittedToLender = "SUBMITTED_TO_LENDER",
|
|
85
|
+
UnconditionallyApproved = "UNCONDITIONALLY_APPROVED",
|
|
86
|
+
UnderReview = "UNDER_REVIEW",
|
|
87
|
+
WaitingOnException = "WAITING_ON_EXCEPTION"
|
|
88
|
+
}
|
|
89
|
+
export interface BrokerAuditReview {
|
|
90
|
+
/**
|
|
91
|
+
* ISO date time when Broker Audit Review was completed
|
|
92
|
+
*/
|
|
93
|
+
completedAt?: string;
|
|
94
|
+
/**
|
|
95
|
+
* UUID of the Team Member that completed the Broker Audit Review
|
|
96
|
+
*/
|
|
97
|
+
completedBy?: string;
|
|
98
|
+
/**
|
|
99
|
+
* The Broker Audit Review outcome
|
|
100
|
+
*/
|
|
101
|
+
outcome?: string;
|
|
102
|
+
/**
|
|
103
|
+
* ISO date time when Broker Audit Review was created
|
|
104
|
+
*/
|
|
105
|
+
requestedAt?: string;
|
|
106
|
+
/**
|
|
107
|
+
* The Broker Audit Review record type
|
|
108
|
+
*/
|
|
109
|
+
reviewType?: string;
|
|
110
|
+
/**
|
|
111
|
+
* The Broker Audit Review status
|
|
112
|
+
*/
|
|
113
|
+
status?: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Intention for applying a loan
|
|
117
|
+
*/
|
|
118
|
+
export declare enum ConfirmedPrimaryPurpose {
|
|
119
|
+
ChattelMortgage = "CHATTEL_MORTGAGE",
|
|
120
|
+
Commercial = "COMMERCIAL",
|
|
121
|
+
Construction = "CONSTRUCTION",
|
|
122
|
+
ConstructionAndPurchase = "CONSTRUCTION_AND_PURCHASE",
|
|
123
|
+
ConstructionAndRefinance = "CONSTRUCTION_AND_REFINANCE",
|
|
124
|
+
HirePurchase = "HIRE_PURCHASE",
|
|
125
|
+
InternalRefiSwitch = "INTERNAL_REFI_SWITCH",
|
|
126
|
+
Lease = "LEASE",
|
|
127
|
+
Loan = "LOAN",
|
|
128
|
+
NewPurchase = "NEW_PURCHASE",
|
|
129
|
+
PreApproval = "PRE_APPROVAL",
|
|
130
|
+
Purchase = "PURCHASE",
|
|
131
|
+
PurchaseAndRefinance = "PURCHASE_AND_REFINANCE",
|
|
132
|
+
Refinance = "REFINANCE",
|
|
133
|
+
Slr = "SLR",
|
|
134
|
+
TopUp = "TOP_UP",
|
|
135
|
+
Unknown = "UNKNOWN",
|
|
136
|
+
Variation = "VARIATION"
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Opportunity stage name. This is a legacy field and will be deprecated after Lendi Group
|
|
140
|
+
* salesforce goes live
|
|
141
|
+
*/
|
|
142
|
+
export declare enum Stage {
|
|
143
|
+
ApplicationTaken = "APPLICATION_TAKEN",
|
|
144
|
+
Appointed = "APPOINTED",
|
|
145
|
+
Approval = "APPROVAL",
|
|
146
|
+
Approved = "APPROVED",
|
|
147
|
+
AtRisk = "AT_RISK",
|
|
148
|
+
ClFutureContactDate = "CL_FUTURE_CONTACT_DATE",
|
|
149
|
+
ClosedLost = "CLOSED_LOST",
|
|
150
|
+
ClosedWon = "CLOSED_WON",
|
|
151
|
+
ClosedWonPolicyActive = "CLOSED_WON_POLICY_ACTIVE",
|
|
152
|
+
ClosedWonSigned = "CLOSED_WON_SIGNED",
|
|
153
|
+
ConfirmedAppointment = "CONFIRMED_APPOINTMENT",
|
|
154
|
+
InApplication = "IN_APPLICATION",
|
|
155
|
+
InAssessment = "IN_ASSESSMENT",
|
|
156
|
+
LoanDocument = "LOAN_DOCUMENT",
|
|
157
|
+
PostContact = "POST_CONTACT",
|
|
158
|
+
PostSettlement = "POST_SETTLEMENT",
|
|
159
|
+
PreContact = "PRE_CONTACT",
|
|
160
|
+
Qualification = "QUALIFICATION",
|
|
161
|
+
Quote = "QUOTE",
|
|
162
|
+
Settled = "SETTLED",
|
|
163
|
+
Settlement = "SETTLEMENT",
|
|
164
|
+
Submitted = "SUBMITTED",
|
|
165
|
+
Unknown = "UNKNOWN"
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Opportunity status. This is a legacy field and will be deprecated after Lendi Group
|
|
169
|
+
* salesforce goes live
|
|
170
|
+
*/
|
|
171
|
+
export declare enum Status {
|
|
172
|
+
Application = "APPLICATION",
|
|
173
|
+
ApplicationCompleted = "APPLICATION_COMPLETED",
|
|
174
|
+
ApplicationStarted = "APPLICATION_STARTED",
|
|
175
|
+
ApprovedAndPendingSettlement = "APPROVED_AND_PENDING_SETTLEMENT",
|
|
176
|
+
ApprovedWithPendingDocuments = "APPROVED_WITH_PENDING_DOCUMENTS",
|
|
177
|
+
Compliance = "COMPLIANCE",
|
|
178
|
+
ConditionallyApproved = "CONDITIONALLY_APPROVED",
|
|
179
|
+
ContactAttempted = "CONTACT_ATTEMPTED",
|
|
180
|
+
ContactMade = "CONTACT_MADE",
|
|
181
|
+
Dashboard = "DASHBOARD",
|
|
182
|
+
DocsGenerated = "DOCS_GENERATED",
|
|
183
|
+
DocumentsReceived = "DOCUMENTS_RECEIVED",
|
|
184
|
+
EConsentComplete = "E_CONSENT_COMPLETE",
|
|
185
|
+
FormallyApproved = "FORMALLY_APPROVED",
|
|
186
|
+
InApplication = "IN_APPLICATION",
|
|
187
|
+
LoanDocumentsReceived = "LOAN_DOCUMENTS_RECEIVED",
|
|
188
|
+
LoanDocumentsSent = "LOAN_DOCUMENTS_SENT",
|
|
189
|
+
LoanDocumentsVerified = "LOAN_DOCUMENTS_VERIFIED",
|
|
190
|
+
Lost = "LOST",
|
|
191
|
+
Mir = "MIR",
|
|
192
|
+
NoAnswer1 = "NO_ANSWER_1",
|
|
193
|
+
NoAnswer2 = "NO_ANSWER_2",
|
|
194
|
+
NoAnswer3 = "NO_ANSWER_3",
|
|
195
|
+
NoAnswer4 = "NO_ANSWER_4",
|
|
196
|
+
NoAnswer5 = "NO_ANSWER_5",
|
|
197
|
+
OppCreatedNew = "OPP_CREATED_NEW",
|
|
198
|
+
PendingSettlement = "PENDING_SETTLEMENT",
|
|
199
|
+
PendingSettlementConfirmation = "PENDING_SETTLEMENT_CONFIRMATION",
|
|
200
|
+
PlatformComplete = "PLATFORM_COMPLETE",
|
|
201
|
+
PreApproval = "PRE_APPROVAL",
|
|
202
|
+
ProductSelectionComplete = "PRODUCT_SELECTION_COMPLETE",
|
|
203
|
+
Quarantined = "QUARANTINED",
|
|
204
|
+
ReadyToSubmit = "READY_TO_SUBMIT",
|
|
205
|
+
Referred = "REFERRED",
|
|
206
|
+
RequiredDocsUploaded = "REQUIRED_DOCS_UPLOADED",
|
|
207
|
+
SelfSubmitted = "SELF_SUBMITTED",
|
|
208
|
+
ServicingPassed = "SERVICING_PASSED",
|
|
209
|
+
Settled = "SETTLED",
|
|
210
|
+
SettledAndDischarged = "SETTLED_AND_DISCHARGED",
|
|
211
|
+
SettledAndReconciled = "SETTLED_AND_RECONCILED",
|
|
212
|
+
SettledNotPaid = "SETTLED_NOT_PAID",
|
|
213
|
+
SettlementBooked = "SETTLEMENT_BOOKED",
|
|
214
|
+
SignedAdditionalDocsRequired = "SIGNED_ADDITIONAL_DOCS_REQUIRED",
|
|
215
|
+
SignedClosedLost = "SIGNED_CLOSED_LOST",
|
|
216
|
+
Stp = "STP",
|
|
217
|
+
StpExceptions = "STP_EXCEPTIONS",
|
|
218
|
+
SubmitChangesToLender = "SUBMIT_CHANGES_TO_LENDER",
|
|
219
|
+
SubmitToProduction = "SUBMIT_TO_PRODUCTION",
|
|
220
|
+
SubmitToProductionIncomplete = "SUBMIT_TO_PRODUCTION_INCOMPLETE",
|
|
221
|
+
SubmitToProductionQA = "SUBMIT_TO_PRODUCTION_QA",
|
|
222
|
+
Submitted = "SUBMITTED",
|
|
223
|
+
SubmittedClosedLost = "SUBMITTED_CLOSED_LOST",
|
|
224
|
+
SubmittedDeclined = "SUBMITTED_DECLINED",
|
|
225
|
+
SubmittedMir = "SUBMITTED_MIR",
|
|
226
|
+
SubmittedOnHold = "SUBMITTED_ON_HOLD",
|
|
227
|
+
SubmittedResolved = "SUBMITTED_RESOLVED",
|
|
228
|
+
SubmittedToLender = "SUBMITTED_TO_LENDER",
|
|
229
|
+
UnconditionalApproval = "UNCONDITIONAL_APPROVAL",
|
|
230
|
+
Unknown = "UNKNOWN"
|
|
231
|
+
}
|
|
232
|
+
export declare enum Type {
|
|
233
|
+
ApplicationWorkflowUpdated = "ApplicationWorkflowUpdated"
|
|
234
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.Type = exports.Status = exports.Stage = exports.ConfirmedPrimaryPurpose = exports.ApplicationStatus = exports.ApplicationStage = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Application stage in Lendi Group Salesforce
|
|
6
|
+
*/
|
|
7
|
+
var ApplicationStage;
|
|
8
|
+
(function (ApplicationStage) {
|
|
9
|
+
ApplicationStage["ClosedLost"] = "CLOSED_LOST";
|
|
10
|
+
ApplicationStage["PostSettlement"] = "POST_SETTLEMENT";
|
|
11
|
+
ApplicationStage["PreApproved"] = "PRE_APPROVED";
|
|
12
|
+
ApplicationStage["PreSubmission"] = "PRE_SUBMISSION";
|
|
13
|
+
ApplicationStage["Settlement"] = "SETTLEMENT";
|
|
14
|
+
ApplicationStage["SubmissionReview"] = "SUBMISSION_REVIEW";
|
|
15
|
+
ApplicationStage["SubmittedToLender"] = "SUBMITTED_TO_LENDER";
|
|
16
|
+
})(ApplicationStage = exports.ApplicationStage || (exports.ApplicationStage = {}));
|
|
17
|
+
/**
|
|
18
|
+
* Application status in Lendi Group Salesforce
|
|
19
|
+
*/
|
|
20
|
+
var ApplicationStatus;
|
|
21
|
+
(function (ApplicationStatus) {
|
|
22
|
+
ApplicationStatus["AmendmentInProgress"] = "AMENDMENT_IN_PROGRESS";
|
|
23
|
+
ApplicationStatus["ApplicationError"] = "APPLICATION_ERROR";
|
|
24
|
+
ApplicationStatus["ApplicationReceived"] = "APPLICATION_RECEIVED";
|
|
25
|
+
ApplicationStatus["Cancelled"] = "CANCELLED";
|
|
26
|
+
ApplicationStatus["ConditionallyApproved"] = "CONDITIONALLY_APPROVED";
|
|
27
|
+
ApplicationStatus["Declined"] = "DECLINED";
|
|
28
|
+
ApplicationStatus["Discharged"] = "DISCHARGED";
|
|
29
|
+
ApplicationStatus["DocumentsIssued"] = "DOCUMENTS_ISSUED";
|
|
30
|
+
ApplicationStatus["InformationProvidedToLender"] = "INFORMATION_PROVIDED_TO_LENDER";
|
|
31
|
+
ApplicationStatus["Lost"] = "LOST";
|
|
32
|
+
ApplicationStatus["MoreInformationRequested"] = "MORE_INFORMATION_REQUESTED";
|
|
33
|
+
ApplicationStatus["OnHold"] = "ON_HOLD";
|
|
34
|
+
ApplicationStatus["PendingSettlement"] = "PENDING_SETTLEMENT";
|
|
35
|
+
ApplicationStatus["PostContact"] = "POST_CONTACT";
|
|
36
|
+
ApplicationStatus["PreApproved"] = "PRE_APPROVED";
|
|
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";
|
|
43
|
+
ApplicationStatus["Settled"] = "SETTLED";
|
|
44
|
+
ApplicationStatus["SolicitorInstructed"] = "SOLICITOR_INSTRUCTED";
|
|
45
|
+
ApplicationStatus["SubmittedToLender"] = "SUBMITTED_TO_LENDER";
|
|
46
|
+
ApplicationStatus["UnconditionallyApproved"] = "UNCONDITIONALLY_APPROVED";
|
|
47
|
+
ApplicationStatus["UnderReview"] = "UNDER_REVIEW";
|
|
48
|
+
ApplicationStatus["WaitingOnException"] = "WAITING_ON_EXCEPTION";
|
|
49
|
+
})(ApplicationStatus = exports.ApplicationStatus || (exports.ApplicationStatus = {}));
|
|
50
|
+
/**
|
|
51
|
+
* Intention for applying a loan
|
|
52
|
+
*/
|
|
53
|
+
var ConfirmedPrimaryPurpose;
|
|
54
|
+
(function (ConfirmedPrimaryPurpose) {
|
|
55
|
+
ConfirmedPrimaryPurpose["ChattelMortgage"] = "CHATTEL_MORTGAGE";
|
|
56
|
+
ConfirmedPrimaryPurpose["Commercial"] = "COMMERCIAL";
|
|
57
|
+
ConfirmedPrimaryPurpose["Construction"] = "CONSTRUCTION";
|
|
58
|
+
ConfirmedPrimaryPurpose["ConstructionAndPurchase"] = "CONSTRUCTION_AND_PURCHASE";
|
|
59
|
+
ConfirmedPrimaryPurpose["ConstructionAndRefinance"] = "CONSTRUCTION_AND_REFINANCE";
|
|
60
|
+
ConfirmedPrimaryPurpose["HirePurchase"] = "HIRE_PURCHASE";
|
|
61
|
+
ConfirmedPrimaryPurpose["InternalRefiSwitch"] = "INTERNAL_REFI_SWITCH";
|
|
62
|
+
ConfirmedPrimaryPurpose["Lease"] = "LEASE";
|
|
63
|
+
ConfirmedPrimaryPurpose["Loan"] = "LOAN";
|
|
64
|
+
ConfirmedPrimaryPurpose["NewPurchase"] = "NEW_PURCHASE";
|
|
65
|
+
ConfirmedPrimaryPurpose["PreApproval"] = "PRE_APPROVAL";
|
|
66
|
+
ConfirmedPrimaryPurpose["Purchase"] = "PURCHASE";
|
|
67
|
+
ConfirmedPrimaryPurpose["PurchaseAndRefinance"] = "PURCHASE_AND_REFINANCE";
|
|
68
|
+
ConfirmedPrimaryPurpose["Refinance"] = "REFINANCE";
|
|
69
|
+
ConfirmedPrimaryPurpose["Slr"] = "SLR";
|
|
70
|
+
ConfirmedPrimaryPurpose["TopUp"] = "TOP_UP";
|
|
71
|
+
ConfirmedPrimaryPurpose["Unknown"] = "UNKNOWN";
|
|
72
|
+
ConfirmedPrimaryPurpose["Variation"] = "VARIATION";
|
|
73
|
+
})(ConfirmedPrimaryPurpose = exports.ConfirmedPrimaryPurpose || (exports.ConfirmedPrimaryPurpose = {}));
|
|
74
|
+
/**
|
|
75
|
+
* Opportunity stage name. This is a legacy field and will be deprecated after Lendi Group
|
|
76
|
+
* salesforce goes live
|
|
77
|
+
*/
|
|
78
|
+
var Stage;
|
|
79
|
+
(function (Stage) {
|
|
80
|
+
Stage["ApplicationTaken"] = "APPLICATION_TAKEN";
|
|
81
|
+
Stage["Appointed"] = "APPOINTED";
|
|
82
|
+
Stage["Approval"] = "APPROVAL";
|
|
83
|
+
Stage["Approved"] = "APPROVED";
|
|
84
|
+
Stage["AtRisk"] = "AT_RISK";
|
|
85
|
+
Stage["ClFutureContactDate"] = "CL_FUTURE_CONTACT_DATE";
|
|
86
|
+
Stage["ClosedLost"] = "CLOSED_LOST";
|
|
87
|
+
Stage["ClosedWon"] = "CLOSED_WON";
|
|
88
|
+
Stage["ClosedWonPolicyActive"] = "CLOSED_WON_POLICY_ACTIVE";
|
|
89
|
+
Stage["ClosedWonSigned"] = "CLOSED_WON_SIGNED";
|
|
90
|
+
Stage["ConfirmedAppointment"] = "CONFIRMED_APPOINTMENT";
|
|
91
|
+
Stage["InApplication"] = "IN_APPLICATION";
|
|
92
|
+
Stage["InAssessment"] = "IN_ASSESSMENT";
|
|
93
|
+
Stage["LoanDocument"] = "LOAN_DOCUMENT";
|
|
94
|
+
Stage["PostContact"] = "POST_CONTACT";
|
|
95
|
+
Stage["PostSettlement"] = "POST_SETTLEMENT";
|
|
96
|
+
Stage["PreContact"] = "PRE_CONTACT";
|
|
97
|
+
Stage["Qualification"] = "QUALIFICATION";
|
|
98
|
+
Stage["Quote"] = "QUOTE";
|
|
99
|
+
Stage["Settled"] = "SETTLED";
|
|
100
|
+
Stage["Settlement"] = "SETTLEMENT";
|
|
101
|
+
Stage["Submitted"] = "SUBMITTED";
|
|
102
|
+
Stage["Unknown"] = "UNKNOWN";
|
|
103
|
+
})(Stage = exports.Stage || (exports.Stage = {}));
|
|
104
|
+
/**
|
|
105
|
+
* Opportunity status. This is a legacy field and will be deprecated after Lendi Group
|
|
106
|
+
* salesforce goes live
|
|
107
|
+
*/
|
|
108
|
+
var Status;
|
|
109
|
+
(function (Status) {
|
|
110
|
+
Status["Application"] = "APPLICATION";
|
|
111
|
+
Status["ApplicationCompleted"] = "APPLICATION_COMPLETED";
|
|
112
|
+
Status["ApplicationStarted"] = "APPLICATION_STARTED";
|
|
113
|
+
Status["ApprovedAndPendingSettlement"] = "APPROVED_AND_PENDING_SETTLEMENT";
|
|
114
|
+
Status["ApprovedWithPendingDocuments"] = "APPROVED_WITH_PENDING_DOCUMENTS";
|
|
115
|
+
Status["Compliance"] = "COMPLIANCE";
|
|
116
|
+
Status["ConditionallyApproved"] = "CONDITIONALLY_APPROVED";
|
|
117
|
+
Status["ContactAttempted"] = "CONTACT_ATTEMPTED";
|
|
118
|
+
Status["ContactMade"] = "CONTACT_MADE";
|
|
119
|
+
Status["Dashboard"] = "DASHBOARD";
|
|
120
|
+
Status["DocsGenerated"] = "DOCS_GENERATED";
|
|
121
|
+
Status["DocumentsReceived"] = "DOCUMENTS_RECEIVED";
|
|
122
|
+
Status["EConsentComplete"] = "E_CONSENT_COMPLETE";
|
|
123
|
+
Status["FormallyApproved"] = "FORMALLY_APPROVED";
|
|
124
|
+
Status["InApplication"] = "IN_APPLICATION";
|
|
125
|
+
Status["LoanDocumentsReceived"] = "LOAN_DOCUMENTS_RECEIVED";
|
|
126
|
+
Status["LoanDocumentsSent"] = "LOAN_DOCUMENTS_SENT";
|
|
127
|
+
Status["LoanDocumentsVerified"] = "LOAN_DOCUMENTS_VERIFIED";
|
|
128
|
+
Status["Lost"] = "LOST";
|
|
129
|
+
Status["Mir"] = "MIR";
|
|
130
|
+
Status["NoAnswer1"] = "NO_ANSWER_1";
|
|
131
|
+
Status["NoAnswer2"] = "NO_ANSWER_2";
|
|
132
|
+
Status["NoAnswer3"] = "NO_ANSWER_3";
|
|
133
|
+
Status["NoAnswer4"] = "NO_ANSWER_4";
|
|
134
|
+
Status["NoAnswer5"] = "NO_ANSWER_5";
|
|
135
|
+
Status["OppCreatedNew"] = "OPP_CREATED_NEW";
|
|
136
|
+
Status["PendingSettlement"] = "PENDING_SETTLEMENT";
|
|
137
|
+
Status["PendingSettlementConfirmation"] = "PENDING_SETTLEMENT_CONFIRMATION";
|
|
138
|
+
Status["PlatformComplete"] = "PLATFORM_COMPLETE";
|
|
139
|
+
Status["PreApproval"] = "PRE_APPROVAL";
|
|
140
|
+
Status["ProductSelectionComplete"] = "PRODUCT_SELECTION_COMPLETE";
|
|
141
|
+
Status["Quarantined"] = "QUARANTINED";
|
|
142
|
+
Status["ReadyToSubmit"] = "READY_TO_SUBMIT";
|
|
143
|
+
Status["Referred"] = "REFERRED";
|
|
144
|
+
Status["RequiredDocsUploaded"] = "REQUIRED_DOCS_UPLOADED";
|
|
145
|
+
Status["SelfSubmitted"] = "SELF_SUBMITTED";
|
|
146
|
+
Status["ServicingPassed"] = "SERVICING_PASSED";
|
|
147
|
+
Status["Settled"] = "SETTLED";
|
|
148
|
+
Status["SettledAndDischarged"] = "SETTLED_AND_DISCHARGED";
|
|
149
|
+
Status["SettledAndReconciled"] = "SETTLED_AND_RECONCILED";
|
|
150
|
+
Status["SettledNotPaid"] = "SETTLED_NOT_PAID";
|
|
151
|
+
Status["SettlementBooked"] = "SETTLEMENT_BOOKED";
|
|
152
|
+
Status["SignedAdditionalDocsRequired"] = "SIGNED_ADDITIONAL_DOCS_REQUIRED";
|
|
153
|
+
Status["SignedClosedLost"] = "SIGNED_CLOSED_LOST";
|
|
154
|
+
Status["Stp"] = "STP";
|
|
155
|
+
Status["StpExceptions"] = "STP_EXCEPTIONS";
|
|
156
|
+
Status["SubmitChangesToLender"] = "SUBMIT_CHANGES_TO_LENDER";
|
|
157
|
+
Status["SubmitToProduction"] = "SUBMIT_TO_PRODUCTION";
|
|
158
|
+
Status["SubmitToProductionIncomplete"] = "SUBMIT_TO_PRODUCTION_INCOMPLETE";
|
|
159
|
+
Status["SubmitToProductionQA"] = "SUBMIT_TO_PRODUCTION_QA";
|
|
160
|
+
Status["Submitted"] = "SUBMITTED";
|
|
161
|
+
Status["SubmittedClosedLost"] = "SUBMITTED_CLOSED_LOST";
|
|
162
|
+
Status["SubmittedDeclined"] = "SUBMITTED_DECLINED";
|
|
163
|
+
Status["SubmittedMir"] = "SUBMITTED_MIR";
|
|
164
|
+
Status["SubmittedOnHold"] = "SUBMITTED_ON_HOLD";
|
|
165
|
+
Status["SubmittedResolved"] = "SUBMITTED_RESOLVED";
|
|
166
|
+
Status["SubmittedToLender"] = "SUBMITTED_TO_LENDER";
|
|
167
|
+
Status["UnconditionalApproval"] = "UNCONDITIONAL_APPROVAL";
|
|
168
|
+
Status["Unknown"] = "UNKNOWN";
|
|
169
|
+
})(Status = exports.Status || (exports.Status = {}));
|
|
170
|
+
var Type;
|
|
171
|
+
(function (Type) {
|
|
172
|
+
Type["ApplicationWorkflowUpdated"] = "ApplicationWorkflowUpdated";
|
|
173
|
+
})(Type = exports.Type || (exports.Type = {}));
|
|
@@ -29,13 +29,16 @@ export interface Liability {
|
|
|
29
29
|
creditLimit?: number;
|
|
30
30
|
description?: string;
|
|
31
31
|
financialInstitution?: string;
|
|
32
|
+
financialInstitutionAccountNumber?: string;
|
|
33
|
+
financialInstitutionBsb?: string;
|
|
34
|
+
financialInstitutionShortName?: string;
|
|
32
35
|
interestOnlyDuration?: number;
|
|
33
36
|
interestOnlyRemainingTerm?: number;
|
|
34
37
|
interestType?: InterestType;
|
|
35
38
|
newLimit?: number;
|
|
36
39
|
originalBalance?: number;
|
|
37
40
|
outstandingBalance: number;
|
|
38
|
-
percentOwned
|
|
41
|
+
percentOwned?: PercentOwned;
|
|
39
42
|
remainingTermDuration?: number;
|
|
40
43
|
repaymentAmount?: number;
|
|
41
44
|
repaymentFrequency?: RepaymentFrequency;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lendi/integrations-transform",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
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",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PayloadObject as OpportunityPayload } from '../types/events/opportunity';
|
|
2
|
-
/**
|
|
3
|
-
* Generates a partial internal request from a partial opportunity event.
|
|
4
|
-
*
|
|
5
|
-
* @param opportunity: Partial opportunity event.
|
|
6
|
-
* @return partialApplication: A partial internal request.
|
|
7
|
-
*/
|
|
8
|
-
export declare function generateOpportunity(opportunity: OpportunityPayload): {};
|