@lendi/integrations-transform 1.7.4 → 1.7.6

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 (40) hide show
  1. package/lib/schemas/public-funding-position-event.json +131 -1
  2. package/lib/schemas/public-liability-event.json +4 -0
  3. package/lib/transform-events/transform-funding-position.js +7 -0
  4. package/lib/transform-events/transform-liability.js +6 -0
  5. package/lib/types/enum-mappings/alieo-frequency.d.ts +3 -3
  6. package/lib/types/enum-mappings/applicant-gender.d.ts +1 -1
  7. package/lib/types/enum-mappings/applicant-type.d.ts +1 -1
  8. package/lib/types/enum-mappings/builder-type.d.ts +1 -1
  9. package/lib/types/enum-mappings/construction-type.d.ts +1 -1
  10. package/lib/types/enum-mappings/country-code.d.ts +1 -1
  11. package/lib/types/enum-mappings/employment-basis.d.ts +1 -1
  12. package/lib/types/enum-mappings/expense-frequency.d.ts +1 -1
  13. package/lib/types/enum-mappings/funding-position.d.ts +4 -4
  14. package/lib/types/enum-mappings/government-benefits.d.ts +1 -1
  15. package/lib/types/enum-mappings/housing-status.d.ts +1 -1
  16. package/lib/types/enum-mappings/income-type.d.ts +1 -1
  17. package/lib/types/enum-mappings/liability-payment-type.d.ts +1 -1
  18. package/lib/types/enum-mappings/liability-type.d.ts +1 -1
  19. package/lib/types/enum-mappings/living-expense.d.ts +1 -1
  20. package/lib/types/enum-mappings/marital-status.d.ts +1 -1
  21. package/lib/types/enum-mappings/postcode.d.ts +1 -1
  22. package/lib/types/enum-mappings/preferred-repayment.d.ts +1 -1
  23. package/lib/types/enum-mappings/proof-of-identity.d.ts +1 -1
  24. package/lib/types/enum-mappings/property-expense-category.d.ts +1 -1
  25. package/lib/types/enum-mappings/public-financial-asset.d.ts +1 -1
  26. package/lib/types/enum-mappings/public-primary-purpose.d.ts +1 -1
  27. package/lib/types/enum-mappings/public-property-status.d.ts +1 -1
  28. package/lib/types/enum-mappings/public-property-type.d.ts +1 -1
  29. package/lib/types/enum-mappings/residency-status.d.ts +1 -1
  30. package/lib/types/enum-mappings/title-gender.d.ts +1 -1
  31. package/lib/types/enum-mappings/title.d.ts +1 -1
  32. package/lib/types/enum-mappings/transaction-type.d.ts +1 -1
  33. package/lib/types/events/public-funding-position.d.ts +116 -1
  34. package/lib/types/events/public-funding-position.js +14 -1
  35. package/lib/types/events/public-liability.d.ts +4 -0
  36. package/lib/types/partial-application.d.ts +1 -1
  37. package/lib/types/recursive-partial.d.ts +1 -1
  38. package/lib/utils/address-tools.d.ts +4 -4
  39. package/lib/utils/normalise-date.d.ts +1 -1
  40. package/package.json +2 -2
@@ -45,6 +45,10 @@
45
45
  "type": "number",
46
46
  "description": "The total amount of customer-specified cash out."
47
47
  },
48
+ "totalTopUp": {
49
+ "type": "number",
50
+ "description": "The total amount of customer-specified top up."
51
+ },
48
52
  "totalDeposit": {
49
53
  "type": "number",
50
54
  "description": "The total deposit amount for all properties."
@@ -59,7 +63,7 @@
59
63
  },
60
64
  "fundsRequested": {
61
65
  "type": "number",
62
- "description": "The final loan amount amount requested by the customer or broker."
66
+ "description": "The final loan amount requested by the customer or broker."
63
67
  },
64
68
  "fundsRequired": {
65
69
  "type": "number",
@@ -69,6 +73,14 @@
69
73
  "type": "number",
70
74
  "description": "Loan to value ratio. Calculated as the loan amount divided by the value of all properties being used as security."
71
75
  },
