@lendi/act-credit-decisions-transform 2.0.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/README.md +31 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.js +28 -0
- package/lib/logger.d.ts +1 -0
- package/lib/logger.js +5 -0
- package/lib/schemas/application-workflow-event.json +240 -0
- package/lib/schemas/credit-report-retrieved-event.json +57 -0
- package/lib/schemas/public-applicant-event.json +910 -0
- package/lib/schemas/public-application-event.json +250 -0
- package/lib/schemas/public-asset-event.json +679 -0
- package/lib/schemas/public-asset-liability-relation-delete-event.json +74 -0
- package/lib/schemas/public-asset-liability-relation-event.json +73 -0
- package/lib/schemas/public-create-applicant-event.json +609 -0
- package/lib/schemas/public-delete-applicant-event.json +66 -0
- package/lib/schemas/public-delete-asset-event.json +53 -0
- package/lib/schemas/public-delete-income-event.json +55 -0
- package/lib/schemas/public-employment-delete-event.json +31 -0
- package/lib/schemas/public-employment-event.json +278 -0
- package/lib/schemas/public-expense-delete-event.json +41 -0
- package/lib/schemas/public-expense-event.json +133 -0
- package/lib/schemas/public-funding-position-event.json +419 -0
- package/lib/schemas/public-income-event.json +242 -0
- package/lib/schemas/public-liability-delete-event.json +37 -0
- package/lib/schemas/public-liability-event.json +262 -0
- package/lib/schemas/public-required-document-event.json +366 -0
- package/lib/schemas/public-update-applicant-event.json +606 -0
- package/lib/schemas/sf-opportunity-event-out.json +138 -0
- package/lib/transform-events/generate-asset-liability-link.d.ts +10 -0
- package/lib/transform-events/generate-asset-liability-link.js +29 -0
- package/lib/transform-events/generate-credit-report-rebuilt.d.ts +8 -0
- package/lib/transform-events/generate-credit-report-rebuilt.js +41 -0
- package/lib/transform-events/transform-applicant.d.ts +8 -0
- package/lib/transform-events/transform-applicant.js +180 -0
- package/lib/transform-events/transform-application-workflow.d.ts +8 -0
- package/lib/transform-events/transform-application-workflow.js +30 -0
- package/lib/transform-events/transform-application.d.ts +20 -0
- package/lib/transform-events/transform-application.js +67 -0
- package/lib/transform-events/transform-asset-address.d.ts +25 -0
- package/lib/transform-events/transform-asset-address.js +87 -0
- package/lib/transform-events/transform-asset.d.ts +58 -0
- package/lib/transform-events/transform-asset.js +337 -0
- package/lib/transform-events/transform-employment.d.ts +9 -0
- package/lib/transform-events/transform-employment.js +107 -0
- package/lib/transform-events/transform-expenses.d.ts +41 -0
- package/lib/transform-events/transform-expenses.js +121 -0
- package/lib/transform-events/transform-funding-position.d.ts +21 -0
- package/lib/transform-events/transform-funding-position.js +107 -0
- package/lib/transform-events/transform-income.d.ts +48 -0
- package/lib/transform-events/transform-income.js +260 -0
- package/lib/transform-events/transform-liability.d.ts +12 -0
- package/lib/transform-events/transform-liability.js +117 -0
- package/lib/transform-events/transform-percent-owned.d.ts +10 -0
- package/lib/transform-events/transform-percent-owned.js +22 -0
- package/lib/transform-events/transform-required-document.d.ts +67 -0
- package/lib/transform-events/transform-required-document.js +148 -0
- package/lib/types/enum-mappings/alieo-frequency.d.ts +15 -0
- package/lib/types/enum-mappings/alieo-frequency.js +25 -0
- package/lib/types/enum-mappings/applicant-gender.d.ts +6 -0
- package/lib/types/enum-mappings/applicant-gender.js +11 -0
- package/lib/types/enum-mappings/applicant-type.d.ts +6 -0
- package/lib/types/enum-mappings/applicant-type.js +10 -0
- package/lib/types/enum-mappings/asset-type.d.ts +3 -0
- package/lib/types/enum-mappings/asset-type.js +17 -0
- package/lib/types/enum-mappings/builder-type.d.ts +7 -0
- package/lib/types/enum-mappings/builder-type.js +9 -0
- package/lib/types/enum-mappings/company-structure.d.ts +7 -0
- package/lib/types/enum-mappings/company-structure.js +10 -0
- package/lib/types/enum-mappings/company-type.d.ts +7 -0
- package/lib/types/enum-mappings/company-type.js +11 -0
- package/lib/types/enum-mappings/construction-type.d.ts +7 -0
- package/lib/types/enum-mappings/construction-type.js +10 -0
- package/lib/types/enum-mappings/country-code.d.ts +7 -0
- package/lib/types/enum-mappings/country-code.js +246 -0
- package/lib/types/enum-mappings/employment-basis.d.ts +7 -0
- package/lib/types/enum-mappings/employment-basis.js +12 -0
- package/lib/types/enum-mappings/expense-frequency.d.ts +7 -0
- package/lib/types/enum-mappings/expense-frequency.js +11 -0
- package/lib/types/enum-mappings/funding-position.d.ts +18 -0
- package/lib/types/enum-mappings/funding-position.js +36 -0
- package/lib/types/enum-mappings/government-benefits.d.ts +7 -0
- package/lib/types/enum-mappings/government-benefits.js +10 -0
- package/lib/types/enum-mappings/guarantor-relationship-type.d.ts +3 -0
- package/lib/types/enum-mappings/guarantor-relationship-type.js +16 -0
- package/lib/types/enum-mappings/housing-status.d.ts +7 -0
- package/lib/types/enum-mappings/housing-status.js +15 -0
- package/lib/types/enum-mappings/income-type.d.ts +7 -0
- package/lib/types/enum-mappings/income-type.js +16 -0
- package/lib/types/enum-mappings/index.d.ts +27 -0
- package/lib/types/enum-mappings/index.js +43 -0
- package/lib/types/enum-mappings/liability-payment-type.d.ts +7 -0
- package/lib/types/enum-mappings/liability-payment-type.js +9 -0
- package/lib/types/enum-mappings/liability-type.d.ts +7 -0
- package/lib/types/enum-mappings/liability-type.js +21 -0
- package/lib/types/enum-mappings/living-expense.d.ts +7 -0
- package/lib/types/enum-mappings/living-expense.js +31 -0
- package/lib/types/enum-mappings/marital-status.d.ts +7 -0
- package/lib/types/enum-mappings/marital-status.js +12 -0
- package/lib/types/enum-mappings/postcode.d.ts +6 -0
- package/lib/types/enum-mappings/postcode.js +15 -0
- package/lib/types/enum-mappings/preferred-repayment.d.ts +7 -0
- package/lib/types/enum-mappings/preferred-repayment.js +10 -0
- package/lib/types/enum-mappings/proof-of-identity.d.ts +7 -0
- package/lib/types/enum-mappings/proof-of-identity.js +10 -0
- package/lib/types/enum-mappings/property-expense-category.d.ts +7 -0
- package/lib/types/enum-mappings/property-expense-category.js +11 -0
- package/lib/types/enum-mappings/public-financial-asset.d.ts +7 -0
- package/lib/types/enum-mappings/public-financial-asset.js +12 -0
- package/lib/types/enum-mappings/public-primary-purpose.d.ts +7 -0
- package/lib/types/enum-mappings/public-primary-purpose.js +9 -0
- package/lib/types/enum-mappings/public-property-status.d.ts +7 -0
- package/lib/types/enum-mappings/public-property-status.js +11 -0
- package/lib/types/enum-mappings/public-property-type.d.ts +7 -0
- package/lib/types/enum-mappings/public-property-type.js +23 -0
- package/lib/types/enum-mappings/residency-status.d.ts +7 -0
- package/lib/types/enum-mappings/residency-status.js +11 -0
- package/lib/types/enum-mappings/title-gender.d.ts +7 -0
- package/lib/types/enum-mappings/title-gender.js +13 -0
- package/lib/types/enum-mappings/title.d.ts +7 -0
- package/lib/types/enum-mappings/title.js +13 -0
- package/lib/types/enum-mappings/to-be-purchased.d.ts +5 -0
- package/lib/types/enum-mappings/to-be-purchased.js +8 -0
- package/lib/types/enum-mappings/to-be-used-as-security.d.ts +5 -0
- package/lib/types/enum-mappings/to-be-used-as-security.js +8 -0
- package/lib/types/enum-mappings/transaction-type.d.ts +7 -0
- package/lib/types/enum-mappings/transaction-type.js +9 -0
- package/lib/types/enum-mappings/trust.d.ts +7 -0
- package/lib/types/enum-mappings/trust.js +14 -0
- package/lib/types/enum-mappings/verification.d.ts +3 -0
- package/lib/types/enum-mappings/verification.js +13 -0
- package/lib/types/events/applicant-delete.d.ts +42 -0
- package/lib/types/events/applicant-delete.js +15 -0
- package/lib/types/events/application-workflow.d.ts +233 -0
- package/lib/types/events/application-workflow.js +172 -0
- package/lib/types/events/asset-delete.d.ts +33 -0
- package/lib/types/events/asset-delete.js +15 -0
- package/lib/types/events/asset-liability-relation-delete.d.ts +52 -0
- package/lib/types/events/asset-liability-relation-delete.js +15 -0
- package/lib/types/events/credit-report-retrieved.d.ts +36 -0
- package/lib/types/events/credit-report-retrieved.js +15 -0
- package/lib/types/events/employment-delete.d.ts +19 -0
- package/lib/types/events/employment-delete.js +7 -0
- package/lib/types/events/expense-delete.d.ts +21 -0
- package/lib/types/events/expense-delete.js +7 -0
- package/lib/types/events/funding-position.d.ts +116 -0
- package/lib/types/events/funding-position.js +34 -0
- package/lib/types/events/income-delete.d.ts +33 -0
- package/lib/types/events/income-delete.js +15 -0
- package/lib/types/events/liability-delete.d.ts +17 -0
- package/lib/types/events/liability-delete.js +7 -0
- package/lib/types/events/opportunity.d.ts +102 -0
- package/lib/types/events/opportunity.js +47 -0
- package/lib/types/events/public-applicant.d.ts +628 -0
- package/lib/types/events/public-applicant.js +411 -0
- package/lib/types/events/public-application.d.ts +151 -0
- package/lib/types/events/public-application.js +103 -0
- package/lib/types/events/public-asset-liability-relation.d.ts +52 -0
- package/lib/types/events/public-asset-liability-relation.js +15 -0
- package/lib/types/events/public-asset.d.ts +502 -0
- package/lib/types/events/public-asset.js +348 -0
- package/lib/types/events/public-employment.d.ts +121 -0
- package/lib/types/events/public-employment.js +46 -0
- package/lib/types/events/public-expense.d.ts +84 -0
- package/lib/types/events/public-expense.js +51 -0
- package/lib/types/events/public-funding-position.d.ts +341 -0
- package/lib/types/events/public-funding-position.js +20 -0
- package/lib/types/events/public-income.d.ts +144 -0
- package/lib/types/events/public-income.js +65 -0
- package/lib/types/events/public-liability.d.ts +140 -0
- package/lib/types/events/public-liability.js +68 -0
- package/lib/types/events/public-required-document.d.ts +374 -0
- package/lib/types/events/public-required-document.js +297 -0
- package/lib/types/partial-application.d.ts +3 -0
- package/lib/types/partial-application.js +2 -0
- package/lib/types/recursive-partial.d.ts +3 -0
- package/lib/types/recursive-partial.js +2 -0
- package/lib/update-application/merge-application.d.ts +14 -0
- package/lib/update-application/merge-application.js +175 -0
- package/lib/update-application/remove-ids-not-required.d.ts +11 -0
- package/lib/update-application/remove-ids-not-required.js +63 -0
- package/lib/update-application/update-primary-applicant.d.ts +27 -0
- package/lib/update-application/update-primary-applicant.js +46 -0
- package/lib/utils/address-tools.d.ts +84 -0
- package/lib/utils/address-tools.js +176 -0
- package/lib/utils/clean-up.d.ts +7 -0
- package/lib/utils/clean-up.js +24 -0
- package/lib/utils/errors.d.ts +28 -0
- package/lib/utils/errors.js +43 -0
- package/lib/utils/formatYesNo.d.ts +8 -0
- package/lib/utils/formatYesNo.js +12 -0
- package/lib/utils/generate-address.d.ts +19 -0
- package/lib/utils/generate-address.js +97 -0
- package/lib/utils/get-financial-institution.d.ts +8 -0
- package/lib/utils/get-financial-institution.js +17 -0
- package/lib/utils/is-asset-type.d.ts +25 -0
- package/lib/utils/is-asset-type.js +46 -0
- package/lib/utils/is-income-type.d.ts +73 -0
- package/lib/utils/is-income-type.js +134 -0
- package/lib/utils/iso-date.d.ts +7 -0
- package/lib/utils/iso-date.js +12 -0
- package/lib/utils/normalise-date.d.ts +8 -0
- package/lib/utils/normalise-date.js +17 -0
- package/lib/utils/round-decimal.d.ts +6 -0
- package/lib/utils/round-decimal.js +12 -0
- package/package.json +79 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformLiability = void 0;
|
|
4
|
+
const application_paths_1 = require("@lendi/act-eac-integrations-protocol/lib/utils/application-paths");
|
|
5
|
+
const application_paths_2 = require("@lendi/integrations-credit-protocol/utils/application-paths");
|
|
6
|
+
const lodash_1 = require("lodash");
|
|
7
|
+
const alieo_frequency_1 = require("../types/enum-mappings/alieo-frequency");
|
|
8
|
+
const enum_mappings_1 = require("../types/enum-mappings");
|
|
9
|
+
const public_liability_1 = require("../types/events/public-liability");
|
|
10
|
+
const get_financial_institution_1 = require("../utils/get-financial-institution");
|
|
11
|
+
const round_decimal_1 = require("../utils/round-decimal");
|
|
12
|
+
const transform_percent_owned_1 = require("./transform-percent-owned");
|
|
13
|
+
const lixi_internal_request_1 = require("@lendi/act-eac-integrations-protocol/lib/types/lixi-internal-request");
|
|
14
|
+
const lixi_internal_request_2 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
|
|
15
|
+
/**
|
|
16
|
+
* Generates a partial internal request from a liability event payload.
|
|
17
|
+
*
|
|
18
|
+
* @param liabilityPayload: A liability event payload.
|
|
19
|
+
* @param liabilityPayload:.applicationId
|
|
20
|
+
* @param liabilityPayload:.id
|
|
21
|
+
* @param liabilityPayload:.liability
|
|
22
|
+
* @returns A partial InternalRequest.
|
|
23
|
+
*/
|
|
24
|
+
function transformLiability({ applicationId, id, liability }) {
|
|
25
|
+
const partialApplication = {};
|
|
26
|
+
const liabilityMapping = {
|
|
27
|
+
applicationId: application_paths_1.paths.ApplicationId,
|
|
28
|
+
annualInterestRate: `${application_paths_1.paths.Liability}.@AnnualInterestRate`,
|
|
29
|
+
id: `${application_paths_1.paths.Liability}.@UniqueID`,
|
|
30
|
+
clearingFromThisLoan: `${application_paths_1.paths.Liability}.@ClearingFromThisLoan`,
|
|
31
|
+
clearingFromOtherSource: `${application_paths_1.paths.Liability}.@ClearingFromOtherSource`,
|
|
32
|
+
description: `${application_paths_1.paths.Liability}.@Description`,
|
|
33
|
+
financialInstitution: `${application_paths_1.paths.Liability}.AccountNumber.@FinancialInstitution`,
|
|
34
|
+
financialInstitutionAccountNumber: `${application_paths_1.paths.Liability}.AccountNumber.@AccountNumber`,
|
|
35
|
+
financialInstitutionBsb: `${application_paths_1.paths.Liability}.AccountNumber.@BSB`,
|
|
36
|
+
interestOnlyRemainingTerm: `${application_paths_1.paths.Liability}.OriginalTerm.@PaymentTypeDuration`,
|
|
37
|
+
creditLimit: `${application_paths_1.paths.Liability}.@CreditLimit`,
|
|
38
|
+
newLimit: `${application_paths_1.paths.Liability}.@NewLimit`,
|
|
39
|
+
repaymentAmount: `${application_paths_1.paths.Liability}.Repayment[0].@RepaymentAmount`,
|
|
40
|
+
repaymentFrequency: `${application_paths_1.paths.Liability}.Repayment[0].@RepaymentFrequency`,
|
|
41
|
+
remainingTermDuration: `${application_paths_1.paths.Liability}.RemainingTerm.@Duration`,
|
|
42
|
+
repaymentTypeDetails: `${application_paths_1.paths.Liability}.Repayment[0].@PaymentType`,
|
|
43
|
+
outstandingBalance: `${application_paths_1.paths.Liability}.@OutstandingBalance`,
|
|
44
|
+
toBeToppedUp: `${application_paths_2.paths.AccountVariation}.@x_AccountToVary`,
|
|
45
|
+
type: `${application_paths_1.paths.Liability}.@Type`,
|
|
46
|
+
percentOwned: `${application_paths_1.paths.Liability}.PercentOwned`,
|
|
47
|
+
};
|
|
48
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping.applicationId, applicationId);
|
|
49
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping.id, id);
|
|
50
|
+
// Default repayments to 0 and repaymentFrequency to weekly.
|
|
51
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping.repaymentAmount, 0);
|
|
52
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping.repaymentFrequency, lixi_internal_request_1.List.Weekly);
|
|
53
|
+
// Currently repayments is not captured for store cards and credit cards, default the monthly repayment amount to
|
|
54
|
+
// the credit limit with interest rate of 3%.
|
|
55
|
+
if ([public_liability_1.LiabilityType.CreditCard, public_liability_1.LiabilityType.StoreCard].includes(liability.type) && liability.creditLimit) {
|
|
56
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping.repaymentAmount, (0, round_decimal_1.roundDecimal)(liability.creditLimit * 0.03));
|
|
57
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping.repaymentFrequency, lixi_internal_request_1.List.Monthly);
|
|
58
|
+
}
|
|
59
|
+
// Default clearingFromThisLoan to No if the value is not present in the event.
|
|
60
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping.clearingFromThisLoan, lixi_internal_request_1.YesNoList.No);
|
|
61
|
+
for (const [key, value] of Object.entries(liability)) {
|
|
62
|
+
if (liabilityMapping[key]) {
|
|
63
|
+
switch (key) {
|
|
64
|
+
case 'outstandingBalance':
|
|
65
|
+
case 'creditLimit':
|
|
66
|
+
case 'newLimit':
|
|
67
|
+
case 'repaymentAmount':
|
|
68
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], (0, round_decimal_1.roundDecimal)(value));
|
|
69
|
+
break;
|
|
70
|
+
case 'toBeToppedUp':
|
|
71
|
+
if (value)
|
|
72
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], id);
|
|
73
|
+
break;
|
|
74
|
+
case 'interestOnlyRemainingTerm':
|
|
75
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], (0, round_decimal_1.roundDecimal)(value));
|
|
76
|
+
(0, lodash_1.set)(partialApplication, `${application_paths_1.paths.Liability}.OriginalTerm.@PaymentType`, lixi_internal_request_1.PaymentTypeList.InterestOnly);
|
|
77
|
+
(0, lodash_1.set)(partialApplication, `${application_paths_1.paths.Liability}.OriginalTerm.@PaymentTypeUnits`, lixi_internal_request_1.LoanTermUnitsList.Years);
|
|
78
|
+
break;
|
|
79
|
+
case 'type':
|
|
80
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], enum_mappings_1.liabilityTypeMapping[value]);
|
|
81
|
+
break;
|
|
82
|
+
case 'clearingFromThisLoan':
|
|
83
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], value ? lixi_internal_request_1.YesNoList.Yes : lixi_internal_request_1.YesNoList.No);
|
|
84
|
+
break;
|
|
85
|
+
case 'clearingFromOtherSource':
|
|
86
|
+
if (value === public_liability_1.ClearingFromOtherSource.PayingOut)
|
|
87
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], lixi_internal_request_1.YesNoList.Yes);
|
|
88
|
+
break;
|
|
89
|
+
case 'repaymentFrequency':
|
|
90
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], alieo_frequency_1.liabilityFrequencyMapping[value]);
|
|
91
|
+
break;
|
|
92
|
+
case 'repaymentTypeDetails':
|
|
93
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], enum_mappings_1.liabilityPaymentTypeMapping[value]);
|
|
94
|
+
break;
|
|
95
|
+
case 'remainingTermDuration':
|
|
96
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], Math.round(value * 12));
|
|
97
|
+
(0, lodash_1.set)(partialApplication, `${application_paths_1.paths.Liability}.RemainingTerm.@Units`, lixi_internal_request_2.UnitsList.Months);
|
|
98
|
+
break;
|
|
99
|
+
case 'financialInstitution':
|
|
100
|
+
const financialInstitution = (0, get_financial_institution_1.getFinancialInstitution)(value.toString()) || lixi_internal_request_2.FinancialInstitutionList.Other;
|
|
101
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], financialInstitution);
|
|
102
|
+
break;
|
|
103
|
+
case 'percentOwned':
|
|
104
|
+
const percentOwned = (0, transform_percent_owned_1.transformPercentOwned)(value);
|
|
105
|
+
if (percentOwned) {
|
|
106
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], percentOwned);
|
|
107
|
+
}
|
|
108
|
+
break;
|
|
109
|
+
default:
|
|
110
|
+
(0, lodash_1.set)(partialApplication, liabilityMapping[key], value);
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return partialApplication;
|
|
116
|
+
}
|
|
117
|
+
exports.transformLiability = transformLiability;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PercentOwned } from '../types/events/public-asset';
|
|
2
|
+
import { PercentOwned as LIXIPercentOwned } from '@lendi/act-eac-integrations-protocol/lib/types/lixi-internal-request';
|
|
3
|
+
/**
|
|
4
|
+
* Transform percentOwned to lixi's format.
|
|
5
|
+
*
|
|
6
|
+
* @param percentOwned PercentOwned for an asset or liability on public liability event.
|
|
7
|
+
* @param percentOwned.owners
|
|
8
|
+
* @returns {LIXIPercentOwned} transformed Lixi PercentOwned.
|
|
9
|
+
*/
|
|
10
|
+
export declare function transformPercentOwned({ owners }: PercentOwned): LIXIPercentOwned;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformPercentOwned = void 0;
|
|
4
|
+
const round_decimal_1 = require("../utils/round-decimal");
|
|
5
|
+
/**
|
|
6
|
+
* Transform percentOwned to lixi's format.
|
|
7
|
+
*
|
|
8
|
+
* @param percentOwned PercentOwned for an asset or liability on public liability event.
|
|
9
|
+
* @param percentOwned.owners
|
|
10
|
+
* @returns {LIXIPercentOwned} transformed Lixi PercentOwned.
|
|
11
|
+
*/
|
|
12
|
+
function transformPercentOwned({ owners = [] }) {
|
|
13
|
+
if (owners.length === 0)
|
|
14
|
+
return null;
|
|
15
|
+
return {
|
|
16
|
+
Owner: owners.map(({ percent, applicantId }) => ({
|
|
17
|
+
'@Percent': (0, round_decimal_1.roundDecimal)(percent * 100),
|
|
18
|
+
'@x_Party': applicantId,
|
|
19
|
+
})),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
exports.transformPercentOwned = transformPercentOwned;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { PersonApplicantPrivacy, ProofOfIdentity } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
|
|
2
|
+
import { EConsent, Identification, Payload as RequiredDocumentPayload, Status } from '../types/events/public-required-document';
|
|
3
|
+
import { PartialApplication } from '../types/partial-application';
|
|
4
|
+
interface TransformRequiredDocumentOptions {
|
|
5
|
+
readonly secondIDEnabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Gets the applicant gender from the identification data
|
|
9
|
+
*
|
|
10
|
+
* @param {Identification} identification Identification data
|
|
11
|
+
*
|
|
12
|
+
* @returns The gender of the applicant
|
|
13
|
+
*/
|
|
14
|
+
export declare const getApplicantGenderFromIdentification: (identification: Identification) => string;
|
|
15
|
+
/**
|
|
16
|
+
* Gets full name on document from the identification data
|
|
17
|
+
*
|
|
18
|
+
* @param {Identification} identification Identification data
|
|
19
|
+
*
|
|
20
|
+
* @returns {string} The full name on document
|
|
21
|
+
*/
|
|
22
|
+
export declare const getNameOnDocument: (identification: Identification) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Transforms issued location data of an ID document
|
|
25
|
+
*
|
|
26
|
+
* @param {Identification} identification Identification data
|
|
27
|
+
* @param {boolean} secondIDEnabled Whether or not second Id functionality is enabled
|
|
28
|
+
*
|
|
29
|
+
* @returns {Partial<ProofOfIdentity>} Partial proof of identity object
|
|
30
|
+
*/
|
|
31
|
+
export declare const transformIDIssuedLocation: (identification: Identification, secondIDEnabled?: boolean) => Partial<ProofOfIdentity>;
|
|
32
|
+
/**
|
|
33
|
+
* Transforms the verification status data of the ID document
|
|
34
|
+
*
|
|
35
|
+
* @param {Status} status Verification status of the ID document
|
|
36
|
+
* @param {boolean} secondIDEnabled Whether or not secondID mapping is enabled
|
|
37
|
+
*
|
|
38
|
+
* @returns {Partial<ProofOfIdentity>} Partial proof of identity
|
|
39
|
+
*/
|
|
40
|
+
export declare const transformVerificationStatus: (status: Status | undefined, secondIDEnabled?: boolean) => Partial<ProofOfIdentity>;
|
|
41
|
+
/**
|
|
42
|
+
* Generates a partial proof of identity object
|
|
43
|
+
*
|
|
44
|
+
* @param {RequiredDocumentPayload} requiredDocumentEventPayload RequiredDocumentCreated/RequiredDocumentUpdated event payload
|
|
45
|
+
* @param {TransformRequiredDocumentOptions} options - Options from generating partial proof of identity
|
|
46
|
+
*
|
|
47
|
+
* @returns {Partial<ProofOfIdentity>} Partial proof of identity document object
|
|
48
|
+
*/
|
|
49
|
+
export declare const generateProofOfIdentity: (requiredDocumentEventPayload: RequiredDocumentPayload, options?: TransformRequiredDocumentOptions) => Partial<ProofOfIdentity>;
|
|
50
|
+
/**
|
|
51
|
+
* Generates an applicants disclosure details mapping for the partial application
|
|
52
|
+
*
|
|
53
|
+
* @param {EConsent} eConsent E-Consent detials from the RequiredDocumentCreated/RequqiredDocumentUpdated event payload
|
|
54
|
+
*
|
|
55
|
+
* @returns {PersonApplicantPrivacy} Applicant disclosure details for partial application
|
|
56
|
+
*/
|
|
57
|
+
export declare const generatePersonApplicantPrivacy: (eConsent: EConsent) => PersonApplicantPrivacy;
|
|
58
|
+
/**
|
|
59
|
+
* Transforms a RequiredDocumentCreated/RequiredDocumentUpdated event payload into a partial application
|
|
60
|
+
*
|
|
61
|
+
* @param {RequiredDocumentPayload} requiredDocEventPayload A RequiredDocumentCreated/RequiredDocumentUpdated event payload
|
|
62
|
+
* @param {TransformRequiredDocumentOptions} options Required document event transformation options
|
|
63
|
+
*
|
|
64
|
+
* @returns {PartialApplication} A partial application
|
|
65
|
+
*/
|
|
66
|
+
export declare const transformRequiredDocument: (requiredDocEventPayload: RequiredDocumentPayload, options?: TransformRequiredDocumentOptions) => PartialApplication;
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformRequiredDocument = exports.generatePersonApplicantPrivacy = exports.generateProofOfIdentity = exports.transformVerificationStatus = exports.transformIDIssuedLocation = exports.getNameOnDocument = exports.getApplicantGenderFromIdentification = void 0;
|
|
4
|
+
const lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
|
|
5
|
+
const application_paths_1 = require("@lendi/act-eac-integrations-protocol/lib/utils/application-paths");
|
|
6
|
+
const lodash_1 = require("lodash");
|
|
7
|
+
const enum_mappings_1 = require("../types/enum-mappings");
|
|
8
|
+
const enum_mappings_2 = require("../types/enum-mappings");
|
|
9
|
+
const enum_mappings_3 = require("../types/enum-mappings");
|
|
10
|
+
const verification_1 = require("../types/enum-mappings/verification");
|
|
11
|
+
const public_required_document_1 = require("../types/events/public-required-document");
|
|
12
|
+
const formatYesNo_1 = require("../utils/formatYesNo");
|
|
13
|
+
const iso_date_1 = require("../utils/iso-date");
|
|
14
|
+
/**
|
|
15
|
+
* Gets the applicant gender from the identification data
|
|
16
|
+
*
|
|
17
|
+
* @param {Identification} identification Identification data
|
|
18
|
+
*
|
|
19
|
+
* @returns The gender of the applicant
|
|
20
|
+
*/
|
|
21
|
+
const getApplicantGenderFromIdentification = (identification) => {
|
|
22
|
+
const { gender, idTitle } = identification;
|
|
23
|
+
return gender ? (0, lodash_1.capitalize)(gender) : enum_mappings_3.titleGenderMapping[idTitle || public_required_document_1.IDTitle.Unknown];
|
|
24
|
+
};
|
|
25
|
+
exports.getApplicantGenderFromIdentification = getApplicantGenderFromIdentification;
|
|
26
|
+
/**
|
|
27
|
+
* Gets full name on document from the identification data
|
|
28
|
+
*
|
|
29
|
+
* @param {Identification} identification Identification data
|
|
30
|
+
*
|
|
31
|
+
* @returns {string} The full name on document
|
|
32
|
+
*/
|
|
33
|
+
const getNameOnDocument = (identification) => {
|
|
34
|
+
const { idFirstName, idMiddleName, idLastName } = identification;
|
|
35
|
+
return [idFirstName, idMiddleName, idLastName].reduce((fullName, nameComponent) => {
|
|
36
|
+
let newFullName = fullName;
|
|
37
|
+
const nameSubstring = nameComponent === null || nameComponent === void 0 ? void 0 : nameComponent.trim();
|
|
38
|
+
if (nameSubstring) {
|
|
39
|
+
newFullName += `${fullName ? ' ' : ''}${nameSubstring}`;
|
|
40
|
+
}
|
|
41
|
+
return newFullName;
|
|
42
|
+
}, '');
|
|
43
|
+
};
|
|
44
|
+
exports.getNameOnDocument = getNameOnDocument;
|
|
45
|
+
/**
|
|
46
|
+
* Transforms issued location data of an ID document
|
|
47
|
+
*
|
|
48
|
+
* @param {Identification} identification Identification data
|
|
49
|
+
* @param {boolean} secondIDEnabled Whether or not second Id functionality is enabled
|
|
50
|
+
*
|
|
51
|
+
* @returns {Partial<ProofOfIdentity>} Partial proof of identity object
|
|
52
|
+
*/
|
|
53
|
+
const transformIDIssuedLocation = (identification, secondIDEnabled = false) => {
|
|
54
|
+
const { australianState, idType, issuingCountry = public_required_document_1.IssuingCountry.Australia } = identification;
|
|
55
|
+
let transformedIssuedLocation = {};
|
|
56
|
+
if (idType === public_required_document_1.IDType.Passport && issuingCountry !== public_required_document_1.IssuingCountry.Australia) {
|
|
57
|
+
const foreignCountryOfIssue = enum_mappings_1.countryCodeMapping[issuingCountry];
|
|
58
|
+
transformedIssuedLocation = Object.assign({ '@DocumentType': lixi_internal_request_1.DocumentTypeList.InternationalPassport, '@CountryOfIssue': foreignCountryOfIssue, '@PlaceOfIssue': foreignCountryOfIssue }, (secondIDEnabled && { '@ResidentialAddressVerified': lixi_internal_request_1.YesNoList.No }));
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
transformedIssuedLocation = {
|
|
62
|
+
'@CountryOfIssue': lixi_internal_request_1.CountryCodeList.Au,
|
|
63
|
+
'@PlaceOfIssue': australianState || lixi_internal_request_1.CountryCodeList.Au,
|
|
64
|
+
'@DocumentType': enum_mappings_2.proofOfIdentityMapping[idType],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return transformedIssuedLocation;
|
|
68
|
+
};
|
|
69
|
+
exports.transformIDIssuedLocation = transformIDIssuedLocation;
|
|
70
|
+
/**
|
|
71
|
+
* Transforms the verification status data of the ID document
|
|
72
|
+
*
|
|
73
|
+
* @param {Status} status Verification status of the ID document
|
|
74
|
+
* @param {boolean} secondIDEnabled Whether or not secondID mapping is enabled
|
|
75
|
+
*
|
|
76
|
+
* @returns {Partial<ProofOfIdentity>} Partial proof of identity
|
|
77
|
+
*/
|
|
78
|
+
const transformVerificationStatus = (status, secondIDEnabled = false) => {
|
|
79
|
+
let transformedVerification = {};
|
|
80
|
+
if (status) {
|
|
81
|
+
const verificationStatus = verification_1.verificationMapping[status];
|
|
82
|
+
transformedVerification = Object.assign({ '@PhotographVerified': verificationStatus }, (secondIDEnabled && {
|
|
83
|
+
'@DOBVerified': verificationStatus,
|
|
84
|
+
'@NameVerified': verificationStatus,
|
|
85
|
+
'@SignatureVerified': verificationStatus,
|
|
86
|
+
'@ResidentialAddressVerified': verificationStatus,
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
return transformedVerification;
|
|
90
|
+
};
|
|
91
|
+
exports.transformVerificationStatus = transformVerificationStatus;
|
|
92
|
+
/**
|
|
93
|
+
* Generates a partial proof of identity object
|
|
94
|
+
*
|
|
95
|
+
* @param {RequiredDocumentPayload} requiredDocumentEventPayload RequiredDocumentCreated/RequiredDocumentUpdated event payload
|
|
96
|
+
* @param {TransformRequiredDocumentOptions} options - Options from generating partial proof of identity
|
|
97
|
+
*
|
|
98
|
+
* @returns {Partial<ProofOfIdentity>} Partial proof of identity document object
|
|
99
|
+
*/
|
|
100
|
+
const generateProofOfIdentity = (requiredDocumentEventPayload, options = {}) => {
|
|
101
|
+
const { secondIDEnabled = false } = options;
|
|
102
|
+
const { id, status, expiryDate, identification } = requiredDocumentEventPayload;
|
|
103
|
+
const nameOnDocument = (0, exports.getNameOnDocument)(identification);
|
|
104
|
+
const { idNumber } = identification;
|
|
105
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ '@UniqueID': id }, (expiryDate && { '@ExpiryDate': (0, iso_date_1.isoDate)(expiryDate) })), (0, exports.transformVerificationStatus)(status, secondIDEnabled)), (nameOnDocument && { '@NameOnDocument': nameOnDocument })), (idNumber && { '@DocumentNumber': idNumber })), (0, exports.transformIDIssuedLocation)(identification, secondIDEnabled)), (secondIDEnabled && {
|
|
106
|
+
'@DocumentCategory': lixi_internal_request_1.DocumentCategoryList.Photographic,
|
|
107
|
+
'@Original': lixi_internal_request_1.YesNoList.Yes,
|
|
108
|
+
}));
|
|
109
|
+
};
|
|
110
|
+
exports.generateProofOfIdentity = generateProofOfIdentity;
|
|
111
|
+
/**
|
|
112
|
+
* Generates an applicants disclosure details mapping for the partial application
|
|
113
|
+
*
|
|
114
|
+
* @param {EConsent} eConsent E-Consent detials from the RequiredDocumentCreated/RequqiredDocumentUpdated event payload
|
|
115
|
+
*
|
|
116
|
+
* @returns {PersonApplicantPrivacy} Applicant disclosure details for partial application
|
|
117
|
+
*/
|
|
118
|
+
const generatePersonApplicantPrivacy = (eConsent) => {
|
|
119
|
+
const { hasConsented, consentedAt = new Date() } = eConsent;
|
|
120
|
+
return {
|
|
121
|
+
'@CreditAuthoritySigned': (0, formatYesNo_1.formatYesNo)(hasConsented),
|
|
122
|
+
'@DateSigned': (0, iso_date_1.isoDate)(consentedAt),
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
exports.generatePersonApplicantPrivacy = generatePersonApplicantPrivacy;
|
|
126
|
+
/**
|
|
127
|
+
* Transforms a RequiredDocumentCreated/RequiredDocumentUpdated event payload into a partial application
|
|
128
|
+
*
|
|
129
|
+
* @param {RequiredDocumentPayload} requiredDocEventPayload A RequiredDocumentCreated/RequiredDocumentUpdated event payload
|
|
130
|
+
* @param {TransformRequiredDocumentOptions} options Required document event transformation options
|
|
131
|
+
*
|
|
132
|
+
* @returns {PartialApplication} A partial application
|
|
133
|
+
*/
|
|
134
|
+
const transformRequiredDocument = (requiredDocEventPayload, options) => {
|
|
135
|
+
const partialApplication = {};
|
|
136
|
+
const { applicantId, applicationId, identification, eConsent } = requiredDocEventPayload;
|
|
137
|
+
(0, lodash_1.set)(partialApplication, `${application_paths_1.paths.PersonApplicant}.@UniqueID`, applicantId);
|
|
138
|
+
(0, lodash_1.set)(partialApplication, application_paths_1.paths.ApplicationId, applicationId);
|
|
139
|
+
if (identification) {
|
|
140
|
+
(0, lodash_1.set)(partialApplication, `${application_paths_1.paths.PersonApplicant}.@Gender`, (0, exports.getApplicantGenderFromIdentification)(identification));
|
|
141
|
+
(0, lodash_1.set)(partialApplication, `${application_paths_1.paths.ProofOfIdentity}`, (0, exports.generateProofOfIdentity)(requiredDocEventPayload, options));
|
|
142
|
+
}
|
|
143
|
+
if (eConsent) {
|
|
144
|
+
(0, lodash_1.set)(partialApplication, `${application_paths_1.paths.Privacy}`, (0, exports.generatePersonApplicantPrivacy)(eConsent));
|
|
145
|
+
}
|
|
146
|
+
return partialApplication;
|
|
147
|
+
};
|
|
148
|
+
exports.transformRequiredDocument = transformRequiredDocument;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { List as LIXIFrequency } from '@lendi/act-eac-integrations-protocol/lib/types/lixi-internal-request';
|
|
2
|
+
import { RepaymentFrequency } from '../events/public-liability';
|
|
3
|
+
import { Frequency } from '../events/public-income';
|
|
4
|
+
export type LiabilityFrequencyMapping = {
|
|
5
|
+
[key in RepaymentFrequency]: LIXIFrequency;
|
|
6
|
+
};
|
|
7
|
+
export type IncomeExpenseFrequencyMapping = {
|
|
8
|
+
[key in RepaymentFrequency | Frequency]: LIXIFrequency;
|
|
9
|
+
};
|
|
10
|
+
export type RentalIncomeFrequencyMapping = {
|
|
11
|
+
[key in Frequency]: LIXIFrequency;
|
|
12
|
+
};
|
|
13
|
+
export declare const incomeExpenseFrequencyMapping: IncomeExpenseFrequencyMapping;
|
|
14
|
+
export declare const liabilityFrequencyMapping: LiabilityFrequencyMapping;
|
|
15
|
+
export declare const rentalIncomeFrequencyMapping: Partial<RentalIncomeFrequencyMapping>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rentalIncomeFrequencyMapping = exports.liabilityFrequencyMapping = exports.incomeExpenseFrequencyMapping = void 0;
|
|
4
|
+
const lixi_internal_request_1 = require("@lendi/act-eac-integrations-protocol/lib/types/lixi-internal-request");
|
|
5
|
+
const public_liability_1 = require("../events/public-liability");
|
|
6
|
+
const public_income_1 = require("../events/public-income");
|
|
7
|
+
exports.incomeExpenseFrequencyMapping = {
|
|
8
|
+
[public_income_1.Frequency.Fortnightly]: lixi_internal_request_1.List.Fortnightly,
|
|
9
|
+
[public_income_1.Frequency.Monthly]: lixi_internal_request_1.List.Monthly,
|
|
10
|
+
[public_income_1.Frequency.Weekly]: lixi_internal_request_1.List.Weekly,
|
|
11
|
+
[public_income_1.Frequency.Quarterly]: lixi_internal_request_1.List.Yearly,
|
|
12
|
+
[public_income_1.Frequency.Yearly]: lixi_internal_request_1.List.Yearly,
|
|
13
|
+
};
|
|
14
|
+
exports.liabilityFrequencyMapping = {
|
|
15
|
+
[public_liability_1.RepaymentFrequency.Yearly]: lixi_internal_request_1.List.Yearly,
|
|
16
|
+
[public_liability_1.RepaymentFrequency.Monthly]: lixi_internal_request_1.List.Monthly,
|
|
17
|
+
[public_liability_1.RepaymentFrequency.Fortnightly]: lixi_internal_request_1.List.Fortnightly,
|
|
18
|
+
[public_liability_1.RepaymentFrequency.Weekly]: lixi_internal_request_1.List.Weekly,
|
|
19
|
+
};
|
|
20
|
+
exports.rentalIncomeFrequencyMapping = {
|
|
21
|
+
[public_income_1.Frequency.Fortnightly]: lixi_internal_request_1.List.Fortnightly,
|
|
22
|
+
[public_income_1.Frequency.Monthly]: lixi_internal_request_1.List.Monthly,
|
|
23
|
+
[public_income_1.Frequency.Weekly]: lixi_internal_request_1.List.Weekly,
|
|
24
|
+
[public_income_1.Frequency.Yearly]: lixi_internal_request_1.List.Yearly,
|
|
25
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Gender } from '../events/public-applicant';
|
|
2
|
+
import { GenderList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
|
|
3
|
+
export type ApplicantGenderMapping = {
|
|
4
|
+
[key in Gender]: GenderList;
|
|
5
|
+
};
|
|
6
|
+
export declare const applicantGenderMapping: ApplicantGenderMapping;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applicantGenderMapping = void 0;
|
|
4
|
+
const public_applicant_1 = require("../events/public-applicant");
|
|
5
|
+
const lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
|
|
6
|
+
exports.applicantGenderMapping = {
|
|
7
|
+
[public_applicant_1.Gender.Female]: lixi_internal_request_1.GenderList.Female,
|
|
8
|
+
[public_applicant_1.Gender.Male]: lixi_internal_request_1.GenderList.Male,
|
|
9
|
+
[public_applicant_1.Gender.Undisclosed]: lixi_internal_request_1.GenderList.Undisclosed,
|
|
10
|
+
[public_applicant_1.Gender.Unknown]: lixi_internal_request_1.GenderList.Undisclosed,
|
|
11
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ApplicantTypeList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
|
|
2
|
+
import { ApplicantType } from '../events/public-applicant';
|
|
3
|
+
export type ApplicantTypeMapping = {
|
|
4
|
+
[key in ApplicantType]: ApplicantTypeList;
|
|
5
|
+
};
|
|
6
|
+
export declare const applicantTypeMapping: ApplicantTypeMapping;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applicantTypeMapping = void 0;
|
|
4
|
+
const lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
|
|
5
|
+
const public_applicant_1 = require("../events/public-applicant");
|
|
6
|
+
exports.applicantTypeMapping = {
|
|
7
|
+
[public_applicant_1.ApplicantType.Borrower]: lixi_internal_request_1.ApplicantTypeList.Borrower,
|
|
8
|
+
[public_applicant_1.ApplicantType.BorrowerAndGuarantor]: lixi_internal_request_1.ApplicantTypeList.BorrowerAndGuarantor,
|
|
9
|
+
[public_applicant_1.ApplicantType.Guarantor]: lixi_internal_request_1.ApplicantTypeList.Guarantor,
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assetTypeMapping = void 0;
|
|
4
|
+
const lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
|
|
5
|
+
const public_asset_1 = require("../events/public-asset");
|
|
6
|
+
exports.assetTypeMapping = {
|
|
7
|
+
[public_asset_1.AssetType.Gifts]: lixi_internal_request_1.NonRealEstateAssetTypeList.Other,
|
|
8
|
+
[public_asset_1.AssetType.HomeContents]: lixi_internal_request_1.NonRealEstateAssetTypeList.Other,
|
|
9
|
+
[public_asset_1.AssetType.ManagedFunds]: lixi_internal_request_1.NonRealEstateAssetTypeList.FinancialAsset,
|
|
10
|
+
[public_asset_1.AssetType.OtherAsset]: lixi_internal_request_1.NonRealEstateAssetTypeList.Other,
|
|
11
|
+
[public_asset_1.AssetType.Property]: null,
|
|
12
|
+
[public_asset_1.AssetType.SavingCheckAccount]: lixi_internal_request_1.NonRealEstateAssetTypeList.FinancialAsset,
|
|
13
|
+
[public_asset_1.AssetType.Shares]: lixi_internal_request_1.NonRealEstateAssetTypeList.FinancialAsset,
|
|
14
|
+
[public_asset_1.AssetType.Superannuation]: lixi_internal_request_1.NonRealEstateAssetTypeList.FinancialAsset,
|
|
15
|
+
[public_asset_1.AssetType.TermDeposit]: lixi_internal_request_1.NonRealEstateAssetTypeList.FinancialAsset,
|
|
16
|
+
[public_asset_1.AssetType.Vehicle]: lixi_internal_request_1.NonRealEstateAssetTypeList.MotorVehicleAndTransport,
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BuilderTypeList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
|
|
2
|
+
import { BuilderType } from '../events/public-asset';
|
|
3
|
+
type BuilderTypeMapping = {
|
|
4
|
+
[key in BuilderType]: BuilderTypeList;
|
|
5
|
+
};
|
|
6
|
+
export declare const builderTypeMapping: BuilderTypeMapping;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.builderTypeMapping = void 0;
|
|
4
|
+
const lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
|
|
5
|
+
const public_asset_1 = require("../events/public-asset");
|
|
6
|
+
exports.builderTypeMapping = {
|
|
7
|
+
[public_asset_1.BuilderType.LicensedBuilder]: lixi_internal_request_1.BuilderTypeList.LicensedBuilder,
|
|
8
|
+
[public_asset_1.BuilderType.OwnerBuilder]: lixi_internal_request_1.BuilderTypeList.OwnerBuilder,
|
|
9
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BusinessStructureFullList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
|
|
2
|
+
import { CompanyStructure } from '../events/public-applicant';
|
|
3
|
+
type CompanyTypeMapping = {
|
|
4
|
+
[key in CompanyStructure]: BusinessStructureFullList;
|
|
5
|
+
};
|
|
6
|
+
export declare const companyStructureMapping: Partial<CompanyTypeMapping>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.companyStructureMapping = void 0;
|
|
4
|
+
const lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
|
|
5
|
+
const public_applicant_1 = require("../events/public-applicant");
|
|
6
|
+
exports.companyStructureMapping = {
|
|
7
|
+
[public_applicant_1.CompanyStructure.SoleTrader]: lixi_internal_request_1.BusinessStructureFullList.SoleTrader,
|
|
8
|
+
[public_applicant_1.CompanyStructure.Partnership]: lixi_internal_request_1.BusinessStructureFullList.Partnership,
|
|
9
|
+
[public_applicant_1.CompanyStructure.Corporation]: lixi_internal_request_1.BusinessStructureFullList.Company,
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TypeOfIncorporationList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
|
|
2
|
+
import { CompanyType } from '../events/public-applicant';
|
|
3
|
+
type CompanyTypeMapping = {
|
|
4
|
+
[key in CompanyType]: TypeOfIncorporationList;
|
|
5
|
+
};
|
|
6
|
+
export declare const companyTypeMapping: CompanyTypeMapping;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.companyTypeMapping = void 0;
|
|
4
|
+
const lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
|
|
5
|
+
const public_applicant_1 = require("../events/public-applicant");
|
|
6
|
+
exports.companyTypeMapping = {
|
|
7
|
+
[public_applicant_1.CompanyType.PtyLtd]: lixi_internal_request_1.TypeOfIncorporationList.PtyLtd,
|
|
8
|
+
[public_applicant_1.CompanyType.Nl]: lixi_internal_request_1.TypeOfIncorporationList.Nl,
|
|
9
|
+
[public_applicant_1.CompanyType.Ltd]: lixi_internal_request_1.TypeOfIncorporationList.Ltd,
|
|
10
|
+
[public_applicant_1.CompanyType.Incorporated]: lixi_internal_request_1.TypeOfIncorporationList.Inc,
|
|
11
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConstructionTypeList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
|
|
2
|
+
import { ConstructionType } from '../events/public-asset';
|
|
3
|
+
type ConstructionTypeMapping = {
|
|
4
|
+
[key in ConstructionType]: ConstructionTypeList;
|
|
5
|
+
};
|
|
6
|
+
export declare const constructionTypeMapping: ConstructionTypeMapping;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.constructionTypeMapping = void 0;
|
|
4
|
+
const lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
|
|
5
|
+
const public_asset_1 = require("../events/public-asset");
|
|
6
|
+
exports.constructionTypeMapping = {
|
|
7
|
+
[public_asset_1.ConstructionType.BuildAProperty]: lixi_internal_request_1.ConstructionTypeList.FullConstruction,
|
|
8
|
+
[public_asset_1.ConstructionType.KnockdownRebuild]: lixi_internal_request_1.ConstructionTypeList.HomeExtension,
|
|
9
|
+
[public_asset_1.ConstructionType.StructuralRenovations]: lixi_internal_request_1.ConstructionTypeList.Renovation,
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Countries } from '../events/public-applicant';
|
|
2
|
+
import { CountryCodeList } from '@lendi/act-eac-integrations-protocol/lib/types/lixi-internal-request';
|
|
3
|
+
type CountryCodeMapping = {
|
|
4
|
+
[key in Countries]: CountryCodeList;
|
|
5
|
+
};
|
|
6
|
+
export declare const countryCodeMapping: Partial<CountryCodeMapping>;
|
|
7
|
+
export {};
|