@lendi/act-credit-decisions-transform 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/README.md +31 -0
  2. package/lib/index.d.ts +11 -0
  3. package/lib/index.js +28 -0
  4. package/lib/logger.d.ts +1 -0
  5. package/lib/logger.js +5 -0
  6. package/lib/schemas/application-workflow-event.json +240 -0
  7. package/lib/schemas/credit-report-retrieved-event.json +57 -0
  8. package/lib/schemas/public-applicant-event.json +910 -0
  9. package/lib/schemas/public-application-event.json +250 -0
  10. package/lib/schemas/public-asset-event.json +679 -0
  11. package/lib/schemas/public-asset-liability-relation-delete-event.json +74 -0
  12. package/lib/schemas/public-asset-liability-relation-event.json +73 -0
  13. package/lib/schemas/public-create-applicant-event.json +609 -0
  14. package/lib/schemas/public-delete-applicant-event.json +66 -0
  15. package/lib/schemas/public-delete-asset-event.json +53 -0
  16. package/lib/schemas/public-delete-income-event.json +55 -0
  17. package/lib/schemas/public-employment-delete-event.json +31 -0
  18. package/lib/schemas/public-employment-event.json +278 -0
  19. package/lib/schemas/public-expense-delete-event.json +41 -0
  20. package/lib/schemas/public-expense-event.json +133 -0
  21. package/lib/schemas/public-funding-position-event.json +419 -0
  22. package/lib/schemas/public-income-event.json +242 -0
  23. package/lib/schemas/public-liability-delete-event.json +37 -0
  24. package/lib/schemas/public-liability-event.json +262 -0
  25. package/lib/schemas/public-required-document-event.json +366 -0
  26. package/lib/schemas/public-update-applicant-event.json +606 -0
  27. package/lib/schemas/sf-opportunity-event-out.json +138 -0
  28. package/lib/transform-events/generate-asset-liability-link.d.ts +10 -0
  29. package/lib/transform-events/generate-asset-liability-link.js +29 -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/transform-applicant.d.ts +8 -0
  33. package/lib/transform-events/transform-applicant.js +180 -0
  34. package/lib/transform-events/transform-application-workflow.d.ts +8 -0
  35. package/lib/transform-events/transform-application-workflow.js +30 -0
  36. package/lib/transform-events/transform-application.d.ts +20 -0
  37. package/lib/transform-events/transform-application.js +67 -0
  38. package/lib/transform-events/transform-asset-address.d.ts +25 -0
  39. package/lib/transform-events/transform-asset-address.js +87 -0
  40. package/lib/transform-events/transform-asset.d.ts +58 -0
  41. package/lib/transform-events/transform-asset.js +337 -0
  42. package/lib/transform-events/transform-employment.d.ts +9 -0
  43. package/lib/transform-events/transform-employment.js +107 -0
  44. package/lib/transform-events/transform-expenses.d.ts +41 -0
  45. package/lib/transform-events/transform-expenses.js +121 -0
  46. package/lib/transform-events/transform-funding-position.d.ts +21 -0
  47. package/lib/transform-events/transform-funding-position.js +107 -0
  48. package/lib/transform-events/transform-income.d.ts +48 -0
  49. package/lib/transform-events/transform-income.js +260 -0
  50. package/lib/transform-events/transform-liability.d.ts +12 -0
  51. package/lib/transform-events/transform-liability.js +117 -0
  52. package/lib/transform-events/transform-percent-owned.d.ts +10 -0
  53. package/lib/transform-events/transform-percent-owned.js +22 -0
  54. package/lib/transform-events/transform-required-document.d.ts +67 -0
  55. package/lib/transform-events/transform-required-document.js +148 -0
  56. package/lib/types/enum-mappings/alieo-frequency.d.ts +15 -0
  57. package/lib/types/enum-mappings/alieo-frequency.js +25 -0
  58. package/lib/types/enum-mappings/applicant-gender.d.ts +6 -0
  59. package/lib/types/enum-mappings/applicant-gender.js +11 -0
  60. package/lib/types/enum-mappings/applicant-type.d.ts +6 -0
  61. package/lib/types/enum-mappings/applicant-type.js +10 -0
  62. package/lib/types/enum-mappings/asset-type.d.ts +3 -0
  63. package/lib/types/enum-mappings/asset-type.js +17 -0
  64. package/lib/types/enum-mappings/builder-type.d.ts +7 -0
  65. package/lib/types/enum-mappings/builder-type.js +9 -0
  66. package/lib/types/enum-mappings/company-structure.d.ts +7 -0
  67. package/lib/types/enum-mappings/company-structure.js +10 -0
  68. package/lib/types/enum-mappings/company-type.d.ts +7 -0
  69. package/lib/types/enum-mappings/company-type.js +11 -0
  70. package/lib/types/enum-mappings/construction-type.d.ts +7 -0
  71. package/lib/types/enum-mappings/construction-type.js +10 -0
  72. package/lib/types/enum-mappings/country-code.d.ts +7 -0
  73. package/lib/types/enum-mappings/country-code.js +246 -0
  74. package/lib/types/enum-mappings/employment-basis.d.ts +7 -0
  75. package/lib/types/enum-mappings/employment-basis.js +12 -0
  76. package/lib/types/enum-mappings/expense-frequency.d.ts +7 -0
  77. package/lib/types/enum-mappings/expense-frequency.js +11 -0
  78. package/lib/types/enum-mappings/funding-position.d.ts +18 -0
  79. package/lib/types/enum-mappings/funding-position.js +36 -0
  80. package/lib/types/enum-mappings/government-benefits.d.ts +7 -0
  81. package/lib/types/enum-mappings/government-benefits.js +10 -0
  82. package/lib/types/enum-mappings/guarantor-relationship-type.d.ts +3 -0
  83. package/lib/types/enum-mappings/guarantor-relationship-type.js +16 -0
  84. package/lib/types/enum-mappings/housing-status.d.ts +7 -0
  85. package/lib/types/enum-mappings/housing-status.js +15 -0
  86. package/lib/types/enum-mappings/income-type.d.ts +7 -0
  87. package/lib/types/enum-mappings/income-type.js +16 -0
  88. package/lib/types/enum-mappings/index.d.ts +27 -0
  89. package/lib/types/enum-mappings/index.js +43 -0
  90. package/lib/types/enum-mappings/liability-payment-type.d.ts +7 -0
  91. package/lib/types/enum-mappings/liability-payment-type.js +9 -0
  92. package/lib/types/enum-mappings/liability-type.d.ts +7 -0
  93. package/lib/types/enum-mappings/liability-type.js +21 -0
  94. package/lib/types/enum-mappings/living-expense.d.ts +7 -0
  95. package/lib/types/enum-mappings/living-expense.js +31 -0
  96. package/lib/types/enum-mappings/marital-status.d.ts +7 -0
  97. package/lib/types/enum-mappings/marital-status.js +12 -0
  98. package/lib/types/enum-mappings/postcode.d.ts +6 -0
  99. package/lib/types/enum-mappings/postcode.js +15 -0
  100. package/lib/types/enum-mappings/preferred-repayment.d.ts +7 -0
  101. package/lib/types/enum-mappings/preferred-repayment.js +10 -0
  102. package/lib/types/enum-mappings/proof-of-identity.d.ts +7 -0
  103. package/lib/types/enum-mappings/proof-of-identity.js +10 -0
  104. package/lib/types/enum-mappings/property-expense-category.d.ts +7 -0
  105. package/lib/types/enum-mappings/property-expense-category.js +11 -0
  106. package/lib/types/enum-mappings/public-financial-asset.d.ts +7 -0
  107. package/lib/types/enum-mappings/public-financial-asset.js +12 -0
  108. package/lib/types/enum-mappings/public-primary-purpose.d.ts +7 -0
  109. package/lib/types/enum-mappings/public-primary-purpose.js +9 -0
  110. package/lib/types/enum-mappings/public-property-status.d.ts +7 -0
  111. package/lib/types/enum-mappings/public-property-status.js +11 -0
  112. package/lib/types/enum-mappings/public-property-type.d.ts +7 -0
  113. package/lib/types/enum-mappings/public-property-type.js +23 -0
  114. package/lib/types/enum-mappings/residency-status.d.ts +7 -0
  115. package/lib/types/enum-mappings/residency-status.js +11 -0
  116. package/lib/types/enum-mappings/title-gender.d.ts +7 -0
  117. package/lib/types/enum-mappings/title-gender.js +13 -0
  118. package/lib/types/enum-mappings/title.d.ts +7 -0
  119. package/lib/types/enum-mappings/title.js +13 -0
  120. package/lib/types/enum-mappings/to-be-purchased.d.ts +5 -0
  121. package/lib/types/enum-mappings/to-be-purchased.js +8 -0
  122. package/lib/types/enum-mappings/to-be-used-as-security.d.ts +5 -0
  123. package/lib/types/enum-mappings/to-be-used-as-security.js +8 -0
  124. package/lib/types/enum-mappings/transaction-type.d.ts +7 -0
  125. package/lib/types/enum-mappings/transaction-type.js +9 -0
  126. package/lib/types/enum-mappings/trust.d.ts +7 -0
  127. package/lib/types/enum-mappings/trust.js +14 -0
  128. package/lib/types/enum-mappings/verification.d.ts +3 -0
  129. package/lib/types/enum-mappings/verification.js +13 -0
  130. package/lib/types/events/applicant-delete.d.ts +42 -0
  131. package/lib/types/events/applicant-delete.js +15 -0
  132. package/lib/types/events/application-workflow.d.ts +233 -0
  133. package/lib/types/events/application-workflow.js +172 -0
  134. package/lib/types/events/asset-delete.d.ts +33 -0
  135. package/lib/types/events/asset-delete.js +15 -0
  136. package/lib/types/events/asset-liability-relation-delete.d.ts +52 -0
  137. package/lib/types/events/asset-liability-relation-delete.js +15 -0
  138. package/lib/types/events/credit-report-retrieved.d.ts +36 -0
  139. package/lib/types/events/credit-report-retrieved.js +15 -0
  140. package/lib/types/events/employment-delete.d.ts +19 -0
  141. package/lib/types/events/employment-delete.js +7 -0
  142. package/lib/types/events/expense-delete.d.ts +21 -0
  143. package/lib/types/events/expense-delete.js +7 -0
  144. package/lib/types/events/funding-position.d.ts +116 -0
  145. package/lib/types/events/funding-position.js +34 -0
  146. package/lib/types/events/income-delete.d.ts +33 -0
  147. package/lib/types/events/income-delete.js +15 -0
  148. package/lib/types/events/liability-delete.d.ts +17 -0
  149. package/lib/types/events/liability-delete.js +7 -0
  150. package/lib/types/events/opportunity.d.ts +102 -0
  151. package/lib/types/events/opportunity.js +47 -0
  152. package/lib/types/events/public-applicant.d.ts +628 -0
  153. package/lib/types/events/public-applicant.js +411 -0
  154. package/lib/types/events/public-application.d.ts +151 -0
  155. package/lib/types/events/public-application.js +103 -0
  156. package/lib/types/events/public-asset-liability-relation.d.ts +52 -0
  157. package/lib/types/events/public-asset-liability-relation.js +15 -0
  158. package/lib/types/events/public-asset.d.ts +502 -0
  159. package/lib/types/events/public-asset.js +348 -0
  160. package/lib/types/events/public-employment.d.ts +121 -0
  161. package/lib/types/events/public-employment.js +46 -0
  162. package/lib/types/events/public-expense.d.ts +84 -0
  163. package/lib/types/events/public-expense.js +51 -0
  164. package/lib/types/events/public-funding-position.d.ts +341 -0
  165. package/lib/types/events/public-funding-position.js +20 -0
  166. package/lib/types/events/public-income.d.ts +144 -0
  167. package/lib/types/events/public-income.js +65 -0
  168. package/lib/types/events/public-liability.d.ts +140 -0
  169. package/lib/types/events/public-liability.js +68 -0
  170. package/lib/types/events/public-required-document.d.ts +374 -0
  171. package/lib/types/events/public-required-document.js +297 -0
  172. package/lib/types/partial-application.d.ts +3 -0
  173. package/lib/types/partial-application.js +2 -0
  174. package/lib/types/recursive-partial.d.ts +3 -0
  175. package/lib/types/recursive-partial.js +2 -0
  176. package/lib/update-application/merge-application.d.ts +14 -0
  177. package/lib/update-application/merge-application.js +175 -0
  178. package/lib/update-application/remove-ids-not-required.d.ts +11 -0
  179. package/lib/update-application/remove-ids-not-required.js +63 -0
  180. package/lib/update-application/update-primary-applicant.d.ts +27 -0
  181. package/lib/update-application/update-primary-applicant.js +46 -0
  182. package/lib/utils/address-tools.d.ts +84 -0
  183. package/lib/utils/address-tools.js +176 -0
  184. package/lib/utils/clean-up.d.ts +7 -0
  185. package/lib/utils/clean-up.js +24 -0
  186. package/lib/utils/errors.d.ts +28 -0
  187. package/lib/utils/errors.js +43 -0
  188. package/lib/utils/formatYesNo.d.ts +8 -0
  189. package/lib/utils/formatYesNo.js +12 -0
  190. package/lib/utils/generate-address.d.ts +19 -0
  191. package/lib/utils/generate-address.js +97 -0
  192. package/lib/utils/get-financial-institution.d.ts +8 -0
  193. package/lib/utils/get-financial-institution.js +17 -0
  194. package/lib/utils/is-asset-type.d.ts +25 -0
  195. package/lib/utils/is-asset-type.js +46 -0
  196. package/lib/utils/is-income-type.d.ts +73 -0
  197. package/lib/utils/is-income-type.js +134 -0
  198. package/lib/utils/iso-date.d.ts +7 -0
  199. package/lib/utils/iso-date.js +12 -0
  200. package/lib/utils/normalise-date.d.ts +8 -0
  201. package/lib/utils/normalise-date.js +17 -0
  202. package/lib/utils/round-decimal.d.ts +6 -0
  203. package/lib/utils/round-decimal.js +12 -0
  204. package/package.json +79 -0
