@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,37 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "version": {
5
+ "type": "string"
6
+ },
7
+ "type": {
8
+ "type": "string",
9
+ "enum": ["LiabilityDeleted"]
10
+ },
11
+ "payload": {
12
+ "type": "object",
13
+ "properties": {
14
+ "id": {
15
+ "type": "string"
16
+ },
17
+ "applicationId": {
18
+ "type": "string"
19
+ },
20
+ "meta": {
21
+ "type": "object",
22
+ "properties": {
23
+ "actionedBy": {
24
+ "type": "string"
25
+ },
26
+ "actionedByRole": {
27
+ "type": "string"
28
+ }
29
+ },
30
+ "required": ["actionedBy", "actionedByRole"]
31
+ }
32
+ },
33
+ "required": ["id", "applicationId"]
34
+ }
35
+ },
36
+ "required": ["version", "type", "payload"]
37
+ }
@@ -0,0 +1,262 @@
1
+ {
2
+ "definitions": {
3
+ "id": {
4
+ "type": "string",
5
+ "format": "uuid"
6
+ },
7
+ "meta": {
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "description": "The metadata of the alieo",
11
+ "properties": {
12
+ "actionedBy": {
13
+ "description": "uuid of user who made the action (create/update/delete)",
14
+ "type": "string"
15
+ },
16
+ "actionedByRole": {
17
+ "description": "role of the user that made the action",
18
+ "enum": ["team", "customer"]
19
+ }
20
+ },
21
+ "required": ["actionedBy", "actionedByRole"]
22
+ },
23
+ "percentOwned": {
24
+ "type": "object",
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
+ "items": {
33
+ "$ref": "#/definitions/applicantOwnership"
34
+ }
35
+ }
36
+ },
37
+ "required": ["owners"]
38
+ },
39
+ "liabilityType": {
40
+ "description": "LEASE_OR_HIRE_FINANCE is deprecated.",
41
+ "enum": [
42
+ "CAR_LOAN",
43
+ "CREDIT_CARD",
44
+ "HELP_HECS_DEBT",
45
+ "HOME_LOAN",
46
+ "LEASE_OR_HIRE_FINANCE",
47
+ "LEASE",
48
+ "HIRE_PURCHASE",
49
+ "LINE_OF_CREDIT",
50
+ "OTHER",
51
+ "OVERDRAFT",
52
+ "PERSONAL_LOAN",
53
+ "SHORT_TERM_FINANCE",
54
+ "STORE_CARD",
55
+ "TAX_DEBT"
56
+ ]
57
+ },
58
+ "outstandingBalance": {
59
+ "type": "number"
60
+ },
61
+ "financialInstitution": {
62
+ "type": "string"
63
+ },
64
+ "financialInstitutionShortName": {
65
+ "type": "string"
66
+ },
67
+ "FinancialInstitutionBsb": {
68
+ "type": "string",
69
+ "pattern": "^\\d{6}$",
70
+ "description": "The BSB number identifying where the account is held within the Financial Institution",
71
+ "example": "123456"
72
+ },
73
+ "FinancialInstitutionAccountNumber": {
74
+ "type": "string",
75
+ "pattern": "^\\d{0,10}$",
76
+ "description": "The unique number assigned to the Financial Institution account",
77
+ "example": "999994"
78
+ },
79
+ "repaymentAmount": {
80
+ "type": "number"
81
+ },
82
+ "repaymentFrequency": {
83
+ "enum": ["FORTNIGHTLY", "MONTHLY", "WEEKLY", "YEARLY"]
84
+ },
85
+ "repaymentTypeDetails": {
86
+ "enum": ["INTEREST_ONLY", "PRINCIPAL_AND_INTEREST"]
87
+ },
88
+ "remainingTermDuration": {
89
+ "type": "number"
90
+ },
91
+ "description": {
92
+ "type": "string",
93
+ "description": "Description of the entity."
94
+ },
95
+ "interestOnlyDuration": {
96
+ "type": "number"
97
+ },
98
+ "annualInterestRate": {
99
+ "type": "number"
100
+ },
101
+ "clearingFromThisLoan": {
102
+ "type": "boolean"
103
+ },
104
+ "clearingFromOtherSource": {
105
+ "enum": ["PAYING_OUT", "REDUCING"]
106
+ },
107
+ "creditLimit": {
108
+ "type": "number"
109
+ },
110
+ "newLimit": {
111
+ "type": "number"
112
+ },
113
+ "originalBalance": {
114
+ "type": "number"
115
+ },
116
+ "applicationId": {
117
+ "type": "string"
118
+ },
119
+ "balloonRepaymentAmount": {
120
+ "type": "number"
121
+ },
122
+ "interestOnlyRemainingTerm": {
123
+ "type": "number"
124
+ },
125
+ "interestType": {
126
+ "type": "string",
127
+ "enum": ["FIXED_RATE", "VARIABLE"]
128
+ },
129
+ "applicantOwnership": {
130
+ "type": "object",
131
+ "properties": {
132
+ "applicantId": {
133
+ "type": "string",
134
+ "description": "The applicant Identifier"
135
+ },
136
+ "customerId": {
137
+ "type": "string",
138
+ "format": "uuid"
139
+ },
140
+ "percent": {
141
+ "type": "number",
142
+ "description": "how much percent for the corresponding applicant",
143
+ "examples": [0.5]
144
+ }
145
+ },
146
+ "required": ["percent", "applicantId"]
147
+ },
148
+ "liability": {
149
+ "type": "object",
150
+ "properties": {
151
+ "percentOwned": {
152
+ "$ref": "#/definitions/percentOwned"
153
+ },
154
+ "type": {
155
+ "$ref": "#/definitions/liabilityType"
156
+ },
157
+ "outstandingBalance": {
158
+ "$ref": "#/definitions/outstandingBalance"
159
+ },
160
+ "financialInstitution": {
161
+ "$ref": "#/definitions/financialInstitution"
162
+ },
163
+ "financialInstitutionShortName": {
164
+ "$ref": "#/definitions/financialInstitutionShortName"
165
+ },
166
+ "financialInstitutionBsb": {
167
+ "$ref": "#/definitions/FinancialInstitutionBsb"
168
+ },
169
+ "financialInstitutionAccountNumber": {
170
+ "$ref": "#/definitions/FinancialInstitutionAccountNumber"
171
+ },
172
+ "repaymentAmount": {
173
+ "$ref": "#/definitions/repaymentAmount"
174
+ },
175
+ "repaymentFrequency": {
176
+ "$ref": "#/definitions/repaymentFrequency"
177
+ },
178
+ "repaymentTypeDetails": {
179
+ "$ref": "#/definitions/repaymentTypeDetails"
180
+ },
181
+ "remainingTermDuration": {
182
+ "$ref": "#/definitions/remainingTermDuration"
183
+ },
184
+ "interestOnlyDuration": {
185
+ "$ref": "#/definitions/interestOnlyDuration"
186
+ },
187
+ "annualInterestRate": {
188
+ "$ref": "#/definitions/annualInterestRate"
189
+ },
190
+ "clearingFromThisLoan": {
191
+ "$ref": "#/definitions/clearingFromThisLoan"
192
+ },
193
+ "clearingFromOtherSource": {
194
+ "$ref": "#/definitions/clearingFromOtherSource"
195
+ },
196
+ "creditLimit": {
197
+ "$ref": "#/definitions/creditLimit"
198
+ },
199
+ "newLimit": {
200
+ "$ref": "#/definitions/newLimit"
201
+ },
202
+ "originalBalance": {
203
+ "$ref": "#/definitions/originalBalance"
204
+ },
205
+ "balloonRepaymentAmount": {
206
+ "$ref": "#/definitions/balloonRepaymentAmount"
207
+ },
208
+ "interestOnlyRemainingTerm": {
209
+ "$ref": "#/definitions/interestOnlyRemainingTerm"
210
+ },
211
+ "interestType": {
212
+ "$ref": "#/definitions/interestType"
213
+ },
214
+ "description": {
215
+ "$ref": "#/definitions/description"
216
+ },
217
+ "toBeToppedUp": {
218
+ "type": "boolean",
219
+ "description": "Is the loan (split) to be topped up"
220
+ }
221
+ },
222
+ "required": ["type", "outstandingBalance"]
223
+ },
224
+ "LiabilityPayload": {
225
+ "type": "object",
226
+ "properties": {
227
+ "id": {
228
+ "$ref": "#/definitions/id",
229
+ "description": "uuid of liability"
230
+ },
231
+ "meta": {
232
+ "$ref": "#/definitions/meta"
233
+ },
234
+ "applicationId": {
235
+ "$ref": "#/definitions/applicationId"
236
+ },
237
+ "liability": {
238
+ "$ref": "#/definitions/liability"
239
+ }
240
+ },
241
+ "required": ["id", "applicationId", "liability"],
242
+ "description": "create / update liability payload"
243
+ }
244
+ },
245
+ "type": "object",
246
+ "title": "The liability event schema",
247
+ "description": "The liability event schema",
248
+ "properties": {
249
+ "version": {
250
+ "type": "string",
251
+ "description": "schema version"
252
+ },
253
+ "type": {
254
+ "type": "string",
255
+ "enum": ["LiabilityCreated", "LiabilityUpdated"]
256
+ },
257
+ "payload": {
258
+ "$ref": "#/definitions/LiabilityPayload"
259
+ }
260
+ },
261
+ "required": ["version", "payload", "type"]
262
+ }
@@ -0,0 +1,366 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Required Document",
4
+ "description": "The Required Document event schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "version": {
8
+ "type": "string",
9
+ "description": "schema version"
10
+ },
11
+ "type": {
12
+ "type": "string",
13
+ "enum": ["RequiredDocumentCreated", "RequiredDocumentUpdated"]
14
+ },
15
+ "payload": {
16
+ "$ref": "#/definitions/payload"
17
+ }
18
+ },
19
+ "required": ["version", "type", "payload"],
20
+ "additionalProperties": true,
21
+ "definitions": {
22
+ "payload": {
23
+ "type": "object",
24
+ "properties": {
25
+ "id": {
26
+ "description": "Required Document ID",
27
+ "type": "string"
28
+ },
29
+ "createdAt": {
30
+ "description": "Created at ISO date time",
31
+ "type": "string",
32
+ "format": "date-time"
33
+ },
34
+ "applicationId": {
35
+ "description": "Application ID",
36
+ "type": "string"
37
+ },
38
+ "applicantId": {
39
+ "description": "Application ID",
40
+ "type": "string"
41
+ },
42
+ "expiryDate": {
43
+ "description": "Expiry Date (can be null if no expiry date set)",
44
+ "type": ["string", "null"],
45
+ "format": "date"
46
+ },
47
+ "status": {
48
+ "description": "Status",
49
+ "type": ["string"],
50
+ "enum": [
51
+ "pending_upload",
52
+ "pending_verification",
53
+ "failed_verification",
54
+ "expired",
55
+ "not_required",
56
+ "verified"
57
+ ]
58
+ },
59
+ "eConsent": {
60
+ "type": "object",
61
+ "properties": {
62
+ "hasConsented": {
63
+ "type": "boolean",
64
+ "description": "eConsent"
65
+ },
66
+ "consentedAt": {
67
+ "description": "Consented at ISO date time",
68
+ "type": "string",
69
+ "format": "date-time"
70
+ }
71
+ },
72
+ "required": ["hasConsented"]
73
+ },
74
+ "identification": {
75
+ "type": "object",
76
+ "properties": {
77
+ "gender": {
78
+ "description": "Gender (can be null if migrated from SF as they do not have this field)",
79
+ "type": ["string", "null"],
80
+ "enum": ["MALE", "FEMALE", null]
81
+ },
82
+ "idNumber": {
83
+ "description": "ID Number",
84
+ "type": "string"
85
+ },
86
+ "idType": {
87
+ "description": "ID Type",
88
+ "type": "string",
89
+ "enum": ["australian_driver_license", "national_id_card", "passport"]
90
+ },
91
+ "idTitle": {
92
+ "description": "ID Title (can be null if migrated from SF as they do not have this field)",
93
+ "type": ["string", "null"],
94
+ "enum": ["DR", "MISS", "MR", "MRS", "MS", "OTHER", "UNKNOWN", null]
95
+ },
96
+ "idFirstName": {
97
+ "description": "ID First Name",
98
+ "type": "string"
99
+ },
100
+ "idMiddleName": {
101
+ "description": "ID Middle Name (can be null as it is an optional field)",
102
+ "type": ["string", "null"]
103
+ },
104
+ "idLastName": {
105
+ "description": "ID Last Name",
106
+ "type": "string"
107
+ },
108
+ "australianState": {
109
+ "description": "Australian State (can be null as it is an optional field)",
110
+ "type": ["string", "null"],
111
+ "enum": ["NSW", "QLD", "VIC", "ACT", "WA", "SA", "NT", "TAS", null]
112
+ },
113
+ "issuingCountry": {
114
+ "description": "Issuing Country (can be null as it is an optional field)",
115
+ "type": ["string", "null"],
116
+ "enum": [
117
+ "Afghanistan",
118
+ "Albania",
119
+ "Algeria",
120
+ "American Samoa",
121
+ "Andorra",
122
+ "Angola",
123
+ "Anguilla",
124
+ "Antarctica",
125
+ "Antigua And Barbuda",
126
+ "Argentina",
127
+ "Armenia",
128
+ "Aruba",
129
+ "Australia",
130
+ "Austria",
131
+ "Azerbaijan",
132
+ "Bahamas",
133
+ "Bahrain",
134
+ "Bangladesh",
135
+ "Barbados",
136
+ "Belarus",
137
+ "Belgium",
138
+ "Belize",
139
+ "Benin",
140
+ "Bermuda",
141
+ "Bhutan",
142
+ "Bolivia",
143
+ "Bosnia And Herzegovina",
144
+ "Botswana",
145
+ "Bouvet Island",
146
+ "Brazil",
147
+ "British Indian Ocean Territory",
148
+ "Brunei Darussalam",
149
+ "Bulgaria",
150
+ "Burkina Faso",
151
+ "Burundi",
152
+ "Cambodia",
153
+ "Cameroon",
154
+ "Canada",
155
+ "Cape Verde",
156
+ "Cayman Islands",
157
+ "Central African Republic",
158
+ "Chad",
159
+ "Chile",
160
+ "China",
161
+ "Christmas Island",
162
+ "Cocos (Keeling) Islands",
163
+ "Colombia",
164
+ "Comoros",
165
+ "Democratic People's Republic of Korea",
166
+ "Democratic Republic Of The Congo",
167
+ "Cook Islands",
168
+ "Costa Rica",
169
+ "Cote D'ivoire",
170
+ "Croatia",
171
+ "Cuba",
172
+ "Cyprus",
173
+ "Czech Republic",
174
+ "Denmark",
175
+ "Djibouti",
176
+ "Dominica",
177
+ "Dominican Republic",
178
+ "East Timor",
179
+ "Ecuador",
180
+ "Egypt",
181
+ "El Salvador",
182
+ "Equatorial Guinea",
183
+ "Eritrea",
184
+ "Estonia",
185
+ "Ethiopia",
186
+ "Falkland Islands",
187
+ "Faroe Islands",
188
+ "Fiji",
189
+ "Finland",
190
+ "France",
191
+ "French Guiana",
192
+ "French Polynesia",
193
+ "French Southern Territories",
194
+ "Gabon",
195
+ "Gambia",
196
+ "Georgia",
197
+ "Germany",
198
+ "Ghana",
199
+ "Gibraltar",
200
+ "Greece",
201
+ "Greenland",
202
+ "Grenada",
203
+ "Guadeloupe",
204
+ "Guam",
205
+ "Guatemala",
206
+ "Guinea",
207
+ "Guinea-bissau",
208
+ "Guyana",
209
+ "Haiti",
210
+ "Heard Island And Mcdonald Islands",
211
+ "Holy See (Vatican City State)",
212
+ "Honduras",
213
+ "Hong Kong",
214
+ "Hungary",
215
+ "Iceland",
216
+ "India",
217
+ "Indonesia",
218
+ "Iran",
219
+ "Iraq",
220
+ "Ireland",
221
+ "Israel",
222
+ "Italy",
223
+ "Jamaica",
224
+ "Japan",
225
+ "Jordan",
226
+ "Kazakstan",
227
+ "Kenya",
228
+ "Kiribati",
229
+ "Kosovo",
230
+ "Kuwait",
231
+ "Kyrgyzstan",
232
+ "Laos",
233
+ "Latvia",
234
+ "Lebanon",
235
+ "Lesotho",
236
+ "Liberia",
237
+ "Libyan Arab Jamahiriya",
238
+ "Liechtenstein",
239
+ "Lithuania",
240
+ "Luxembourg",
241
+ "Macau",
242
+ "Macedonia",
243
+ "Madagascar",
244
+ "Malawi",
245
+ "Malaysia",
246
+ "Maldives",
247
+ "Mali",
248
+ "Malta",
249
+ "Marshall Islands",
250
+ "Martinique",
251
+ "Mauritania",
252
+ "Mauritius",
253
+ "Mayotte",
254
+ "Mexico",
255
+ "Federated States Of Micronesia",
256
+ "Republic Of Moldova",
257
+ "Monaco",
258
+ "Mongolia",
259
+ "Montserrat",
260
+ "Montenegro",
261
+ "Morocco",
262
+ "Mozambique",
263
+ "Myanmar",
264
+ "Namibia",
265
+ "Nauru",
266
+ "Nepal",
267
+ "Netherlands",
268
+ "Netherlands Antilles",
269
+ "New Caledonia",
270
+ "New Zealand",
271
+ "Nicaragua",
272
+ "Niger",
273
+ "Nigeria",
274
+ "Niue",
275
+ "Norfolk Island",
276
+ "Northern Mariana Islands",
277
+ "Norway",
278
+ "Oman",
279
+ "Pakistan",
280
+ "Palau",
281
+ "Palestinian Territory",
282
+ "Panama",
283
+ "Papua New Guinea",
284
+ "Paraguay",
285
+ "Peru",
286
+ "Philippines",
287
+ "Pitcairn",
288
+ "Poland",
289
+ "Portugal",
290
+ "Puerto Rico",
291
+ "Qatar",
292
+ "Romania",
293
+ "Russian Federation",
294
+ "Rwanda",
295
+ "Saint Helena",
296
+ "Saint Kitts And Nevis",
297
+ "Saint Lucia",
298
+ "Saint Pierre And Miquelon",
299
+ "Saint Vincent And The Grenadines",
300
+ "Samoa",
301
+ "San Marino",
302
+ "Sao Tome And Principe",
303
+ "Saudi Arabia",
304
+ "Senegal",
305
+ "Serbia",
306
+ "Seychelles",
307
+ "Sierra Leone",
308
+ "Singapore",
309
+ "Slovakia",
310
+ "Slovenia",
311
+ "Solomon Islands",
312
+ "Somalia",
313
+ "South Africa",
314
+ "South Georgia And The South Sandwich Islands",
315
+ "The Republic of South Korea",
316
+ "Spain",
317
+ "Sri Lanka",
318
+ "Sudan",
319
+ "Suriname",
320
+ "Svalbard And Jan Mayen",
321
+ "Swaziland",
322
+ "Sweden",
323
+ "Switzerland",
324
+ "Syrian Arab Republic",
325
+ "Taiwan",
326
+ "Tajikistan",
327
+ "Tanzania",
328
+ "Thailand",
329
+ "Togo",
330
+ "Tokelau",
331
+ "Tonga",
332
+ "Trinidad And Tobago",
333
+ "Tunisia",
334
+ "Turkey",
335
+ "Turkmenistan",
336
+ "Turks And Caicos Islands",
337
+ "Tuvalu",
338
+ "Uganda",
339
+ "Ukraine",
340
+ "United Arab Emirates",
341
+ "United Kingdom",
342
+ "United States of America",
343
+ "United States Minor Outlying Islands",
344
+ "Uruguay",
345
+ "Uzbekistan",
346
+ "Vanuatu",
347
+ "Venezuela",
348
+ "Vietnam",
349
+ "British Virgin Islands",
350
+ "US Virgin Islands",
351
+ "Wallis And Futuna",
352
+ "Western Sahara",
353
+ "Yemen",
354
+ "Zambia",
355
+ "Zimbabwe",
356
+ null
357
+ ]
358
+ }
359
+ },
360
+ "required": ["idNumber", "idType"]
361
+ }
362
+ },
363
+ "required": ["id", "applicationId", "applicantId"]
364
+ }
365
+ }
366
+ }