@lendi/act-credit-decisions-transform 2.0.21 → 2.0.22

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.
Files changed (28) hide show
  1. package/lib/schemas/credit-report-retrieved-event.json +828 -10
  2. package/lib/transform-events/generate-asset-liability-link.js +1 -2
  3. package/lib/transform-events/generate-credit-report-rebuilt.d.ts +1 -1
  4. package/lib/transform-events/generate-credit-report-rebuilt.js +1 -2
  5. package/lib/transform-events/transform-applicant.js +2 -2
  6. package/lib/transform-events/transform-application-workflow.js +1 -2
  7. package/lib/transform-events/transform-application.js +1 -2
  8. package/lib/transform-events/transform-asset-address.js +4 -4
  9. package/lib/transform-events/transform-asset.js +8 -8
  10. package/lib/transform-events/transform-bcm-status-updated.js +1 -2
  11. package/lib/transform-events/transform-employment.js +1 -2
  12. package/lib/transform-events/transform-expenses.js +6 -6
  13. package/lib/transform-events/transform-funding-position.js +2 -3
  14. package/lib/transform-events/transform-income.js +6 -6
  15. package/lib/transform-events/transform-liability.js +1 -2
  16. package/lib/transform-events/transform-percent-owned.js +1 -2
  17. package/lib/types/events/credit-report-retrieved.d.ts +561 -5
  18. package/lib/types/events/credit-report-retrieved.js +297 -6
  19. package/lib/update-application/merge-application.js +1 -2
  20. package/lib/utils/address-tools.js +8 -8
  21. package/lib/utils/clean-up.js +1 -2
  22. package/lib/utils/generate-address.js +3 -3
  23. package/lib/utils/get-financial-institution.js +1 -2
  24. package/lib/utils/is-asset-type.js +4 -5
  25. package/lib/utils/is-income-type.js +9 -9
  26. package/lib/utils/normalise-date.js +1 -2
  27. package/lib/utils/round-decimal.js +1 -2
  28. package/package.json +1 -1
