@lendi/integrations-transform 1.5.8 → 1.5.9
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.js +10 -26
- package/lib/logger.d.ts +1 -2
- package/lib/logger.js +2 -5
- package/lib/transform-events/generate-asset-liability-link.d.ts +3 -1
- package/lib/transform-events/generate-asset-liability-link.js +14 -18
- package/lib/transform-events/generate-credit-report-rebuilt.js +17 -21
- package/lib/transform-events/generate-employment.d.ts +1 -1
- package/lib/transform-events/generate-employment.js +51 -56
- package/lib/transform-events/generate-required-document.d.ts +1 -7
- package/lib/transform-events/generate-required-document.js +43 -69
- package/lib/transform-events/transform-applicant.d.ts +2 -1
- package/lib/transform-events/transform-applicant.js +78 -91
- package/lib/transform-events/transform-application-workflow.d.ts +0 -1
- package/lib/transform-events/transform-application-workflow.js +9 -14
- package/lib/transform-events/transform-application.d.ts +3 -1
- package/lib/transform-events/transform-application.js +28 -33
- package/lib/transform-events/transform-asset-address.d.ts +8 -2
- package/lib/transform-events/transform-asset-address.js +35 -37
- package/lib/transform-events/transform-asset.d.ts +7 -1
- package/lib/transform-events/transform-asset.js +164 -184
- package/lib/transform-events/transform-expenses.d.ts +4 -0
- package/lib/transform-events/transform-expenses.js +52 -58
- package/lib/transform-events/transform-funding-position.d.ts +2 -2
- package/lib/transform-events/transform-funding-position.js +38 -46
- package/lib/transform-events/transform-income.d.ts +8 -1
- package/lib/transform-events/transform-income.js +121 -139
- package/lib/transform-events/transform-liability.d.ts +4 -1
- package/lib/transform-events/transform-liability.js +62 -65
- package/lib/transform-events/transform-percent-owned.d.ts +1 -0
- package/lib/transform-events/transform-percent-owned.js +7 -14
- package/lib/types/enum-mappings/alieo-frequency.js +22 -26
- package/lib/types/enum-mappings/asset-type.js +14 -18
- package/lib/types/enum-mappings/builder-type.js +6 -10
- package/lib/types/enum-mappings/construction-type.js +7 -11
- package/lib/types/enum-mappings/country-code.js +243 -247
- package/lib/types/enum-mappings/employment-basis.js +9 -13
- package/lib/types/enum-mappings/expense-frequency.js +8 -12
- package/lib/types/enum-mappings/funding-position.js +29 -32
- package/lib/types/enum-mappings/government-benefits.js +7 -11
- package/lib/types/enum-mappings/housing-status.js +12 -16
- package/lib/types/enum-mappings/income-type.js +13 -17
- package/lib/types/enum-mappings/index.js +27 -43
- package/lib/types/enum-mappings/liability-payment-type.js +6 -10
- package/lib/types/enum-mappings/liability-type.js +18 -22
- package/lib/types/enum-mappings/living-expense.js +27 -31
- package/lib/types/enum-mappings/marital-status.js +9 -13
- package/lib/types/enum-mappings/postcode.js +11 -15
- package/lib/types/enum-mappings/preferred-repayment.js +7 -11
- package/lib/types/enum-mappings/proof-of-identity.js +7 -11
- package/lib/types/enum-mappings/property-expense-category.js +8 -12
- package/lib/types/enum-mappings/public-financial-asset.js +9 -13
- package/lib/types/enum-mappings/public-primary-purpose.js +6 -10
- package/lib/types/enum-mappings/public-property-status.js +8 -12
- package/lib/types/enum-mappings/public-property-type.js +20 -24
- package/lib/types/enum-mappings/residency-status.js +8 -12
- package/lib/types/enum-mappings/title-gender.js +10 -14
- package/lib/types/enum-mappings/title.js +10 -14
- package/lib/types/enum-mappings/to-be-purchased.js +4 -7
- package/lib/types/enum-mappings/to-be-used-as-security.js +4 -7
- package/lib/types/enum-mappings/transaction-type.js +6 -10
- package/lib/types/enum-mappings/verification.js +10 -14
- package/lib/types/events/applicant-delete.js +4 -7
- package/lib/types/events/application-workflow.js +10 -13
- package/lib/types/events/asset-delete.js +4 -7
- package/lib/types/events/asset-liability-relation-delete.js +4 -7
- package/lib/types/events/credit-report-retrieved.js +4 -7
- package/lib/types/events/employment-delete.js +2 -5
- package/lib/types/events/expense-delete.js +2 -5
- package/lib/types/events/funding-position.js +6 -9
- package/lib/types/events/income-delete.js +4 -7
- package/lib/types/events/liability-delete.js +2 -5
- package/lib/types/events/opportunity.js +6 -9
- package/lib/types/events/public-applicant.js +28 -31
- package/lib/types/events/public-application.js +26 -29
- package/lib/types/events/public-asset-liability-relation.js +4 -7
- package/lib/types/events/public-asset.js +26 -29
- package/lib/types/events/public-employment.js +18 -21
- package/lib/types/events/public-expense.js +8 -11
- package/lib/types/events/public-funding-position.js +2 -5
- package/lib/types/events/public-income.js +12 -15
- package/lib/types/events/public-liability.js +16 -19
- package/lib/types/events/public-required-document.js +14 -17
- package/lib/types/partial-application.js +1 -2
- package/lib/types/recursive-partial.js +1 -2
- package/lib/update-application/merge-application.d.ts +1 -1
- package/lib/update-application/merge-application.js +41 -38
- package/lib/update-application/update-primary-applicant.d.ts +1 -4
- package/lib/update-application/update-primary-applicant.js +14 -38
- package/lib/utils/address-tools.d.ts +3 -1
- package/lib/utils/address-tools.js +56 -68
- package/lib/utils/clean-up.d.ts +1 -1
- package/lib/utils/clean-up.js +6 -10
- package/lib/utils/formatYesNo.d.ts +0 -1
- package/lib/utils/formatYesNo.js +2 -7
- package/lib/utils/generate-address.d.ts +3 -2
- package/lib/utils/generate-address.js +33 -42
- package/lib/utils/get-financial-institution.d.ts +1 -0
- package/lib/utils/get-financial-institution.js +7 -10
- package/lib/utils/is-asset-type.js +13 -20
- package/lib/utils/is-income-type.d.ts +2 -0
- package/lib/utils/is-income-type.js +50 -69
- package/lib/utils/iso-date.d.ts +0 -1
- package/lib/utils/iso-date.js +2 -7
- package/lib/utils/normalise-date.js +6 -10
- package/lib/utils/round-decimal.js +1 -5
- package/package.json +14 -17
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_c[public_income_1.Frequency.Monthly] = lixi_internal_request_1.List.Monthly,
|
|
24
|
-
_c[public_income_1.Frequency.Weekly] = lixi_internal_request_1.List.Weekly,
|
|
25
|
-
_c[public_income_1.Frequency.Yearly] = lixi_internal_request_1.List.Yearly,
|
|
26
|
-
_c);
|
|
1
|
+
import { List as LIXIFrequency } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
|
|
2
|
+
import { RepaymentFrequency } from '../events/public-liability';
|
|
3
|
+
import { Frequency } from '../events/public-income';
|
|
4
|
+
export const incomeExpenseFrequencyMapping = {
|
|
5
|
+
[Frequency.Fortnightly]: LIXIFrequency.Fortnightly,
|
|
6
|
+
[Frequency.Monthly]: LIXIFrequency.Monthly,
|
|
7
|
+
[Frequency.Weekly]: LIXIFrequency.Weekly,
|
|
8
|
+
[Frequency.Quarterly]: LIXIFrequency.Yearly,
|
|
9
|
+
[Frequency.Yearly]: LIXIFrequency.Yearly,
|
|
10
|
+
};
|
|
11
|
+
export const liabilityFrequencyMapping = {
|
|
12
|
+
[RepaymentFrequency.Yearly]: LIXIFrequency.Yearly,
|
|
13
|
+
[RepaymentFrequency.Monthly]: LIXIFrequency.Monthly,
|
|
14
|
+
[RepaymentFrequency.Fortnightly]: LIXIFrequency.Fortnightly,
|
|
15
|
+
[RepaymentFrequency.Weekly]: LIXIFrequency.Weekly,
|
|
16
|
+
};
|
|
17
|
+
export const rentalIncomeFrequencyMapping = {
|
|
18
|
+
[Frequency.Fortnightly]: LIXIFrequency.Fortnightly,
|
|
19
|
+
[Frequency.Monthly]: LIXIFrequency.Monthly,
|
|
20
|
+
[Frequency.Weekly]: LIXIFrequency.Weekly,
|
|
21
|
+
[Frequency.Yearly]: LIXIFrequency.Yearly,
|
|
22
|
+
};
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
_a[public_asset_1.AssetType.Superannuation] = lixi_internal_request_1.NonRealEstateAssetTypeList.FinancialAsset,
|
|
16
|
-
_a[public_asset_1.AssetType.TermDeposit] = lixi_internal_request_1.NonRealEstateAssetTypeList.FinancialAsset,
|
|
17
|
-
_a[public_asset_1.AssetType.Vehicle] = lixi_internal_request_1.NonRealEstateAssetTypeList.MotorVehicleAndTransport,
|
|
18
|
-
_a);
|
|
1
|
+
import { NonRealEstateAssetTypeList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
|
|
2
|
+
import { AssetType } from '../events/public-asset';
|
|
3
|
+
export const assetTypeMapping = {
|
|
4
|
+
[AssetType.Gifts]: NonRealEstateAssetTypeList.Other,
|
|
5
|
+
[AssetType.HomeContents]: NonRealEstateAssetTypeList.Other,
|
|
6
|
+
[AssetType.ManagedFunds]: NonRealEstateAssetTypeList.FinancialAsset,
|
|
7
|
+
[AssetType.OtherAsset]: NonRealEstateAssetTypeList.Other,
|
|
8
|
+
[AssetType.Property]: null,
|
|
9
|
+
[AssetType.SavingCheckAccount]: NonRealEstateAssetTypeList.FinancialAsset,
|
|
10
|
+
[AssetType.Shares]: NonRealEstateAssetTypeList.FinancialAsset,
|
|
11
|
+
[AssetType.Superannuation]: NonRealEstateAssetTypeList.FinancialAsset,
|
|
12
|
+
[AssetType.TermDeposit]: NonRealEstateAssetTypeList.FinancialAsset,
|
|
13
|
+
[AssetType.Vehicle]: NonRealEstateAssetTypeList.MotorVehicleAndTransport,
|
|
14
|
+
};
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.builderTypeMapping = (_a = {},
|
|
8
|
-
_a[public_asset_1.BuilderType.LicensedBuilder] = lixi_internal_request_1.BuilderTypeList.LicensedBuilder,
|
|
9
|
-
_a[public_asset_1.BuilderType.OwnerBuilder] = lixi_internal_request_1.BuilderTypeList.OwnerBuilder,
|
|
10
|
-
_a);
|
|
1
|
+
import { BuilderTypeList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
|
|
2
|
+
import { BuilderType } from '../events/public-asset';
|
|
3
|
+
export const builderTypeMapping = {
|
|
4
|
+
[BuilderType.LicensedBuilder]: BuilderTypeList.LicensedBuilder,
|
|
5
|
+
[BuilderType.OwnerBuilder]: BuilderTypeList.OwnerBuilder,
|
|
6
|
+
};
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
_a[public_asset_1.ConstructionType.BuildAProperty] = lixi_internal_request_1.ConstructionTypeList.FullConstruction,
|
|
9
|
-
_a[public_asset_1.ConstructionType.KnockdownRebuild] = lixi_internal_request_1.ConstructionTypeList.HomeExtension,
|
|
10
|
-
_a[public_asset_1.ConstructionType.StructuralRenovations] = lixi_internal_request_1.ConstructionTypeList.Renovation,
|
|
11
|
-
_a);
|
|
1
|
+
import { ConstructionTypeList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
|
|
2
|
+
import { ConstructionType } from '../events/public-asset';
|
|
3
|
+
export const constructionTypeMapping = {
|
|
4
|
+
[ConstructionType.BuildAProperty]: ConstructionTypeList.FullConstruction,
|
|
5
|
+
[ConstructionType.KnockdownRebuild]: ConstructionTypeList.HomeExtension,
|
|
6
|
+
[ConstructionType.StructuralRenovations]: ConstructionTypeList.Renovation,
|
|
7
|
+
};
|