@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,652 @@
1
+ {
2
+ "definitions": {
3
+ "Payload": {
4
+ "$ref": "#/definitions/payload"
5
+ },
6
+ "id": {
7
+ "type": "string",
8
+ "format": "uuid"
9
+ },
10
+ "applicantKeyObject": {
11
+ "type": "object",
12
+ "properties": {
13
+ "applicantId": {
14
+ "$ref": "#/definitions/id"
15
+ }
16
+ }
17
+ },
18
+ "applicantMeta": {
19
+ "type": "object",
20
+ "additionalProperties": false,
21
+ "description": "The metadata of the applicant",
22
+ "properties": {
23
+ "actionedBy": {
24
+ "description": "uuid of user who made the action (create/update/delete)",
25
+ "type": "string"
26
+ },
27
+ "actionedByRole": {
28
+ "description": "role of the user that made the action",
29
+ "enum": ["team", "customer"]
30
+ }
31
+ },
32
+ "required": ["actionedBy", "actionedByRole"]
33
+ },
34
+ "dependant": {
35
+ "type": "object",
36
+ "properties": {
37
+ "id": {
38
+ "type": "string",
39
+ "format": "uuid",
40
+ "description": "Id for entity."
41
+ },
42
+ "age": {
43
+ "type": "number",
44
+ "minimum": 0
45
+ },
46
+ "isAddedOnThisApplicant": {
47
+ "type": "boolean",
48
+ "description": "Whether dependant was added for this applicant."
49
+ },
50
+ "sharedWith": {
51
+ "$ref": "#/definitions/applicantKeyObject"
52
+ }
53
+ }
54
+ },
55
+ "applicantType": {
56
+ "enum": ["BORROWER", "BORROWER_AND_GUARANTOR", "GUARANTOR"]
57
+ },
58
+ "creditStatus": {
59
+ "enum": ["FAIR", "UNKNOWN", "AVERAGE", "EXCELLENT"],
60
+ "description": "current credit status of the applicant (Customer declared value)"
61
+ },
62
+ "employmentType": {
63
+ "enum": ["EMPLOYEE", "SELF_EMPLOYED", "UNKNOWN"],
64
+ "description": "applicant's employment type"
65
+ },
66
+ "isPrimaryApplicant": {
67
+ "type": "boolean"
68
+ },
69
+ "hasSelfEmploymentProof": {
70
+ "type": "boolean"
71
+ },
72
+ "totalIncomeEstimate": {
73
+ "type": "number",
74
+ "minimum": 0,
75
+ "description": "The applicants estimated total income per financial year. Whole Australian dollars"
76
+ },
77
+ "dateOfBirth": {
78
+ "type": "string",
79
+ "description": "applicant's DOB, in ISO-8601 date format"
80
+ },
81
+ "gender": {
82
+ "enum": ["FEMALE", "MALE", "UNDISCLOSED", "UNKNOWN"]
83
+ },
84
+ "maritalStatus": {
85
+ "enum": ["DE_FACTO", "DIVORCED", "MARRIED", "SINGLE", "UNKNOWN"]
86
+ },
87
+ "residencyStatus": {
88
+ "enum": ["AUSTRALIAN_CITIZEN", "PERMANENT_RESIDENT", "TEMPORARY_RESIDENT", "UNKNOWN"]
89
+ },
90
+ "dependants": {
91
+ "type": "array",
92
+ "items": {
93
+ "$ref": "#/definitions/dependant"
94
+ }
95
+ },
96
+ "firstName": {
97
+ "type": "string",
98
+ "description": "customer's first name"
99
+ },
100
+ "middleName": {
101
+ "type": "string",
102
+ "description": "customer's middle name"
103
+ },
104
+ "lastName": {
105
+ "type": "string",
106
+ "description": "customer's last name"
107
+ },
108
+ "title": {
109
+ "enum": ["DR", "MISS", "MR", "MRS", "MS", "UNKNOWN"]
110
+ },
111
+ "countries": {
112
+ "type": "string",
113
+ "example": "Australia",
114
+ "enum": [
115
+ "Afghanistan",
116
+ "Albania",
117
+ "Algeria",
118
+ "American Samoa",
119
+ "Andorra",
120
+ "Angola",
121
+ "Anguilla",
122
+ "Antarctica",
123
+ "Antigua And Barbuda",
124
+ "Argentina",
125
+ "Armenia",
126
+ "Aruba",
127
+ "Australia",
128
+ "Austria",
129
+ "Azerbaijan",
130
+ "Bahamas",
131
+ "Bahrain",
132
+ "Bangladesh",
133
+ "Barbados",
134
+ "Belarus",
135
+ "Belgium",
136
+ "Belize",
137
+ "Benin",
138
+ "Bermuda",
139
+ "Bhutan",
140
+ "Bolivia",
141
+ "Bosnia And Herzegovina",
142
+ "Botswana",
143
+ "Bouvet Island",
144
+ "Brazil",
145
+ "British Indian Ocean Territory",
146
+ "Brunei Darussalam",
147
+ "Bulgaria",
148
+ "Burkina Faso",
149
+ "Burundi",
150
+ "Cambodia",
151
+ "Cameroon",
152
+ "Canada",
153
+ "Cape Verde",
154
+ "Cayman Islands",
155
+ "Central African Republic",
156
+ "Chad",
157
+ "Chile",
158
+ "China",
159
+ "Christmas Island",
160
+ "Cocos (Keeling) Islands",
161
+ "Colombia",
162
+ "Comoros",
163
+ "Democratic People's Republic of Korea",
164
+ "Democratic Republic Of The Congo",
165
+ "Cook Islands",
166
+ "Costa Rica",
167
+ "Cote D'ivoire",
168
+ "Croatia",
169
+ "Cuba",
170
+ "Cyprus",
171
+ "Czech Republic",
172
+ "Denmark",
173
+ "Djibouti",
174
+ "Dominica",
175
+ "Dominican Republic",
176
+ "East Timor",
177
+ "Ecuador",
178
+ "Egypt",
179
+ "El Salvador",
180
+ "Equatorial Guinea",
181
+ "Eritrea",
182
+ "Estonia",
183
+ "Ethiopia",
184
+ "Falkland Islands",
185
+ "Faroe Islands",
186
+ "Fiji",
187
+ "Finland",
188
+ "France",
189
+ "French Guiana",
190
+ "French Polynesia",
191
+ "French Southern Territories",
192
+ "Gabon",
193
+ "Gambia",
194
+ "Georgia",
195
+ "Germany",
196
+ "Ghana",
197
+ "Gibraltar",
198
+ "Greece",
199
+ "Greenland",
200
+ "Grenada",
201
+ "Guadeloupe",
202
+ "Guam",
203
+ "Guatemala",
204
+ "Guinea",
205
+ "Guinea-bissau",
206
+ "Guyana",
207
+ "Haiti",
208
+ "Heard Island And Mcdonald Islands",
209
+ "Holy See (Vatican City State)",
210
+ "Honduras",
211
+ "Hong Kong",
212
+ "Hungary",
213
+ "Iceland",
214
+ "India",
215
+ "Indonesia",
216
+ "Iran",
217
+ "Iraq",
218
+ "Ireland",
219
+ "Israel",
220
+ "Italy",
221
+ "Jamaica",
222
+ "Japan",
223
+ "Jordan",
224
+ "Kazakstan",
225
+ "Kenya",
226
+ "Kiribati",
227
+ "Kosovo",
228
+ "Kuwait",
229
+ "Kyrgyzstan",
230
+ "Laos",
231
+ "Latvia",
232
+ "Lebanon",
233
+ "Lesotho",
234
+ "Liberia",
235
+ "Libyan Arab Jamahiriya",
236
+ "Liechtenstein",
237
+ "Lithuania",
238
+ "Luxembourg",
239
+ "Macau",
240
+ "Macedonia",
241
+ "Madagascar",
242
+ "Malawi",
243
+ "Malaysia",
244
+ "Maldives",
245
+ "Mali",
246
+ "Malta",
247
+ "Marshall Islands",
248
+ "Martinique",
249
+ "Mauritania",
250
+ "Mauritius",
251
+ "Mayotte",
252
+ "Mexico",
253
+ "Federated States Of Micronesia",
254
+ "Republic Of Moldova",
255
+ "Monaco",
256
+ "Mongolia",
257
+ "Montserrat",
258
+ "Montenegro",
259
+ "Morocco",
260
+ "Mozambique",
261
+ "Myanmar",
262
+ "Namibia",
263
+ "Nauru",
264
+ "Nepal",
265
+ "Netherlands",
266
+ "Netherlands Antilles",
267
+ "New Caledonia",
268
+ "New Zealand",
269
+ "Nicaragua",
270
+ "Niger",
271
+ "Nigeria",
272
+ "Niue",
273
+ "Norfolk Island",
274
+ "Northern Mariana Islands",
275
+ "Norway",
276
+ "Oman",
277
+ "Pakistan",
278
+ "Palau",
279
+ "Palestinian Territory",
280
+ "Panama",
281
+ "Papua New Guinea",
282
+ "Paraguay",
283
+ "Peru",
284
+ "Philippines",
285
+ "Pitcairn",
286
+ "Poland",
287
+ "Portugal",
288
+ "Puerto Rico",
289
+ "Qatar",
290
+ "Romania",
291
+ "Russian Federation",
292
+ "Rwanda",
293
+ "Saint Helena",
294
+ "Saint Kitts And Nevis",
295
+ "Saint Lucia",
296
+ "Saint Pierre And Miquelon",
297
+ "Saint Vincent And The Grenadines",
298
+ "Samoa",
299
+ "San Marino",
300
+ "Sao Tome And Principe",
301
+ "Saudi Arabia",
302
+ "Senegal",
303
+ "Serbia",
304
+ "Seychelles",
305
+ "Sierra Leone",
306
+ "Singapore",
307
+ "Slovakia",
308
+ "Slovenia",
309
+ "Solomon Islands",
310
+ "Somalia",
311
+ "South Africa",
312
+ "South Georgia And The South Sandwich Islands",
313
+ "The Republic of South Korea",
314
+ "Spain",
315
+ "Sri Lanka",
316
+ "Sudan",
317
+ "Suriname",
318
+ "Svalbard And Jan Mayen",
319
+ "Swaziland",
320
+ "Sweden",
321
+ "Switzerland",
322
+ "Syrian Arab Republic",
323
+ "Taiwan",
324
+ "Tajikistan",
325
+ "Tanzania",
326
+ "Thailand",
327
+ "Togo",
328
+ "Tokelau",
329
+ "Tonga",
330
+ "Trinidad And Tobago",
331
+ "Tunisia",
332
+ "Turkey",
333
+ "Turkmenistan",
334
+ "Turks And Caicos Islands",
335
+ "Tuvalu",
336
+ "Uganda",
337
+ "Ukraine",
338
+ "United Arab Emirates",
339
+ "United Kingdom",
340
+ "United States of America",
341
+ "United States Minor Outlying Islands",
342
+ "Uruguay",
343
+ "Uzbekistan",
344
+ "Vanuatu",
345
+ "Venezuela",
346
+ "Vietnam",
347
+ "British Virgin Islands",
348
+ "US Virgin Islands",
349
+ "Wallis And Futuna",
350
+ "Western Sahara",
351
+ "Yemen",
352
+ "Zambia",
353
+ "Zimbabwe"
354
+ ]
355
+ },
356
+ "housingStatusList": {
357
+ "type": "string",
358
+ "additionalProperties": false,
359
+ "enum": [
360
+ "Renting",
361
+ "Boarding",
362
+ "Caravan",
363
+ "Other",
364
+ "Own Home",
365
+ "Own Home Mortgage",
366
+ "Supplied by Employer",
367
+ "With Parents"
368
+ ]
369
+ },
370
+ "otherState": {
371
+ "type": "string",
372
+ "example": "Ohio"
373
+ },
374
+ "AustralianStates": {
375
+ "example": "NSW",
376
+ "type": "string",
377
+ "enum": ["QLD", "NSW", "VIC", "WA", "SA", "TAS", "ACT", "NT"]
378
+ },
379
+ "date": {
380
+ "type": "string",
381
+ "format": "date",
382
+ "example": "2018-07-17"
383
+ },
384
+ "AddressStandard": {
385
+ "type": "object",
386
+ "additionalProperties": false,
387
+ "properties": {
388
+ "buildingName": {
389
+ "description": "The building name",
390
+ "type": "string"
391
+ },
392
+ "deliveryAddress": {
393
+ "description": "Postal address, usually a PO Box or Locked Bag",
394
+ "type": "string",
395
+ "example": "PO Box 1"
396
+ },
397
+ "lotSection": {
398
+ "description": "The lot number",
399
+ "type": "string"
400
+ },
401
+ "streetName": {
402
+ "type": "string"
403
+ },
404
+ "streetNumber": {
405
+ "type": "string"
406
+ },
407
+ "streetSuffix": {
408
+ "description": "The street suffix",
409
+ "type": "string",
410
+ "example": "North"
411
+ },
412
+ "streetType": {
413
+ "type": "string"
414
+ },
415
+ "level": {
416
+ "type": "string"
417
+ },
418
+ "unit": {
419
+ "type": "string"
420
+ }
421
+ }
422
+ },
423
+ "address": {
424
+ "type": "object",
425
+ "additionalProperties": false,
426
+ "properties": {
427
+ "postcode": {
428
+ "type": "string"
429
+ },
430
+ "state": {
431
+ "example": "NSW",
432
+ "type": "string",
433
+ "anyOf": [
434
+ {
435
+ "$ref": "#/definitions/AustralianStates"
436
+ },
437
+ {
438
+ "$ref": "#/definitions/otherState"
439
+ }
440
+ ]
441
+ },
442
+ "city": {
443
+ "type": "string"
444
+ },
445
+ "country": {
446
+ "$ref": "#/definitions/countries"
447
+ },
448
+ "formatted": {
449
+ "type": "string"
450
+ },
451
+ "standard": {
452
+ "$ref": "#/definitions/AddressStandard"
453
+ }
454
+ }
455
+ },
456
+ "commonAddressProperties": {
457
+ "type": "object",
458
+ "properties": {
459
+ "externalId": {
460
+ "$ref": "#/definitions/id"
461
+ },
462
+ "housingStatus": {
463
+ "$ref": "#/definitions/housingStatusList"
464
+ },
465
+ "startDate": {
466
+ "$ref": "#/definitions/date"
467
+ },
468
+ "residentialAddress": {
469
+ "$ref": "#/definitions/address"
470
+ }
471
+ }
472
+ },
473
+ "currentAddress": {
474
+ "$ref": "#/definitions/commonAddressProperties"
475
+ },
476
+ "previousAddresses": {
477
+ "type": "array",
478
+ "minItems": 0,
479
+ "items": {
480
+ "type": "object",
481
+ "allOf": [
482
+ {
483
+ "$ref": "#/definitions/commonAddressProperties"
484
+ },
485
+ {
486
+ "type": "object",
487
+ "properties": {
488
+ "endDate": {
489
+ "$ref": "#/definitions/date"
490
+ }
491
+ }
492
+ }
493
+ ]
494
+ }
495
+ },
496
+ "contact": {
497
+ "type": "object",
498
+ "additionalProperties": false,
499
+ "properties": {
500
+ "currentAddress": {
501
+ "$ref": "#/definitions/currentAddress"
502
+ },
503
+ "mailingAddress": {
504
+ "description": "applicant's mailing address being captured as part of funnels 5 (post product select)",
505
+ "$ref": "#/definitions/address"
506
+ },
507
+ "mobileNumber": {
508
+ "type": "string",
509
+ "description": "applicant's mobile number formatted in +611234567890"
510
+ },
511
+ "postSettlementAddress": {
512
+ "$ref": "#/definitions/address",
513
+ "description": "applicant's post settlement address being captured as part of funnels 5 (post product select)"
514
+ },
515
+ "previousAddresses": {
516
+ "$ref": "#/definitions/previousAddresses"
517
+ },
518
+ "emailAddress": {
519
+ "type": "string",
520
+ "description": "The applicant email"
521
+ }
522
+ }
523
+ },
524
+ "invitationStatus": {
525
+ "enum": ["ACCEPTED", "PENDING", "CANCELLED", "EXPIRED"],
526
+ "description": "different invitation statuses an applicant can have"
527
+ },
528
+ "entity": {
529
+ "enum": ["PERSON", "COMPANY"],
530
+ "description": "applicant's entity. For a person applicant this is 'PERSON'"
531
+ },
532
+ "isFirstHomeBuyer": {
533
+ "type": "boolean",
534
+ "description": "Whether it's the applicants first home purchase."
535
+ },
536
+ "payload": {
537
+ "type": "object",
538
+ "additionalProperties": false,
539
+ "properties": {
540
+ "id": {
541
+ "$ref": "#/definitions/id",
542
+ "description": "uuid of applicant"
543
+ },
544
+ "applicationId": {
545
+ "$ref": "#/definitions/id",
546
+ "description": "uuid of application"
547
+ },
548
+ "customerId": {
549
+ "$ref": "#/definitions/id",
550
+ "description": "uuid of customer"
551
+ },
552
+ "clonedFromApplicantId": {
553
+ "$ref": "#/definitions/id",
554
+ "description": "uuid of source applicant"
555
+ },
556
+ "meta": {
557
+ "$ref": "#/definitions/applicantMeta"
558
+ },
559
+ "applicantType": {
560
+ "$ref": "#/definitions/applicantType"
561
+ },
562
+ "creditStatus": {
563
+ "$ref": "#/definitions/creditStatus"
564
+ },
565
+ "entity": {
566
+ "$ref": "#/definitions/entity"
567
+ },
568
+ "employmentType": {
569
+ "$ref": "#/definitions/employmentType"
570
+ },
571
+ "isPrimaryApplicant": {
572
+ "$ref": "#/definitions/isPrimaryApplicant"
573
+ },
574
+ "hasSelfEmploymentProof": {
575
+ "$ref": "#/definitions/hasSelfEmploymentProof"
576
+ },
577
+ "totalIncomeEstimate": {
578
+ "$ref": "#/definitions/totalIncomeEstimate"
579
+ },
580
+ "dateOfBirth": {
581
+ "$ref": "#/definitions/dateOfBirth"
582
+ },
583
+ "gender": {
584
+ "$ref": "#/definitions/gender"
585
+ },
586
+ "maritalStatus": {
587
+ "$ref": "#/definitions/maritalStatus"
588
+ },
589
+ "maritalDetails": {
590
+ "$ref": "#/definitions/applicantKeyObject"
591
+ },
592
+ "residencyStatus": {
593
+ "$ref": "#/definitions/residencyStatus"
594
+ },
595
+ "dependants": {
596
+ "$ref": "#/definitions/dependants"
597
+ },
598
+ "firstName": {
599
+ "$ref": "#/definitions/firstName"
600
+ },
601
+ "middleName": {
602
+ "$ref": "#/definitions/middleName"
603
+ },
604
+ "lastName": {
605
+ "$ref": "#/definitions/lastName"
606
+ },
607
+ "title": {
608
+ "$ref": "#/definitions/title"
609
+ },
610
+ "contact": {
611
+ "$ref": "#/definitions/contact"
612
+ },
613
+ "invitationStatus": {
614
+ "$ref": "#/definitions/invitationStatus"
615
+ },
616
+ "countryOfBirth": {
617
+ "$ref": "#/definitions/countries"
618
+ },
619
+ "citizenship": {
620
+ "$ref": "#/definitions/countries"
621
+ },
622
+ "mothersMaidenName": {
623
+ "type": "string",
624
+ "description": "Mothers Maiden Name"
625
+ },
626
+ "isFirstHomeBuyer": {
627
+ "$ref": "#/definitions/isFirstHomeBuyer"
628
+ }
629
+ },
630
+ "required": ["id", "applicationId", "customerId"],
631
+ "description": "create/update applicant payload"
632
+ }
633
+ },
634
+ "type": "object",
635
+ "title": "The applicant event schema",
636
+ "description": "Create, update or delete. UpdatePrimaryApplicant is DEPRECATED",
637
+ "additionalProperties": false,
638
+ "properties": {
639
+ "version": {
640
+ "type": "string",
641
+ "description": "schema version"
642
+ },
643
+ "type": {
644
+ "type": "string",
645
+ "enum": ["UpdateApplicant", "CreateApplicant"]
646
+ },
647
+ "payload": {
648
+ "$ref": "#/definitions/Payload"
649
+ }
650
+ },
651
+ "required": ["version", "payload", "type"]
652
+ }