@@ -1,6 +1,257 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Type = exports.Source = void 0;
3
+ exports.CreditReportRetrievedType = exports.LendiRepaymentStatusCode = exports.LendiConsumerAccountTypeList = exports.Source = exports.SummaryType = exports.DataLevel = exports.PrimaryMatchType = exports.InsolvencyStatus = exports.InsolvencyTypeList = exports.DirectorshipType = exports.OrganisationTypeList = exports.Status = exports.CourtActionType = exports.ConsumerAccountTypeList = exports.CreditEnquiryAccountType = exports.RepaymentStatusList = exports.RepaymentStatusCode = exports.PaymentDefaultStatusList = exports.LoanPaymentMethodCodeList = exports.CommercialAccountType = void 0;
4
+ var CommercialAccountType;
5
+ (function (CommercialAccountType) {
6
+ CommercialAccountType["AllOtherAccountTypes"] = "All Other Account Types";
7
+ CommercialAccountType["AutoLoan"] = "Auto Loan";
8
+ CommercialAccountType["BankOverdraft"] = "Bank Overdraft";
9
+ CommercialAccountType["BillOfSale"] = "Bill of Sale";
10
+ CommercialAccountType["BridgingFinance"] = "Bridging Finance";
11
+ CommercialAccountType["BuyNowPayLaterFacility"] = "Buy Now Pay Later Facility";
12
+ CommercialAccountType["BuyNowPayLaterTransaction"] = "Buy Now Pay Later Transaction";
13
+ CommercialAccountType["CashOnDelivery"] = "Cash on Delivery";
14
+ CommercialAccountType["ChargeCard"] = "Charge Card";
15
+ CommercialAccountType["Cheque"] = "Cheque";
16
+ CommercialAccountType["CommercialAccountTypeTelecommunicationServices"] = "Telecommunication Services";
17
+ CommercialAccountType["CommercialRental"] = "Commercial Rental";
18
+ CommercialAccountType["ContinuingCreditContract"] = "Continuing Credit Contract";
19
+ CommercialAccountType["CreditCard"] = "Credit Card";
20
+ CommercialAccountType["Dealership"] = "Dealership";
21
+ CommercialAccountType["DeferredPaymentDebitCard"] = "Deferred Payment Debit Card";
22
+ CommercialAccountType["DirectorSAccess"] = "Director's Access";
23
+ CommercialAccountType["EquipmentHireOrRental"] = "Equipment Hire or Rental";
24
+ CommercialAccountType["FactoredAccount"] = "Factored Account";
25
+ CommercialAccountType["HirePurchase"] = "Hire Purchase";
26
+ CommercialAccountType["Leasing"] = "Leasing";
27
+ CommercialAccountType["LendingProposal"] = "Lending Proposal";
28
+ CommercialAccountType["Overdraft"] = "Overdraft";
29
+ CommercialAccountType["PersonalLoan"] = "Personal Loan";
30
+ CommercialAccountType["PersonalLoanFixedTerm"] = "Personal Loan Fixed Term";
31
+ CommercialAccountType["PersonalLoanRevolving"] = "Personal Loan Revolving";
32
+ CommercialAccountType["PremiumFinance"] = "Premium Finance";
33
+ CommercialAccountType["RealEstateMortgage"] = "Real Estate Mortgage";
34
+ CommercialAccountType["RealPropertyMortgage"] = "Real Property Mortgage";
35
+ CommercialAccountType["SearchRequest"] = "Search Request";
36
+ CommercialAccountType["TelecommunicationServices"] = "Telecommunication services";
37
+ CommercialAccountType["TelecommunicationsServices"] = "Telecommunications Services";
38
+ CommercialAccountType["The30DayAccount"] = "30-Day Account";
39
+ CommercialAccountType["The60DayAccount"] = "60-Day Account";
40
+ CommercialAccountType["The7DayAccount"] = "7-Day Account";
41
+ CommercialAccountType["The90DayAccount"] = "90-Day Account";
42
+ CommercialAccountType["TradeFinance"] = "Trade Finance";
43
+ CommercialAccountType["Utilities"] = "Utilities";
44
+ CommercialAccountType["WholesaleFinance"] = "Wholesale Finance";
45
+ })(CommercialAccountType || (exports.CommercialAccountType = CommercialAccountType = {}));
46
+ var LoanPaymentMethodCodeList;
47
+ (function (LoanPaymentMethodCodeList) {
48
+ LoanPaymentMethodCodeList["InterestOnly"] = "Interest only";
49
+ LoanPaymentMethodCodeList["NotApplicable"] = "Not Applicable";
50
+ LoanPaymentMethodCodeList["PrincipalAndInterestFull"] = "Principal and Interest Full";
51
+ LoanPaymentMethodCodeList["PrincipalAndInterestPartial"] = "Principal and Interest Partial";
52
+ })(LoanPaymentMethodCodeList || (exports.LoanPaymentMethodCodeList = LoanPaymentMethodCodeList = {}));
53
+ var PaymentDefaultStatusList;
54
+ (function (PaymentDefaultStatusList) {
55
+ PaymentDefaultStatusList["Current"] = "Current";
56
+ PaymentDefaultStatusList["Disputed"] = "Disputed";
57
+ PaymentDefaultStatusList["NewArrangement"] = "New Arrangement";
58
+ PaymentDefaultStatusList["NewArrangementVaried"] = "New Arrangement Varied";
59
+ PaymentDefaultStatusList["Outstanding"] = "Outstanding";
60
+ PaymentDefaultStatusList["Paid"] = "Paid";
61
+ PaymentDefaultStatusList["Settled"] = "Settled";
62
+ })(PaymentDefaultStatusList || (exports.PaymentDefaultStatusList = PaymentDefaultStatusList = {}));
63
+ /**
64
+ * Repayment history code.
65
+ */
66
+ var RepaymentStatusCode;
67
+ (function (RepaymentStatusCode) {
68
+ RepaymentStatusCode["A"] = "A";
69
+ RepaymentStatusCode["C"] = "C";
70
+ RepaymentStatusCode["O"] = "O";
71
+ RepaymentStatusCode["P"] = "P";
72
+ RepaymentStatusCode["R"] = "R";
73
+ RepaymentStatusCode["T"] = "T";
74
+ RepaymentStatusCode["The0"] = "0";
75
+ RepaymentStatusCode["The1"] = "1";
76
+ RepaymentStatusCode["The2"] = "2";
77
+ RepaymentStatusCode["The3"] = "3";
78
+ RepaymentStatusCode["The4"] = "4";
79
+ RepaymentStatusCode["The5"] = "5";
80
+ RepaymentStatusCode["The6"] = "6";
81
+ RepaymentStatusCode["The991"] = "-991";
82
+ RepaymentStatusCode["The992"] = "-992";
83
+ RepaymentStatusCode["The993"] = "-993";
84
+ RepaymentStatusCode["X"] = "X";
85
+ })(RepaymentStatusCode || (exports.RepaymentStatusCode = RepaymentStatusCode = {}));
86
+ /**
87
+ * Repayment history status.
88
+ */
89
+ var RepaymentStatusList;
90
+ (function (RepaymentStatusList) {
91
+ RepaymentStatusList["Closed"] = "Closed";
92
+ RepaymentStatusList["NotAssociated"] = "Not Associated";
93
+ RepaymentStatusList["NotOverdue"] = "Not Overdue";
94
+ RepaymentStatusList["NotReported"] = "Not Reported";
95
+ RepaymentStatusList["OverdueOver179Days"] = "Overdue Over 179 Days";
96
+ RepaymentStatusList["OverdueUpto119Days"] = "Overdue Upto 119 Days";
97
+ RepaymentStatusList["OverdueUpto149Days"] = "Overdue Upto 149 Days";
98
+ RepaymentStatusList["OverdueUpto179Days"] = "Overdue Upto 179 Days";
99
+ RepaymentStatusList["OverdueUpto29Days"] = "Overdue Upto 29 Days";
100
+ RepaymentStatusList["OverdueUpto59Days"] = "Overdue Upto 59 Days";
101
+ RepaymentStatusList["OverdueUpto89Days"] = "Overdue Upto 89 Days";
102
+ RepaymentStatusList["Pending"] = "Pending";
103
+ RepaymentStatusList["Transferred"] = "Transferred";
104
+ })(RepaymentStatusList || (exports.RepaymentStatusList = RepaymentStatusList = {}));
105
+ var CreditEnquiryAccountType;
106
+ (function (CreditEnquiryAccountType) {
107
+ CreditEnquiryAccountType["BankOverdraft"] = "Bank Overdraft";
108
+ CreditEnquiryAccountType["BillOfSale"] = "Bill of Sale";
109
+ CreditEnquiryAccountType["BridgingFinance"] = "Bridging Finance";
110
+ CreditEnquiryAccountType["CashOnDelivery"] = "Cash on Delivery";
111
+ CreditEnquiryAccountType["Cheque"] = "Cheque";
112
+ CreditEnquiryAccountType["CommercialAccountTypeTelecommunicationServices"] = "Telecommunication Services";
113
+ CreditEnquiryAccountType["CommercialRental"] = "Commercial Rental";
114
+ CreditEnquiryAccountType["CreditCard"] = "Credit Card";
115
+ CreditEnquiryAccountType["Dealership"] = "Dealership";
116
+ CreditEnquiryAccountType["DeferredPaymentDebitCard"] = "Deferred Payment Debit Card";
117
+ CreditEnquiryAccountType["DirectorSAccess"] = "Director's Access";
118
+ CreditEnquiryAccountType["FactoredAccount"] = "Factored Account";
119
+ CreditEnquiryAccountType["HirePurchase"] = "Hire Purchase";
120
+ CreditEnquiryAccountType["Leasing"] = "Leasing";
121
+ CreditEnquiryAccountType["LendingProposal"] = "Lending Proposal";
122
+ CreditEnquiryAccountType["PersonalLoan"] = "Personal Loan";
123
+ CreditEnquiryAccountType["PremiumFinance"] = "Premium Finance";
124
+ CreditEnquiryAccountType["RealEstateMortgage"] = "Real Estate Mortgage";
125
+ CreditEnquiryAccountType["SearchRequest"] = "Search Request";
126
+ CreditEnquiryAccountType["TelecommunicationServices"] = "Telecommunication services";
127
+ CreditEnquiryAccountType["The30DayAccount"] = "30-Day Account";
128
+ CreditEnquiryAccountType["The60DayAccount"] = "60-Day Account";
129
+ CreditEnquiryAccountType["The7DayAccount"] = "7-Day Account";
130
+ CreditEnquiryAccountType["The90DayAccount"] = "90-Day Account";
131
+ CreditEnquiryAccountType["TradeFinance"] = "Trade Finance";
132
+ CreditEnquiryAccountType["Utilities"] = "Utilities";
133
+ CreditEnquiryAccountType["WholesaleFinance"] = "Wholesale Finance";
134
+ })(CreditEnquiryAccountType || (exports.CreditEnquiryAccountType = CreditEnquiryAccountType = {}));
135
+ var ConsumerAccountTypeList;
136
+ (function (ConsumerAccountTypeList) {
137
+ ConsumerAccountTypeList["AllOtherAccountTypes"] = "All Other Account Types";
138
+ ConsumerAccountTypeList["AutoLoan"] = "Auto Loan";
139
+ ConsumerAccountTypeList["BuyNowPayLaterFacility"] = "Buy Now Pay Later Facility";
140
+ ConsumerAccountTypeList["BuyNowPayLaterTransaction"] = "Buy Now Pay Later Transaction";
141
+ ConsumerAccountTypeList["ChargeCard"] = "Charge Card";
142
+ ConsumerAccountTypeList["ContinuingCreditContract"] = "Continuing Credit Contract";
143
+ ConsumerAccountTypeList["CreditCard"] = "Credit Card";
144
+ ConsumerAccountTypeList["EquipmentHireOrRental"] = "Equipment Hire or Rental";
145
+ ConsumerAccountTypeList["Overdraft"] = "Overdraft";
146
+ ConsumerAccountTypeList["PersonalLoanFixedTerm"] = "Personal Loan Fixed Term";
147
+ ConsumerAccountTypeList["PersonalLoanRevolving"] = "Personal Loan Revolving";
148
+ ConsumerAccountTypeList["RealPropertyMortgage"] = "Real Property Mortgage";
149
+ ConsumerAccountTypeList["TelecommunicationsServices"] = "Telecommunications Services";
150
+ ConsumerAccountTypeList["Utilities"] = "Utilities";
151
+ })(ConsumerAccountTypeList || (exports.ConsumerAccountTypeList = ConsumerAccountTypeList = {}));
152
+ /**
153
+ * Includes information about default judgements and other court actions (such as writs and
154
+ * summons)
155
+ */
156
+ var CourtActionType;
157
+ (function (CourtActionType) {
158
+ CourtActionType["DefaultJudgement"] = "defaultJudgement";
159
+ CourtActionType["OtherCourtAction"] = "otherCourtAction";
160
+ })(CourtActionType || (exports.CourtActionType = CourtActionType = {}));
161
+ /**
162
+ * Status of the court action.
163
+ */
164
+ var Status;
165
+ (function (Status) {
166
+ Status["Disconnected"] = "Disconnected";
167
+ Status["Paid"] = "Paid";
168
+ Status["Settled"] = "Settled";
169
+ })(Status || (exports.Status = Status = {}));
170
+ var OrganisationTypeList;
171
+ (function (OrganisationTypeList) {
172
+ OrganisationTypeList["Incorporated"] = "Incorporated";
173
+ OrganisationTypeList["LimitedLiabilityRegisteredBody"] = "Limited Liability Registered Body";
174
+ OrganisationTypeList["Proprietary"] = "Proprietary";
175
+ OrganisationTypeList["ProprietaryLimited"] = "Proprietary Limited";
176
+ OrganisationTypeList["ProprietaryLimitedNoLiability"] = "Proprietary Limited No Liability";
177
+ })(OrganisationTypeList || (exports.OrganisationTypeList = OrganisationTypeList = {}));
178
+ /**
179
+ * The type of Directorship
180
+ */
181
+ var DirectorshipType;
182
+ (function (DirectorshipType) {
183
+ DirectorshipType["Current"] = "Current";
184
+ DirectorshipType["Previous"] = "Previous";
185
+ })(DirectorshipType || (exports.DirectorshipType = DirectorshipType = {}));
186
+ var InsolvencyTypeList;
187
+ (function (InsolvencyTypeList) {
188
+ InsolvencyTypeList["AssignmentOrArrangement"] = "Assignment or Arrangement";
189
+ InsolvencyTypeList["Bankruptcy"] = "Bankruptcy";
190
+ InsolvencyTypeList["BankruptcySequestrationOrderArrangement"] = "Bankruptcy Sequestration Order Arrangement";
191
+ InsolvencyTypeList["Composition"] = "Composition";
192
+ InsolvencyTypeList["DebtAgreement"] = "Debt Agreement";
193
+ InsolvencyTypeList["PersonalInsolvencyAgreement"] = "Personal Insolvency Agreement";
194
+ })(InsolvencyTypeList || (exports.InsolvencyTypeList = InsolvencyTypeList = {}));
195
+ var InsolvencyStatus;
196
+ (function (InsolvencyStatus) {
197
+ InsolvencyStatus["Completed"] = "Completed";
198
+ InsolvencyStatus["Discharged"] = "Discharged";
199
+ InsolvencyStatus["Terminated"] = "Terminated";
200
+ })(InsolvencyStatus || (exports.InsolvencyStatus = InsolvencyStatus = {}));
201
+ /**
202
+ * Strong - credit report is found, and a record exists in the credit provider's database;
203
+ * Create - credit report is found, no record exists in the credit provider's database, a
204
+ * new record is added.
205
+ */
206
+ var PrimaryMatchType;
207
+ (function (PrimaryMatchType) {
208
+ PrimaryMatchType["Create"] = "Create";
209
+ PrimaryMatchType["Strong"] = "Strong";
210
+ })(PrimaryMatchType || (exports.PrimaryMatchType = PrimaryMatchType = {}));
211
+ /**
212
+ * Indicates the data level type of the characteristic. A characteristic can be derived
213
+ * based on Negative, Partial or Comprehensive
214
+ */
215
+ var DataLevel;
216
+ (function (DataLevel) {
217
+ DataLevel["Comprehensive"] = "Comprehensive";
218
+ DataLevel["Negative"] = "Negative";
219
+ DataLevel["Partial"] = "Partial";
220
+ })(DataLevel || (exports.DataLevel = DataLevel = {}));
221
+ var SummaryType;
222
+ (function (SummaryType) {
223
+ SummaryType["AgeOfCreditFileInMths"] = "ageOfCreditFileInMths";
224
+ SummaryType["ClosedAccounts"] = "closedAccounts";
225
+ SummaryType["CommercialAdverseFlagOnFileInLast48Or84Months"] = "commercialAdverseFlagOnFileInLast48Or84Months";
226
+ SummaryType["ConsumerAdverseFlagOnFileInLast48Or84Months"] = "consumerAdverseFlagOnFileInLast48Or84Months";
227
+ SummaryType["CreditEnquiriesInLast5Years"] = "creditEnquiriesInLast5Years";
228
+ SummaryType["CurrentDirectorships"] = "currentDirectorships";
229
+ SummaryType["DefaultsLast12Months"] = "defaultsLast12Months";
230
+ SummaryType["DefaultsLast5To7Years"] = "defaultsLast5To7Years";
231
+ SummaryType["DefaultsLast6Months"] = "defaultsLast6Months";
232
+ SummaryType["FinancialHardshipIndicatorsInLast12Months"] = "financialHardshipIndicatorsInLast12Months";
233
+ SummaryType["InsolvenciesAndActions"] = "insolvenciesAndActions";
234
+ SummaryType["NumBankruptOnlyInsolvenciesOnFile"] = "numBankruptOnlyInsolvenciesOnFile";
235
+ SummaryType["NumConsumerEnquiriesInLast12Months"] = "numConsumerEnquiriesInLast12Months";
236
+ SummaryType["NumCourtWritsInLast60Months"] = "numCourtWritsInLast60Months";
237
+ SummaryType["NumJudgementsInLast60Months"] = "numJudgementsInLast60Months";
238
+ SummaryType["NumOpenAutoAccounts"] = "numOpenAutoAccounts";
239
+ SummaryType["NumOpenChargeCardAccounts"] = "numOpenChargeCardAccounts";
240
+ SummaryType["NumOpenCreditCardAccounts"] = "numOpenCreditCardAccounts";
241
+ SummaryType["NumOpenMortgageAccounts"] = "numOpenMortgageAccounts";
242
+ SummaryType["NumOpenOverdraftAccounts"] = "numOpenOverdraftAccounts";
243
+ SummaryType["NumOpenPersonalLoanAccounts"] = "numOpenPersonalLoanAccounts";
244
+ SummaryType["NumOpenRentalAccounts"] = "numOpenRentalAccounts";
245
+ SummaryType["NumUnpaidOrUnsettledCourtWritsInLast60Months"] = "numUnpaidOrUnsettledCourtWritsInLast60Months";
246
+ SummaryType["NumUnpaidOrUnsettledJudgementsInLast60Months"] = "numUnpaidOrUnsettledJudgementsInLast60Months";
247
+ SummaryType["NumberOfCommercialDisqualifiedDirectorshipsInLast60Months"] = "numberOfCommercialDisqualifiedDirectorshipsInLast60Months";
248
+ SummaryType["OpenedAccounts"] = "openedAccounts";
249
+ SummaryType["PreviousDirectorships"] = "previousDirectorships";
250
+ SummaryType["WorstClosedInLast24Months"] = "worstClosedInLast24Months";
251
+ SummaryType["WorstOpenAccountStatus"] = "worstOpenAccountStatus";
252
+ SummaryType["WorstOpenInLast12Months"] = "worstOpenInLast12Months";
253
+ SummaryType["WorstOpenInLast24Months"] = "worstOpenInLast24Months";
254
+ })(SummaryType || (exports.SummaryType = SummaryType = {}));
4
255
  /**
5
256
  * A list of credit report service provider
6
257
  */
