@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,50 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.PublicExpenseType = exports.ActionedByRole = exports.ExpenseType = exports.Frequency = void 0;
4
+ var Frequency;
5
+ (function (Frequency) {
6
+ Frequency["Fortnightly"] = "FORTNIGHTLY";
7
+ Frequency["Monthly"] = "MONTHLY";
8
+ Frequency["Quarterly"] = "QUARTERLY";
9
+ Frequency["Weekly"] = "WEEKLY";
10
+ Frequency["Yearly"] = "YEARLY";
11
+ })(Frequency = exports.Frequency || (exports.Frequency = {}));
12
+ var ExpenseType;
13
+ (function (ExpenseType) {
14
+ ExpenseType["Board"] = "BOARD";
15
+ ExpenseType["BodyCorporateFeesStrataFeesAndLandTax"] = "BODY_CORPORATE_FEES_STRATA_FEES_AND_LAND_TAX";
16
+ ExpenseType["ChildAndSpousalMaintenance"] = "CHILD_AND_SPOUSAL_MAINTENANCE";
17
+ ExpenseType["Childcare"] = "CHILDCARE";
18
+ ExpenseType["ClothingAndPersonalCare"] = "CLOTHING_AND_PERSONAL_CARE";
19
+ ExpenseType["Groceries"] = "GROCERIES";
20
+ ExpenseType["HealthInsurance"] = "HEALTH_INSURANCE";
21
+ ExpenseType["HigherVocationalTrainingEducation"] = "HIGHER_VOCATIONAL_TRAINING_EDUCATION";
22
+ ExpenseType["Insurance"] = "INSURANCE";
23
+ ExpenseType["InvestmentPropertyRunningCosts"] = "INVESTMENT_PROPERTY_RUNNING_COSTS";
24
+ ExpenseType["LifeInsurance"] = "LIFE_INSURANCE";
25
+ ExpenseType["LivingExpensesEstimate"] = "LIVING_EXPENSES_ESTIMATE";
26
+ ExpenseType["MedicalAndHealth"] = "MEDICAL_AND_HEALTH";
27
+ ExpenseType["Other"] = "OTHER";
28
+ ExpenseType["PetCare"] = "PET_CARE";
29
+ ExpenseType["PrimaryResidenceRunningCosts"] = "PRIMARY_RESIDENCE_RUNNING_COSTS";
30
+ ExpenseType["PrimarySecondaryEducation"] = "PRIMARY_SECONDARY_EDUCATION";
31
+ ExpenseType["PrivateSchoolingAndTuition"] = "PRIVATE_SCHOOLING_AND_TUITION";
32
+ ExpenseType["RecreationAndEntertainment"] = "RECREATION_AND_ENTERTAINMENT";
33
+ ExpenseType["Rent"] = "RENT";
34
+ ExpenseType["SecondaryResidenceRunningCosts"] = "SECONDARY_RESIDENCE_RUNNING_COSTS";
35
+ ExpenseType["TelephoneInternetPayTvAndMediaStreamingSubscriptions"] = "TELEPHONE_INTERNET_PAY_TV_AND_MEDIA_STREAMING_SUBSCRIPTIONS";
36
+ ExpenseType["Transport"] = "TRANSPORT";
37
+ })(ExpenseType = exports.ExpenseType || (exports.ExpenseType = {}));
38
+ /**
39
+ * role of the user that made the action
40
+ */
41
+ var ActionedByRole;
42
+ (function (ActionedByRole) {
43
+ ActionedByRole["Customer"] = "customer";
44
+ ActionedByRole["Team"] = "team";
45
+ })(ActionedByRole = exports.ActionedByRole || (exports.ActionedByRole = {}));
46
+ var PublicExpenseType;
47
+ (function (PublicExpenseType) {
48
+ PublicExpenseType["ExpenseCreated"] = "ExpenseCreated";
49
+ PublicExpenseType["ExpenseUpdated"] = "ExpenseUpdated";
50
+ })(PublicExpenseType = exports.PublicExpenseType || (exports.PublicExpenseType = {}));
@@ -0,0 +1,226 @@
1
+ /**
2
+ * This event is the public funding position event
3
+ */
4
+ export interface PublicFundingPosition {
5
+ payload: Payload;
6
+ type: Type;
7
+ /**
8
+ * schema version
9
+ */
10
+ version: string;
11
+ }
12
+ export interface Payload {
13
+ /**
14
+ * Application ID
15
+ */
16
+ applicationId: string;
17
+ /**
18
+ * The final loan amount amount requested by the customer or broker.
19
+ */
20
+ fundsRequested: number;
21
+ /**
22
+ * The amount required to balance all costs with contributions. The minimum loan amount
23
+ * required for settlement.
24
+ */
25
+ fundsRequired: number;
26
+ fundsRequiredBreakdown: FundsRequiredBreakdown;
27
+ /**
28
+ * Application ID
29
+ */
30
+ id: string;
31
+ /**
32
+ * Lenders Mortgage Insurance premium. An additional cost required by lenders for higher
33
+ * risk loans.
34
+ */
35
+ lmi: number;
36
+ /**
37
+ * Whether the lmi premium is included in the funds required.
38
+ */
39
+ lmiIncluded: boolean;
40
+ /**
41
+ * Loan to value ratio. Calculated as the loan amount divided by the value of all properties
42
+ * being used as security.
43
+ */
44
+ lvr: number;
45
+ /**
46
+ * The amount remaining after settlement. Calculated as the difference between the funds
47
+ * requested and funds required.
48
+ */
49
+ netSurplus: number;
50
+ /**
51
+ * List of refinance or new purchase property
52
+ */
53
+ properties: Property[];
54
+ /**
55
+ * The total amount of customer-specified cash out.
56
+ */
57
+ totalCashOut: number;
58
+ /**
59
+ * The total amount of debt to be consolidated.
60
+ */
61
+ totalDebtConsolidation: number;
62
+ /**
63
+ * The total deposit amount for all properties.
64
+ */
65
+ totalDeposit: number;
66
+ /**
67
+ * The total amount available for settlement from government grants.
68
+ */
69
+ totalGovernmentContributions: number;
70
+ }
71
+ export interface FundsRequiredBreakdown {
72
+ /**
73
+ * The interest accrued before an existing loan has been discharged and payable to the
74
+ * existing lender at settlement.
75
+ */
76
+ accruedInterest: number;
77
+ /**
78
+ * The amount that will be used for construction purposes.
79
+ */
80
+ constructionCosts: number;
81
+ /**
82
+ * The costs involved with a conveyancer who assists with settlement.
83
+ */
84
+ conveyancingCost: number;
85
+ /**
86
+ * An additional fee payable to the Land Titles Office for property buyers that are not
87
+ * permanent residents.
88
+ */
89
+ foreignBuyerSurcharge: number;
90
+ /**
91
+ * A fee charged by a customer’s existing lender when closing a home loan account.
92
+ */
93
+ lenderDischargeFee: number;
94
+ /**
95
+ * Fees payable to the lender on setting up a home loan and completing settlement.
96
+ */
97
+ lenderSetupFee: number;
98
+ /**
99
+ * A fee paid to the Land Titles Office for the registration of a mortgage over a property.
100
+ */
101
+ mortgageRegistrationFee: number;
102
+ /**
103
+ * Other fees payable to an interested party to ensure settlement can proceed.
104
+ */
105
+ otherSundries: number;
106
+ /**
107
+ * Tax paid to the State Revenue Office when purchasing a property.
108
+ */
109
+ stampDuty: number;
110
+ /**
111
+ * A fee paid to the Land Titles Office fee for transferring the property title from the
112
+ * seller to the buyer.
113
+ */
114
+ transferFee: number;
115
+ }
116
+ export interface Property {
117
+ /**
118
+ * The interest accrued before an existing loan has been discharged and payable to the
119
+ * existing lender at settlement.
120
+ */
121
+ accruedInterest?: number;
122
+ /**
123
+ * The additional amount of money requested by the customer as part of the loan.
124
+ */
125
+ cashOutAmount?: number;
126
+ /**
127
+ * The amount that will be used for construction purposes.
128
+ */
129
+ constructionCosts: number;
130
+ /**
131
+ * The amount that a customer is contributing towards the settlement.
132
+ */
133
+ contributionAmount: number;
134
+ /**
135
+ * The costs involved with a conveyancer who assists with settlement.
136
+ */
137
+ conveyancingCost?: number;
138
+ /**
139
+ * The credit limit of an existing home loan that is secured by a property.
140
+ */
141
+ currentLoanAmount?: number;
142
+ debtConsolidation?: DebtConsolidation[];
143
+ /**
144
+ * An additional fee payable to the Land Titles Office for property buyers that are not
145
+ * permanent residents.
146
+ */
147
+ foreignBuyerSurcharge?: number;
148
+ /**
149
+ * The amount available for settlement from government grants.
150
+ */
151
+ governmentContributions: number;
152
+ /**
153
+ * Property ID
154
+ */
155
+ id: string;
156
+ /**
157
+ * A fee charged by a customer’s existing lender when closing a home loan account.
158
+ */
159
+ lenderDischargeFee?: number;
160
+ /**
161
+ * Fees payable to the lender on setting up a home loan and completing settlement.
162
+ */
163
+ lenderSetupFee: number;
164
+ /**
165
+ * A fee paid to the Land Titles Office for the registration of a mortgage over a property.
166
+ */
167
+ mortgageRegistrationFee: number;
168
+ /**
169
+ * Other fees payable to an interested party to ensure settlement can proceed.
170
+ */
171
+ otherSundries: number;
172
+ /**
173
+ * The value of a property.
174
+ */
175
+ propertyValue?: number;
176
+ /**
177
+ * The agreed price that a property has been purchased for.
178
+ */
179
+ purchasePrice?: number;
180
+ /**
181
+ * Tax paid to the State Revenue Office when purchasing a property.
182
+ */
183
+ stampDuty?: number;
184
+ /**
185
+ * A sum of all contributions made towards settlement.
186
+ */
187
+ totalContributions: number;
188
+ /**
189
+ * A sum of all costs and charges involved with funding the loan and settlement.
190
+ */
191
+ totalCosts: number;
192
+ /**
193
+ * Total fund required. The sum of purchase price, and fees.
194
+ */
195
+ totalRequired: number;
196
+ /**
197
+ * A fee paid to the Land Titles Office fee for transferring the property title from the
198
+ * seller to the buyer.
199
+ */
200
+ transferFee?: number;
201
+ }
202
+ export interface DebtConsolidation {
203
+ /**
204
+ * Amount
205
+ */
206
+ amount: number;
207
+ /**
208
+ * Financial institution short name
209
+ */
210
+ financialInstitutionShortName: null | string;
211
+ /**
212
+ * ID
213
+ */
214
+ id: string;
215
+ /**
216
+ * Liability type
217
+ */
218
+ liabilityType: null | string;
219
+ /**
220
+ * to consolidate
221
+ */
222
+ toConsolidate: boolean;
223
+ }
224
+ export declare enum Type {
225
+ FundingPosition = "FundingPosition"
226
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.Type = void 0;
4
+ var Type;
5
+ (function (Type) {
6
+ Type["FundingPosition"] = "FundingPosition";
7
+ })(Type = exports.Type || (exports.Type = {}));
@@ -0,0 +1,144 @@
1
+ export interface PublicIncome {
2
+ payload: IncomeDefinition;
3
+ type: PublicIncomeType;
4
+ version: string;
5
+ }
6
+ export interface IncomeDefinition {
7
+ applicationId: string;
8
+ /**
9
+ * uuid of Expense
10
+ */
11
+ id: string;
12
+ income: Income;
13
+ meta?: Meta;
14
+ }
15
+ export interface Income {
16
+ amount?: number;
17
+ assetId?: string;
18
+ bas?: BASDefinition[];
19
+ benefitType?: BenefitType;
20
+ comments?: string;
21
+ companyId?: string;
22
+ description?: string;
23
+ /**
24
+ * Company Applicant
25
+ */
26
+ employmentId?: string;
27
+ frequency?: Frequency;
28
+ gross?: number;
29
+ incomes?: IncomeBusinessDetails[];
30
+ percentOwned?: OwnershipProportion;
31
+ type: IncomeType;
32
+ }
33
+ /**
34
+ * Business activity statement details
35
+ */
36
+ export interface BASDefinition {
37
+ quarter: number;
38
+ salesAmount?: number;
39
+ }
40
+ export declare enum BenefitType {
41
+ AgePension = "AGE_PENSION",
42
+ DisabilitySupportPension = "DISABILITY_SUPPORT_PENSION",
43
+ FamilyTax = "FAMILY_TAX",
44
+ Other = "OTHER"
45
+ }
46
+ export declare enum Frequency {
47
+ Fortnightly = "FORTNIGHTLY",
48
+ Monthly = "MONTHLY",
49
+ Quarterly = "QUARTERLY",
50
+ Weekly = "WEEKLY",
51
+ Yearly = "YEARLY"
52
+ }
53
+ /**
54
+ * Earnings for a company over a specified financial year
55
+ */
56
+ export interface IncomeBusinessDetails {
57
+ addback?: AddBackDefinition;
58
+ companyProfitBeforeTax?: number;
59
+ nonRecurringIncome?: number;
60
+ year?: number;
61
+ }
62
+ /**
63
+ * add-back is an expense that is added back to the profits of the business
64
+ */
65
+ export interface AddBackDefinition {
66
+ depreciation?: number;
67
+ interest?: number;
68
+ lease?: number;
69
+ nonRecurringExpenses?: number;
70
+ other?: number;
71
+ salary?: number;
72
+ superannuationExcess?: number;
73
+ }
74
+ export interface OwnershipProportion {
75
+ owners: Ownership[];
76
+ /**
77
+ * Indicate whether ownership proportions are equal, specified individually for each one or
78
+ * not specified.
79
+ */
80
+ proportions?: Proportions;
81
+ }
82
+ export interface Ownership {
83
+ applicantId: string;
84
+ /**
85
+ * how much percent for the corresponding applicant
86
+ */
87
+ percent: number;
88
+ }
89
+ /**
90
+ * Indicate whether ownership proportions are equal, specified individually for each one or
91
+ * not specified.
92
+ */
93
+ export declare enum Proportions {
94
+ Equal = "EQUAL",
95
+ NotSpecified = "NOT_SPECIFIED",
96
+ Specified = "SPECIFIED"
97
+ }
98
+ export declare enum IncomeType {
99
+ ChildMaintenance = "CHILD_MAINTENANCE",
100
+ ForeignIncome = "FOREIGN_INCOME",
101
+ GovtBenefit = "GOVT_BENEFIT",
102
+ InvestmentIncome = "INVESTMENT_INCOME",
103
+ OtherIncome = "OTHER_INCOME",
104
+ PaygAllowancesNotTaxed = "PAYG_ALLOWANCES_NOT_TAXED",
105
+ PaygAllowancesTaxed = "PAYG_ALLOWANCES_TAXED",
106
+ PaygBaseSalary = "PAYG_BASE_SALARY",
107
+ PaygBonusIncome = "PAYG_BONUS_INCOME",
108
+ PaygCarAllowance = "PAYG_CAR_ALLOWANCE",
109
+ PaygCommissionIncome = "PAYG_COMMISSION_INCOME",
110
+ PaygCompanyCar = "PAYG_COMPANY_CAR",
111
+ PaygNonVoluntaryDeductionsPreTax = "PAYG_NON_VOLUNTARY_DEDUCTIONS_PRE_TAX",
112
+ PaygOvertimeIncome = "PAYG_OVERTIME_INCOME",
113
+ PaygSalarySacrifice = "PAYG_SALARY_SACRIFICE",
114
+ RentalIncome = "RENTAL_INCOME",
115
+ SelfEmployedBusinessIncome = "SELF_EMPLOYED_BUSINESS_INCOME",
116
+ SelfEmployedBusinessIncomeFullDoc = "SELF_EMPLOYED_BUSINESS_INCOME_FULL_DOC",
117
+ SelfEmployedBusinessIncomeLowDoc = "SELF_EMPLOYED_BUSINESS_INCOME_LOW_DOC",
118
+ SuperAnnuityPension = "SUPER_ANNUITY_PENSION",
119
+ WorkersCompensation = "WORKERS_COMPENSATION"
120
+ }
121
+ /**
122
+ * The metadata of the alieo
123
+ */
124
+ export interface Meta {
125
+ /**
126
+ * uuid of user who made the action (create/update/delete)
127
+ */
128
+ actionedBy: string;
129
+ /**
130
+ * role of the user that made the action
131
+ */
132
+ actionedByRole: ActionedByRole;
133
+ }
134
+ /**
135
+ * role of the user that made the action
136
+ */
137
+ export declare enum ActionedByRole {
138
+ Customer = "customer",
139
+ Team = "team"
140
+ }
141
+ export declare enum PublicIncomeType {
142
+ IncomeCreated = "IncomeCreated",
143
+ IncomeUpdated = "IncomeUpdated"
144
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.PublicIncomeType = exports.ActionedByRole = exports.IncomeType = exports.Proportions = exports.Frequency = exports.BenefitType = void 0;
4
+ var BenefitType;
5
+ (function (BenefitType) {
6
+ BenefitType["AgePension"] = "AGE_PENSION";
7
+ BenefitType["DisabilitySupportPension"] = "DISABILITY_SUPPORT_PENSION";
8
+ BenefitType["FamilyTax"] = "FAMILY_TAX";
9
+ BenefitType["Other"] = "OTHER";
10
+ })(BenefitType = exports.BenefitType || (exports.BenefitType = {}));
11
+ var Frequency;
12
+ (function (Frequency) {
13
+ Frequency["Fortnightly"] = "FORTNIGHTLY";
14
+ Frequency["Monthly"] = "MONTHLY";
15
+ Frequency["Quarterly"] = "QUARTERLY";
16
+ Frequency["Weekly"] = "WEEKLY";
17
+ Frequency["Yearly"] = "YEARLY";
18
+ })(Frequency = exports.Frequency || (exports.Frequency = {}));
19
+ /**
20
+ * Indicate whether ownership proportions are equal, specified individually for each one or
21
+ * not specified.
22
+ */
23
+ var Proportions;
24
+ (function (Proportions) {
25
+ Proportions["Equal"] = "EQUAL";
26
+ Proportions["NotSpecified"] = "NOT_SPECIFIED";
27
+ Proportions["Specified"] = "SPECIFIED";
28
+ })(Proportions = exports.Proportions || (exports.Proportions = {}));
29
+ var IncomeType;
30
+ (function (IncomeType) {
31
+ IncomeType["ChildMaintenance"] = "CHILD_MAINTENANCE";
32
+ IncomeType["ForeignIncome"] = "FOREIGN_INCOME";
33
+ IncomeType["GovtBenefit"] = "GOVT_BENEFIT";
34
+ IncomeType["InvestmentIncome"] = "INVESTMENT_INCOME";
35
+ IncomeType["OtherIncome"] = "OTHER_INCOME";
36
+ IncomeType["PaygAllowancesNotTaxed"] = "PAYG_ALLOWANCES_NOT_TAXED";
37
+ IncomeType["PaygAllowancesTaxed"] = "PAYG_ALLOWANCES_TAXED";
38
+ IncomeType["PaygBaseSalary"] = "PAYG_BASE_SALARY";
39
+ IncomeType["PaygBonusIncome"] = "PAYG_BONUS_INCOME";
40
+ IncomeType["PaygCarAllowance"] = "PAYG_CAR_ALLOWANCE";
41
+ IncomeType["PaygCommissionIncome"] = "PAYG_COMMISSION_INCOME";
42
+ IncomeType["PaygCompanyCar"] = "PAYG_COMPANY_CAR";
43
+ IncomeType["PaygNonVoluntaryDeductionsPreTax"] = "PAYG_NON_VOLUNTARY_DEDUCTIONS_PRE_TAX";
44
+ IncomeType["PaygOvertimeIncome"] = "PAYG_OVERTIME_INCOME";
45
+ IncomeType["PaygSalarySacrifice"] = "PAYG_SALARY_SACRIFICE";
46
+ IncomeType["RentalIncome"] = "RENTAL_INCOME";
47
+ IncomeType["SelfEmployedBusinessIncome"] = "SELF_EMPLOYED_BUSINESS_INCOME";
48
+ IncomeType["SelfEmployedBusinessIncomeFullDoc"] = "SELF_EMPLOYED_BUSINESS_INCOME_FULL_DOC";
49
+ IncomeType["SelfEmployedBusinessIncomeLowDoc"] = "SELF_EMPLOYED_BUSINESS_INCOME_LOW_DOC";
50
+ IncomeType["SuperAnnuityPension"] = "SUPER_ANNUITY_PENSION";
51
+ IncomeType["WorkersCompensation"] = "WORKERS_COMPENSATION";
52
+ })(IncomeType = exports.IncomeType || (exports.IncomeType = {}));
53
+ /**
54
+ * role of the user that made the action
55
+ */
56
+ var ActionedByRole;
57
+ (function (ActionedByRole) {
58
+ ActionedByRole["Customer"] = "customer";
59
+ ActionedByRole["Team"] = "team";
60
+ })(ActionedByRole = exports.ActionedByRole || (exports.ActionedByRole = {}));
61
+ var PublicIncomeType;
62
+ (function (PublicIncomeType) {
63
+ PublicIncomeType["IncomeCreated"] = "IncomeCreated";
64
+ PublicIncomeType["IncomeUpdated"] = "IncomeUpdated";
65
+ })(PublicIncomeType = exports.PublicIncomeType || (exports.PublicIncomeType = {}));
@@ -0,0 +1,133 @@
1
+ /**
2
+ * The liability event schema
3
+ */
4
+ export interface PublicLiability {
5
+ payload: LiabilityPayload;
6
+ type: Type;
7
+ /**
8
+ * schema version
9
+ */
10
+ version: string;
11
+ }
12
+ /**
13
+ * create / update liability payload
14
+ */
15
+ export interface LiabilityPayload {
16
+ applicationId: string;
17
+ /**
18
+ * uuid of liability
19
+ */
20
+ id: string;
21
+ liability: Liability;
22
+ meta?: Meta;
23
+ }
24
+ export interface Liability {
25
+ annualInterestRate?: number;
26
+ balloonRepaymentAmount?: number;
27
+ clearingFromOtherSource?: ClearingFromOtherSource;
28
+ clearingFromThisLoan?: boolean;
29
+ creditLimit?: number;
30
+ description?: string;
31
+ financialInstitution?: string;
32
+ interestOnlyDuration?: number;
33
+ interestOnlyRemainingTerm?: number;
34
+ interestType?: InterestType;
35
+ newLimit?: number;
36
+ originalBalance?: number;
37
+ outstandingBalance: number;
38
+ percentOwned: PercentOwned;
39
+ remainingTermDuration?: number;
40
+ repaymentAmount?: number;
41
+ repaymentFrequency?: RepaymentFrequency;
42
+ repaymentTypeDetails?: RepaymentTypeDetails;
43
+ type: LiabilityType;
44
+ }
45
+ export declare enum ClearingFromOtherSource {
46
+ PayingOut = "PAYING_OUT",
47
+ Reducing = "REDUCING"
48
+ }
49
+ export declare enum InterestType {
50
+ FixedRate = "FIXED_RATE",
51
+ Variable = "VARIABLE"
52
+ }
53
+ export interface PercentOwned {
54
+ owners: ApplicantOwnership[];
55
+ /**
56
+ * Indicate whether ownership proportions are equal, specified individually for each one or
57
+ * not specified.
58
+ */
59
+ proportions?: Proportions;
60
+ }
61
+ export interface ApplicantOwnership {
62
+ /**
63
+ * The applicant Identifier
64
+ */
65
+ applicantId: string;
66
+ customerId?: string;
67
+ /**
68
+ * how much percent for the corresponding applicant
69
+ */
70
+ percent: number;
71
+ }
72
+ /**
73
+ * Indicate whether ownership proportions are equal, specified individually for each one or
74
+ * not specified.
75
+ */
76
+ export declare enum Proportions {
77
+ Equal = "EQUAL",
78
+ NotSpecified = "NOT_SPECIFIED",
79
+ Specified = "SPECIFIED"
80
+ }
81
+ export declare enum RepaymentFrequency {
82
+ Fortnightly = "FORTNIGHTLY",
83
+ Monthly = "MONTHLY",
84
+ Weekly = "WEEKLY",
85
+ Yearly = "YEARLY"
86
+ }
87
+ export declare enum RepaymentTypeDetails {
88
+ InterestOnly = "INTEREST_ONLY",
89
+ PrincipalAndInterest = "PRINCIPAL_AND_INTEREST"
90
+ }
91
+ /**
92
+ * LEASE_OR_HIRE_FINANCE is deprecated.
93
+ */
94
+ export declare enum LiabilityType {
95
+ CarLoan = "CAR_LOAN",
96
+ CreditCard = "CREDIT_CARD",
97
+ HelpHecsDebt = "HELP_HECS_DEBT",
98
+ HirePurchase = "HIRE_PURCHASE",
99
+ HomeLoan = "HOME_LOAN",
100
+ Lease = "LEASE",
101
+ LeaseOrHireFinance = "LEASE_OR_HIRE_FINANCE",
102
+ LineOfCredit = "LINE_OF_CREDIT",
103
+ Other = "OTHER",
104
+ Overdraft = "OVERDRAFT",
105
+ PersonalLoan = "PERSONAL_LOAN",
106
+ ShortTermFinance = "SHORT_TERM_FINANCE",
107
+ StoreCard = "STORE_CARD",
108
+ TaxDebt = "TAX_DEBT"
109
+ }
110
+ /**
111
+ * The metadata of the alieo
112
+ */
113
+ export interface Meta {
114
+ /**
115
+ * uuid of user who made the action (create/update/delete)
116
+ */
117
+ actionedBy: string;
118
+ /**
119
+ * role of the user that made the action
120
+ */
121
+ actionedByRole: ActionedByRole;
122
+ }
123
+ /**
124
+ * role of the user that made the action
125
+ */
126
+ export declare enum ActionedByRole {
127
+ Customer = "customer",
128
+ Team = "team"
129
+ }
130
+ export declare enum Type {
131
+ LiabilityCreated = "LiabilityCreated",
132
+ LiabilityUpdated = "LiabilityUpdated"
133
+ }
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.Type = exports.ActionedByRole = exports.LiabilityType = exports.RepaymentTypeDetails = exports.RepaymentFrequency = exports.Proportions = exports.InterestType = exports.ClearingFromOtherSource = void 0;
4
+ var ClearingFromOtherSource;
5
+ (function (ClearingFromOtherSource) {
6
+ ClearingFromOtherSource["PayingOut"] = "PAYING_OUT";
7
+ ClearingFromOtherSource["Reducing"] = "REDUCING";
8
+ })(ClearingFromOtherSource = exports.ClearingFromOtherSource || (exports.ClearingFromOtherSource = {}));
9
+ var InterestType;
10
+ (function (InterestType) {
11
+ InterestType["FixedRate"] = "FIXED_RATE";
12
+ InterestType["Variable"] = "VARIABLE";
13
+ })(InterestType = exports.InterestType || (exports.InterestType = {}));
14
+ /**
15
+ * Indicate whether ownership proportions are equal, specified individually for each one or
16
+ * not specified.
17
+ */
18
+ var Proportions;
19
+ (function (Proportions) {
20
+ Proportions["Equal"] = "EQUAL";
21
+ Proportions["NotSpecified"] = "NOT_SPECIFIED";
22
+ Proportions["Specified"] = "SPECIFIED";
23
+ })(Proportions = exports.Proportions || (exports.Proportions = {}));
24
+ var RepaymentFrequency;
25
+ (function (RepaymentFrequency) {
26
+ RepaymentFrequency["Fortnightly"] = "FORTNIGHTLY";
27
+ RepaymentFrequency["Monthly"] = "MONTHLY";
28
+ RepaymentFrequency["Weekly"] = "WEEKLY";
29
+ RepaymentFrequency["Yearly"] = "YEARLY";
30
+ })(RepaymentFrequency = exports.RepaymentFrequency || (exports.RepaymentFrequency = {}));
31
+ var RepaymentTypeDetails;
32
+ (function (RepaymentTypeDetails) {
33
+ RepaymentTypeDetails["InterestOnly"] = "INTEREST_ONLY";
34
+ RepaymentTypeDetails["PrincipalAndInterest"] = "PRINCIPAL_AND_INTEREST";
35
+ })(RepaymentTypeDetails = exports.RepaymentTypeDetails || (exports.RepaymentTypeDetails = {}));
36
+ /**
37
+ * LEASE_OR_HIRE_FINANCE is deprecated.
38
+ */
39
+ var LiabilityType;
40
+ (function (LiabilityType) {
41
+ LiabilityType["CarLoan"] = "CAR_LOAN";
42
+ LiabilityType["CreditCard"] = "CREDIT_CARD";
43
+ LiabilityType["HelpHecsDebt"] = "HELP_HECS_DEBT";
44
+ LiabilityType["HirePurchase"] = "HIRE_PURCHASE";
45
+ LiabilityType["HomeLoan"] = "HOME_LOAN";
46
+ LiabilityType["Lease"] = "LEASE";
47
+ LiabilityType["LeaseOrHireFinance"] = "LEASE_OR_HIRE_FINANCE";
48
+ LiabilityType["LineOfCredit"] = "LINE_OF_CREDIT";
49
+ LiabilityType["Other"] = "OTHER";
50
+ LiabilityType["Overdraft"] = "OVERDRAFT";
51
+ LiabilityType["PersonalLoan"] = "PERSONAL_LOAN";
52
+ LiabilityType["ShortTermFinance"] = "SHORT_TERM_FINANCE";
53
+ LiabilityType["StoreCard"] = "STORE_CARD";
54
+ LiabilityType["TaxDebt"] = "TAX_DEBT";
55
+ })(LiabilityType = exports.LiabilityType || (exports.LiabilityType = {}));
56
+ /**
57
+ * role of the user that made the action
58
+ */
59
+ var ActionedByRole;
60
+ (function (ActionedByRole) {
61
+ ActionedByRole["Customer"] = "customer";
62
+ ActionedByRole["Team"] = "team";
63
+ })(ActionedByRole = exports.ActionedByRole || (exports.ActionedByRole = {}));
64
+ var Type;
65
+ (function (Type) {
66
+ Type["LiabilityCreated"] = "LiabilityCreated";
67
+ Type["LiabilityUpdated"] = "LiabilityUpdated";
68
+ })(Type = exports.Type || (exports.Type = {}));