@lendi/act-credit-decisions-transform 1.9.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 +8 -0
  43. package/lib/transform-events/transform-employment.js +106 -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 +78 -0
@@ -0,0 +1,679 @@
1
+ {
2
+ "definitions": {
3
+ "payload": {
4
+ "type": "object",
5
+ "$ref": "#/definitions/createAssetDefinition"
6
+ },
7
+ "id": {
8
+ "type": "string"
9
+ },
10
+ "meta": {
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "description": "The metadata of the alieo",
14
+ "properties": {
15
+ "actionedBy": {
16
+ "description": "uuid of user who made the action (create/update/delete)",
17
+ "type": "string"
18
+ },
19
+ "actionedByRole": {
20
+ "description": "role of the user that made the action",
21
+ "enum": ["team", "customer"]
22
+ }
23
+ },
24
+ "required": ["actionedBy", "actionedByRole"]
25
+ },
26
+ "applicantOwnership": {
27
+ "type": "object",
28
+ "required": ["applicantId", "percent"],
29
+ "properties": {
30
+ "applicantId": {
31
+ "type": "string",
32
+ "description": "The applicant Identifier"
33
+ },
34
+ "customerId": {
35
+ "type": "string"
36
+ },
37
+ "percent": {
38
+ "type": "number",
39
+ "description": "how much percent for the corresponding applicant",
40
+ "examples": [0.5]
41
+ }
42
+ }
43
+ },
44
+ "percentOwned": {
45
+ "type": "object",
46
+ "required": ["owners"],
47
+ "properties": {
48
+ "proportions": {
49
+ "enum": ["EQUAL", "SPECIFIED", "NOT_SPECIFIED"],
50
+ "description": "Indicate whether ownership proportions are equal, specified individually for each one or not specified."
51
+ },
52
+ "owners": {
53
+ "type": "array",
54
+ "items": {
55
+ "$ref": "#/definitions/applicantOwnership"
56
+ }
57
+ }
58
+ }
59
+ },
60
+ "make": {
61
+ "type": "string",
62
+ "description": "Make of the vehicle"
63
+ },
64
+ "model": {
65
+ "type": "string",
66
+ "description": "Model of the vehicle."
67
+ },
68
+ "year": {
69
+ "type": "number",
70
+ "description": "Year the vehicle was made."
71
+ },
72
+ "estimatedValue": {
73
+ "type": "number",
74
+ "description": "Estimated value of a given asset/liability."
75
+ },
76
+ "toBeUsedAsSecurity": {
77
+ "type": "boolean"
78
+ },
79
+ "toBePurchased": {
80
+ "type": "boolean"
81
+ },
82
+ "contractPriceAmount": {
83
+ "type": "number",
84
+ "description": "Price of contract."
85
+ },
86
+ "description": {
87
+ "type": "string",
88
+ "description": "Description of the entity."
89
+ },
90
+ "address": {
91
+ "type": "object",
92
+ "properties": {
93
+ "postcode": {
94
+ "description": "A 4 digit postcode",
95
+ "type": "string"
96
+ },
97
+ "state": {
98
+ "description": "One our great nation's states",
99
+ "type": "string"
100
+ },
101
+ "city": {
102
+ "description": "The suburb name",
103
+ "type": "string"
104
+ },
105
+ "country": {
106
+ "$ref": "#/definitions/countries"
107
+ },
108
+ "formatted": {
109
+ "description": "A formatted version of the address",
110
+ "type": "string"
111
+ },
112
+ "standard": {
113
+ "$ref": "#/definitions/addressStandard"
114
+ }
115
+ }
116
+ },
117
+ "countries": {
118
+ "type": "string",
119
+ "example": "Australia",
120
+ "enum": [
121
+ "Afghanistan",
122
+ "Albania",
123
+ "Algeria",
124
+ "American Samoa",
125
+ "Andorra",
126
+ "Angola",
127
+ "Anguilla",
128
+ "Antarctica",
129
+ "Antigua And Barbuda",
130
+ "Argentina",
131
+ "Armenia",
132
+ "Aruba",
133
+ "Australia",
134
+ "Austria",
135
+ "Azerbaijan",
136
+ "Bahamas",
137
+ "Bahrain",
138
+ "Bangladesh",
139
+ "Barbados",
140
+ "Belarus",
141
+ "Belgium",
142
+ "Belize",
143
+ "Benin",
144
+ "Bermuda",
145
+ "Bhutan",
146
+ "Bolivia",
147
+ "Bosnia And Herzegovina",
148
+ "Botswana",
149
+ "Bouvet Island",
150
+ "Brazil",
151
+ "British Indian Ocean Territory",
152
+ "Brunei Darussalam",
153
+ "Bulgaria",
154
+ "Burkina Faso",
155
+ "Burundi",
156
+ "Cambodia",
157
+ "Cameroon",
158
+ "Canada",
159
+ "Cape Verde",
160
+ "Cayman Islands",
161
+ "Central African Republic",
162
+ "Chad",
163
+ "Chile",
164
+ "China",
165
+ "Christmas Island",
166
+ "Cocos (Keeling) Islands",
167
+ "Colombia",
168
+ "Comoros",
169
+ "Democratic People's Republic of Korea",
170
+ "Democratic Republic Of The Congo",
171
+ "Cook Islands",
172
+ "Costa Rica",
173
+ "Cote D'ivoire",
174
+ "Croatia",
175
+ "Cuba",
176
+ "Cyprus",
177
+ "Czech Republic",
178
+ "Denmark",
179
+ "Djibouti",
180
+ "Dominica",
181
+ "Dominican Republic",
182
+ "East Timor",
183
+ "Ecuador",
184
+ "Egypt",
185
+ "El Salvador",
186
+ "Equatorial Guinea",
187
+ "Eritrea",
188
+ "Estonia",
189
+ "Ethiopia",
190
+ "Falkland Islands",
191
+ "Faroe Islands",
192
+ "Fiji",
193
+ "Finland",
194
+ "France",
195
+ "French Guiana",
196
+ "French Polynesia",
197
+ "French Southern Territories",
198
+ "Gabon",
199
+ "Gambia",
200
+ "Georgia",
201
+ "Germany",
202
+ "Ghana",
203
+ "Gibraltar",
204
+ "Greece",
205
+ "Greenland",
206
+ "Grenada",
207
+ "Guadeloupe",
208
+ "Guam",
209
+ "Guatemala",
210
+ "Guinea",
211
+ "Guinea-bissau",
212
+ "Guyana",
213
+ "Haiti",
214
+ "Heard Island And Mcdonald Islands",
215
+ "Holy See (Vatican City State)",
216
+ "Honduras",
217
+ "Hong Kong",
218
+ "Hungary",
219
+ "Iceland",
220
+ "India",
221
+ "Indonesia",
222
+ "Iran",
223
+ "Iraq",
224
+ "Ireland",
225
+ "Israel",
226
+ "Italy",
227
+ "Jamaica",
228
+ "Japan",
229
+ "Jordan",
230
+ "Kazakstan",
231
+ "Kenya",
232
+ "Kiribati",
233
+ "Kosovo",
234
+ "Kuwait",
235
+ "Kyrgyzstan",
236
+ "Laos",
237
+ "Latvia",
238
+ "Lebanon",
239
+ "Lesotho",
240
+ "Liberia",
241
+ "Libyan Arab Jamahiriya",
242
+ "Liechtenstein",
243
+ "Lithuania",
244
+ "Luxembourg",
245
+ "Macau",
246
+ "Macedonia",
247
+ "Madagascar",
248
+ "Malawi",
249
+ "Malaysia",
250
+ "Maldives",
251
+ "Mali",
252
+ "Malta",
253
+ "Marshall Islands",
254
+ "Martinique",
255
+ "Mauritania",
256
+ "Mauritius",
257
+ "Mayotte",
258
+ "Mexico",
259
+ "Federated States Of Micronesia",
260
+ "Republic Of Moldova",
261
+ "Monaco",
262
+ "Mongolia",
263
+ "Montserrat",
264
+ "Montenegro",
265
+ "Morocco",
266
+ "Mozambique",
267
+ "Myanmar",
268
+ "Namibia",
269
+ "Nauru",
270
+ "Nepal",
271
+ "Netherlands",
272
+ "Netherlands Antilles",
273
+ "New Caledonia",
274
+ "New Zealand",
275
+ "Nicaragua",
276
+ "Niger",
277
+ "Nigeria",
278
+ "Niue",
279
+ "Norfolk Island",
280
+ "Northern Mariana Islands",
281
+ "Norway",
282
+ "Oman",
283
+ "Pakistan",
284
+ "Palau",
285
+ "Palestinian Territory",
286
+ "Panama",
287
+ "Papua New Guinea",
288
+ "Paraguay",
289
+ "Peru",
290
+ "Philippines",
291
+ "Pitcairn",
292
+ "Poland",
293
+ "Portugal",
294
+ "Puerto Rico",
295
+ "Qatar",
296
+ "Romania",
297
+ "Russian Federation",
298
+ "Rwanda",
299
+ "Saint Helena",
300
+ "Saint Kitts And Nevis",
301
+ "Saint Lucia",
302
+ "Saint Pierre And Miquelon",
303
+ "Saint Vincent And The Grenadines",
304
+ "Samoa",
305
+ "San Marino",
306
+ "Sao Tome And Principe",
307
+ "Saudi Arabia",
308
+ "Senegal",
309
+ "Serbia",
310
+ "Seychelles",
311
+ "Sierra Leone",
312
+ "Singapore",
313
+ "Slovakia",
314
+ "Slovenia",
315
+ "Solomon Islands",
316
+ "Somalia",
317
+ "South Africa",
318
+ "South Georgia And The South Sandwich Islands",
319
+ "The Republic of South Korea",
320
+ "Spain",
321
+ "Sri Lanka",
322
+ "Sudan",
323
+ "Suriname",
324
+ "Svalbard And Jan Mayen",
325
+ "Swaziland",
326
+ "Sweden",
327
+ "Switzerland",
328
+ "Syrian Arab Republic",
329
+ "Taiwan",
330
+ "Tajikistan",
331
+ "Tanzania",
332
+ "Thailand",
333
+ "Togo",
334
+ "Tokelau",
335
+ "Tonga",
336
+ "Trinidad And Tobago",
337
+ "Tunisia",
338
+ "Turkey",
339
+ "Turkmenistan",
340
+ "Turks And Caicos Islands",
341
+ "Tuvalu",
342
+ "Uganda",
343
+ "Ukraine",
344
+ "United Arab Emirates",
345
+ "United Kingdom",
346
+ "United States of America",
347
+ "United States Minor Outlying Islands",
348
+ "Uruguay",
349
+ "Uzbekistan",
350
+ "Vanuatu",
351
+ "Venezuela",
352
+ "Vietnam",
353
+ "British Virgin Islands",
354
+ "US Virgin Islands",
355
+ "Wallis And Futuna",
356
+ "Western Sahara",
357
+ "Yemen",
358
+ "Zambia",
359
+ "Zimbabwe"
360
+ ]
361
+ },
362
+ "addressStandard": {
363
+ "type": "object",
364
+ "properties": {
365
+ "buildingName": {
366
+ "description": "The building name",
367
+ "type": "string"
368
+ },
369
+ "level": {
370
+ "description": "The level of the unit/apartment",
371
+ "type": "string"
372
+ },
373
+ "lotSection": {
374
+ "description": "The lot number",
375
+ "type": "string"
376
+ },
377
+ "streetName": {
378
+ "description": "The street name",
379
+ "type": "string"
380
+ },
381
+ "streetNumber": {
382
+ "description": "The street number",
383
+ "type": "string"
384
+ },
385
+ "streetType": {
386
+ "description": "The type of the street i.e. road",
387
+ "type": "string"
388
+ },
389
+ "unit": {
390
+ "description": "The unit number",
391
+ "type": "string"
392
+ }
393
+ }
394
+ },
395
+ "primaryPurpose": {
396
+ "enum": ["INVESTMENT", "OWNER_OCCUPIED"]
397
+ },
398
+ "propertyStatus": {
399
+ "enum": ["ESTABLISHED", "NEW_BUILDING", "OFF_THE_PLAN", "VACANT_LAND"]
400
+ },
401
+ "zoneType": {
402
+ "enum": ["COMMERCIAL", "INDUSTRIAL", "RESIDENTIAL", "RURAL"]
403
+ },
404
+ "propertyType": {
405
+ "enum": [
406
+ "APARTMENT_UNIT_LESS_THAN_50M2",
407
+ "APARTMENT_UNIT_MORE_THAN_50M2",
408
+ "DUPLEX",
409
+ "FULLY_DETACHED_HOUSE",
410
+ "KIT_HOME",
411
+ "LAND",
412
+ "MULTI_DWELLING_SINGLE_TITLE",
413
+ "PROPERTY_OVER_10_HA",
414
+ "SEMI_DETACHED_HOUSE",
415
+ "SERVICED_APARTMENT",
416
+ "STUDENT_ACCOMMODATION",
417
+ "STUDIO",
418
+ "TERRACE",
419
+ "TOWNHOUSE",
420
+ "VILLA",
421
+ "WAREHOUSE_APARTMENT"
422
+ ]
423
+ },
424
+ "contractDetails": {
425
+ "type": "object",
426
+ "description": "Details of the purchase/sale price as specified in the Contract of Sale",
427
+ "properties": {
428
+ "contractDate": {
429
+ "type": "string",
430
+ "description": "The date of the Contract of Sale."
431
+ },
432
+ "estimatedSettlementDate": {
433
+ "type": "string",
434
+ "description": "The purchase date of the property, or the proposed settlement date for a property being purchased or sold"
435
+ },
436
+ "contractPriceAmount": {
437
+ "type": "number",
438
+ "description": "Captures the total purchase/sale price as specified in the Contract of Sale."
439
+ }
440
+ }
441
+ },
442
+ "constructionDetails": {
443
+ "type": "object",
444
+ "properties": {
445
+ "constructionType": {
446
+ "type": "string",
447
+ "enum": ["STRUCTURAL_RENOVATIONS", "BUILD_A_PROPERTY", "KNOCKDOWN_REBUILD"]
448
+ },
449
+ "buildPriceAmount": {
450
+ "type": "number"
451
+ },
452
+ "buildIn6Months": {
453
+ "description": "Indicates whether it should be coded as vacant land loan or a construction loan",
454
+ "type": "boolean"
455
+ },
456
+ "landEstimatedValue": {
457
+ "type": "number"
458
+ },
459
+ "otherConstructionCosts": {
460
+ "type": "number"
461
+ },
462
+ "builderType": {
463
+ "type": "string",
464
+ "enum": ["LICENSED_BUILDER", "OWNER_BUILDER"]
465
+ },
466
+ "isFixedPriceContract": {
467
+ "type": "boolean"
468
+ }
469
+ }
470
+ },
471
+ "toBeSold": {
472
+ "type": "boolean"
473
+ },
474
+ "knockDownToRebuild": {
475
+ "description": "DEPRECATED",
476
+ "type": "boolean"
477
+ },
478
+ "financialInstitution": {
479
+ "type": "string"
480
+ },
481
+ "financialInstitutionShortName": {
482
+ "type": "string"
483
+ },
484
+ "FinancialInstitutionBsb": {
485
+ "type": "string",
486
+ "pattern": "^\\d{6}$",
487
+ "description": "The BSB number identifying where the account is held within the Financial Institution",
488
+ "example": "123456"
489
+ },
490
+ "FinancialInstitutionAccountNumber": {
491
+ "type": "string",
492
+ "pattern": "^\\d{0,10}$",
493
+ "description": "The unique number assigned to the Financial Institution account",
494
+ "example": "999994"
495
+ },
496
+ "isConstruction": {
497
+ "type": "boolean"
498
+ },
499
+ "dataType": {
500
+ "type": "string"
501
+ },
502
+ "relationId": {
503
+ "$ref": "#/definitions/id",
504
+ "description": "uuid of relation"
505
+ },
506
+ "assetType": {
507
+ "enum": [
508
+ "GIFTS",
509
+ "HOME_CONTENTS",
510
+ "MANAGED_FUNDS",
511
+ "OTHER_ASSET",
512
+ "PROPERTY",
513
+ "SAVING_CHECK_ACCOUNT",
514
+ "SHARES",
515
+ "SUPERANNUATION",
516
+ "TERM_DEPOSIT",
517
+ "VEHICLE"
518
+ ]
519
+ },
520
+ "applicationId": {
521
+ "type": "string"
522
+ },
523
+ "PropertyExpenses": {
524
+ "type": "array",
525
+ "items": {
526
+ "type": "object",
527
+ "additionalProperties": false,
528
+ "required": ["type"],
529
+ "properties": {
530
+ "type": {
531
+ "type": "string",
532
+ "enum": [
533
+ "BODY_CORPORATE_FEES_STRATA_FEES_AND_LAND_TAX",
534
+ "PRIMARY_RESIDENCE_RUNNING_COSTS",
535
+ "INVESTMENT_PROPERTY_RUNNING_COSTS",
536
+ "SECONDARY_RESIDENCE_RUNNING_COSTS"
537
+ ]
538
+ },
539
+ "amount": {
540
+ "type": "number",
541
+ "example": 100000
542
+ },
543
+ "frequency": {
544
+ "type": "string",
545
+ "enum": ["FORTNIGHTLY", "MONTHLY", "QUARTERLY", "WEEKLY", "YEARLY"]
546
+ },
547
+ "comments": {
548
+ "type": "string"
549
+ }
550
+ }
551
+ }
552
+ },
553
+ "asset": {
554
+ "type": "object",
555
+ "properties": {
556
+ "percentOwned": {
557
+ "$ref": "#/definitions/percentOwned"
558
+ },
559
+ "description": {
560
+ "type": "string"
561
+ },
562
+ "dataType": {
563
+ "$ref": "#/definitions/dataType"
564
+ },
565
+ "type": {
566
+ "$ref": "#/definitions/assetType"
567
+ },
568
+ "estimatedValue": {
569
+ "$ref": "#/definitions/estimatedValue"
570
+ },
571
+ "financialInstitution": {
572
+ "$ref": "#/definitions/financialInstitution"
573
+ },
574
+ "financialInstitutionShortName": {
575
+ "$ref": "#/definitions/financialInstitutionShortName"
576
+ },
577
+ "financialInstitutionBsb": {
578
+ "$ref": "#/definitions/FinancialInstitutionBsb"
579
+ },
580
+ "financialInstitutionAccountNumber": {
581
+ "$ref": "#/definitions/FinancialInstitutionAccountNumber"
582
+ },
583
+ "toBeSold": {
584
+ "$ref": "#/definitions/toBeSold"
585
+ },
586
+ "knockDownToRebuild": {
587
+ "$ref": "#/definitions/knockDownToRebuild"
588
+ },
589
+ "toBeUsedAsSecurity": {
590
+ "$ref": "#/definitions/toBeUsedAsSecurity"
591
+ },
592
+ "toBePurchased": {
593
+ "$ref": "#/definitions/toBePurchased"
594
+ },
595
+ "contractPriceAmount": {
596
+ "$ref": "#/definitions/contractPriceAmount"
597
+ },
598
+ "address": {
599
+ "$ref": "#/definitions/address"
600
+ },
601
+ "primaryPurpose": {
602
+ "$ref": "#/definitions/primaryPurpose"
603
+ },
604
+ "propertyStatus": {
605
+ "$ref": "#/definitions/propertyStatus"
606
+ },
607
+ "zoneType": {
608
+ "$ref": "#/definitions/zoneType"
609
+ },
610
+ "propertyType": {
611
+ "$ref": "#/definitions/propertyType"
612
+ },
613
+ "relationId": {
614
+ "$ref": "#/definitions/relationId"
615
+ },
616
+ "contractDetails": {
617
+ "$ref": "#/definitions/contractDetails"
618
+ },
619
+ "constructionDetails": {
620
+ "$ref": "#/definitions/constructionDetails"
621
+ },
622
+ "isConstruction": {
623
+ "$ref": "#/definitions/isConstruction"
624
+ },
625
+ "make": {
626
+ "$ref": "#/definitions/make"
627
+ },
628
+ "model": {
629
+ "$ref": "#/definitions/model"
630
+ },
631
+ "year": {
632
+ "$ref": "#/definitions/year"
633
+ },
634
+ "propertyExpenses": {
635
+ "$ref": "#/definitions/PropertyExpenses"
636
+ }
637
+ },
638
+ "additionalProperties": true,
639
+ "required": ["type"]
640
+ },
641
+ "createAssetDefinition": {
642
+ "type": "object",
643
+ "properties": {
644
+ "id": {
645
+ "$ref": "#/definitions/id",
646
+ "description": "uuid of asset"
647
+ },
648
+ "meta": {
649
+ "$ref": "#/definitions/meta"
650
+ },
651
+ "applicationId": {
652
+ "$ref": "#/definitions/applicationId"
653
+ },
654
+ "asset": {
655
+ "$ref": "#/definitions/asset"
656
+ }
657
+ },
658
+ "required": ["id", "applicationId", "asset"],
659
+ "description": "create Asset payload"
660
+ }
661
+ },
662
+ "type": "object",
663
+ "title": "The asset event schema",
664
+ "description": "Create or update",
665
+ "properties": {
666
+ "type": {
667
+ "type": "string",
668
+ "enum": ["AssetUpdated", "AssetCreated"],
669
+ "description": "schema version"
670
+ },
671
+ "version": {
672
+ "type": "string"
673
+ },
674
+ "payload": {
675
+ "$ref": "#/definitions/payload"
676
+ }
677
+ },
678
+ "required": ["version", "payload", "type"]
679
+ }