@@ -8,8 +259,48 @@ var Source;
8
259
  (function (Source) {
9
260
  Source["Equifax"] = "equifax";
10
261
  })(Source || (exports.Source = Source = {}));
11
- var Type;
12
- (function (Type) {
13
- Type["CreditReportNoMatch"] = "CreditReportNoMatch";
14
- Type["CreditReportRetrieved"] = "CreditReportRetrieved";
15
- })(Type || (exports.Type = Type = {}));
262
+ /**
263
+ * Account type of the consumer enquiries that has been transformed to Lendi values
264
+ *
265
+ * Account type of the consumer enquiries that has been transformed to Lendi values. Any
266
+ * value that can not be mapped to Lendi values will be set to UNKNOWN
267
+ */
268
+ var LendiConsumerAccountTypeList;
269
+ (function (LendiConsumerAccountTypeList) {
270
+ LendiConsumerAccountTypeList["BnplAccounts"] = "BNPL_ACCOUNTS";
271
+ LendiConsumerAccountTypeList["CarLoans"] = "CAR_LOANS";
272
+ LendiConsumerAccountTypeList["CreditChargeCards"] = "CREDIT_CHARGE_CARDS";
273
+ LendiConsumerAccountTypeList["HomeLoans"] = "HOME_LOANS";
274
+ LendiConsumerAccountTypeList["Leases"] = "LEASES";
275
+ LendiConsumerAccountTypeList["Overdrafts"] = "OVERDRAFTS";
276
+ LendiConsumerAccountTypeList["PersonalLoans"] = "PERSONAL_LOANS";
277
+ LendiConsumerAccountTypeList["Unknown"] = "UNKNOWN";
278
+ })(LendiConsumerAccountTypeList || (exports.LendiConsumerAccountTypeList = LendiConsumerAccountTypeList = {}));
279
+ /**
280
+ * Repayment history code.
281
+ *
282
+ * Equifax Repayment history code in Lendi value
283
+ */
284
+ var LendiRepaymentStatusCode;
285
+ (function (LendiRepaymentStatusCode) {
286
+ LendiRepaymentStatusCode["Closed"] = "CLOSED";
287
+ LendiRepaymentStatusCode["NotApplicable"] = "NOT_APPLICABLE";
288
+ LendiRepaymentStatusCode["NotAssociated"] = "NOT_ASSOCIATED";
289
+ LendiRepaymentStatusCode["NotOverdue"] = "NOT_OVERDUE";
290
+ LendiRepaymentStatusCode["NotReported"] = "NOT_REPORTED";
291
+ LendiRepaymentStatusCode["OtherCase"] = "OTHER_CASE";
292
+ LendiRepaymentStatusCode["OverdueMorethan180Days"] = "OVERDUE_MORETHAN_180DAYS";
293
+ LendiRepaymentStatusCode["OverdueUpto119Days"] = "OVERDUE_UPTO_119DAYS";
294
+ LendiRepaymentStatusCode["OverdueUpto149Days"] = "OVERDUE_UPTO_149DAYS";
295
+ LendiRepaymentStatusCode["OverdueUpto179Days"] = "OVERDUE_UPTO_179DAYS";
296
+ LendiRepaymentStatusCode["OverdueUpto29Days"] = "OVERDUE_UPTO_29DAYS";
297
+ LendiRepaymentStatusCode["OverdueUpto59Days"] = "OVERDUE_UPTO_59DAYS";
298
+ LendiRepaymentStatusCode["OverdueUpto89Days"] = "OVERDUE_UPTO_89DAYS";
299
+ LendiRepaymentStatusCode["Pending"] = "PENDING";
300
+ LendiRepaymentStatusCode["Transferred"] = "TRANSFERRED";
301
+ })(LendiRepaymentStatusCode || (exports.LendiRepaymentStatusCode = LendiRepaymentStatusCode = {}));
302
+ var CreditReportRetrievedType;
303
+ (function (CreditReportRetrievedType) {
304
+ CreditReportRetrievedType["CreditReportNoMatch"] = "CreditReportNoMatch";
305
+ CreditReportRetrievedType["CreditReportRetrieved"] = "CreditReportRetrieved";
306
+ })(CreditReportRetrievedType || (exports.CreditReportRetrievedType = CreditReportRetrievedType = {}));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deepMergeApplication = void 0;
3
+ exports.deepMergeApplication = deepMergeApplication;
4
4
  const merge = require("deepmerge");