76
+ "baseFundsRequested": {
77
+ "type": "number",
78
+ "description": "The loan amount input by the customer or broker, but does not include the lmi. See fundsRequested for the final loan amount requested that includes lmi if lmiIncluded is true."
79
+ },
80
+ "baseLVR": {
81
+ "type": "number",
82
+ "description": "Loan to value ratio. Calculated as the loan amount divided by the value of all properties being used as security. Based on the baseFundsRequested field, which does not include the lmi."
83
+ },
72
84
  "netSurplus": {
73
85
  "type": "number",
74
86
  "description": "The amount remaining after settlement. Calculated as the difference between the funds requested and funds required."
@@ -80,6 +92,42 @@
80
92
  "lmiIncluded": {
81
93
  "type": "boolean",
82
94
  "description": "Whether the lmi premium is included in the funds required."
95
+ },
96
+ "cashoutCustomerActionRequired": {
97
+ "type": "boolean",
98
+ "description": "Customer action on cash-out required."
99
+ },
100
+ "cashoutCustomerActionCompleted": {
101
+ "type": "boolean",
102
+ "description": "Customer action on cash-out completed."
103
+ },
104
+ "cashoutCustomerAcknowledgement": {
105
+ "type": "boolean",
106
+ "description": "Cash-out acknowledgement completed by customer."
107
+ },
108
+ "cashoutBrokerCompleted": {
109
+ "type": "boolean",
110
+ "description": "All cash-out reasons are completed with comment by broker."
111
+ },
112
+ "topUpBrokerCompleted": {
113
+ "type": "boolean",
114
+ "description": "All top-up reasons are completed with comment by broker. Value undefined is equivalent to false."
115
+ },
116
+ "totalLendingAmount": {
117
+ "type": "number",
118
+ "description": "Total lending amount is fundsRequested plus the current loan amount, an example for the current loan amount is the loan amount on a land and the land would be used as security for a construction loan. If lmiIncluded is true it will include the lmi."
119
+ },
120
+ "totalLendingLvr": {
121
+ "type": "number",
122
+ "description": "Loan to value ratio. Calculated as the total lending amount divided by the value of all properties (including new purchase, refinance, security, and construction). Based on the totalLendingAmount field, which may include the lmi."
123
+ },
124
+ "totalPledgeAmount": {
125
+ "type": "number",
126
+ "description": "This is the total amount ($) of equity that the Guarantors are offering up as part of the Security Guarantee to the Borrowers application."
127
+ },
128
+ "totalPropertyValue": {
129
+ "type": "number",
130
+ "description": "Total property value excluding guarantor security properties."
83
131
  }
84
132
  },
85
133
  "required": [
@@ -88,6 +136,7 @@
88
136
  "properties",
89
137
  "fundsRequiredBreakdown",
90
138
  "totalCashOut",
139
+ "totalTopUp",
91
140
  "totalDeposit",
92
141
  "totalDebtConsolidation",
93
142
  "totalGovernmentContributions",
@@ -99,6 +148,24 @@
99
148
  "lmiIncluded"
100
149
  ]
101
150
  },
151
+ "OtherConsolidatingHomeLoanLiability": {
152
+ "type": "object",
153
+ "properties": {
154
+ "assetId": {
155
+ "type": "string",
156
+ "description": "The asset ID of the property associated with the home loan liability"
157
+ },
158
+ "liabilityId": {
159
+ "type": "string",
160
+ "description": "The home loan liability ID"
161
+ },
162
+ "outstandingAmount": {
163
+ "type": "number",
164
+ "description": "The home loan liability outstanding amount"
165
+ }
166
+ },
167
+ "required": ["assetId", "liabilityId", "outstandingAmount"]
168
+ },
102
169
  "Property": {
103
170
  "type": "object",
104
171
  "properties": {
@@ -187,6 +254,26 @@
187
254
  "cashOutAmount": {
188
255
  "type": "number",
189
256
  "description": "The additional amount of money requested by the customer as part of the loan."
257
+ },
258
+ "cashOuts": {
259
+ "type": "array",
260
+ "items": {
261
+ "$ref": "#/definitions/CashOut"
262
+ }
263
+ },
264
+ "pledgeAmount": {
265
+ "type": "number",
266
+ "description": "This is the amount ($) of equity that the Guarantor is offering up as part of the Security Guarantee to the Borrowers application."
267
+ },
268
+ "topUps": {
269
+ "type": "array",
270
+ "items": {
271
+ "$ref": "#/definitions/TopUp"
272
+ }
273
+ },
274
+ "topUpAmount": {
275
+ "type": "number",
276
+ "description": "The additional amount of money requested by the customer as part of the top-up loan."
190
277
  }
191
278
  },
192
279
  "required": [
@@ -270,6 +357,13 @@
270
357
  "accruedInterest": {
271
358
  "type": "number",
272
359
  "description": "The interest accrued before an existing loan has been discharged and payable to the existing lender at settlement."
360
+ },
361
+ "otherConsolidatingHomeLoanLiabilities": {
362
+ "type": "array",
363
+ "items": {
364
+ "$ref": "#/definitions/OtherConsolidatingHomeLoanLiability"
365
+ },
366
+ "description": "List of home loan liabilities to be consolidated, tied to a home loan asset not to be used as security."
273
367
  }
274
368
  },
275
369
  "required": [
@@ -284,6 +378,42 @@
284
378
  "lenderDischargeFee",
285
379
  "accruedInterest"
286
380
  ]
381
+ },
382
+ "CashOut": {
383
+ "type": "object",
384
+ "properties": {
385
+ "amount": {
386
+ "type": "number",
387
+ "description": "The amount of cash-out with reason."
388
+ },
389
+ "reason": {
390
+ "type": "string",
391
+ "enum": [
392
+ "EDUCATION_EXPENSES",
393
+ "HOLIDAY_EXPENSES",
394
+ "PROPERTY_DEPOSIT",
395
+ "NON_STRUCTURAL_RENOVATIONS",
396
+ "MARITAL_SETTLEMENT",
397
+ "MEDICAL_EXPENSES",
398
+ "OTHER",
399
+ "INVESTMENT_PURPOSES",
400
+ "VEHICLE_PURCHASE",
401
+ "WEDDING_EXPENSES"
402
+ ]
403
+ },
404
+ "description": {
405
+ "type": "string",
406
+ "description": "Additional description for the cash-out reason."
407
+ },
408
+ "comment": {
409
+ "type": "string",
410
+ "description": "Comment by broker for the cash-out."
411
+ }
412
+ },
413
+ "required": ["amount"]
414
+ },
415
+ "TopUp": {
416
+ "allOf": [{ "$ref": "#/definitions/CashOut" }]
287
417
  }
