@lendi/integrations-transform 1.0.7 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/lib/index.d.ts +7 -0
  2. package/lib/index.js +20 -0
  3. package/lib/logger.d.ts +2 -0
  4. package/lib/logger.js +5 -0
  5. package/lib/schemas/credit-report-retrieved-event.json +57 -0
  6. package/lib/schemas/public-applicant-event.json +652 -0
  7. package/lib/schemas/public-application-event.json +224 -0
  8. package/lib/schemas/public-asset-event.json +633 -0
  9. package/lib/schemas/public-asset-liability-relation-delete-event.json +74 -0
  10. package/lib/schemas/public-asset-liability-relation-event.json +73 -0
  11. package/lib/schemas/public-create-applicant-event.json +610 -0
  12. package/lib/schemas/public-delete-applicant-event.json +66 -0
  13. package/lib/schemas/public-delete-asset-event.json +53 -0
  14. package/lib/schemas/public-delete-income-event.json +55 -0
  15. package/lib/schemas/public-employment-delete-event.json +31 -0
  16. package/lib/schemas/public-employment-event.json +302 -0
  17. package/lib/schemas/public-expense-delete-event.json +41 -0
  18. package/lib/schemas/public-expense-event.json +132 -0
  19. package/lib/schemas/public-funding-position-event.json +289 -0
  20. package/lib/schemas/public-income-event.json +242 -0
  21. package/lib/schemas/public-liability-delete-event.json +37 -0
  22. package/lib/schemas/public-liability-event.json +234 -0
  23. package/lib/schemas/public-required-document-event.json +98 -0
  24. package/lib/schemas/public-update-applicant-event.json +607 -0
  25. package/lib/schemas/sf-opportunity-event-out.json +138 -0
  26. package/lib/transform-events/generate-asset-liability-link.d.ts +8 -0
  27. package/lib/transform-events/generate-asset-liability-link.js +29 -0
  28. package/lib/transform-events/generate-asset.d.ts +17 -0
  29. package/lib/transform-events/generate-asset.js +178 -0
  30. package/lib/transform-events/generate-credit-report-rebuilt.d.ts +8 -0
  31. package/lib/transform-events/generate-credit-report-rebuilt.js +41 -0
  32. package/lib/transform-events/generate-employment.d.ts +8 -0
  33. package/lib/transform-events/generate-employment.js +106 -0
  34. package/lib/transform-events/generate-funding-position.d.ts +18 -0
  35. package/lib/transform-events/generate-funding-position.js +82 -0
  36. package/lib/transform-events/generate-income.d.ts +37 -0
  37. package/lib/transform-events/generate-income.js +254 -0
  38. package/lib/transform-events/generate-liability.d.ts +8 -0
  39. package/lib/transform-events/generate-liability.js +87 -0
  40. package/lib/transform-events/generate-lixi-percentowned.d.ts +9 -0
  41. package/lib/transform-events/generate-lixi-percentowned.js +24 -0
  42. package/lib/transform-events/generate-opportunity.d.ts +8 -0
  43. package/lib/transform-events/generate-opportunity.js +32 -0
  44. package/lib/transform-events/generate-required-document.d.ts +8 -0
  45. package/lib/transform-events/generate-required-document.js +54 -0
  46. package/lib/transform-events/transform-applicant.d.ts +33 -0
  47. package/lib/transform-events/transform-applicant.js +189 -0
  48. package/lib/transform-events/transform-application.d.ts +8 -0
  49. package/lib/transform-events/transform-application.js +54 -0
  50. package/lib/transform-events/transform-expenses.d.ts +37 -0
  51. package/lib/transform-events/transform-expenses.js +121 -0
  52. package/lib/types/enum-mappings/alieo-frequency.d.ts +15 -0
  53. package/lib/types/enum-mappings/alieo-frequency.js +26 -0
  54. package/lib/types/enum-mappings/country-code.d.ts +7 -0
  55. package/lib/types/enum-mappings/country-code.js +247 -0
  56. package/lib/types/enum-mappings/employment-basis.d.ts +7 -0
  57. package/lib/types/enum-mappings/employment-basis.js +13 -0
  58. package/lib/types/enum-mappings/expense-frequency.d.ts +7 -0
  59. package/lib/types/enum-mappings/expense-frequency.js +12 -0
  60. package/lib/types/enum-mappings/funding-position.d.ts +18 -0
  61. package/lib/types/enum-mappings/funding-position.js +34 -0
  62. package/lib/types/enum-mappings/government-benefits.d.ts +7 -0
  63. package/lib/types/enum-mappings/government-benefits.js +11 -0
  64. package/lib/types/enum-mappings/housing-status.d.ts +7 -0
  65. package/lib/types/enum-mappings/housing-status.js +16 -0
  66. package/lib/types/enum-mappings/income-type.d.ts +7 -0
  67. package/lib/types/enum-mappings/income-type.js +17 -0
  68. package/lib/types/enum-mappings/liability-payment-type.d.ts +7 -0
  69. package/lib/types/enum-mappings/liability-payment-type.js +10 -0
  70. package/lib/types/enum-mappings/liability-type.d.ts +7 -0
  71. package/lib/types/enum-mappings/liability-type.js +22 -0
  72. package/lib/types/enum-mappings/living-expense.d.ts +7 -0
  73. package/lib/types/enum-mappings/living-expense.js +31 -0
  74. package/lib/types/enum-mappings/marital-status.d.ts +7 -0
  75. package/lib/types/enum-mappings/marital-status.js +13 -0
  76. package/lib/types/enum-mappings/postcode.d.ts +6 -0
  77. package/lib/types/enum-mappings/postcode.js +16 -0
  78. package/lib/types/enum-mappings/preferred-repayment.d.ts +7 -0
  79. package/lib/types/enum-mappings/preferred-repayment.js +11 -0
  80. package/lib/types/enum-mappings/proof-of-identity.d.ts +7 -0
  81. package/lib/types/enum-mappings/proof-of-identity.js +11 -0
  82. package/lib/types/enum-mappings/public-financial-asset.d.ts +7 -0
  83. package/lib/types/enum-mappings/public-financial-asset.js +13 -0
  84. package/lib/types/enum-mappings/public-primary-purpose.d.ts +7 -0
  85. package/lib/types/enum-mappings/public-primary-purpose.js +10 -0
  86. package/lib/types/enum-mappings/public-property-status.d.ts +7 -0
  87. package/lib/types/enum-mappings/public-property-status.js +12 -0
  88. package/lib/types/enum-mappings/public-property-type.d.ts +7 -0
  89. package/lib/types/enum-mappings/public-property-type.js +24 -0
  90. package/lib/types/enum-mappings/residency-status.d.ts +7 -0
  91. package/lib/types/enum-mappings/residency-status.js +12 -0
  92. package/lib/types/enum-mappings/title-gender.d.ts +7 -0
  93. package/lib/types/enum-mappings/title-gender.js +14 -0
  94. package/lib/types/enum-mappings/title.d.ts +7 -0
  95. package/lib/types/enum-mappings/title.js +14 -0
  96. package/lib/types/enum-mappings/transaction-type.d.ts +7 -0
  97. package/lib/types/enum-mappings/transaction-type.js +10 -0
  98. package/lib/types/events/applicant-delete.d.ts +42 -0
  99. package/lib/types/events/applicant-delete.js +15 -0
  100. package/lib/types/events/asset-delete.d.ts +33 -0
  101. package/lib/types/events/asset-delete.js +15 -0
  102. package/lib/types/events/asset-liability-relation-delete.d.ts +52 -0
  103. package/lib/types/events/asset-liability-relation-delete.js +15 -0
  104. package/lib/types/events/credit-report-retrieved.d.ts +36 -0
  105. package/lib/types/events/credit-report-retrieved.js +15 -0
  106. package/lib/types/events/employment-delete.d.ts +19 -0
  107. package/lib/types/events/employment-delete.js +7 -0
  108. package/lib/types/events/expense-delete.d.ts +21 -0
  109. package/lib/types/events/expense-delete.js +7 -0
  110. package/lib/types/events/funding-position.d.ts +116 -0
  111. package/lib/types/events/funding-position.js +34 -0
  112. package/lib/types/events/income-delete.d.ts +33 -0
  113. package/lib/types/events/income-delete.js +15 -0
  114. package/lib/types/events/liability-delete.d.ts +17 -0
  115. package/lib/types/events/liability-delete.js +7 -0
  116. package/lib/types/events/opportunity.d.ts +102 -0
  117. package/lib/types/events/opportunity.js +47 -0
  118. package/lib/types/events/public-applicant.d.ts +485 -0
  119. package/lib/types/events/public-applicant.js +343 -0
  120. package/lib/types/events/public-application.d.ts +145 -0
  121. package/lib/types/events/public-application.js +100 -0
  122. package/lib/types/events/public-asset-liability-relation.d.ts +52 -0
  123. package/lib/types/events/public-asset-liability-relation.js +15 -0
  124. package/lib/types/events/public-asset.d.ts +469 -0
  125. package/lib/types/events/public-asset.js +319 -0
  126. package/lib/types/events/public-employment.d.ts +190 -0
  127. package/lib/types/events/public-employment.js +69 -0
  128. package/lib/types/events/public-expense.d.ts +83 -0
  129. package/lib/types/events/public-expense.js +50 -0
  130. package/lib/types/events/public-funding-position.d.ts +226 -0
  131. package/lib/types/events/public-funding-position.js +7 -0
  132. package/lib/types/events/public-income.d.ts +144 -0
  133. package/lib/types/events/public-income.js +65 -0
  134. package/lib/types/events/public-liability.d.ts +133 -0
  135. package/lib/types/events/public-liability.js +68 -0
  136. package/lib/types/events/public-required-document.d.ts +99 -0
  137. package/lib/types/events/public-required-document.js +44 -0
  138. package/lib/types/partial-application.d.ts +3 -0
  139. package/lib/types/partial-application.js +2 -0
  140. package/lib/types/recursive-partial.d.ts +3 -0
  141. package/lib/types/recursive-partial.js +2 -0
  142. package/lib/utils/address-tools.d.ts +69 -0
  143. package/lib/utils/address-tools.js +146 -0
  144. package/lib/utils/clean-up.d.ts +7 -0
  145. package/lib/utils/clean-up.js +24 -0
  146. package/lib/utils/generate-address.d.ts +19 -0
  147. package/lib/utils/generate-address.js +102 -0
  148. package/lib/utils/get-financial-institution.d.ts +7 -0
  149. package/lib/utils/get-financial-institution.js +16 -0
  150. package/lib/utils/is-income-type.d.ts +83 -0
  151. package/lib/utils/is-income-type.js +166 -0
  152. package/lib/utils/normalise-date.d.ts +8 -0
  153. package/lib/utils/normalise-date.js +17 -0
  154. package/lib/utils/round-decimal.d.ts +6 -0
  155. package/lib/utils/round-decimal.js +12 -0
  156. package/package.json +10 -7