@@ -0,0 +1,419 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "The funding position event schema",
4
+ "description": "This event is the public funding position event",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "version": {
9
+ "type": "string",
10
+ "description": "schema version"
11
+ },
12
+ "type": {
13
+ "type": "string",
14
+ "enum": ["FundingPosition"]
15
+ },
16
+ "payload": {
17
+ "$ref": "#/definitions/Payload"
18
+ }
19
+ },
20
+ "required": ["version", "type", "payload"],
21
+ "definitions": {
22
+ "Payload": {
23
+ "type": "object",
24
+ "additionalProperties": true,
25
+ "properties": {
26
+ "id": {
27
+ "type": "string",
28
+ "description": "Application ID"
29
+ },
30
+ "applicationId": {
31
+ "type": "string",
32
+ "description": "Application ID"
33
+ },
34
+ "properties": {
35
+ "type": "array",
36
+ "items": {
37
+ "$ref": "#/definitions/Property"
38
+ },
39
+ "description": "List of refinance or new purchase property"
40
+ },
41
+ "fundsRequiredBreakdown": {
42
+ "$ref": "#/definitions/FundsRequiredBreakdown"
43
+ },
44
+ "totalCashOut": {
45
+ "type": "number",
46
+ "description": "The total amount of customer-specified cash out."
47
+ },
48
+ "totalTopUp": {
49
+ "type": "number",
50
+ "description": "The total amount of customer-specified top up."
51
+ },
52
+ "totalDeposit": {
53
+ "type": "number",
54
+ "description": "The total deposit amount for all properties."
55
+ },
56
+ "totalDebtConsolidation": {
57
+ "type": "number",
58
+ "description": "The total amount of debt to be consolidated."
59
+ },
60
+ "totalGovernmentContributions": {
61
+ "type": "number",
62
+ "description": "The total amount available for settlement from government grants."
63
+ },
64
+ "fundsRequested": {
65
+ "type": "number",
66
+ "description": "The final loan amount requested by the customer or broker."
67
+ },
68
+ "fundsRequired": {
69
+ "type": "number",
70
+ "description": "The amount required to balance all costs with contributions. The minimum loan amount required for settlement."
71
+ },
72
+ "lvr": {
73
+ "type": "number",
74
+ "description": "Loan to value ratio. Calculated as the loan amount divided by the value of all properties being used as security."
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
+ },
84
+ "netSurplus": {
85
+ "type": "number",
86
+ "description": "The amount remaining after settlement. Calculated as the difference between the funds requested and funds required."
87
+ },
88
+ "lmi": {
89
+ "type": "number",
90
+ "description": "Lenders Mortgage Insurance premium. An additional cost required by lenders for higher risk loans."
91
+ },
92
+ "lmiIncluded": {
93
+ "type": "boolean",
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."
131
+ }
132
+ },
133
+ "required": [
134
+ "id",
135
+ "applicationId",
136
+ "properties",
137
+ "fundsRequiredBreakdown",
138
+ "totalCashOut",
139
+ "totalTopUp",
140
+ "totalDeposit",
141
+ "totalDebtConsolidation",
142
+ "totalGovernmentContributions",
143
+ "fundsRequested",
144
+ "fundsRequired",
145
+ "lvr",
146
+ "netSurplus",
147
+ "lmi",
148
+ "lmiIncluded"
149
+ ]
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
+ },
169
+ "Property": {
170
+ "type": "object",
171
+ "properties": {
172
+ "id": {
173
+ "type": "string",
174
+ "description": "Property ID"
175
+ },
176
+ "mortgageRegistrationFee": {
177
+ "type": "number",
178
+ "description": "A fee paid to the Land Titles Office for the registration of a mortgage over a property."
179
+ },
180
+ "lenderSetupFee": {
181
+ "type": "number",
182
+ "description": "Fees payable to the lender on setting up a home loan and completing settlement."
183
+ },
184
+ "otherSundries": {
185
+ "type": "number",
186
+ "description": "Other fees payable to an interested party to ensure settlement can proceed."
187
+ },
188
+ "contributionAmount": {
189
+ "type": "number",
190
+ "description": "The amount that a customer is contributing towards the settlement."
191
+ },
192
+ "governmentContributions": {
193
+ "type": "number",
194
+ "description": "The amount available for settlement from government grants."
195
+ },
196
+ "constructionCosts": {
197
+ "type": ["number"],
198
+ "description": "The amount that will be used for construction purposes."
199
+ },
200
+ "totalCosts": {
201
+ "type": "number",
202
+ "description": "A sum of all costs and charges involved with funding the loan and settlement."
203
+ },
204
+ "totalContributions": {
205
+ "type": "number",
206
+ "description": "A sum of all contributions made towards settlement."
207
+ },
208
+ "purchasePrice": {
209
+ "type": "number",
210
+ "description": "The agreed price that a property has been purchased for."
211
+ },
212
+ "transferFee": {
213
+ "type": "number",
214
+ "description": "A fee paid to the Land Titles Office fee for transferring the property title from the seller to the buyer."
215
+ },
216
+ "stampDuty": {
217
+ "type": "number",
218
+ "description": "Tax paid to the State Revenue Office when purchasing a property."
219
+ },
220
+ "conveyancingCost": {
221
+ "type": "number",
222
+ "description": "The costs involved with a conveyancer who assists with settlement."
223
+ },
224
+ "foreignBuyerSurcharge": {
225
+ "type": ["number"],
226
+ "description": "An additional fee payable to the Land Titles Office for property buyers that are not permanent residents. "
227
+ },
228
+ "totalRequired": {
229
+ "type": "number",
230
+ "description": "Total fund required. The sum of purchase price, and fees."
231
+ },
232
+ "propertyValue": {
233
+ "type": "number",
234
+ "description": "The value of a property."
235
+ },
236
+ "currentLoanAmount": {
237
+ "type": "number",
238
+ "description": "The credit limit of an existing home loan that is secured by a property."
239
+ },
240
+ "lenderDischargeFee": {
241
+ "type": "number",
242
+ "description": "A fee charged by a customer’s existing lender when closing a home loan account."
243
+ },
244
+ "accruedInterest": {
245
+ "type": "number",
246
+ "description": "The interest accrued before an existing loan has been discharged and payable to the existing lender at settlement."
247
+ },
248
+ "debtConsolidation": {
249
+ "type": "array",
250
+ "items": {
251
+ "$ref": "#/definitions/DebtConsolidation"
252
+ }
253
+ },
254
+ "cashOutAmount": {
255
+ "type": "number",
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."
277
+ }
278
+ },
279
+ "required": [
280
+ "id",
281
+ "mortgageRegistrationFee",
282
+ "lenderSetupFee",
283
+ "otherSundries",
284
+ "contributionAmount",
285
+ "governmentContributions",
286
+ "constructionCosts",
287
+ "totalCosts",
288
+ "totalContributions",
289
+ "totalRequired"
290
+ ]
291
+ },
292
+ "DebtConsolidation": {
293
+ "type": "object",
294
+ "properties": {
295
+ "id": {
296
+ "type": "string",
297
+ "description": "ID"
298
+ },
299
+ "amount": {
300
+ "type": "number",
301
+ "description": "Amount"
302
+ },
303
+ "liabilityType": {
304
+ "type": ["string", "null"],
305
+ "description": "Liability type"
306
+ },
307
+ "financialInstitutionShortName": {
308
+ "type": ["string", "null"],
309
+ "description": "Financial institution short name"
310
+ },
311
+ "toConsolidate": {
312
+ "type": "boolean",
313
+ "description": "to consolidate"
314
+ }
315
+ },
316
+ "required": ["id", "amount", "liabilityType", "financialInstitutionShortName", "toConsolidate"]
317
+ },
318
+ "FundsRequiredBreakdown": {
319
+ "type": "object",
320
+ "properties": {
321
+ "mortgageRegistrationFee": {
322
+ "type": "number",
323
+ "description": "A fee paid to the Land Titles Office for the registration of a mortgage over a property."
324
+ },
325
+ "lenderSetupFee": {
326
+ "type": "number",
327
+ "description": "Fees payable to the lender on setting up a home loan and completing settlement."
328
+ },
329
+ "otherSundries": {
330
+ "type": "number",
331
+ "description": "Other fees payable to an interested party to ensure settlement can proceed."
332
+ },
333
+ "constructionCosts": {
334
+ "type": ["number"],
335
+ "description": "The amount that will be used for construction purposes."
336
+ },
337
+ "transferFee": {
338
+ "type": "number",
339
+ "description": "A fee paid to the Land Titles Office fee for transferring the property title from the seller to the buyer."
340
+ },
341
+ "stampDuty": {
342
+ "type": "number",
343
+ "description": "Tax paid to the State Revenue Office when purchasing a property."
344
+ },
345
+ "conveyancingCost": {
346
+ "type": "number",
347
+ "description": "The costs involved with a conveyancer who assists with settlement."
348
+ },
349
+ "foreignBuyerSurcharge": {
350
+ "type": ["number"],
351
+ "description": "An additional fee payable to the Land Titles Office for property buyers that are not permanent residents. "
352
+ },
353
+ "lenderDischargeFee": {
354
+ "type": "number",
355
+ "description": "A fee charged by a customer’s existing lender when closing a home loan account."
356
+ },
357
+ "accruedInterest": {
358
+ "type": "number",
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."
367
+ }
368
+ },
369
+ "required": [
370
+ "mortgageRegistrationFee",
371
+ "lenderSetupFee",
372
+ "otherSundries",
373
+ "constructionCosts",
374
+ "transferFee",
375
+ "stampDuty",
376
+ "conveyancingCost",
377
+ "foreignBuyerSurcharge",
378
+ "lenderDischargeFee",
379
+ "accruedInterest"
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" }]
417
+ }
418
+ }
419
+ }
@@ -0,0 +1,242 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "definitions": {
4
+ "frequency": {
5
+ "type": "string",
6
+ "enum": ["FORTNIGHTLY", "MONTHLY", "WEEKLY", "QUARTERLY", "YEARLY"]
7
+ },
8
+ "ownership": {
9
+ "type": "object",
10
+ "required": ["applicantId", "percent"],
11
+ "properties": {
12
+ "applicantId": {
13
+ "type": "string",
14
+ "format": "uuid"
15
+ },
16
+ "percent": {
17
+ "type": "number",
18
+ "description": "how much percent for the corresponding applicant"
19
+ }
20
+ }
21
+ },
22
+ "ownershipProportion": {
23
+ "type": "object",
24
+ "required": ["owners"],
25
+ "properties": {
26
+ "proportions": {
27
+ "enum": ["EQUAL", "SPECIFIED", "NOT_SPECIFIED"],
28
+ "description": "Indicate whether ownership proportions are equal, specified individually for each one or not specified."
29
+ },
30
+ "owners": {
31
+ "type": "array",
32
+ "minItems": 1,
33
+ "items": {
34
+ "$ref": "#/definitions/ownership"
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "year": {
40
+ "type": "number",
41
+ "description": "Year the vehicle was made."
42
+ },
43
+ "AddBackDefinition": {
44
+ "type": "object",
45
+ "description": "add-back is an expense that is added back to the profits of the business",
46
+ "properties": {
47
+ "depreciation": {
48
+ "type": "number",
49
+ "example": 3200
50
+ },
51
+ "interest": {
52
+ "type": "number",
53
+ "example": 4600
54
+ },
55
+ "lease": {
56
+ "type": "number",
57
+ "example": 7600
58
+ },
59
+ "nonRecurringExpenses": {
60
+ "type": "number",
61
+ "example": 7810
62
+ },
63
+ "salary": {
64
+ "type": "number",
65
+ "example": 9000
66
+ },
67
+ "superannuationExcess": {
68
+ "type": "number",
69
+ "example": 1300
70
+ },
71
+ "other": {
72
+ "type": "number",
73
+ "example": 6600
74
+ }
75
+ }
76
+ },
77
+ "BASDefinition": {
78
+ "type": "object",
79
+ "description": "Business activity statement details",
80
+ "properties": {
81
+ "quarter": {
82
+ "type": "number",
83
+ "example": 1,
84
+ "enum": [1, 2, 3, 4]
85
+ },
86
+ "salesAmount": {
87
+ "type": "number",
88
+ "example": 54570
89
+ }
90
+ },
91
+ "required": ["quarter"]
92
+ },
93
+ "IncomeBusinessDetails": {
94
+ "type": "object",
95
+ "description": "Earnings for a company over a specified financial year",
96
+ "properties": {
97
+ "year": {
98
+ "$ref": "#/definitions/year"
99
+ },
100
+ "companyProfitBeforeTax": {
101
+ "type": "number",
102
+ "example": 200000
103
+ },
104
+ "addback": {
105
+ "$ref": "#/definitions/AddBackDefinition"
106
+ },
107
+ "nonRecurringIncome": {
108
+ "type": "number",
109
+ "example": 9100
110
+ }
111
+ }
112
+ },
113
+ "incomeDefinition": {
114
+ "type": "object",
115
+ "required": ["id", "applicationId", "income"],
116
+ "properties": {
117
+ "id": {
118
+ "type": "string",
119
+ "format": "uuid",
120
+ "description": "uuid of Expense"
121
+ },
122
+ "meta": {
123
+ "$ref": "#/definitions/meta"
124
+ },
125
+ "applicationId": {
126
+ "type": "string"
127
+ },
128
+ "income": {
129
+ "type": "object",
130
+ "required": ["type"],
131
+ "properties": {
132
+ "amount": {
133
+ "type": "number"
134
+ },
135
+ "assetId": {
136
+ "type": "string",
137
+ "format": "uuid"
138
+ },
139
+ "benefitType": {
140
+ "type": "string",
141
+ "enum": ["FAMILY_TAX", "AGE_PENSION", "DISABILITY_SUPPORT_PENSION", "OTHER"]
142
+ },
143
+ "comments": {
144
+ "type": "string"
145
+ },
146
+ "description": {
147
+ "type": "string"
148
+ },
149
+ "companyId": {
150
+ "type": "string",
151
+ "format": "uuid"
152
+ },
153
+ "gross": {
154
+ "type": "number",
155
+ "example": 235000
156
+ },
157
+ "incomes": {
158
+ "type": "array",
159
+ "items": {
160
+ "$ref": "#/definitions/IncomeBusinessDetails"
161
+ }
162
+ },
163
+ "bas": {
164
+ "type": "array",
165
+ "uniqueItems": true,
166
+ "items": {
167
+ "$ref": "#/definitions/BASDefinition"
168
+ }
169
+ },
170
+ "employmentId": {
171
+ "type": "string",
172
+ "format": "uuid",
173
+ "description": "Company Applicant"
174
+ },
175
+ "frequency": {
176
+ "$ref": "#/definitions/frequency"
177
+ },
178
+ "percentOwned": {
179
+ "$ref": "#/definitions/ownershipProportion"
180
+ },
181
+ "type": {
182
+ "type": "string",
183
+ "enum": [
184
+ "CHILD_MAINTENANCE",
185
+ "FOREIGN_INCOME",
186
+ "GOVT_BENEFIT",
187
+ "INVESTMENT_INCOME",
188
+ "OTHER_INCOME",
189
+ "PAYG_BASE_SALARY",
190
+ "PAYG_COMMISSION_INCOME",
191
+ "PAYG_BONUS_INCOME",
192
+ "PAYG_OVERTIME_INCOME",
193
+ "PAYG_CAR_ALLOWANCE",
194
+ "PAYG_ALLOWANCES_TAXED",
195
+ "PAYG_ALLOWANCES_NOT_TAXED",
196
+ "PAYG_COMPANY_CAR",
197
+ "PAYG_NON_VOLUNTARY_DEDUCTIONS_PRE_TAX",
198
+ "PAYG_SALARY_SACRIFICE",
199
+ "RENTAL_INCOME",
200
+ "SELF_EMPLOYED_BUSINESS_INCOME",
201
+ "SELF_EMPLOYED_BUSINESS_INCOME_FULL_DOC",
202
+ "SELF_EMPLOYED_BUSINESS_INCOME_LOW_DOC",
203
+ "SUPER_ANNUITY_PENSION",
204
+ "WORKERS_COMPENSATION"
205
+ ]
206
+ }
207
+ }
208
+ }
209
+ }
210
+ },
211
+ "meta": {
212
+ "type": "object",
213
+ "additionalProperties": false,
214
+ "description": "The metadata of the alieo",
215
+ "properties": {
216
+ "actionedBy": {
217
+ "description": "uuid of user who made the action (create/update/delete)",
218
+ "type": "string"
219
+ },
220
+ "actionedByRole": {
221
+ "description": "role of the user that made the action",
222
+ "enum": ["team", "customer"]
223
+ }
224
+ },
225
+ "required": ["actionedBy", "actionedByRole"]
226
+ }
227
+ },
228
+ "type": "object",
229
+ "properties": {
230
+ "type": {
231
+ "type": "string",
232
+ "enum": ["IncomeCreated", "IncomeUpdated"]
233
+ },
234
+ "version": {
235
+ "type": "string"
236
+ },
237
+ "payload": {
238
+ "$ref": "#/definitions/incomeDefinition"
239
+ }
240
+ },
241
+ "required": ["type", "version", "payload"]
242
+ }