288
418
  }
289
419
  }
@@ -213,6 +213,10 @@
213
213
  },
214
214
  "description": {
215
215
  "$ref": "#/definitions/description"
216
+ },
217
+ "toBeToppedUp": {
218
+ "type": "boolean",
219
+ "description": "Is the loan (split) to be topped up"
216
220
  }
217
221
  },
218
222
  "required": ["type", "outstandingBalance"]
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFees = exports.transformFundingPosition = void 0;
4
4
  const lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
5
5
  const application_paths_1 = require("@lendi/integrations-protocol/lib/utils/application-paths");
6
+ const application_paths_2 = require("@lendi/integrations-credit-protocol/utils/application-paths");
6
7
  const lodash_1 = require("lodash");
7
8
  const enum_mappings_1 = require("../types/enum-mappings");
8
9
  /**
@@ -20,6 +21,7 @@ function transformFundingPosition(fundingPosition, uniqueIdSuffix = 'loanDetails
20
21
  applicationId: application_paths_1.paths.ApplicationId,
21
22
  fundsRequested: `${application_paths_1.paths.RolledUpAmounts}.@TotalNewFunds`,
22
23
  lvr: `${application_paths_1.paths.Summary}.LoanToValuationRatio.@ApplicationLVR`,
24
+ properties: `${application_paths_2.paths.AccountVariation}.LimitIncrease.@IncreaseAmount`,
23
25
  totalGovernmentContributions: application_paths_1.paths.ContributionFunds,
24
26
  totalDeposit: application_paths_1.paths.ContributionFunds,
25
27
  totalCashOut: `${application_paths_1.paths.EquityRelease}.Amount.@LumpSum`,
@@ -46,6 +48,11 @@ function transformFundingPosition(fundingPosition, uniqueIdSuffix = 'loanDetails
46
48
  case 'fundsRequested':
47
49
  (0, lodash_1.set)(partialApplication, fundingPositionMapping[key], Math.round(value));
48
50
  break;
51
+ case 'properties':
52
+ const propertyToBeToppedUp = value.find((property) => property.topUpAmount > 0);
53
+ if (propertyToBeToppedUp)
54
+ (0, lodash_1.set)(partialApplication, fundingPositionMapping[key], propertyToBeToppedUp.topUpAmount);
55
+ break;
49
56
  default:
50
57
  (0, lodash_1.set)(partialApplication, fundingPositionMapping[key], value);
51
58
  break;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.transformLiability = void 0;
4
4
  const application_paths_1 = require("@lendi/integrations-protocol/lib/utils/application-paths");
5
+ const application_paths_2 = require("@lendi/integrations-credit-protocol/utils/application-paths");
5
6
  const lodash_1 = require("lodash");
6
7
  const alieo_frequency_1 = require("../types/enum-mappings/alieo-frequency");
7
8
  const enum_mappings_1 = require("../types/enum-mappings");
@@ -40,6 +41,7 @@ function transformLiability({ applicationId, id, liability }) {
40
41
  remainingTermDuration: `${application_paths_1.paths.Liability}.RemainingTerm.@Duration`,
41
42
  repaymentTypeDetails: `${application_paths_1.paths.Liability}.Repayment[0].@PaymentType`,
42
43
  outstandingBalance: `${application_paths_1.paths.Liability}.@OutstandingBalance`,
44
+ toBeToppedUp: `${application_paths_2.paths.AccountVariation}.@x_AccountToVary`,
43
45
  type: `${application_paths_1.paths.Liability}.@Type`,
44
46
  percentOwned: `${application_paths_1.paths.Liability}.PercentOwned`,
45
47
  };
@@ -65,6 +67,10 @@ function transformLiability({ applicationId, id, liability }) {
65
67
  case 'repaymentAmount':
66
68
  (0, lodash_1.set)(partialApplication, liabilityMapping[key], (0, round_decimal_1.roundDecimal)(value));
67
69
  break;
70
+ case 'toBeToppedUp':
71
+ if (value)
72
+ (0, lodash_1.set)(partialApplication, liabilityMapping[key], id);
73
+ break;
68
74
  case 'interestOnlyRemainingTerm':
69
75
  (0, lodash_1.set)(partialApplication, liabilityMapping[key], (0, round_decimal_1.roundDecimal)(value));
70
76
  (0, lodash_1.set)(partialApplication, `${application_paths_1.paths.Liability}.OriginalTerm.@PaymentType`, lixi_internal_request_1.PaymentTypeList.InterestOnly);
@@ -1,13 +1,13 @@
1
1
  import { List as LIXIFrequency } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { RepaymentFrequency } from '../events/public-liability';
3
3
  import { Frequency } from '../events/public-income';
4
- export declare type LiabilityFrequencyMapping = {
4
+ export type LiabilityFrequencyMapping = {
5
5
  [key in RepaymentFrequency]: LIXIFrequency;
6
6
  };
7
- export declare type IncomeExpenseFrequencyMapping = {
7
+ export type IncomeExpenseFrequencyMapping = {
8
8
  [key in RepaymentFrequency | Frequency]: LIXIFrequency;
9
9
  };
10
- export declare type RentalIncomeFrequencyMapping = {
10
+ export type RentalIncomeFrequencyMapping = {
11
11
  [key in Frequency]: LIXIFrequency;
12
12
  };
13
13
  export declare const incomeExpenseFrequencyMapping: IncomeExpenseFrequencyMapping;
@@ -1,6 +1,6 @@
1
1
  import { Gender } from '../events/public-applicant';
2
2
  import { GenderList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
3
- export declare type ApplicantGenderMapping = {
3
+ export type ApplicantGenderMapping = {
4
4
  [key in Gender]: GenderList;
5
5
  };
6
6
  export declare const applicantGenderMapping: ApplicantGenderMapping;
@@ -1,6 +1,6 @@
1
1
  import { ApplicantTypeList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
2
2
  import { ApplicantType } from '../events/public-applicant';
3
- export declare type ApplicantTypeMapping = {
3
+ export type ApplicantTypeMapping = {
4
4
  [key in ApplicantType]: ApplicantTypeList;
5
5
  };
6
6
  export declare const applicantTypeMapping: ApplicantTypeMapping;
@@ -1,6 +1,6 @@
1
1
  import { BuilderTypeList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
2
2
  import { BuilderType } from '../events/public-asset';
3
- declare type BuilderTypeMapping = {
3
+ type BuilderTypeMapping = {
4
4
  [key in BuilderType]: BuilderTypeList;
5
5
  };
6
6
  export declare const builderTypeMapping: BuilderTypeMapping;
@@ -1,6 +1,6 @@
1
1
  import { ConstructionTypeList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
2
2
  import { ConstructionType } from '../events/public-asset';
3
- declare type ConstructionTypeMapping = {
3
+ type ConstructionTypeMapping = {
4
4
  [key in ConstructionType]: ConstructionTypeList;
5
5
  };
6
6
  export declare const constructionTypeMapping: ConstructionTypeMapping;
@@ -1,6 +1,6 @@
1
1
  import { Countries } from '../events/public-applicant';
2
2
  import { CountryCodeList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
3
- declare type CountryCodeMapping = {
3
+ type CountryCodeMapping = {
4
4
  [key in Countries]: CountryCodeList;
5
5
  };
6
6
  export declare const countryCodeMapping: Partial<CountryCodeMapping>;
@@ -1,6 +1,6 @@
1
1
  import { PaygBasisList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { EmploymentBasis } from '../events/public-employment';
3
- declare type PaygEmploymentBasisMapping = {
3
+ type PaygEmploymentBasisMapping = {
4
4
  [key in EmploymentBasis]: PaygBasisList;
5
5
  };
6
6
  export declare const paygEmploymentBasisMapping: PaygEmploymentBasisMapping;
@@ -1,6 +1,6 @@
1
1
  import { List as FrequencyList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { Frequency } from '../events/public-expense';
3
- declare type FrequencyMapping = {
3
+ type FrequencyMapping = {
4
4
  [key in Frequency]: FrequencyList;
5
5
  };
6
6
  export declare const frequencyMapping: Partial<FrequencyMapping>;
@@ -1,17 +1,17 @@
1
1
  import { FeeCategoryList, FeeTypeList, Custom4DescriptionList as DescriptionList, ContributionFundsTypeList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
- declare type CategoryMapping = {
2
+ type CategoryMapping = {
3
3
  [key: string]: FeeCategoryList;
4
4
  };
5
5
  export declare const categoryMapping: CategoryMapping;
6
- declare type TypeMapping = {
6
+ type TypeMapping = {
7
7
  [key: string]: FeeTypeList;
8
8
  };
9
9
  export declare const typeMapping: TypeMapping;
10
- declare type DescriptionMapping = {
10
+ type DescriptionMapping = {
11
11
  [key: string]: DescriptionList;
12
12
  };
13
13
  export declare const descriptionMapping: DescriptionMapping;
14
- declare type ContributionMapping = {
14
+ type ContributionMapping = {
15
15
  [key: string]: ContributionFundsTypeList;
16
16
  };
17
17
  export declare const contributionMapping: ContributionMapping;
@@ -1,6 +1,6 @@
1
1
  import { GovernmentBenefitsTypeList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { BenefitType } from '../events/public-income';
3
- declare type GovernmentBenefitsMapping = {
3
+ type GovernmentBenefitsMapping = {
4
4
  [key in BenefitType]: GovernmentBenefitsTypeList;
5
5
  };
6
6
  export declare const governmentBenefitsMapping: Partial<GovernmentBenefitsMapping>;
@@ -1,6 +1,6 @@
1
1
  import { HousingStatusList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { HousingStatusList as ApplicantEventHousingStatusList } from '../events/public-applicant';
3
- declare type HousingStatusMapping = {
3
+ type HousingStatusMapping = {
4
4
  [key in ApplicantEventHousingStatusList]: HousingStatusList;
5
5
  };
6
6
  export declare const housingStatusMapping: HousingStatusMapping;
@@ -1,6 +1,6 @@
1
1
  import { OtherIncomeTypeList, Custom0DescriptionList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { IncomeType } from '../events/public-income';
3
- declare type OtherIncomeMapping = {
3
+ type OtherIncomeMapping = {
4
4
  [key in IncomeType]: OtherIncomeTypeList | Custom0DescriptionList;
5
5
  };
6
6
  export declare const otherIncomeMapping: Partial<OtherIncomeMapping>;
@@ -1,6 +1,6 @@
1
1
  import { PaymentTypeList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { RepaymentTypeDetails } from '../events/public-liability';
3
- declare type LiabilityPaymentTypeMapping = {
3
+ type LiabilityPaymentTypeMapping = {
4
4
  [key in RepaymentTypeDetails]: PaymentTypeList;
5
5
  };
6
6
  export declare const liabilityPaymentTypeMapping: LiabilityPaymentTypeMapping;
@@ -1,6 +1,6 @@
1
1
  import { LiabilityTypeList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { LiabilityType } from '../events/public-liability';
3
- declare type LiabilityTypeMapping = {
3
+ type LiabilityTypeMapping = {
4
4
  [key in LiabilityType]: LiabilityTypeList;
5
5
  };
6
6
  export declare const liabilityTypeMapping: LiabilityTypeMapping;
@@ -1,6 +1,6 @@
1
1
  import { OtherCommitmentCategoryList, LivingExpenseCategoryList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { ExpenseType } from '../events/public-expense';
3
- declare type LivingExpenseMapping = {
3
+ type LivingExpenseMapping = {
4
4
  [key in ExpenseType]: LivingExpenseCategoryList | OtherCommitmentCategoryList;
5
5
  };
6
6
  export declare const livingExpenseMapping: LivingExpenseMapping;
@@ -1,6 +1,6 @@
1
1
  import { MaritalStatusList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { MaritalStatus } from '../events/public-applicant';
3
- declare type MaritalStatusMapping = {
3
+ type MaritalStatusMapping = {
4
4
  [key in MaritalStatus]: MaritalStatusList;
5
5
  };
6
6
  export declare const maritalStatusMapping: MaritalStatusMapping;
@@ -1,5 +1,5 @@
1
1
  import { AustralianState } from '../events/public-required-document';
2
- declare type PostCodeMapping = {
2
+ type PostCodeMapping = {
3
3
  [key in AustralianState]: string;
4
4
  };
5
5
  export declare const postcodeMapping: PostCodeMapping;
@@ -1,6 +1,6 @@
1
1
  import { PaymentTypeList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { PaymentType } from '../events/public-application';
3
- declare type PreferredRepaymentMapping = {
3
+ type PreferredRepaymentMapping = {
4
4
  [key in PaymentType]: PaymentTypeList;
5
5
  };
6
6
  export declare const preferredRepaymentMapping: PreferredRepaymentMapping;
@@ -1,6 +1,6 @@
1
1
  import { DocumentTypeList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { IDType } from '../events/public-required-document';
3
- declare type ProofOfIdentityMapping = {
3
+ type ProofOfIdentityMapping = {
4
4
  [key in IDType]: DocumentTypeList;
5
5
  };
6
6
  export declare const proofOfIdentityMapping: ProofOfIdentityMapping;
@@ -1,6 +1,6 @@
1
1
  import { PropertyExpenseCategoryList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
2
2
  import { PropertyExpenseType } from '../events/public-asset';
3
- declare type PropertyExpenseCategoryMapping = {
3
+ type PropertyExpenseCategoryMapping = {
4
4
  [key in PropertyExpenseType]: PropertyExpenseCategoryList;
5
5
  };
6
6
  export declare const propertyExpenseCategoryMapping: PropertyExpenseCategoryMapping;
@@ -1,6 +1,6 @@
1
1
  import { FinancialAssetTypeList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { AssetType } from '../events/public-asset';
3
- declare type FinancialAssetMapping = {
3
+ type FinancialAssetMapping = {
4
4
  [key in AssetType]: FinancialAssetTypeList;
5
5
  };
6
6
  export declare const financialAssetMapping: Partial<FinancialAssetMapping>;
@@ -1,6 +1,6 @@
1
1
  import { PrimaryPurposeRealEstateAssetList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { PrimaryPurpose } from '../events/public-asset';
3
- declare type PrimaryPurposeMapping = {
3
+ type PrimaryPurposeMapping = {
4
4
  [key in PrimaryPurpose]: PrimaryPurposeRealEstateAssetList;
5
5
  };
6
6
  export declare const primaryPurposeMapping: PrimaryPurposeMapping;
@@ -1,6 +1,6 @@
1
1
  import { RealEstateAssetStatusList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { PropertyStatus } from '../events/public-asset';
3
- declare type PropertyStatusMapping = {
3
+ type PropertyStatusMapping = {
4
4
  [key in PropertyStatus]: RealEstateAssetStatusList;
5
5
  };
6
6
  export declare const propertyStatusMapping: PropertyStatusMapping;
@@ -1,6 +1,6 @@
1
1
  import { PropertyType } from '../events/public-asset';
2
2
  import { ResidentialTypeList, Custom2PropertyTypeNameList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
3
- declare type PropertyTypeMapping = {
3
+ type PropertyTypeMapping = {
4
4
  [key in PropertyType]: ResidentialTypeList | Custom2PropertyTypeNameList;
5
5
  };
6
6
  export declare const propertyTypeMapping: PropertyTypeMapping;
@@ -1,6 +1,6 @@
1
1
  import { ResidencyStatus } from '../events/public-applicant';
2
2
  import { ResidencyStatusList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
3
- declare type ResidencyStatusMapping = {
3
+ type ResidencyStatusMapping = {
4
4
  [key in ResidencyStatus]: ResidencyStatusList;
5
5
  };
6
6
  export declare const residencyStatusMapping: ResidencyStatusMapping;
@@ -1,6 +1,6 @@
1
1
  import { IDTitle } from '../events/public-required-document';
2
2
  import { GenderList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
3
- declare type TitleGenderMapping = {
3
+ type TitleGenderMapping = {
4
4
  [key in IDTitle]: GenderList;
5
5
  };
6
6
  export declare const titleGenderMapping: Partial<TitleGenderMapping>;
@@ -1,6 +1,6 @@
1
1
  import { Title } from '../events/public-applicant';
2
2
  import { NameTitleList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
3
- declare type TitleMapping = {
3
+ type TitleMapping = {
4
4
  [key in Title]: NameTitleList;
5
5
  };
6
6
  export declare const titleMapping: TitleMapping;
@@ -1,6 +1,6 @@
1
1
  import { PurposeOfApplicationList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { PrimaryPurpose } from '../events/public-application';
3
- declare type TransactionTypeMapping = {
3
+ type TransactionTypeMapping = {
4
4
  [key in PrimaryPurpose]: PurposeOfApplicationList;
5
5
  };
6
6
  export declare const transactionTypeMapping: TransactionTypeMapping;
@@ -15,7 +15,35 @@ export interface Payload {
15
15
  */