@@ -0,0 +1,7 @@
1
+ import { FinancialAssetTypeList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
+ import { AssetType } from '../events/public-asset';
3
+ declare type FinancialAssetMapping = {
4
+ [key in AssetType]: FinancialAssetTypeList;
5
+ };
6
+ export declare const financialAssetMapping: Partial<FinancialAssetMapping>;
7
+ export {};
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var _a;
3
+ exports.__esModule = true;
4
+ exports.financialAssetMapping = void 0;
5
+ var lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
6
+ var public_asset_1 = require("../events/public-asset");
7
+ exports.financialAssetMapping = (_a = {},
8
+ _a[public_asset_1.AssetType.Shares] = lixi_internal_request_1.FinancialAssetTypeList.SharesAndDebentures,
9
+ _a[public_asset_1.AssetType.Superannuation] = lixi_internal_request_1.FinancialAssetTypeList.Superannuation,
10
+ _a[public_asset_1.AssetType.TermDeposit] = lixi_internal_request_1.FinancialAssetTypeList.TermDeposit,
11
+ _a[public_asset_1.AssetType.SavingCheckAccount] = lixi_internal_request_1.FinancialAssetTypeList.SavingsAccount,
12
+ _a[public_asset_1.AssetType.ManagedFunds] = lixi_internal_request_1.FinancialAssetTypeList.ManagedFunds,
13
+ _a);
@@ -0,0 +1,7 @@
1
+ import { PrimaryPurposeRealEstateAssetList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
+ import { PrimaryPurpose } from '../events/public-asset';
3
+ declare type PrimaryPurposeMapping = {
4
+ [key in PrimaryPurpose]: PrimaryPurposeRealEstateAssetList;
5
+ };
6
+ export declare const primaryPurposeMapping: PrimaryPurposeMapping;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ var _a;
3
+ exports.__esModule = true;
4
+ exports.primaryPurposeMapping = void 0;
5
+ var lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
6
+ var public_asset_1 = require("../events/public-asset");
7
+ exports.primaryPurposeMapping = (_a = {},
8
+ _a[public_asset_1.PrimaryPurpose.Investment] = lixi_internal_request_1.PrimaryPurposeRealEstateAssetList.Investment,
9
+ _a[public_asset_1.PrimaryPurpose.OwnerOccupied] = lixi_internal_request_1.PrimaryPurposeRealEstateAssetList.OwnerOccupied,
10
+ _a);
@@ -0,0 +1,7 @@
1
+ import { RealEstateAssetStatusList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
+ import { PropertyStatus } from '../events/public-asset';
3
+ declare type PropertyStatusMapping = {
4
+ [key in PropertyStatus]: RealEstateAssetStatusList;
5
+ };
6
+ export declare const propertyStatusMapping: PropertyStatusMapping;
7
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var _a;
3
+ exports.__esModule = true;
4
+ exports.propertyStatusMapping = void 0;
5
+ var lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
6
+ var public_asset_1 = require("../events/public-asset");
7
+ exports.propertyStatusMapping = (_a = {},
8
+ _a[public_asset_1.PropertyStatus.Established] = lixi_internal_request_1.RealEstateAssetStatusList.Established,
9
+ _a[public_asset_1.PropertyStatus.NewBuilding] = lixi_internal_request_1.RealEstateAssetStatusList.NewBuilding,
10
+ _a[public_asset_1.PropertyStatus.VacantLand] = lixi_internal_request_1.RealEstateAssetStatusList.VacantLand,
11
+ _a[public_asset_1.PropertyStatus.OffThePlan] = lixi_internal_request_1.RealEstateAssetStatusList.OffThePlan,
12
+ _a);
@@ -0,0 +1,7 @@
1
+ import { PropertyType } from '../events/public-asset';
2
+ import { ResidentialTypeList, Custom3PropertyTypeNameList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
3
+ declare type PropertyTypeMapping = {
4
+ [key in PropertyType]: ResidentialTypeList | Custom3PropertyTypeNameList;
5
+ };
6
+ export declare const propertyTypeMapping: PropertyTypeMapping;
7
+ export {};
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var _a;
3
+ exports.__esModule = true;
4
+ exports.propertyTypeMapping = void 0;
5
+ var public_asset_1 = require("../events/public-asset");
6
+ var lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
7
+ exports.propertyTypeMapping = (_a = {},
8
+ _a[public_asset_1.PropertyType.ApartmentUnitLessThan50M2] = lixi_internal_request_1.ResidentialTypeList.HighDensityApartment,
9
+ _a[public_asset_1.PropertyType.ApartmentUnitMoreThan50M2] = lixi_internal_request_1.ResidentialTypeList.ApartmentUnitFlat,
10
+ _a[public_asset_1.PropertyType.Duplex] = lixi_internal_request_1.ResidentialTypeList.Duplex,
11
+ _a[public_asset_1.PropertyType.FullyDetachedHouse] = lixi_internal_request_1.ResidentialTypeList.FullyDetachedHouse,
12
+ _a[public_asset_1.PropertyType.KitHome] = lixi_internal_request_1.ResidentialTypeList.KitHome,
13
+ _a[public_asset_1.PropertyType.Land] = lixi_internal_request_1.ResidentialTypeList.VacantLand,
14
+ _a[public_asset_1.PropertyType.Studio] = lixi_internal_request_1.ResidentialTypeList.BedsitterBachelor,
15
+ _a[public_asset_1.PropertyType.SemiDetachedHouse] = lixi_internal_request_1.ResidentialTypeList.SemiDetachedHouse,
16
+ _a[public_asset_1.PropertyType.ServicedApartment] = lixi_internal_request_1.ResidentialTypeList.ServicedApartment,
17
+ _a[public_asset_1.PropertyType.StudentAccommodation] = lixi_internal_request_1.ResidentialTypeList.UnitStudentAccommodation,
18
+ _a[public_asset_1.PropertyType.Terrace] = lixi_internal_request_1.ResidentialTypeList.Terrace,
19
+ _a[public_asset_1.PropertyType.Townhouse] = lixi_internal_request_1.ResidentialTypeList.Townhouse,
20
+ _a[public_asset_1.PropertyType.Villa] = lixi_internal_request_1.ResidentialTypeList.Villa,
21
+ _a[public_asset_1.PropertyType.WarehouseApartment] = lixi_internal_request_1.ResidentialTypeList.StudioWarehouseApartment,
22
+ _a[public_asset_1.PropertyType.PropertyOver10_Ha] = lixi_internal_request_1.Custom3PropertyTypeNameList.PropertyOver10HA,
23
+ _a[public_asset_1.PropertyType.MultiDwellingSingleTitle] = lixi_internal_request_1.Custom3PropertyTypeNameList.MultiDwellingSingleTitle,
24
+ _a);
@@ -0,0 +1,7 @@
1
+ import { ResidencyStatus } from '../events/public-applicant';
2
+ import { ResidencyStatusList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
3
+ declare type ResidencyStatusMapping = {
4
+ [key in ResidencyStatus]: ResidencyStatusList;
5
+ };
6
+ export declare const residencyStatusMapping: ResidencyStatusMapping;
7
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var _a;
3
+ exports.__esModule = true;
4
+ exports.residencyStatusMapping = void 0;
5
+ var public_applicant_1 = require("../events/public-applicant");
6
+ var lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
7
+ exports.residencyStatusMapping = (_a = {},
8
+ _a[public_applicant_1.ResidencyStatus.AustralianCitizen] = lixi_internal_request_1.ResidencyStatusList.PermanentlyInAustralia,
9
+ _a[public_applicant_1.ResidencyStatus.PermanentResident] = lixi_internal_request_1.ResidencyStatusList.PermanentlyInAustralia,
10
+ _a[public_applicant_1.ResidencyStatus.TemporaryResident] = lixi_internal_request_1.ResidencyStatusList.TemporarilyInAustralia,
11
+ _a[public_applicant_1.ResidencyStatus.Unknown] = lixi_internal_request_1.ResidencyStatusList.NonResident,
12
+ _a);
@@ -0,0 +1,7 @@
1
+ import { IDTitle } from '../events/public-required-document';
2
+ import { GenderList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
3
+ declare type TitleGenderMapping = {
4
+ [key in IDTitle]: GenderList;
5
+ };
6
+ export declare const titleGenderMapping: Partial<TitleGenderMapping>;
7
+ export {};
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var _a;
3
+ exports.__esModule = true;
4
+ exports.titleGenderMapping = void 0;
5
+ var public_required_document_1 = require("../events/public-required-document");
6
+ var lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
7
+ exports.titleGenderMapping = (_a = {},
8
+ _a[public_required_document_1.IDTitle.Miss] = lixi_internal_request_1.GenderList.Female,
9
+ _a[public_required_document_1.IDTitle.Mr] = lixi_internal_request_1.GenderList.Male,
10
+ _a[public_required_document_1.IDTitle.Mrs] = lixi_internal_request_1.GenderList.Female,
11
+ _a[public_required_document_1.IDTitle.MS] = lixi_internal_request_1.GenderList.Female,
12
+ _a[public_required_document_1.IDTitle.Other] = lixi_internal_request_1.GenderList.Undisclosed,
13
+ _a[public_required_document_1.IDTitle.Unknown] = lixi_internal_request_1.GenderList.Undisclosed,
14
+ _a);
@@ -0,0 +1,7 @@
1
+ import { Title } from '../events/public-applicant';
2
+ import { NameTitleList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
3
+ declare type TitleMapping = {
4
+ [key in Title]: NameTitleList;
5
+ };
6
+ export declare const titleMapping: TitleMapping;
7
+ export {};
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var _a;
3
+ exports.__esModule = true;
4
+ exports.titleMapping = void 0;
5
+ var public_applicant_1 = require("../events/public-applicant");
6
+ var lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
7
+ exports.titleMapping = (_a = {},
8
+ _a[public_applicant_1.Title.DR] = lixi_internal_request_1.NameTitleList.DR,
9
+ _a[public_applicant_1.Title.Miss] = lixi_internal_request_1.NameTitleList.Miss,
10
+ _a[public_applicant_1.Title.Mr] = lixi_internal_request_1.NameTitleList.Mr,
11
+ _a[public_applicant_1.Title.Mrs] = lixi_internal_request_1.NameTitleList.Mrs,
12
+ _a[public_applicant_1.Title.MS] = lixi_internal_request_1.NameTitleList.MS,
13
+ _a[public_applicant_1.Title.Unknown] = lixi_internal_request_1.NameTitleList.Other,
14
+ _a);
@@ -0,0 +1,7 @@
1
+ import { PurposeOfApplicationList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
+ import { PrimaryPurpose } from '../events/public-application';
3
+ declare type TransactionTypeMapping = {
4
+ [key in PrimaryPurpose]: PurposeOfApplicationList;
5
+ };
6
+ export declare const transactionTypeMapping: TransactionTypeMapping;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ var _a;
3
+ exports.__esModule = true;
4
+ exports.transactionTypeMapping = void 0;
5
+ var lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
6
+ var public_application_1 = require("../events/public-application");
7
+ exports.transactionTypeMapping = (_a = {},
8
+ _a[public_application_1.PrimaryPurpose.NewPurchase] = lixi_internal_request_1.PurposeOfApplicationList.PurchaseRealEstate,
9
+ _a[public_application_1.PrimaryPurpose.Refinance] = lixi_internal_request_1.PurposeOfApplicationList.RefinanceHomeLoan,
10
+ _a);
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Delete.
3
+ */
4
+ export interface ApplicantDelete {
5
+ payload: Payload;
6
+ type: Type;
7
+ /**
8
+ * schema version
9
+ */
10
+ version: string;
11
+ }
12
+ export interface Payload {
13
+ /**
14
+ * uuid of application
15
+ */
16
+ applicationId: string;
17
+ id: string;
18
+ meta?: ApplicantMeta;
19
+ }
20
+ /**
21
+ * The metadata of the applicant
22
+ */
23
+ export interface ApplicantMeta {
24
+ /**
25
+ * uuid of user who made the action (delete)
26
+ */
27
+ actionedBy: string;
28
+ /**
29
+ * role of the user that made the action
30
+ */
31
+ actionedByRole: ActionedByRole;
32
+ }
33
+ /**
34
+ * role of the user that made the action
35
+ */
36
+ export declare enum ActionedByRole {
37
+ Customer = "customer",
38
+ Team = "team"
39
+ }
40
+ export declare enum Type {
41
+ DeleteApplicant = "DeleteApplicant"
42
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.Type = exports.ActionedByRole = void 0;
4
+ /**
5
+ * role of the user that made the action
6
+ */
7
+ var ActionedByRole;
8
+ (function (ActionedByRole) {
9
+ ActionedByRole["Customer"] = "customer";
10
+ ActionedByRole["Team"] = "team";
11
+ })(ActionedByRole = exports.ActionedByRole || (exports.ActionedByRole = {}));
12
+ var Type;
13
+ (function (Type) {
14
+ Type["DeleteApplicant"] = "DeleteApplicant";
15
+ })(Type = exports.Type || (exports.Type = {}));
@@ -0,0 +1,33 @@
1
+ export interface AssetDelete {
2
+ payload: DeletePayloadDefinition;
3
+ type: Type;
4
+ version: string;
5
+ }
6
+ export interface DeletePayloadDefinition {
7
+ applicationId: string;
8
+ id: string;
9
+ meta?: Meta;
10
+ }
11
+ /**
12
+ * The metadata of the alieo
13
+ */
14
+ export interface Meta {
15
+ /**
16
+ * uuid of user who made the action (create/update/delete)
17
+ */
18
+ actionedBy: string;
19
+ /**
20
+ * role of the user that made the action
21
+ */
22
+ actionedByRole: ActionedByRole;
23
+ }
24
+ /**
25
+ * role of the user that made the action
26
+ */
27
+ export declare enum ActionedByRole {
28
+ Customer = "customer",
29
+ Team = "team"
30
+ }
31
+ export declare enum Type {
32
+ AssetDeleted = "AssetDeleted"
33
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.Type = exports.ActionedByRole = void 0;
4
+ /**
5
+ * role of the user that made the action
6
+ */
7
+ var ActionedByRole;
8
+ (function (ActionedByRole) {
9
+ ActionedByRole["Customer"] = "customer";
10
+ ActionedByRole["Team"] = "team";
11
+ })(ActionedByRole = exports.ActionedByRole || (exports.ActionedByRole = {}));
12
+ var Type;
13
+ (function (Type) {
14
+ Type["AssetDeleted"] = "AssetDeleted";
15
+ })(Type = exports.Type || (exports.Type = {}));
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The AssetAndLiabilityRelationDeleted event schema
3
+ */
4
+ export interface AssetLiabilityRelationDelete {
5
+ payload: DeleteAssetAndLiabilityRelationDefinition;
6
+ type: Type;
7
+ /**
8
+ * schema version
9
+ */
10
+ version: string;
11
+ }
12
+ /**
13
+ * delete Asset And Liability Relation payload
14
+ */
15
+ export interface DeleteAssetAndLiabilityRelationDefinition {
16
+ applicationId: string;
17
+ meta?: Meta;
18
+ relation: Relation;
19
+ }
20
+ /**
21
+ * The metadata of the alieo
22
+ */
23
+ export interface Meta {
24
+ /**
25
+ * uuid of user who made the action (create/update/delete)
26
+ */
27
+ actionedBy: string;
28
+ /**
29
+ * role of the user that made the action
30
+ */
31
+ actionedByRole: ActionedByRole;
32
+ }
33
+ /**
34
+ * role of the user that made the action
35
+ */
36
+ export declare enum ActionedByRole {
37
+ Customer = "customer",
38
+ Team = "team"
39
+ }
40
+ export interface Relation {
41
+ /**
42
+ * uuid of asset
43
+ */
44
+ assetId: string;
45
+ /**
46
+ * uuid of liability
47
+ */
48
+ liabilityId: string;
49
+ }
50
+ export declare enum Type {
51
+ AssetAndLiabilityRelationDeleted = "AssetAndLiabilityRelationDeleted"
52
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.Type = exports.ActionedByRole = void 0;
4
+ /**
5
+ * role of the user that made the action
6
+ */
7
+ var ActionedByRole;
8
+ (function (ActionedByRole) {
9
+ ActionedByRole["Customer"] = "customer";
10
+ ActionedByRole["Team"] = "team";
11
+ })(ActionedByRole = exports.ActionedByRole || (exports.ActionedByRole = {}));
12
+ var Type;
13
+ (function (Type) {
14
+ Type["AssetAndLiabilityRelationDeleted"] = "AssetAndLiabilityRelationDeleted";
15
+ })(Type = exports.Type || (exports.Type = {}));
@@ -0,0 +1,36 @@
1
+ export interface CreditReportRetrieved {
2
+ payload: any[] | boolean | number | number | null | PayloadObject | string;
3
+ type: Type;
4
+ version: string;
5
+ }
6
+ export interface PayloadObject {
7
+ applicantId: string;
8
+ applicationId: string;
9
+ /**
10
+ * ISO 8601 time when the event is created
11
+ */
12
+ createdAt?: string;
13
+ customerId: string;
14
+ /**
15
+ * Indicate whether there is a match found or not for the customer.
16
+ */
17
+ isNoMatch?: boolean;
18
+ /**
19
+ * Credit report raw content, compressed and 64-base encoded.
20
+ */
21
+ raw: string;
22
+ /**
23
+ * A list of credit report service provider
24
+ */
25
+ source: Source;
26
+ }
27
+ /**
28
+ * A list of credit report service provider
29
+ */
30
+ export declare enum Source {
31
+ Equifax = "equifax"
32
+ }
33
+ export declare enum Type {
34
+ CreditReportNoMatch = "CreditReportNoMatch",
35
+ CreditReportRetrieved = "CreditReportRetrieved"
36
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.Type = exports.Source = void 0;
4
+ /**
5
+ * A list of credit report service provider
6
+ */
7
+ var Source;
8
+ (function (Source) {
9
+ Source["Equifax"] = "equifax";
10
+ })(Source = exports.Source || (exports.Source = {}));
11
+ var Type;
12
+ (function (Type) {
13
+ Type["CreditReportNoMatch"] = "CreditReportNoMatch";
14
+ Type["CreditReportRetrieved"] = "CreditReportRetrieved";
15
+ })(Type = exports.Type || (exports.Type = {}));
@@ -0,0 +1,19 @@
1
+ export interface EmploymentDelete {
2
+ payload: Payload;
3
+ type: Type;
4
+ version: string;
5
+ }
6
+ export interface Payload {
7
+ /**
8
+ * uuid of applicant
9
+ */
10
+ applicantId?: string;
11
+ /**
12
+ * uuid of application
13
+ */
14
+ applicationId: string;
15
+ id: string;
16
+ }
17
+ export declare enum Type {
18
+ EmploymentDeleted = "EmploymentDeleted"
19
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.Type = void 0;
4
+ var Type;
5
+ (function (Type) {
6
+ Type["EmploymentDeleted"] = "EmploymentDeleted";
7
+ })(Type = exports.Type || (exports.Type = {}));
@@ -0,0 +1,21 @@
1
+ export interface ExpenseDelete {
2
+ payload: Payload;
3
+ type: Type;
4
+ version: string;
5
+ }
6
+ export interface Payload {
7
+ /**
8
+ * uuid of applicant
9
+ */
10
+ applicantId: string;
11
+ applicationId: string;
12
+ id: string;
13
+ meta?: Meta;
14
+ }
15
+ export interface Meta {
16
+ actionedBy: string;
17
+ actionedByRole: string;
18
+ }
19
+ export declare enum Type {
20
+ ExpenseDeleted = "ExpenseDeleted"
21
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.Type = void 0;
4
+ var Type;
5
+ (function (Type) {
6
+ Type["ExpenseDeleted"] = "ExpenseDeleted";
7
+ })(Type = exports.Type || (exports.Type = {}));
@@ -0,0 +1,116 @@
1
+ /**
2
+ * The Funding Position object in Salesforce
3
+ */
4
+ export interface FundingPosition {
5
+ payload: PayloadClass;
6
+ type: Type;
7
+ /**
8
+ * schema version
9
+ */
10
+ version: string;
11
+ }
12
+ export interface PayloadClass {
13
+ /**
14
+ * Application ID
15
+ */
16
+ applicationId: string;
17
+ /**
18
+ * Amount of Borrower Contributions
19
+ */
20
+ borrowerContributions: number | null;
21
+ /**
22
+ * Calculated LVR from related Application. Opportunity.Calculated_LVR__c field in Salesforce
23
+ */
24
+ calculatedLvr: number | null;
25
+ /**
26
+ * Client legal fees
27
+ */
28
+ clientLegalFees: number | null;
29
+ /**
30
+ * First home owner grants
31
+ */
32
+ firstHomeOwnerConcessionsAndGrants: number | null;
33
+ fundingPositionDetails?: FundingPositionDetail[];
34
+ /**
35
+ * Amount of Funds Requested
36
+ */
37
+ fundsRequested: number | null;
38
+ /**
39
+ * Amount of Funds Required
40
+ */
41
+ fundsRequired: number | null;
42
+ /**
43
+ * Funding Position ID
44
+ */
45
+ id: string;
46
+ /**
47
+ * Lender setup fees
48
+ */
49
+ lenderSetupFees: number | null;
50
+ /**
51
+ * Lenders Mortgage Insurance
52
+ */
53
+ lendersMortgageInsurance: number | null;
54
+ /**
55
+ * Max Loan Asset
56
+ */
57
+ loanMaxAsset: number | null;
58
+ /**
59
+ * Max Loan Product
60
+ */
61
+ loanMaxProduct: number | null;
62
+ /**
63
+ * Net Surplus
64
+ */
65
+ netSurplus: number | null;
66
+ /**
67
+ * Other sundries
68
+ */
69
+ otherSundries: number | null;
70
+ }
71
+ /**
72
+ * Details on a Funding Position object in Salesforce that represent assets or liabilities.
73
+ * Eg. fees, debt, purchases
74
+ */
75
+ export interface FundingPositionDetail {
76
+ /**
77
+ * Amount of the detail
78
+ */
79
+ amount: number | null;
80
+ /**
81
+ * Category of the detail
82
+ */
83
+ category: Category | null;
84
+ /**
85
+ * Detail type
86
+ */
87
+ detailType?: DetailType;
88
+ }
89
+ export declare enum Category {
90
+ BorrowerContribution = "Borrower Contribution",
91
+ Debt = "Debt",
92
+ EquityRelease = "Equity Release",
93
+ Fee = "Fee",
94
+ Other = "Other",
95
+ Purchase = "Purchase"
96
+ }
97
+ /**
98
+ * Detail type
99
+ */
100
+ export declare enum DetailType {
101
+ Deposit = "Deposit",
102
+ DischargeCosts = "Discharge Costs",
103
+ EquityRelease = "Equity Release",
104
+ HomeLoanToRepay = "Home Loan to Repay",
105
+ OtherDebtsToRepay = "Other Debts to Repay",
106
+ PotentialAccruedInterest = "Potential Accrued Interest",
107
+ PurchasePrice = "Purchase Price",
108
+ PurchaseStampDuty = "Purchase Stamp Duty",
109
+ RegistrationFee = "Registration Fee",
110
+ TransferFee = "Transfer Fee"
111
+ }
112
+ export declare enum Type {
113
+ FundingPositionCreated = "FundingPositionCreated",
114
+ FundingPositionMigrated = "FundingPositionMigrated",
115
+ FundingPositionUpdated = "FundingPositionUpdated"
116
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.Type = exports.DetailType = exports.Category = void 0;
4
+ var Category;
5
+ (function (Category) {
6
+ Category["BorrowerContribution"] = "Borrower Contribution";
7
+ Category["Debt"] = "Debt";
8
+ Category["EquityRelease"] = "Equity Release";
9
+ Category["Fee"] = "Fee";
10
+ Category["Other"] = "Other";
11
+ Category["Purchase"] = "Purchase";
12
+ })(Category = exports.Category || (exports.Category = {}));
13
+ /**
14
+ * Detail type
15
+ */
16
+ var DetailType;
17
+ (function (DetailType) {
18
+ DetailType["Deposit"] = "Deposit";
19
+ DetailType["DischargeCosts"] = "Discharge Costs";
20
+ DetailType["EquityRelease"] = "Equity Release";
21
+ DetailType["HomeLoanToRepay"] = "Home Loan to Repay";
22
+ DetailType["OtherDebtsToRepay"] = "Other Debts to Repay";
23
+ DetailType["PotentialAccruedInterest"] = "Potential Accrued Interest";
24
+ DetailType["PurchasePrice"] = "Purchase Price";
25
+ DetailType["PurchaseStampDuty"] = "Purchase Stamp Duty";
26
+ DetailType["RegistrationFee"] = "Registration Fee";
27
+ DetailType["TransferFee"] = "Transfer Fee";
28
+ })(DetailType = exports.DetailType || (exports.DetailType = {}));
29
+ var Type;
30
+ (function (Type) {
31
+ Type["FundingPositionCreated"] = "FundingPositionCreated";
32
+ Type["FundingPositionMigrated"] = "FundingPositionMigrated";
33
+ Type["FundingPositionUpdated"] = "FundingPositionUpdated";
34
+ })(Type = exports.Type || (exports.Type = {}));