@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,910 @@
1
+ {
2
+ "definitions": {
3
+ "Payload": {
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "properties": {
7
+ "id": {
8
+ "$ref": "#/definitions/id",
9
+ "description": "uuid of applicant"
10
+ },
11
+ "applicationId": {
12
+ "$ref": "#/definitions/id",
13
+ "description": "uuid of application"
14
+ },
15
+ "cityOfBirth": {
16
+ "$ref": "#/definitions/cityOfBirth"
17
+ },
18
+ "citizenship": {
19
+ "$ref": "#/definitions/countries"
20
+ },
21
+ "countryOfBirth": {
22
+ "$ref": "#/definitions/countries"
23
+ },
24
+ "clonedFromApplicantId": {
25
+ "$ref": "#/definitions/id",
26
+ "description": "uuid of source applicant"
27
+ },
28
+ "customerId": {
29
+ "$ref": "#/definitions/id",
30
+ "description": "uuid of customer"
31
+ },
32
+ "meta": {
33
+ "$ref": "#/definitions/applicantMeta"
34
+ },
35
+ "applicantType": {
36
+ "$ref": "#/definitions/applicantType"
37
+ },
38
+ "creditStatus": {
39
+ "$ref": "#/definitions/creditStatus"
40
+ },
41
+ "entity": {
42
+ "$ref": "#/definitions/entity"
43
+ },
44
+ "employmentType": {
45
+ "$ref": "#/definitions/employmentType"
46
+ },
47
+ "guarantorRelationshipToBorrower": {
48
+ "$ref": "#/definitions/guarantorRelationshipToBorrowerDefinition"
49
+ },
50
+ "isFirstHomeBuyer": {
51
+ "$ref": "#/definitions/isFirstHomeBuyer"
52
+ },
53
+ "isPrimaryApplicant": {
54
+ "$ref": "#/definitions/isPrimaryApplicant"
55
+ },
56
+ "hasSelfEmploymentProof": {
57
+ "$ref": "#/definitions/hasSelfEmploymentProof"
58
+ },
59
+ "totalIncomeEstimate": {
60
+ "$ref": "#/definitions/totalIncomeEstimate"
61
+ },
62
+ "dateOfBirth": {
63
+ "$ref": "#/definitions/dateOfBirth"
64
+ },
65
+ "gender": {
66
+ "$ref": "#/definitions/gender"
67
+ },
68
+ "maritalStatus": {
69
+ "$ref": "#/definitions/maritalStatus"
70
+ },
71
+ "maritalDetails": {
72
+ "$ref": "#/definitions/applicantKeyObject"
73
+ },
74
+ "residencyStatus": {
75
+ "$ref": "#/definitions/residencyStatus"
76
+ },
77
+ "dependants": {
78
+ "$ref": "#/definitions/dependants"
79
+ },
80
+ "firstName": {
81
+ "$ref": "#/definitions/firstName"
82
+ },
83
+ "middleName": {
84
+ "$ref": "#/definitions/middleName"
85
+ },
86
+ "lastName": {
87
+ "$ref": "#/definitions/lastName"
88
+ },
89
+ "mothersMaidenName": {
90
+ "type": "string",
91
+ "description": "Mothers Maiden Name"
92
+ },
93
+ "title": {
94
+ "$ref": "#/definitions/title"
95
+ },
96
+ "contact": {
97
+ "$ref": "#/definitions/contact"
98
+ },
99
+ "invitationStatus": {
100
+ "$ref": "#/definitions/invitationStatus"
101
+ },
102
+ "trustName": {
103
+ "$ref": "#/definitions/name"
104
+ },
105
+ "trustType": {
106
+ "$ref": "#/definitions/trustType"
107
+ },
108
+ "registeredDate": {
109
+ "$ref": "#/definitions/date"
110
+ },
111
+ "registeredCountry": {
112
+ "$ref": "#/definitions/countries"
113
+ },
114
+ "registeredAddress": {
115
+ "$ref": "#/definitions/address"
116
+ },
117
+ "mailingAddress": {
118
+ "$ref": "#/definitions/address"
119
+ },
120
+ "industryCode": {
121
+ "$ref": "#/definitions/industryCode"
122
+ },
123
+ "isPassiveEntity": {
124
+ "$ref": "#/definitions/isPassiveEntity"
125
+ },
126
+ "companyName": {
127
+ "$ref": "#/definitions/name"
128
+ },
129
+ "companyType": {
130
+ "$ref": "#/definitions/companyType"
131
+ },
132
+ "companyStructure": {
133
+ "$ref": "#/definitions/companyStructure"
134
+ },
135
+ "isDiversified": {
136
+ "type": "boolean"
137
+ },
138
+ "legalEntitiesInGroup": {
139
+ "$ref": "#/definitions/legalEntities"
140
+ },
141
+ "isCommercialRelationship": {
142
+ "type": "boolean"
143
+ },
144
+ "abn": {
145
+ "$ref": "#/definitions/abn"
146
+ },
147
+ "acn": {
148
+ "$ref": "#/definitions/acn"
149
+ },
150
+ "registeredState": {
151
+ "$ref": "#/definitions/australianStates"
152
+ },
153
+ "yearsOfTrading": {
154
+ "$ref": "#/definitions/yearsOfTrading"
155
+ },
156
+ "currentLender": {
157
+ "$ref": "#/definitions/name"
158
+ },
159
+ "legalEntitiesWithCurrentLender": {
160
+ "$ref": "#/definitions/legalEntities"
161
+ },
162
+ "monthsWithCurrentLender": {
163
+ "$ref": "#/definitions/numOfMonths"
164
+ },
165
+ "branch": {
166
+ "$ref": "#/definitions/name"
167
+ },
168
+ "hasMoreThan25PercentBusinessWithOneCustomer": {
169
+ "type": "boolean",
170
+ "description": "Company doing more than 25% of business with one customer or supplier"
171
+ },
172
+ "moreThan25PercentBusinessWithOneCustomerDetails": {
173
+ "$ref": "#/definitions/description"
174
+ },
175
+ "hasOutstandingTax": {
176
+ "type": "boolean"
177
+ },
178
+ "outstandingTaxDetails": {
179
+ "$ref": "#/definitions/description"
180
+ },
181
+ "isPrincipalPlaceOfBusinessLeased": {
182
+ "type": "boolean",
183
+ "description": "Is the principal place of business leased"
184
+ },
185
+ "principalPlaceOfBusinessLeasedDetails": {
186
+ "$ref": "#/definitions/description"
187
+ },
188
+ "doesTermLoanNeed100PercentFunding": {
189
+ "type": "boolean",
190
+ "description": "100% funding required for Term Loans"
191
+ },
192
+ "termLoanNeed100PercentFundingDetails": {
193
+ "$ref": "#/definitions/description"
194
+ },
195
+ "isActingAsFranchise": {
196
+ "$ref": "#/definitions/yesNoIntend"
197
+ },
198
+ "actingAsFranchiseDetails": {
199
+ "$ref": "#/definitions/description"
200
+ },
201
+ "isWorkingInImportExport": {
202
+ "$ref": "#/definitions/yesNoIntend"
203
+ },
204
+ "workingInImportExportDetails": {
205
+ "$ref": "#/definitions/description"
206
+ },
207
+ "isInvestingInProperty": {
208
+ "$ref": "#/definitions/yesNoIntend"
209
+ },
210
+ "investingInPropertyDetails": {
211
+ "$ref": "#/definitions/description"
212
+ },
213
+ "hasGoodConduct": {
214
+ "type": "boolean",
215
+ "description": "The applicant has not been over the credit limit, in arrears or in hardship in relation to any existing credit or other fixed expenses"
216
+ },
217
+ "wasBankruptOrInsolvent": {
218
+ "type": "boolean",
219
+ "description": "Have you been: bankrupt or insolvent, petitioned or aware of anyone petitioning you for bankruptcy, advised to seek bankruptcy, or associated with a company that was or threatened to be placed into administration?"
220
+ },
221
+ "hasPastOrCurrentDebts": {
222
+ "type": "boolean",
223
+ "description": "Have you or a company with which you are associated had any past or current debts that were or are in default of the payment arrangement?"
224
+ },
225
+ "hadRepaymentDifficultyOrLegalProceedings": {
226
+ "type": "boolean",
227
+ "description": "Have you had any difficulty in meeting your existing loan repayments, or had any financial judgments or legal proceedings, in the past two years?"
228
+ },
229
+ "isUSCitizenOrResident": {
230
+ "type": "boolean",
231
+ "description": "Is the applicant a US citizen or resident for US tax purposes?"
232
+ },
233
+ "hadLatePaymentsOrArrearsOrAdverseCreditHistory": {
234
+ "type": "boolean",
235
+ "description": "Has the applicant had any late payments, loan arrears or adverse credit history such as current or prior defaults or bankruptcies?"
236
+ }
237
+ },
238
+ "required": ["id", "applicationId", "meta", "entity", "applicantType"],
239
+ "description": "create applicant payload"
240
+ },
241
+ "id": {
242
+ "type": "string",
243
+ "format": "uuid"
244
+ },
245
+ "applicantKeyObject": {
246
+ "type": "object",
247
+ "properties": {
248
+ "applicantId": {
249
+ "$ref": "#/definitions/id"
250
+ }
251
+ }
252
+ },
253
+ "applicantMeta": {
254
+ "type": "object",
255
+ "additionalProperties": false,
256
+ "description": "The metadata of the applicant",
257
+ "properties": {
258
+ "actionedBy": {
259
+ "description": "uuid of user who made the action (create/update)",
260
+ "type": "string"
261
+ },
262
+ "actionedByRole": {
263
+ "description": "role of the user that made the action",
264
+ "enum": ["team", "customer"]
265
+ }
266
+ },
267
+ "required": ["actionedBy", "actionedByRole"]
268
+ },
269
+ "dependant": {
270
+ "type": "object",
271
+ "properties": {
272
+ "id": {
273
+ "type": "string",
274
+ "format": "uuid",
275
+ "description": "Id for entity."
276
+ },
277
+ "age": {
278
+ "type": "number",
279
+ "minimum": 0
280
+ },
281
+ "isAddedOnThisApplicant": {
282
+ "type": "boolean",
283
+ "description": "Whether dependant was added for this applicant."
284
+ },
285
+ "sharedWith": {
286
+ "$ref": "#/definitions/applicantKeyObject"
287
+ }
288
+ }
289
+ },
290
+ "applicantType": {
291
+ "enum": ["BORROWER", "BORROWER_AND_GUARANTOR", "GUARANTOR"]
292
+ },
293
+ "creditStatus": {
294
+ "enum": ["FAIR", "UNKNOWN", "AVERAGE", "EXCELLENT"],
295
+ "description": "current credit status of the applicant (Customer declared value)"
296
+ },
297
+ "employmentType": {
298
+ "enum": ["EMPLOYEE", "SELF_EMPLOYED", "UNKNOWN"],
299
+ "description": "applicant's employment type"
300
+ },
301
+ "isPrimaryApplicant": {
302
+ "type": "boolean"
303
+ },
304
+ "hasSelfEmploymentProof": {
305
+ "type": "boolean"
306
+ },
307
+ "totalIncomeEstimate": {
308
+ "type": "number",
309
+ "minimum": 0,
310
+ "description": "The applicants estimated total income per financial year. Whole Australian dollars"
311
+ },
312
+ "dateOfBirth": {
313
+ "type": "string",
314
+ "description": "applicant's DOB, in ISO-8601 date format"
315
+ },
316
+ "gender": {
317
+ "enum": ["FEMALE", "MALE", "UNDISCLOSED", "UNKNOWN"]
318
+ },
319
+ "maritalStatus": {
320
+ "enum": ["DE_FACTO", "DIVORCED", "MARRIED", "SINGLE", "UNKNOWN"]
321
+ },
322
+ "residencyStatus": {
323
+ "enum": ["AUSTRALIAN_CITIZEN", "PERMANENT_RESIDENT", "TEMPORARY_RESIDENT", "UNKNOWN"]
324
+ },
325
+ "dependants": {
326
+ "type": "array",
327
+ "items": {
328
+ "$ref": "#/definitions/dependant"
329
+ }
330
+ },
331
+ "name": {
332
+ "type": "string",
333
+ "minLength": 1,
334
+ "maxLength": 256
335
+ },
336
+ "firstName": {
337
+ "type": "string",
338
+ "description": "customer's first name"
339
+ },
340
+ "middleName": {
341
+ "type": "string",
342
+ "description": "customer's middle name"
343
+ },
344
+ "lastName": {
345
+ "type": "string",
346
+ "description": "customer's last name"
347
+ },
348
+ "title": {
349
+ "enum": ["DR", "MISS", "MR", "MRS", "MS", "UNKNOWN"]
350
+ },
351
+ "countries": {
352
+ "type": "string",
353
+ "example": "Australia",
354
+ "enum": [
355
+ "Afghanistan",
356
+ "Albania",
357
+ "Algeria",
358
+ "American Samoa",
359
+ "Andorra",
360
+ "Angola",
361
+ "Anguilla",
362
+ "Antarctica",
363
+ "Antigua And Barbuda",
364
+ "Argentina",
365
+ "Armenia",
366
+ "Aruba",
367
+ "Australia",
368
+ "Austria",
369
+ "Azerbaijan",
370
+ "Bahamas",
371
+ "Bahrain",
372
+ "Bangladesh",
373
+ "Barbados",
374
+ "Belarus",
375
+ "Belgium",
376
+ "Belize",
377
+ "Benin",
378
+ "Bermuda",
379
+ "Bhutan",
380
+ "Bolivia",
381
+ "Bosnia And Herzegovina",
382
+ "Botswana",
383
+ "Bouvet Island",
384
+ "Brazil",
385
+ "British Indian Ocean Territory",
386
+ "Brunei Darussalam",
387
+ "Bulgaria",
388
+ "Burkina Faso",
389
+ "Burundi",
390
+ "Cambodia",
391
+ "Cameroon",
392
+ "Canada",
393
+ "Cape Verde",
394
+ "Cayman Islands",
395
+ "Central African Republic",
396
+ "Chad",
397
+ "Chile",
398
+ "China",
399
+ "Christmas Island",
400
+ "Cocos (Keeling) Islands",
401
+ "Colombia",
402
+ "Comoros",
403
+ "Democratic People's Republic of Korea",
404
+ "Democratic Republic Of The Congo",
405
+ "Cook Islands",
406
+ "Costa Rica",
407
+ "Cote D'ivoire",
408
+ "Croatia",
409
+ "Cuba",
410
+ "Cyprus",
411
+ "Czech Republic",
412
+ "Denmark",
413
+ "Djibouti",
414
+ "Dominica",
415
+ "Dominican Republic",
416
+ "East Timor",
417
+ "Ecuador",
418
+ "Egypt",
419
+ "El Salvador",
420
+ "Equatorial Guinea",
421
+ "Eritrea",
422
+ "Estonia",
423
+ "Ethiopia",
424
+ "Falkland Islands",
425
+ "Faroe Islands",
426
+ "Fiji",
427
+ "Finland",
428
+ "France",
429
+ "French Guiana",
430
+ "French Polynesia",
431
+ "French Southern Territories",
432
+ "Gabon",
433
+ "Gambia",
434
+ "Georgia",
435
+ "Germany",
436
+ "Ghana",
437
+ "Gibraltar",
438
+ "Greece",
439
+ "Greenland",
440
+ "Grenada",
441
+ "Guadeloupe",
442
+ "Guam",
443
+ "Guatemala",
444
+ "Guinea",
445
+ "Guinea-bissau",
446
+ "Guyana",
447
+ "Haiti",
448
+ "Heard Island And Mcdonald Islands",
449
+ "Holy See (Vatican City State)",
450
+ "Honduras",
451
+ "Hong Kong",
452
+ "Hungary",
453
+ "Iceland",
454
+ "India",
455
+ "Indonesia",
456
+ "Iran",
457
+ "Iraq",
458
+ "Ireland",
459
+ "Israel",
460
+ "Italy",
461
+ "Jamaica",
462
+ "Japan",
463
+ "Jordan",
464
+ "Kazakstan",
465
+ "Kenya",
466
+ "Kiribati",
467
+ "Kosovo",
468
+ "Kuwait",
469
+ "Kyrgyzstan",
470
+ "Laos",
471
+ "Latvia",
472
+ "Lebanon",
473
+ "Lesotho",
474
+ "Liberia",
475
+ "Libyan Arab Jamahiriya",
476
+ "Liechtenstein",
477
+ "Lithuania",
478
+ "Luxembourg",
479
+ "Macau",
480
+ "Macedonia",
481
+ "Madagascar",
482
+ "Malawi",
483
+ "Malaysia",
484
+ "Maldives",
485
+ "Mali",
486
+ "Malta",
487
+ "Marshall Islands",
488
+ "Martinique",
489
+ "Mauritania",
490
+ "Mauritius",
491
+ "Mayotte",
492
+ "Mexico",
493
+ "Federated States Of Micronesia",
494
+ "Republic Of Moldova",
495
+ "Monaco",
496
+ "Mongolia",
497
+ "Montserrat",
498
+ "Montenegro",
499
+ "Morocco",
500
+ "Mozambique",
501
+ "Myanmar",
502
+ "Namibia",
503
+ "Nauru",
504
+ "Nepal",
505
+ "Netherlands",
506
+ "Netherlands Antilles",
507
+ "New Caledonia",
508
+ "New Zealand",
509
+ "Nicaragua",
510
+ "Niger",
511
+ "Nigeria",
512
+ "Niue",
513
+ "Norfolk Island",
514
+ "Northern Mariana Islands",
515
+ "Norway",
516
+ "Oman",
517
+ "Pakistan",
518
+ "Palau",
519
+ "Palestinian Territory",
520
+ "Panama",
521
+ "Papua New Guinea",
522
+ "Paraguay",
523
+ "Peru",
524
+ "Philippines",
525
+ "Pitcairn",
526
+ "Poland",
527
+ "Portugal",
528
+ "Puerto Rico",
529
+ "Qatar",
530
+ "Romania",
531
+ "Russian Federation",
532
+ "Rwanda",
533
+ "Saint Helena",
534
+ "Saint Kitts And Nevis",
535
+ "Saint Lucia",
536
+ "Saint Pierre And Miquelon",
537
+ "Saint Vincent And The Grenadines",
538
+ "Samoa",
539
+ "San Marino",
540
+ "Sao Tome And Principe",
541
+ "Saudi Arabia",
542
+ "Senegal",
543
+ "Serbia",
544
+ "Seychelles",
545
+ "Sierra Leone",
546
+ "Singapore",
547
+ "Slovakia",
548
+ "Slovenia",
549
+ "Solomon Islands",
550
+ "Somalia",
551
+ "South Africa",
552
+ "South Georgia And The South Sandwich Islands",
553
+ "The Republic of South Korea",
554
+ "Spain",
555
+ "Sri Lanka",
556
+ "Sudan",
557
+ "Suriname",
558
+ "Svalbard And Jan Mayen",
559
+ "Swaziland",
560
+ "Sweden",
561
+ "Switzerland",
562
+ "Syrian Arab Republic",
563
+ "Taiwan",
564
+ "Tajikistan",
565
+ "Tanzania",
566
+ "Thailand",
567
+ "Togo",
568
+ "Tokelau",
569
+ "Tonga",
570
+ "Trinidad And Tobago",
571
+ "Tunisia",
572
+ "Turkey",
573
+ "Turkmenistan",
574
+ "Turks And Caicos Islands",
575
+ "Tuvalu",
576
+ "Uganda",
577
+ "Ukraine",
578
+ "United Arab Emirates",
579
+ "United Kingdom",
580
+ "United States of America",
581
+ "United States Minor Outlying Islands",
582
+ "Uruguay",
583
+ "Uzbekistan",
584
+ "Vanuatu",
585
+ "Venezuela",
586
+ "Vietnam",
587
+ "British Virgin Islands",
588
+ "US Virgin Islands",
589
+ "Wallis And Futuna",
590
+ "Western Sahara",
591
+ "Yemen",
592
+ "Zambia",
593
+ "Zimbabwe"
594
+ ]
595
+ },
596
+ "housingStatusList": {
597
+ "type": "string",
598
+ "enum": [
599
+ "Renting",
600
+ "Boarding",
601
+ "Caravan",
602
+ "Other",
603
+ "Own Home",
604
+ "Own Home Mortgage",
605
+ "Supplied by Employer",
606
+ "With Parents"
607
+ ]
608
+ },
609
+ "otherState": {
610
+ "type": "string",
611
+ "example": "Ohio"
612
+ },
613
+ "australianStates": {
614
+ "example": "NSW",
615
+ "type": "string",
616
+ "enum": ["QLD", "NSW", "VIC", "WA", "SA", "TAS", "ACT", "NT"]
617
+ },
618
+ "date": {
619
+ "type": "string",
620
+ "format": "date",
621
+ "example": "2018-07-17"
622
+ },
623
+ "addressStandard": {
624
+ "type": "object",
625
+ "additionalProperties": false,
626
+ "properties": {
627
+ "buildingName": {
628
+ "description": "The building name",
629
+ "type": "string",
630
+ "minLength": 1,
631
+ "maxLength": 512
632
+ },
633
+ "deliveryAddress": {
634
+ "description": "Postal address, usually a PO Box or Locked Bag",
635
+ "type": "string",
636
+ "example": "PO Box 1",
637
+ "maxLength": 512
638
+ },
639
+ "lotSection": {
640
+ "description": "The lot number",
641
+ "type": "string",
642
+ "minLength": 1,
643
+ "maxLength": 512
644
+ },
645
+ "streetName": {
646
+ "type": "string"
647
+ },
648
+ "streetNumber": {
649
+ "type": "string"
650
+ },
651
+ "streetSuffix": {
652
+ "description": "The street suffix",
653
+ "type": "string",
654
+ "example": "North",
655
+ "maxLength": 128
656
+ },
657
+ "streetType": {
658
+ "type": "string"
659
+ },
660
+ "level": {
661
+ "type": "string"
662
+ },
663
+ "unit": {
664
+ "type": "string"
665
+ }
666
+ }
667
+ },
668
+ "address": {
669
+ "type": "object",
670
+ "additionalProperties": false,
671
+ "properties": {
672
+ "postcode": {
673
+ "type": "string"
674
+ },
675
+ "state": {
676
+ "example": "NSW",
677
+ "type": "string",
678
+ "anyOf": [
679
+ {
680
+ "$ref": "#/definitions/australianStates"
681
+ },
682
+ {
683
+ "$ref": "#/definitions/otherState"
684
+ }
685
+ ]
686
+ },
687
+ "city": {
688
+ "type": "string"
689
+ },
690
+ "country": {
691
+ "$ref": "#/definitions/countries"
692
+ },
693
+ "formatted": {
694
+ "type": "string"
695
+ },
696
+ "standard": {
697
+ "$ref": "#/definitions/addressStandard"
698
+ }
699
+ }
700
+ },
701
+ "commonAddressProperties": {
702
+ "type": "object",
703
+ "properties": {
704
+ "externalId": {
705
+ "$ref": "#/definitions/id"
706
+ },
707
+ "housingStatus": {
708
+ "$ref": "#/definitions/housingStatusList"
709
+ },
710
+ "startDate": {
711
+ "$ref": "#/definitions/date"
712
+ },
713
+ "residentialAddress": {
714
+ "$ref": "#/definitions/address"
715
+ }
716
+ }
717
+ },
718
+ "currentAddress": {
719
+ "$ref": "#/definitions/commonAddressProperties"
720
+ },
721
+ "previousAddresses": {
722
+ "type": "array",
723
+ "minItems": 0,
724
+ "items": {
725
+ "type": "object",
726
+ "allOf": [
727
+ {
728
+ "$ref": "#/definitions/commonAddressProperties"
729
+ },
730
+ {
731
+ "type": "object",
732
+ "properties": {
733
+ "endDate": {
734
+ "$ref": "#/definitions/date"
735
+ }
736
+ }
737
+ }
738
+ ]
739
+ }
740
+ },
741
+ "contact": {
742
+ "type": "object",
743
+ "additionalProperties": false,
744
+ "properties": {
745
+ "currentAddress": {
746
+ "$ref": "#/definitions/currentAddress"
747
+ },
748
+ "mailingAddress": {
749
+ "description": "applicant's mailing address being captured as part of funnels 5 (post product select)",
750
+ "$ref": "#/definitions/address"
751
+ },
752
+ "mobileNumber": {
753
+ "type": "string",
754
+ "description": "applicant's mobile number formatted in +611234567890"
755
+ },
756
+ "previousAddresses": {
757
+ "$ref": "#/definitions/previousAddresses"
758
+ },
759
+ "postSettlementAddress": {
760
+ "$ref": "#/definitions/address",
761
+ "description": "applicant's post settlement address being captured as part of funnels 5 (post product select)"
762
+ },
763
+ "emailAddress": {
764
+ "type": "string",
765
+ "description": "The applicant email"
766
+ }
767
+ }
768
+ },
769
+ "invitationStatus": {
770
+ "enum": ["ACCEPTED", "PENDING", "CANCELLED", "EXPIRED"],
771
+ "description": "different invitation statuses an applicant can have"
772
+ },
773
+ "isFirstHomeBuyer": {
774
+ "type": "boolean",
775
+ "description": "Whether it's the applicants first home purchase."
776
+ },
777
+ "guarantorRelationshipToBorrowerApplicantId": {
778
+ "$ref": "#/definitions/id",
779
+ "description": "Applicant Id of borrower that has relationship with guarantor."
780
+ },
781
+ "guarantorRelationshipToBorrowerType": {
782
+ "enum": ["Father", "Mother", "Spouse", "Brother", "Sister", "Son", "Daughter", "Other Relative", "Other"],
783
+ "description": "The relationship between borrower and guarantor."
784
+ },
785
+ "guarantorRelationshipToBorrowerTypeOther": {
786
+ "type": "string",
787
+ "description": "Description of relationship between borrower and guarantor when other."
788
+ },
789
+ "guarantorRelationshipToBorrowerDefinition": {
790
+ "type": "object",
791
+ "additionalProperties": false,
792
+ "properties": {
793
+ "applicantId": {
794
+ "$ref": "#/definitions/guarantorRelationshipToBorrowerApplicantId"
795
+ },
796
+ "type": {
797
+ "$ref": "#/definitions/guarantorRelationshipToBorrowerType"
798
+ },
799
+ "typeOther": {
800
+ "$ref": "#/definitions/guarantorRelationshipToBorrowerTypeOther"
801
+ }
802
+ },
803
+ "required": ["applicantId", "type"]
804
+ },
805
+ "entity": {
806
+ "enum": ["PERSON", "COMPANY", "TRUST"],
807
+ "description": "applicant's entity. For a person applicant this is 'PERSON'"
808
+ },
809
+ "cityOfBirth": {
810
+ "type": "string",
811
+ "example": "Sydney"
812
+ },
813
+ "industryCode": {
814
+ "type": "string",
815
+ "pattern": "^\\d{4}$",
816
+ "description": "ANZSIC business code lookup "
817
+ },
818
+ "isPassiveEntity": {
819
+ "type": "boolean",
820
+ "description": "If the entity's primary business activity is investing"
821
+ },
822
+ "legalEntities": {
823
+ "type": "integer",
824
+ "minimum": 0,
825
+ "maximum": 1000000
826
+ },
827
+ "description": {
828
+ "type": "string",
829
+ "minLength": 1,
830
+ "maxLength": 1024
831
+ },
832
+ "numOfMonths": {
833
+ "type": "integer",
834
+ "minimum": 1,
835
+ "maximum": 1200
836
+ },
837
+ "yesNoIntend": {
838
+ "type": "string",
839
+ "enum": ["Yes", "No", "Intend"]
840
+ },
841
+ "trustType": {
842
+ "enum": [
843
+ "CASH_MANAGEMENT_TRUST",
844
+ "DISCRETIONARY_TRUST",
845
+ "FIXED",
846
+ "HYBRID",
847
+ "SIMPLE_OR_BARE",
848
+ "SUPERANNUATION_TRUSTS",
849
+ "UNIT",
850
+ "OTHER"
851
+ ]
852
+ },
853
+ "trustName": {
854
+ "$ref": "#/definitions/name"
855
+ },
856
+ "registeredDate": {
857
+ "$ref": "#/definitions/date"
858
+ },
859
+ "registeredCountry": {
860
+ "$ref": "#/definitions/countries"
861
+ },
862
+ "registeredAddress": {
863
+ "$ref": "#/definitions/address"
864
+ },
865
+ "mailingAddress": {
866
+ "$ref": "#/definitions/address"
867
+ },
868
+ "companyName": {
869
+ "$ref": "#/definitions/name"
870
+ },
871
+ "abn": {
872
+ "type": "string",
873
+ "pattern": "^\\d{11}$",
874
+ "description": "Company ABN Number"
875
+ },
876
+ "acn": {
877
+ "type": "string",
878
+ "pattern": "^\\d{9}$",
879
+ "description": "Australian Company Number"
880
+ },
881
+ "yearsOfTrading": {
882
+ "type": "string",
883
+ "enum": ["1", "2", "3", "4", "5", "5-10", ">10"]
884
+ },
885
+ "companyType": {
886
+ "enum": ["INCORPORATED", "LTD", "NL", "PTY_LTD"]
887
+ },
888
+ "companyStructure": {
889
+ "enum": ["SOLE_TRADER", "PARTNERSHIP", "CORPORATION", "TRUST"]
890
+ }
891
+ },
892
+ "type": "object",
893
+ "title": "The applicant event schema",
894
+ "description": "Create or update.",
895
+ "additionalProperties": false,
896
+ "properties": {
897
+ "version": {
898
+ "type": "string",
899
+ "description": "schema version"
900
+ },
901
+ "type": {
902
+ "type": "string",
903
+ "enum": ["UpdateApplicant", "CreateApplicant"]
904
+ },
905
+ "payload": {
906
+ "$ref": "#/definitions/Payload"
907
+ }
908
+ },
909
+ "required": ["version", "payload", "type"]
910
+ }