16
16
  applicationId: string;
17
17
  /**
18
- * The final loan amount amount requested by the customer or broker.
18
+ * The loan amount input by the customer or broker, but does not include the lmi. See
19
+ * fundsRequested for the final loan amount requested that includes lmi if lmiIncluded is
20
+ * true.
21
+ */
22
+ baseFundsRequested?: number;
23
+ /**
24
+ * Loan to value ratio. Calculated as the loan amount divided by the value of all properties
25
+ * being used as security. Based on the baseFundsRequested field, which does not include the
26
+ * lmi.
27
+ */
28
+ baseLVR?: number;
29
+ /**
30
+ * All cash-out reasons are completed with comment by broker.
31
+ */
32
+ cashoutBrokerCompleted?: boolean;
33
+ /**
34
+ * Cash-out acknowledgement completed by customer.
35
+ */
36
+ cashoutCustomerAcknowledgement?: boolean;
37
+ /**
38
+ * Customer action on cash-out completed.
39
+ */
40
+ cashoutCustomerActionCompleted?: boolean;
41
+ /**
42
+ * Customer action on cash-out required.
43
+ */
44
+ cashoutCustomerActionRequired?: boolean;
45
+ /**
46
+ * The final loan amount requested by the customer or broker.
19
47
  */
20
48
  fundsRequested: number;