5
5
  const cleanDeep = require('clean-deep');
6
6
  /**
@@ -115,7 +115,6 @@ function deepMergeApplication(existingApplication, newApplication, options = {})
115
115
  };
116
116
  return cleanDeep(mergedApplication, params);
117
117
  }
118
- exports.deepMergeApplication = deepMergeApplication;
119
118
  const arrayItemToReplaceKeys = ['Owner', 'Attendee', 'Shareholder', 'Fee', 'ContributionFunds', 'RentalIncome'];
120
119
  /**
121
120
  *
@@ -3,7 +3,14 @@
3
3
  * A set of tools for manipulating addresses in LIXI applications.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.isOverseasAddress = exports.extractCountryFromFormatted = exports.setCountry = exports.isMissingCountry = exports.rebuildPreviousAddress = exports.rebuildAddress = exports.mapTransform = exports.lixiAddressMapping = exports.australianStates = exports.lixiContactAddressMapping = void 0;
6
+ exports.lixiAddressMapping = exports.australianStates = exports.lixiContactAddressMapping = void 0;
7
+ exports.mapTransform = mapTransform;
8
+ exports.rebuildAddress = rebuildAddress;
9
+ exports.rebuildPreviousAddress = rebuildPreviousAddress;
10
+ exports.isMissingCountry = isMissingCountry;
11
+ exports.setCountry = setCountry;
12
+ exports.extractCountryFromFormatted = extractCountryFromFormatted;
13
+ exports.isOverseasAddress = isOverseasAddress;
7
14
  const lixi_internal_request_1 = require("@lendi/act-eac-integrations-protocol/lib/types/lixi-internal-request");
8
15
  const lodash_1 = require("lodash");
9
16
  const country_code_1 = require("../types/enum-mappings/country-code");
@@ -79,7 +86,6 @@ function mapTransform(source, pathMappedTransform) {
79
86
  });
80
87
  return finalTransform;
81
88
  }
82
- exports.mapTransform = mapTransform;
83
89
  const postcodePathString = 'residentialAddress.postcode';
84
90
  const statePathString = 'residentialAddress.state';
85
91
  /**
@@ -106,7 +112,6 @@ function rebuildAddress(eventAddress, addressId) {
106
112
  lixiContactAddress['@x_ResidentialAddress'] = addressId;
107
113
  return { lixiAddress, lixiContactAddress };
108
114
  }
109
- exports.rebuildAddress = rebuildAddress;
110
115
  /**
111
116
  * Converts a previous address object from an event model to a LIXI address and corresponding LIXI current address object.
112
117
  *
@@ -119,7 +124,6 @@ function rebuildPreviousAddress(eventPreviousAddresses = [], addressId) {
119
124
  const previousAddress = eventPreviousAddresses.sort((lhs, rhs) => lhs.endDate.localeCompare(rhs.endDate)).pop();
120
125
  return rebuildAddress(previousAddress, addressId);
121
126
  }
122
- exports.rebuildPreviousAddress = rebuildPreviousAddress;
123
127
  /**
124
128
  * Checks if an event is missing country.
125
129
  *
@@ -131,7 +135,6 @@ function isMissingCountry(addressEvent) {
131
135
  }
132
136
  return false;
133
137
  }
134
- exports.isMissingCountry = isMissingCountry;
135
138
  /**
136
139
  * Sets the country from the last item on the formatted address.
137
140
  *
@@ -144,7 +147,6 @@ function setCountry(address) {
144
147
  }
145
148
  return address;
146
149
  }
147
- exports.setCountry = setCountry;
148
150
  /**
149
151
  * @description Extract a country from a formatted address.
150
152
  * @param {string} formatted - A formatted Address.
@@ -154,7 +156,6 @@ function extractCountryFromFormatted(formatted = '') {
154
156
  var _a;
155
157
  return (_a = formatted === null || formatted === void 0 ? void 0 : formatted.split(',').pop()) === null || _a === void 0 ? void 0 : _a.trim();
156
158
  }
157
- exports.extractCountryFromFormatted = extractCountryFromFormatted;
158
159
  /**
159
160
  * @description If the address has an overseas country or state, it returns true, defaults to false if no country and state found.
160
161
  * @param {Address} address - Asset Address
@@ -173,4 +174,3 @@ function isOverseasAddress({ country, formatted, state } = {}) {
173
174
  }
174
175
  return false;
175
176
  }
176
- exports.isOverseasAddress = isOverseasAddress;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cleanUp = void 0;
3
+ exports.cleanUp = cleanUp;
4
4
  /* istanbul ignore file */
