@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,289 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "The funding position event schema",
4
+ "description": "This event is the public funding position event",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "version": {
9
+ "type": "string",
10
+ "description": "schema version"
11
+ },
12
+ "type": {
13
+ "type": "string",
14
+ "enum": ["FundingPosition"]
15
+ },
16
+ "payload": {
17
+ "$ref": "#/definitions/Payload"
18
+ }
19
+ },
20
+ "required": ["version", "type", "payload"],
21
+ "definitions": {
22
+ "Payload": {
23
+ "type": "object",
24
+ "additionalProperties": true,
25
+ "properties": {
26
+ "id": {
27
+ "type": "string",
28
+ "description": "Application ID"
29
+ },
30
+ "applicationId": {
31
+ "type": "string",
32
+ "description": "Application ID"
33
+ },
34
+ "properties": {
35
+ "type": "array",
36
+ "items": {
37
+ "$ref": "#/definitions/Property"
38
+ },
39
+ "description": "List of refinance or new purchase property"
40
+ },
41
+ "fundsRequiredBreakdown": {
42
+ "$ref": "#/definitions/FundsRequiredBreakdown"
43
+ },
44
+ "totalCashOut": {
45
+ "type": "number",
46
+ "description": "The total amount of customer-specified cash out."
47
+ },
48
+ "totalDeposit": {
49
+ "type": "number",
50
+ "description": "The total deposit amount for all properties."
51
+ },
52
+ "totalDebtConsolidation": {
53
+ "type": "number",
54
+ "description": "The total amount of debt to be consolidated."
55
+ },
56
+ "totalGovernmentContributions": {
57
+ "type": "number",
58
+ "description": "The total amount available for settlement from government grants."
59
+ },
60
+ "fundsRequested": {
61
+ "type": "number",
62
+ "description": "The final loan amount amount requested by the customer or broker."
63
+ },
64
+ "fundsRequired": {
65
+ "type": "number",
66
+ "description": "The amount required to balance all costs with contributions. The minimum loan amount required for settlement."
67
+ },
68
+ "lvr": {
69
+ "type": "number",
70
+ "description": "Loan to value ratio. Calculated as the loan amount divided by the value of all properties being used as security."
71
+ },
72
+ "netSurplus": {
73
+ "type": "number",
74
+ "description": "The amount remaining after settlement. Calculated as the difference between the funds requested and funds required."
75
+ },
76
+ "lmi": {
77
+ "type": "number",
78
+ "description": "Lenders Mortgage Insurance premium. An additional cost required by lenders for higher risk loans."
79
+ },
80
+ "lmiIncluded": {
81
+ "type": "boolean",
82
+ "description": "Whether the lmi premium is included in the funds required."
83
+ }
84
+ },
85
+ "required": [
86
+ "id",
87
+ "applicationId",
88
+ "properties",
89
+ "fundsRequiredBreakdown",
90
+ "totalCashOut",
91
+ "totalDeposit",
92
+ "totalDebtConsolidation",
93
+ "totalGovernmentContributions",
94
+ "fundsRequested",
95
+ "fundsRequired",
96
+ "lvr",
97
+ "netSurplus",
98
+ "lmi",
99
+ "lmiIncluded"
100
+ ]
101
+ },
102
+ "Property": {
103
+ "type": "object",
104
+ "properties": {
105
+ "id": {
106
+ "type": "string",
107
+ "description": "Property ID"
108
+ },
109
+ "mortgageRegistrationFee": {
110
+ "type": "number",
111
+ "description": "A fee paid to the Land Titles Office for the registration of a mortgage over a property."
112
+ },
113
+ "lenderSetupFee": {
114
+ "type": "number",
115
+ "description": "Fees payable to the lender on setting up a home loan and completing settlement."
116
+ },
117
+ "otherSundries": {
118
+ "type": "number",
119
+ "description": "Other fees payable to an interested party to ensure settlement can proceed."
120
+ },
121
+ "contributionAmount": {
122
+ "type": "number",
123
+ "description": "The amount that a customer is contributing towards the settlement."
124
+ },
125
+ "governmentContributions": {
126
+ "type": "number",
127
+ "description": "The amount available for settlement from government grants."
128
+ },
129
+ "constructionCosts": {
130
+ "type": ["number"],
131
+ "description": "The amount that will be used for construction purposes."
132
+ },
133
+ "totalCosts": {
134
+ "type": "number",
135
+ "description": "A sum of all costs and charges involved with funding the loan and settlement."
136
+ },
137
+ "totalContributions": {
138
+ "type": "number",
139
+ "description": "A sum of all contributions made towards settlement."
140
+ },
141
+ "purchasePrice": {
142
+ "type": "number",
143
+ "description": "The agreed price that a property has been purchased for."
144
+ },
145
+ "transferFee": {
146
+ "type": "number",
147
+ "description": "A fee paid to the Land Titles Office fee for transferring the property title from the seller to the buyer."
148
+ },
149
+ "stampDuty": {
150
+ "type": "number",
151
+ "description": "Tax paid to the State Revenue Office when purchasing a property."
152
+ },
153
+ "conveyancingCost": {
154
+ "type": "number",
155
+ "description": "The costs involved with a conveyancer who assists with settlement."
156
+ },
157
+ "foreignBuyerSurcharge": {
158
+ "type": ["number"],
159
+ "description": "An additional fee payable to the Land Titles Office for property buyers that are not permanent residents. "
160
+ },
161
+ "totalRequired": {
162
+ "type": "number",
163
+ "description": "Total fund required. The sum of purchase price, and fees."
164
+ },
165
+ "propertyValue": {
166
+ "type": "number",
167
+ "description": "The value of a property."
168
+ },
169
+ "currentLoanAmount": {
170
+ "type": "number",
171
+ "description": "The credit limit of an existing home loan that is secured by a property."
172
+ },
173
+ "lenderDischargeFee": {
174
+ "type": "number",
175
+ "description": "A fee charged by a customer’s existing lender when closing a home loan account."
176
+ },
177
+ "accruedInterest": {
178
+ "type": "number",
179
+ "description": "The interest accrued before an existing loan has been discharged and payable to the existing lender at settlement."
180
+ },
181
+ "debtConsolidation": {
182
+ "type": "array",
183
+ "items": {
184
+ "$ref": "#/definitions/DebtConsolidation"
185
+ }
186
+ },
187
+ "cashOutAmount": {
188
+ "type": "number",
189
+ "description": "The additional amount of money requested by the customer as part of the loan."
190
+ }
191
+ },
192
+ "required": [
193
+ "id",
194
+ "mortgageRegistrationFee",
195
+ "lenderSetupFee",
196
+ "otherSundries",
197
+ "contributionAmount",
198
+ "governmentContributions",
199
+ "constructionCosts",
200
+ "totalCosts",
201
+ "totalContributions",
202
+ "totalRequired"
203
+ ]
204
+ },
205
+ "DebtConsolidation": {
206
+ "type": "object",
207
+ "properties": {
208
+ "id": {
209
+ "type": "string",
210
+ "description": "ID"
211
+ },
212
+ "amount": {
213
+ "type": "number",
214
+ "description": "Amount"
215
+ },
216
+ "liabilityType": {
217
+ "type": ["string", "null"],
218
+ "description": "Liability type"
219
+ },
220
+ "financialInstitutionShortName": {
221
+ "type": ["string", "null"],
222
+ "description": "Financial institution short name"
223
+ },
224
+ "toConsolidate": {
225
+ "type": "boolean",
226
+ "description": "to consolidate"
227
+ }
228
+ },
229
+ "required": ["id", "amount", "liabilityType", "financialInstitutionShortName", "toConsolidate"]
230
+ },
231
+ "FundsRequiredBreakdown": {
232
+ "type": "object",
233
+ "properties": {
234
+ "mortgageRegistrationFee": {
235
+ "type": "number",
236
+ "description": "A fee paid to the Land Titles Office for the registration of a mortgage over a property."
237
+ },
238
+ "lenderSetupFee": {
239
+ "type": "number",
240
+ "description": "Fees payable to the lender on setting up a home loan and completing settlement."
241
+ },
242
+ "otherSundries": {
243
+ "type": "number",
244
+ "description": "Other fees payable to an interested party to ensure settlement can proceed."
245
+ },
246
+ "constructionCosts": {
247
+ "type": ["number"],
248
+ "description": "The amount that will be used for construction purposes."
249
+ },
250
+ "transferFee": {
251
+ "type": "number",
252
+ "description": "A fee paid to the Land Titles Office fee for transferring the property title from the seller to the buyer."
253
+ },
254
+ "stampDuty": {
255
+ "type": "number",
256
+ "description": "Tax paid to the State Revenue Office when purchasing a property."
257
+ },
258
+ "conveyancingCost": {
259
+ "type": "number",
260
+ "description": "The costs involved with a conveyancer who assists with settlement."
261
+ },
262
+ "foreignBuyerSurcharge": {
263
+ "type": ["number"],
264
+ "description": "An additional fee payable to the Land Titles Office for property buyers that are not permanent residents. "
265
+ },
266
+ "lenderDischargeFee": {
267
+ "type": "number",
268
+ "description": "A fee charged by a customer’s existing lender when closing a home loan account."
269
+ },
270
+ "accruedInterest": {
271
+ "type": "number",
272
+ "description": "The interest accrued before an existing loan has been discharged and payable to the existing lender at settlement."
273
+ }
274
+ },
275
+ "required": [
276
+ "mortgageRegistrationFee",
277
+ "lenderSetupFee",
278
+ "otherSundries",
279
+ "constructionCosts",
280
+ "transferFee",
281
+ "stampDuty",
282
+ "conveyancingCost",
283
+ "foreignBuyerSurcharge",
284
+ "lenderDischargeFee",
285
+ "accruedInterest"
286
+ ]
287
+ }
288
+ }
289
+ }
@@ -0,0 +1,242 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "definitions": {
4
+ "frequency": {
5
+ "type": "string",
6
+ "enum": ["FORTNIGHTLY", "MONTHLY", "WEEKLY", "QUARTERLY", "YEARLY"]
7
+ },
8
+ "ownership": {
9
+ "type": "object",
10
+ "required": ["applicantId", "percent"],
11
+ "properties": {
12
+ "applicantId": {
13
+ "type": "string",
14
+ "format": "uuid"
15
+ },
16
+ "percent": {
17
+ "type": "number",
18
+ "description": "how much percent for the corresponding applicant"
19
+ }
20
+ }
21
+ },
22
+ "ownershipProportion": {
23
+ "type": "object",
24
+ "required": ["owners"],
25
+ "properties": {
26
+ "proportions": {
27
+ "enum": ["EQUAL", "SPECIFIED", "NOT_SPECIFIED"],
28
+ "description": "Indicate whether ownership proportions are equal, specified individually for each one or not specified."
29
+ },
30
+ "owners": {
31
+ "type": "array",
32
+ "minItems": 1,
33
+ "items": {
34
+ "$ref": "#/definitions/ownership"
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "year": {
40
+ "type": "number",
41
+ "description": "Year the vehicle was made."
42
+ },
43
+ "AddBackDefinition": {
44
+ "type": "object",
45
+ "description": "add-back is an expense that is added back to the profits of the business",
46
+ "properties": {
47
+ "depreciation": {
48
+ "type": "number",
49
+ "example": 3200
50
+ },
51
+ "interest": {
52
+ "type": "number",
53
+ "example": 4600
54
+ },
55
+ "lease": {
56
+ "type": "number",
57
+ "example": 7600
58
+ },
59
+ "nonRecurringExpenses": {
60
+ "type": "number",
61
+ "example": 7810
62
+ },
63
+ "salary": {
64
+ "type": "number",
65
+ "example": 9000
66
+ },
67
+ "superannuationExcess": {
68
+ "type": "number",
69
+ "example": 1300
70
+ },
71
+ "other": {
72
+ "type": "number",
73
+ "example": 6600
74
+ }
75
+ }
76
+ },
77
+ "BASDefinition": {
78
+ "type": "object",
79
+ "description": "Business activity statement details",
80
+ "properties": {
81
+ "quarter": {
82
+ "type": "number",
83
+ "example": 1,
84
+ "enum": [1, 2, 3, 4]
85
+ },
86
+ "salesAmount": {
87
+ "type": "number",
88
+ "example": 54570
89
+ }
90
+ },
91
+ "required": ["quarter"]
92
+ },
93
+ "IncomeBusinessDetails": {
94
+ "type": "object",
95
+ "description": "Earnings for a company over a specified financial year",
96
+ "properties": {
97
+ "year": {
98
+ "$ref": "#/definitions/year"
99
+ },
100
+ "companyProfitBeforeTax": {
101
+ "type": "number",
102
+ "example": 200000
103
+ },
104
+ "addback": {
105
+ "$ref": "#/definitions/AddBackDefinition"
106
+ },
107
+ "nonRecurringIncome": {
108
+ "type": "number",
109
+ "example": 9100
110
+ }
111
+ }
112
+ },
113
+ "incomeDefinition": {
114
+ "type": "object",
115
+ "required": ["id", "applicationId", "income"],
116
+ "properties": {
117
+ "id": {
118
+ "type": "string",
119
+ "format": "uuid",
120
+ "description": "uuid of Expense"
121
+ },
122
+ "meta": {
123
+ "$ref": "#/definitions/meta"
124
+ },
125
+ "applicationId": {
126
+ "type": "string"
127
+ },
128
+ "income": {
129
+ "type": "object",
130
+ "required": ["type"],
131
+ "properties": {
132
+ "amount": {
133
+ "type": "number"
134
+ },
135
+ "assetId": {
136
+ "type": "string",
137
+ "format": "uuid"
138
+ },
139
+ "benefitType": {
140
+ "type": "string",
141
+ "enum": ["FAMILY_TAX", "AGE_PENSION", "DISABILITY_SUPPORT_PENSION", "OTHER"]
142
+ },
143
+ "comments": {
144
+ "type": "string"
145
+ },
146
+ "description": {
147
+ "type": "string"
148
+ },
149
+ "companyId": {
150
+ "type": "string",
151
+ "format": "uuid"
152
+ },
153
+ "gross": {
154
+ "type": "number",
155
+ "example": 235000
156
+ },
157
+ "incomes": {
158
+ "type": "array",
159
+ "items": {
160
+ "$ref": "#/definitions/IncomeBusinessDetails"
161
+ }
162
+ },
163
+ "bas": {
164
+ "type": "array",
165
+ "uniqueItems": true,
166
+ "items": {
167
+ "$ref": "#/definitions/BASDefinition"
168
+ }
169
+ },
170
+ "employmentId": {
171
+ "type": "string",
172
+ "format": "uuid",
173
+ "description": "Company Applicant"
174
+ },
175
+ "frequency": {
176
+ "$ref": "#/definitions/frequency"
177
+ },
178
+ "percentOwned": {
179
+ "$ref": "#/definitions/ownershipProportion"
180
+ },
181
+ "type": {
182
+ "type": "string",
183
+ "enum": [
184
+ "CHILD_MAINTENANCE",
185
+ "FOREIGN_INCOME",
186
+ "GOVT_BENEFIT",
187
+ "INVESTMENT_INCOME",
188
+ "OTHER_INCOME",
189
+ "PAYG_BASE_SALARY",
190
+ "PAYG_COMMISSION_INCOME",
191
+ "PAYG_BONUS_INCOME",
192
+ "PAYG_OVERTIME_INCOME",
193
+ "PAYG_CAR_ALLOWANCE",
194
+ "PAYG_ALLOWANCES_TAXED",
195
+ "PAYG_ALLOWANCES_NOT_TAXED",
196
+ "PAYG_COMPANY_CAR",
197
+ "PAYG_NON_VOLUNTARY_DEDUCTIONS_PRE_TAX",
198
+ "PAYG_SALARY_SACRIFICE",
199
+ "RENTAL_INCOME",
200
+ "SELF_EMPLOYED_BUSINESS_INCOME",
201
+ "SELF_EMPLOYED_BUSINESS_INCOME_FULL_DOC",
202
+ "SELF_EMPLOYED_BUSINESS_INCOME_LOW_DOC",
203
+ "SUPER_ANNUITY_PENSION",
204
+ "WORKERS_COMPENSATION"
205
+ ]
206
+ }
207
+ }
208
+ }
209
+ }
210
+ },
211
+ "meta": {
212
+ "type": "object",
213
+ "additionalProperties": false,
214
+ "description": "The metadata of the alieo",
215
+ "properties": {
216
+ "actionedBy": {
217
+ "description": "uuid of user who made the action (create/update/delete)",
218
+ "type": "string"
219
+ },
220
+ "actionedByRole": {
221
+ "description": "role of the user that made the action",
222
+ "enum": ["team", "customer"]
223
+ }
224
+ },
225
+ "required": ["actionedBy", "actionedByRole"]
226
+ }
227
+ },
228
+ "type": "object",
229
+ "properties": {
230
+ "type": {
231
+ "type": "string",
232
+ "enum": ["IncomeCreated", "IncomeUpdated"]
233
+ },
234
+ "version": {
235
+ "type": "string"
236
+ },
237
+ "payload": {
238
+ "$ref": "#/definitions/incomeDefinition"
239
+ }
240
+ },
241
+ "required": ["type", "version", "payload"]
242
+ }
@@ -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
+ }