21
49
  /**
@@ -51,6 +79,11 @@ export interface Payload {
51
79
  * List of refinance or new purchase property
52
80
  */
53
81
  properties: Property[];
82
+ /**
83
+ * All top-up reasons are completed with comment by broker. Value undefined is equivalent to
84
+ * false.
85
+ */
86
+ topUpBrokerCompleted?: boolean;
54
87
  /**
55
88
  * The total amount of customer-specified cash out.
56
89
  */
@@ -67,6 +100,31 @@ export interface Payload {
67
100
  * The total amount available for settlement from government grants.
68
101
  */
69
102
  totalGovernmentContributions: number;
103
+ /**
104
+ * Total lending amount is fundsRequested plus the current loan amount, an example for the
105
+ * current loan amount is the loan amount on a land and the land would be used as security
106
+ * for a construction loan. If lmiIncluded is true it will include the lmi.
107
+ */
108
+ totalLendingAmount?: number;
109
+ /**
110
+ * Loan to value ratio. Calculated as the total lending amount divided by the value of all
111
+ * properties (including new purchase, refinance, security, and construction). Based on the
112
+ * totalLendingAmount field, which may include the lmi.
113
+ */
114
+ totalLendingLvr?: number;
115
+ /**
116
+ * This is the total amount ($) of equity that the Guarantors are offering up as part of the
117
+ * Security Guarantee to the Borrowers application.
118
+ */
119
+ totalPledgeAmount?: number;
120
+ /**
121
+ * Total property value excluding guarantor security properties.
122
+ */
123
+ totalPropertyValue?: number;
124
+ /**
125
+ * The total amount of customer-specified top up.
126
+ */
127
+ totalTopUp: number;
70
128
  }