5
5
  const clean_deep_1 = require("clean-deep");
6
6
  /**
@@ -21,4 +21,3 @@ function cleanUp(payload) {
21
21
  };
22
22
  return (0, clean_deep_1.default)(payload, params);
23
23
  }
24
- exports.cleanUp = cleanUp;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateStandard = exports.generateAddress = exports.StreetTypeArray = exports.StreetNumberMaxLength = void 0;
3
+ exports.StreetTypeArray = exports.StreetNumberMaxLength = void 0;
4
+ exports.generateAddress = generateAddress;
5
+ exports.generateStandard = generateStandard;
4
6
  const lixi_internal_request_1 = require("@lendi/act-eac-integrations-protocol/lib/types/lixi-internal-request");
5
7
  const lodash_1 = require("lodash");
6
8
  const country_code_1 = require("..//types/enum-mappings/country-code");
@@ -67,7 +69,6 @@ function generateAddress(address, id) {
67
69
  }
68
70
  return transformedAddress;
69
71
  }
70
- exports.generateAddress = generateAddress;
71
72
  /**
72
73
  * Generates an address standard.
73
74
  *
@@ -94,4 +95,3 @@ function generateStandard(addressStandard) {
94
95
  }
95
96
  return transformedStandard;
96
97
  }
97
- exports.generateStandard = generateStandard;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFinancialInstitution = void 0;
3
+ exports.getFinancialInstitution = getFinancialInstitution;
4
4
  const lixi_internal_request_1 = require("@lendi/act-eac-integrations-protocol/lib/types/lixi-internal-request");
5
5
  const financialInstitutions = Object.values(lixi_internal_request_1.FinancialInstitutionList);
6
6
  /**
@@ -14,4 +14,3 @@ function getFinancialInstitution(institution) {
14
14
  const financialInstitution = financialInstitutions.find((item) => item.toUpperCase() === institutionUpperCased);
15
15
  return financialInstitution || lixi_internal_request_1.FinancialInstitutionList.Other;
16
16
  }
17
- exports.getFinancialInstitution = getFinancialInstitution;
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isOtherAsset = exports.isMotorVehicle = exports.isRealEstateAsset = exports.isFinancialAsset = void 0;
3
+ exports.isFinancialAsset = isFinancialAsset;
4
+ exports.isRealEstateAsset = isRealEstateAsset;
5
+ exports.isMotorVehicle = isMotorVehicle;
6
+ exports.isOtherAsset = isOtherAsset;
4
7
  const public_asset_1 = require("../types/events/public-asset");
5
8
  /**
6
9
  * @description Checks if the asset is of financial type.
@@ -16,7 +19,6 @@ function isFinancialAsset(asset) {
16
19
  public_asset_1.AssetType.ManagedFunds,
17
20
  ].includes(asset.type);
18
21
  }
19
- exports.isFinancialAsset = isFinancialAsset;
20
22
  /**
21
23
  * @description Is Asset a Real Estate Asset.
22
24
  * @param {Asset} asset An Asset.
@@ -25,7 +27,6 @@ exports.isFinancialAsset = isFinancialAsset;
25
27
  function isRealEstateAsset(asset) {
26
28
  return asset.type === public_asset_1.AssetType.Property;
27
29
  }
28
- exports.isRealEstateAsset = isRealEstateAsset;
29
30
  /**
30
31
  * @description Is Asset a Motor Vehicle.
31
32
  * @param {Asset} asset An Asset.
@@ -34,7 +35,6 @@ exports.isRealEstateAsset = isRealEstateAsset;
34
35
  function isMotorVehicle(asset) {
35
36
  return asset.type === public_asset_1.AssetType.Vehicle;
36
37
  }
37
- exports.isMotorVehicle = isMotorVehicle;
38
38
  /**
39
39
  * @description Is Asset of LIXI type `OtherAsset`.
40
40
  * @param {Asset} asset An Asset.
@@ -43,4 +43,3 @@ exports.isMotorVehicle = isMotorVehicle;
43
43
  function isOtherAsset(asset) {
44
44
  return [public_asset_1.AssetType.HomeContents, public_asset_1.AssetType.Gifts, public_asset_1.AssetType.OtherAsset].includes(asset.type);
45
45
  }
46
- exports.isOtherAsset = isOtherAsset;
@@ -1,6 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sortBusinessIncome = exports.getApplicantId = exports.getApplicantIdFromEmployment = exports.hasMatchingEmployment = exports.isFullDocOrLowDocIncome = exports.isOtherIncomeWithDesc = exports.isOtherIncome = exports.isRentalIncome = exports.isSelfEmployedIncome = exports.isPaygIncome = exports.otherIncomeList = exports.PAYGList = exports.descriptionOtherIncomeTypes = void 0;
3
+ exports.sortBusinessIncome = exports.hasMatchingEmployment = exports.otherIncomeList = exports.PAYGList = exports.descriptionOtherIncomeTypes = void 0;
4
+ exports.isPaygIncome = isPaygIncome;
5
+ exports.isSelfEmployedIncome = isSelfEmployedIncome;
6
+ exports.isRentalIncome = isRentalIncome;
7
+ exports.isOtherIncome = isOtherIncome;
8
+ exports.isOtherIncomeWithDesc = isOtherIncomeWithDesc;
9
+ exports.isFullDocOrLowDocIncome = isFullDocOrLowDocIncome;
10
+ exports.getApplicantIdFromEmployment = getApplicantIdFromEmployment;
11
+ exports.getApplicantId = getApplicantId;
4
12
  const lodash_1 = require("lodash");
5
13
  const public_income_1 = require("../types/events/public-income");
6
14
  exports.descriptionOtherIncomeTypes = [
@@ -36,7 +44,6 @@ exports.otherIncomeList = [
36
44
  function isPaygIncome(incomeType) {
37
45
  return exports.PAYGList.includes(incomeType);
38
46
  }
39
- exports.isPaygIncome = isPaygIncome;
40
47
  /**
41
48
  * @description Is income type SelfEmployedBusinessIncome.
42
49
  * @param {string} incomeType Income type.
@@ -45,7 +52,6 @@ exports.isPaygIncome = isPaygIncome;
45
52
  function isSelfEmployedIncome(incomeType) {
46
53
  return incomeType === public_income_1.IncomeType.SelfEmployedBusinessIncome;
47
54
  }
48
- exports.isSelfEmployedIncome = isSelfEmployedIncome;
49
55
  /**
50
56
  * @description Is income type Rental Income.
51
57
  * @param {IncomeType} incomeType Income type.
@@ -54,7 +60,6 @@ exports.isSelfEmployedIncome = isSelfEmployedIncome;
54
60
  function isRentalIncome(incomeType) {
55
61
  return incomeType === public_income_1.IncomeType.RentalIncome;
56
62
  }
57
- exports.isRentalIncome = isRentalIncome;
58
63
  /**
59
64
  * @description Is income type grouped as OtherIncome.
60
65
  * @param {IncomeType} incomeType Income type.
@@ -63,7 +68,6 @@ exports.isRentalIncome = isRentalIncome;
63
68
  function isOtherIncome(incomeType) {
64
69
  return exports.otherIncomeList.includes(incomeType);
65
70
  }
66
- exports.isOtherIncome = isOtherIncome;
67
71
  /**
68
72
  * @description Is Income type one of OtherIncome types.
69
73
  * @param {IncomeType} incomeType Income Type.
@@ -72,7 +76,6 @@ exports.isOtherIncome = isOtherIncome;
72
76
  function isOtherIncomeWithDesc(incomeType) {
73
77
  return exports.descriptionOtherIncomeTypes.includes(incomeType);
74
78
  }
75
- exports.isOtherIncomeWithDesc = isOtherIncomeWithDesc;
76
79
  /**
77
80
  * @description Is Self Employed Full Doc or Low Doc Income
78
81
  * @param incomeType Income Type from Event
@@ -81,7 +84,6 @@ exports.isOtherIncomeWithDesc = isOtherIncomeWithDesc;
81
84
  function isFullDocOrLowDocIncome(incomeType) {
82
85
  return [public_income_1.IncomeType.SelfEmployedBusinessIncomeFullDoc, public_income_1.IncomeType.SelfEmployedBusinessIncomeLowDoc].includes(incomeType);
83
86
  }
84
- exports.isFullDocOrLowDocIncome = isFullDocOrLowDocIncome;
85
87
  /**
86
88
  * Checks if there is some employment for the applicant that has the same employment id as the employment id in the income event
87
89
  *
@@ -114,7 +116,6 @@ function getApplicantIdFromEmployment(applicants, lookupId, lookupField) {
114
116
  }
115
117
  return applicantId;
116
118
  }
117
- exports.getApplicantIdFromEmployment = getApplicantIdFromEmployment;
118
119
  /**
119
120
  * @description Get an applicantId from the event or the applicants.
120
121
  * @param {Income} income Income.
@@ -128,7 +129,6 @@ function getApplicantId({ percentOwned, employmentId, companyId }, applicants =
128
129
  // for selfemployed
129
130
  getApplicantIdFromEmployment(applicants, companyId, '@x_Employer'));
130
131
  }
131
- exports.getApplicantId = getApplicantId;
132
132
  /**
133
133
  * @description Sort Business Income By Year.
134
134
  * @param incomeA Income Details for Self Employed Full Doc.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normaliseDate = void 0;
3
+ exports.normaliseDate = normaliseDate;
4
4
  /**
5
5
  * Accepts any type of data format and normalises it into a consistent format
6
6
  * as "2019-09-19".
@@ -14,4 +14,3 @@ function normaliseDate(dateOfBirth) {
14
14
  const day = ('0' + date.getDate()).slice(-2);
15
15
  return `${year}-${month}-${day}`;
16
16
  }
17
- exports.normaliseDate = normaliseDate;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.roundDecimal = void 0;
3
+ exports.roundDecimal = roundDecimal;
4
4
  /**
5
5
  * Rounds given value to 2 decimals.
6
6
  *
@@ -9,4 +9,3 @@ exports.roundDecimal = void 0;
9
9
  function roundDecimal(amount) {
10
10
  return parseFloat(amount.toFixed(2));
11
11
  }
12
- exports.roundDecimal = roundDecimal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/act-credit-decisions-transform",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "private": false,
5
5
  "description": "Library for kafka event data transforming",
6
6
  "author": "Integrations <integrations@lendi.com.au>",