@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
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Integrations Transform
2
+
3
+ Contains tooling for converting Lendi's kafka event data into LIXI format.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Installation](#markdown-header-installation)
8
+ - [Publishing](#markdown-header-publishing)
9
+
10
+ ## Installation
11
+
12
+ To install and implement this module you can run the following:
13
+
14
+ ```
15
+ yarn add @lendi/act-credit-decisions-transform
16
+ ```
17
+
18
+ ## Development
19
+
20
+ Before merging your work, please remember to bump the version in `package.json`.
21
+ Once merged, you can then follow the below
22
+ [publishing](#markdown-header-publishing) steps to publish the latest changes.
23
+
24
+ ## Publishing
25
+
26
+ After your updates have been merged to `master`, you then need to publish to
27
+ `npm` please do the following:
28
+
29
+ - Click the "Publish" step from Bitbucket pipelines `master` branch.
30
+
31
+ **Note**: Make sure you have bumped the `package.json` version.
package/lib/index.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ export * from './transform-events/transform-applicant';
2
+ export * from './transform-events/transform-application';
3
+ export * from './transform-events/transform-application-workflow';
4
+ export * from './transform-events/transform-employment';
5
+ export * from './transform-events/transform-income';
6
+ export * from './transform-events/transform-asset';
7
+ export * from './transform-events/transform-expenses';
8
+ export * from './transform-events/transform-liability';
9
+ export * from './transform-events/transform-required-document';
10
+ export * from './transform-events/transform-funding-position';
11
+ export * from './update-application/merge-application';
package/lib/index.js ADDED
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /* istanbul ignore file */
18
+ __exportStar(require("./transform-events/transform-applicant"), exports);
19
+ __exportStar(require("./transform-events/transform-application"), exports);
20
+ __exportStar(require("./transform-events/transform-application-workflow"), exports);
21
+ __exportStar(require("./transform-events/transform-employment"), exports);
22
+ __exportStar(require("./transform-events/transform-income"), exports);
23
+ __exportStar(require("./transform-events/transform-asset"), exports);
24
+ __exportStar(require("./transform-events/transform-expenses"), exports);
25
+ __exportStar(require("./transform-events/transform-liability"), exports);
26
+ __exportStar(require("./transform-events/transform-required-document"), exports);
27
+ __exportStar(require("./transform-events/transform-funding-position"), exports);
28
+ __exportStar(require("./update-application/merge-application"), exports);
@@ -0,0 +1 @@
1
+ export declare const logger: import("@lendi/logging").Logger;
package/lib/logger.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.logger = void 0;
4
+ const logging_1 = require("@lendi/logging");
5
+ exports.logger = (0, logging_1.createLogger)({ name: 'integrations-transform', messageKey: 'message' });
@@ -0,0 +1,240 @@
1
+ {
2
+ "definitions": {
3
+ "brokerAuditReview": {
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "properties": {
7
+ "requestedAt": {
8
+ "type": "string",
9
+ "format": "date-time",
10
+ "description": "ISO date time when Broker Audit Review was created"
11
+ },
12
+ "reviewType": {
13
+ "type": "string",
14
+ "description": "The Broker Audit Review record type"
15
+ },
16
+ "status": {
17
+ "type": "string",
18
+ "description": "The Broker Audit Review status"
19
+ },
20
+ "outcome": {
21
+ "type": "string",
22
+ "description": "The Broker Audit Review outcome"
23
+ },
24
+ "completedBy": {
25
+ "type": "string",
26
+ "format": "uuid",
27
+ "description": "UUID of the Team Member that completed the Broker Audit Review"
28
+ },
29
+ "completedAt": {
30
+ "type": "string",
31
+ "format": "date-time",
32
+ "description": "ISO date time when Broker Audit Review was completed"
33
+ }
34
+ }
35
+ },
36
+ "applicationWorkflow": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "properties": {
40
+ "applicationId": {
41
+ "type": "string",
42
+ "format": "uuid",
43
+ "description": "UUID of the Application"
44
+ },
45
+ "applicationOwner": {
46
+ "type": "string",
47
+ "format": "uuid",
48
+ "description": "UUID of the Application Owner (Team Member)"
49
+ },
50
+ "stage": {
51
+ "type": "string",
52
+ "description": "Opportunity stage name. This is a legacy field and will be deprecated after Lendi Group salesforce goes live",
53
+ "enum": [
54
+ "APPLICATION_TAKEN",
55
+ "APPOINTED",
56
+ "APPROVAL",
57
+ "APPROVED",
58
+ "AT_RISK",
59
+ "CL_FUTURE_CONTACT_DATE",
60
+ "CLOSED_LOST",
61
+ "CLOSED_WON_POLICY_ACTIVE",
62
+ "CLOSED_WON_SIGNED",
63
+ "CLOSED_WON",
64
+ "CONFIRMED_APPOINTMENT",
65
+ "IN_APPLICATION",
66
+ "IN_ASSESSMENT",
67
+ "LOAN_DOCUMENT",
68
+ "POST_CONTACT",
69
+ "POST_SETTLEMENT",
70
+ "PRE_CONTACT",
71
+ "QUALIFICATION",
72
+ "QUOTE",
73
+ "SETTLED",
74
+ "SETTLEMENT",
75
+ "SUBMITTED",
76
+ "UNKNOWN"
77
+ ]
78
+ },
79
+ "applicationStage": {
80
+ "type": "string",
81
+ "description": "Application stage in Lendi Group Salesforce",
82
+ "enum": [
83
+ "PRE_SUBMISSION",
84
+ "SUBMISSION_REVIEW",
85
+ "SUBMITTED_TO_LENDER",
86
+ "PRE_APPROVED",
87
+ "SETTLEMENT",
88
+ "POST_SETTLEMENT",
89
+ "CLOSED_LOST"
90
+ ]
91
+ },
92
+ "status": {
93
+ "type": "string",
94
+ "description": "Opportunity status. This is a legacy field and will be deprecated after Lendi Group salesforce goes live",
95
+ "enum": [
96
+ "APPLICATION",
97
+ "APPLICATION_COMPLETED",
98
+ "APPLICATION_STARTED",
99
+ "APPROVED_AND_PENDING_SETTLEMENT",
100
+ "APPROVED_WITH_PENDING_DOCUMENTS",
101
+ "COMPLIANCE",
102
+ "CONDITIONALLY_APPROVED",
103
+ "CONTACT_ATTEMPTED",
104
+ "CONTACT_MADE",
105
+ "DASHBOARD",
106
+ "DOCS_GENERATED",
107
+ "DOCUMENTS_RECEIVED",
108
+ "E_CONSENT_COMPLETE",
109
+ "FORMALLY_APPROVED",
110
+ "IN_APPLICATION",
111
+ "LOAN_DOCUMENTS_RECEIVED",
112
+ "LOAN_DOCUMENTS_SENT",
113
+ "LOAN_DOCUMENTS_VERIFIED",
114
+ "LOST",
115
+ "MIR",
116
+ "NO_ANSWER_1",
117
+ "NO_ANSWER_2",
118
+ "NO_ANSWER_3",
119
+ "NO_ANSWER_4",
120
+ "NO_ANSWER_5",
121
+ "OPP_CREATED_NEW",
122
+ "PENDING_SETTLEMENT",
123
+ "PENDING_SETTLEMENT_CONFIRMATION",
124
+ "PLATFORM_COMPLETE",
125
+ "PRE_APPROVAL",
126
+ "PRODUCT_SELECTION_COMPLETE",
127
+ "QUARANTINED",
128
+ "READY_TO_SUBMIT",
129
+ "REQUIRED_DOCS_UPLOADED",
130
+ "SELF_SUBMITTED",
131
+ "SERVICING_PASSED",
132
+ "SETTLED",
133
+ "SETTLED_NOT_PAID",
134
+ "SETTLED_AND_DISCHARGED",
135
+ "SETTLED_AND_RECONCILED",
136
+ "SETTLEMENT_BOOKED",
137
+ "SIGNED_ADDITIONAL_DOCS_REQUIRED",
138
+ "STP",
139
+ "STP_EXCEPTIONS",
140
+ "SUBMIT_TO_PRODUCTION",
141
+ "SUBMIT_TO_PRODUCTION_INCOMPLETE",
142
+ "SUBMIT_TO_PRODUCTION_QA",
143
+ "SUBMITTED",
144
+ "SUBMITTED_CLOSED_LOST",
145
+ "SUBMITTED_DECLINED",
146
+ "SUBMITTED_ON_HOLD",
147
+ "SUBMITTED_RESOLVED",
148
+ "SUBMITTED_MIR",
149
+ "UNCONDITIONAL_APPROVAL",
150
+ "SUBMITTED_TO_LENDER",
151
+ "SUBMIT_CHANGES_TO_LENDER",
152
+ "SIGNED_CLOSED_LOST",
153
+ "REFERRED",
154
+ "UNKNOWN"
155
+ ]
156
+ },
157
+ "applicationStatus": {
158
+ "enum": [
159
+ "AMENDMENT_IN_PROGRESS",
160
+ "APPLICATION_ERROR",
161
+ "APPLICATION_RECEIVED",
162
+ "APPROVED_IN_PRINCIPLE",
163
+ "CONDITIONALLY_APPROVED",
164
+ "DECLINED",
165
+ "DISCHARGED",
166
+ "DOCUMENTS_ISSUED",
167
+ "DOCUMENTS_RECEIVED",
168
+ "INFORMATION_PROVIDED_TO_LENDER",
169
+ "LODGEMENT",
170
+ "LOST",
171
+ "MORE_INFORMATION_REQUESTED",
172
+ "ON_HOLD",
173
+ "POST_CONTACT",
174
+ "PRE_CONTACT",
175
+ "PROCESS_PENDING",
176
+ "READY_FOR_SETTLEMENT",
177
+ "REFERRED",
178
+ "REVIEW_INCOMPLETE",
179
+ "SELF_SUBMITTED",
180
+ "SETTLED",
181
+ "SETTLEMENT_BOOKED",
182
+ "UNCONDITIONALLY_APPROVED",
183
+ "UNDER_REVIEW",
184
+ "WAITING_ON_EXCEPTION"
185
+ ],
186
+ "description": "Application status in Lendi Group Salesforce"
187
+ },
188
+ "confirmedPrimaryPurpose": {
189
+ "type": "string",
190
+ "description": "Intention for applying a loan",
191
+ "enum": [
192
+ "CHATTEL_MORTGAGE",
193
+ "COMMERCIAL",
194
+ "CONSTRUCTION_AND_PURCHASE",
195
+ "CONSTRUCTION_AND_REFINANCE",
196
+ "CONSTRUCTION",
197
+ "HIRE_PURCHASE",
198
+ "INTERNAL_REFI_SWITCH",
199
+ "LEASE",
200
+ "LOAN",
201
+ "NEW_PURCHASE",
202
+ "PRE_APPROVAL",
203
+ "PURCHASE_AND_REFINANCE",
204
+ "PURCHASE",
205
+ "REFINANCE",
206
+ "SLR",
207
+ "TOP_UP",
208
+ "VARIATION",
209
+ "UNKNOWN"
210
+ ]
211
+ },
212
+ "brokerAuditReview": {
213
+ "type": "array",
214
+ "items": {
215
+ "$ref": "#/definitions/brokerAuditReview"
216
+ }
217
+ }
218
+ },
219
+ "required": ["applicationId", "stage", "status", "brokerAuditReview"]
220
+ }
221
+ },
222
+ "type": "object",
223
+ "title": "The application workflow event schema",
224
+ "description": "Application workflow",
225
+ "additionalProperties": false,
226
+ "properties": {
227
+ "version": {
228
+ "type": "string",
229
+ "description": "schema version"
230
+ },
231
+ "type": {
232
+ "type": "string",
233
+ "enum": ["ApplicationWorkflowUpdated"]
234
+ },
235
+ "payload": {
236
+ "$ref": "#/definitions/applicationWorkflow"
237
+ }
238
+ },
239
+ "required": ["version", "payload", "type"]
240
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "payload": {
6
+ "$ref": "#/definitions/payload"
7
+ },
8
+ "type": {
9
+ "type": "string",
10
+ "enum": ["CreditReportNoMatch", "CreditReportRetrieved"]
11
+ },
12
+ "version": {
13
+ "type": "string"
14
+ }
15
+ },
16
+ "required": ["payload", "type", "version"],
17
+ "definitions": {
18
+ "payload": {
19
+ "allOf": [
20
+ {
21
+ "properties": {
22
+ "applicationId": {
23
+ "type": "string"
24
+ },
25
+ "applicantId": {
26
+ "type": "string"
27
+ },
28
+ "customerId": {
29
+ "type": "string"
30
+ },
31
+ "source": {
32
+ "description": "A list of credit report service provider",
33
+ "type": "string",
34
+ "enum": ["equifax"]
35
+ },
36
+ "createdAt": {
37
+ "description": "ISO 8601 time when the event is created",
38
+ "type": "string",
39
+ "format": "date-time",
40
+ "example": ["2020-11-03T03:43:33.333Z"]
41
+ },
42
+ "raw": {
43
+ "description": "Credit report raw content, compressed and 64-base encoded.",
44
+ "type": "string"
45
+ },
46
+ "isNoMatch": {
47
+ "description": "Indicate whether there is a match found or not for the customer.",
48
+ "type": "boolean",
49
+ "default": false
50
+ }
51
+ },
52
+ "required": ["applicationId", "applicantId", "customerId", "source", "raw"]
53
+ }
54
+ ]
55
+ }
56
+ }
57
+ }