71
129
  export interface FundsRequiredBreakdown {
72
130
  /**
@@ -99,6 +157,11 @@ export interface FundsRequiredBreakdown {
99
157
  * A fee paid to the Land Titles Office for the registration of a mortgage over a property.
100
158
  */
101
159
  mortgageRegistrationFee: number;
160
+ /**
161
+ * List of home loan liabilities to be consolidated, tied to a home loan asset not to be
162
+ * used as security.
163
+ */
164
+ otherConsolidatingHomeLoanLiabilities?: OtherConsolidatingHomeLoanLiability[];
102
165
  /**
103
166
  * Other fees payable to an interested party to ensure settlement can proceed.
104
167
  */
@@ -113,6 +176,20 @@ export interface FundsRequiredBreakdown {
113
176
  */
114
177
  transferFee: number;
115
178
  }
179
+ export interface OtherConsolidatingHomeLoanLiability {
180
+ /**
181
+ * The asset ID of the property associated with the home loan liability
182
+ */
183
+ assetId: string;
184
+ /**
185
+ * The home loan liability ID
186
+ */
187
+ liabilityId: string;
188
+ /**
189
+ * The home loan liability outstanding amount
190
+ */
191
+ outstandingAmount: number;
192
+ }
116
193
  export interface Property {
117
194
  /**
118
195
  * The interest accrued before an existing loan has been discharged and payable to the
@@ -123,6 +200,7 @@ export interface Property {
123
200
  * The additional amount of money requested by the customer as part of the loan.
124
201
  */
125
202
  cashOutAmount?: number;
203
+ cashOuts?: CashOut[];
126
204
  /**
127
205
  * The amount that will be used for construction purposes.
128
206
  */
@@ -169,6 +247,11 @@ export interface Property {
169
247
  * Other fees payable to an interested party to ensure settlement can proceed.
170
248
  */
171
249
  otherSundries: number;
250
+ /**
251
+ * This is the amount ($) of equity that the Guarantor is offering up as part of the
252
+ * Security Guarantee to the Borrowers application.
253
+ */
254
+ pledgeAmount?: number;
172
255
  /**
173
256
  * The value of a property.
174
257
  */
@@ -181,6 +264,11 @@ export interface Property {
181
264
  * Tax paid to the State Revenue Office when purchasing a property.
182
265
  */
183
266
  stampDuty?: number;
267
+ /**
268
+ * The additional amount of money requested by the customer as part of the top-up loan.
269
+ */
270
+ topUpAmount?: number;
271
+ topUps?: CashOut[];
184
272
  /**
185
273
  * A sum of all contributions made towards settlement.
186
274
  */
@@ -199,6 +287,33 @@ export interface Property {
199
287
  */
200
288
  transferFee?: number;
201
289
  }
290
+ export interface CashOut {
291
+ /**
292
+ * The amount of cash-out with reason.
293
+ */
294
+ amount: number;
295
+ /**
296
+ * Comment by broker for the cash-out.
297
+ */
298
+ comment?: string;
299
+ /**
300
+ * Additional description for the cash-out reason.
301
+ */
302
+ description?: string;
303
+ reason?: Reason;
304
+ }
305
+ export declare enum Reason {
306
+ EducationExpenses = "EDUCATION_EXPENSES",
307
+ HolidayExpenses = "HOLIDAY_EXPENSES",
308
+ InvestmentPurposes = "INVESTMENT_PURPOSES",
309
+ MaritalSettlement = "MARITAL_SETTLEMENT",
310
+ MedicalExpenses = "MEDICAL_EXPENSES",
311
+ NonStructuralRenovations = "NON_STRUCTURAL_RENOVATIONS",
312
+ Other = "OTHER",
313
+ PropertyDeposit = "PROPERTY_DEPOSIT",
314
+ VehiclePurchase = "VEHICLE_PURCHASE",
315
+ WeddingExpenses = "WEDDING_EXPENSES"
316
+ }
202
317
  export interface DebtConsolidation {
203
318
  /**
204
319
  * Amount
@@ -1,6 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Type = void 0;
3
+ exports.Type = exports.Reason = void 0;
4
+ var Reason;
5
+ (function (Reason) {
6
+ Reason["EducationExpenses"] = "EDUCATION_EXPENSES";
7
+ Reason["HolidayExpenses"] = "HOLIDAY_EXPENSES";
8
+ Reason["InvestmentPurposes"] = "INVESTMENT_PURPOSES";
9
+ Reason["MaritalSettlement"] = "MARITAL_SETTLEMENT";
10
+ Reason["MedicalExpenses"] = "MEDICAL_EXPENSES";
11
+ Reason["NonStructuralRenovations"] = "NON_STRUCTURAL_RENOVATIONS";
12
+ Reason["Other"] = "OTHER";
13
+ Reason["PropertyDeposit"] = "PROPERTY_DEPOSIT";
14
+ Reason["VehiclePurchase"] = "VEHICLE_PURCHASE";
15
+ Reason["WeddingExpenses"] = "WEDDING_EXPENSES";
16
+ })(Reason = exports.Reason || (exports.Reason = {}));
4
17
  var Type;
5
18
  (function (Type) {
6
19
  Type["FundingPosition"] = "FundingPosition";
@@ -43,6 +43,10 @@ export interface Liability {
43
43
  repaymentAmount?: number;
44
44
  repaymentFrequency?: RepaymentFrequency;
45
45
  repaymentTypeDetails?: RepaymentTypeDetails;
46
+ /**
47
+ * Is the loan (split) to be topped up
48
+ */
49
+ toBeToppedUp?: boolean;
46
50
  type: LiabilityType;
47
51
  }
48
52
  export declare enum ClearingFromOtherSource {
@@ -1,3 +1,3 @@
1
1
  import { InternalRequest } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
2
  import { RecursivePartial } from './recursive-partial';
3
- export declare type PartialApplication = RecursivePartial<InternalRequest>;
3
+ export type PartialApplication = RecursivePartial<InternalRequest>;
@@ -1,3 +1,3 @@
1
- export declare type RecursivePartial<T> = {
1
+ export type RecursivePartial<T> = {
2
2
  [P in keyof T]?: RecursivePartial<T[P]>;
3
3
  };
@@ -6,7 +6,7 @@ import { Address, CommonAddressProperties, Countries, PreviousAddress as Interna
6
6
  /**
7
7
  * Type definition for functions used to transform types while mapping from event values to LIXI values.
8
8
  */
9
- export declare type MappingTransformFunction<I = any, O = any> = (input: I) => O;
9
+ export type MappingTransformFunction<I = any, O = any> = (input: I) => O;
10
10
  /**
11
11
  * Specifies the destination path of the object in dot notation along with an optional data transform function.
12
12
  */
@@ -23,7 +23,7 @@ export interface MappedTransform {
23
23
  /**
24
24
  * A type defining a record set of path mapped transforms
25
25
  */
26
- export declare type PathMappedTransform = Record<string, MappedTransform>;
26
+ export type PathMappedTransform = Record<string, MappedTransform>;
27
27
  export declare const lixiContactAddressMapping: PathMappedTransform;
28
28
  export declare const australianStates: string[];
29
29
  /**
@@ -37,8 +37,8 @@ export declare const lixiAddressMapping: PathMappedTransform;
37
37
  * @param pathMappedTransform A PathMappedTransform to be applied to the source
38
38
  */
39
39
  export declare function mapTransform<T>(source: any, pathMappedTransform: PathMappedTransform): T;
40
- declare type EventAddressType = InternalPreviousAddress | CommonAddressProperties;
41
- export declare type LixiContactAddressType = CurrentAddress | PreviousAddress;
40
+ type EventAddressType = InternalPreviousAddress | CommonAddressProperties;
41
+ export type LixiContactAddressType = CurrentAddress | PreviousAddress;
42
42
  export interface AddressTransformedType {
43
43
  lixiAddress: AddressType;
44
44
  lixiContactAddress: LixiContactAddressType;
@@ -1,4 +1,4 @@
1
- export declare type DateConstructorParam = ConstructorParameters<DateConstructor>[0];
1
+ export type DateConstructorParam = ConstructorParameters<DateConstructor>[0];
2
2
  /**
3
3
  * Accepts any type of data format and normalises it into a consistent format
4
4
  * as "2019-09-19".
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/integrations-transform",
3
- "version": "1.7.4",
3
+ "version": "1.7.6",
4
4
  "description": "Library for kafka event data transforming",
5
5
  "author": "Integrations <integrations@lendi.com.au>",
6
6
  "homepage": "https://bitbucket.org/lendi-dev/integrations-shared-packages#readme",
@@ -21,7 +21,7 @@
21
21
  "url": "git+ssh://git@bitbucket.org/lendi-dev/integrations-shared-packages.git"
22
22
  },
23
23
  "dependencies": {
24
- "@lendi/integrations-credit-protocol": "^1.18.0",
24
+ "@lendi/integrations-credit-protocol": "1.18.1",
25
25
  "@lendi/integrations-protocol": "2.7.0",
26
26
  "@lendi/logging": "^1.0.0",
27
27
  "clean-deep": "^3.4.0",