@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.
- package/README.md +31 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.js +28 -0
- package/lib/logger.d.ts +1 -0
- package/lib/logger.js +5 -0
- package/lib/schemas/application-workflow-event.json +240 -0
- package/lib/schemas/credit-report-retrieved-event.json +57 -0
- package/lib/schemas/public-applicant-event.json +910 -0
- package/lib/schemas/public-application-event.json +250 -0
- package/lib/schemas/public-asset-event.json +679 -0
- package/lib/schemas/public-asset-liability-relation-delete-event.json +74 -0
- package/lib/schemas/public-asset-liability-relation-event.json +73 -0
- package/lib/schemas/public-create-applicant-event.json +609 -0
- package/lib/schemas/public-delete-applicant-event.json +66 -0
- package/lib/schemas/public-delete-asset-event.json +53 -0
- package/lib/schemas/public-delete-income-event.json +55 -0
- package/lib/schemas/public-employment-delete-event.json +31 -0
- package/lib/schemas/public-employment-event.json +278 -0
- package/lib/schemas/public-expense-delete-event.json +41 -0
- package/lib/schemas/public-expense-event.json +133 -0
- package/lib/schemas/public-funding-position-event.json +419 -0
- package/lib/schemas/public-income-event.json +242 -0
- package/lib/schemas/public-liability-delete-event.json +37 -0
- package/lib/schemas/public-liability-event.json +262 -0
- package/lib/schemas/public-required-document-event.json +366 -0
- package/lib/schemas/public-update-applicant-event.json +606 -0
- package/lib/schemas/sf-opportunity-event-out.json +138 -0
- package/lib/transform-events/generate-asset-liability-link.d.ts +10 -0
- package/lib/transform-events/generate-asset-liability-link.js +29 -0
- package/lib/transform-events/generate-credit-report-rebuilt.d.ts +8 -0
- package/lib/transform-events/generate-credit-report-rebuilt.js +41 -0
- package/lib/transform-events/transform-applicant.d.ts +8 -0
- package/lib/transform-events/transform-applicant.js +180 -0
- package/lib/transform-events/transform-application-workflow.d.ts +8 -0
- package/lib/transform-events/transform-application-workflow.js +30 -0
- package/lib/transform-events/transform-application.d.ts +20 -0
- package/lib/transform-events/transform-application.js +67 -0
- package/lib/transform-events/transform-asset-address.d.ts +25 -0
- package/lib/transform-events/transform-asset-address.js +87 -0
- package/lib/transform-events/transform-asset.d.ts +58 -0
- package/lib/transform-events/transform-asset.js +337 -0
- package/lib/transform-events/transform-employment.d.ts +8 -0
- package/lib/transform-events/transform-employment.js +106 -0
- package/lib/transform-events/transform-expenses.d.ts +41 -0
- package/lib/transform-events/transform-expenses.js +121 -0
- package/lib/transform-events/transform-funding-position.d.ts +21 -0
- package/lib/transform-events/transform-funding-position.js +107 -0
- package/lib/transform-events/transform-income.d.ts +48 -0
- package/lib/transform-events/transform-income.js +260 -0
- package/lib/transform-events/transform-liability.d.ts +12 -0
- package/lib/transform-events/transform-liability.js +117 -0
- package/lib/transform-events/transform-percent-owned.d.ts +10 -0
- package/lib/transform-events/transform-percent-owned.js +22 -0
- package/lib/transform-events/transform-required-document.d.ts +67 -0
- package/lib/transform-events/transform-required-document.js +148 -0
- package/lib/types/enum-mappings/alieo-frequency.d.ts +15 -0
- package/lib/types/enum-mappings/alieo-frequency.js +25 -0
- package/lib/types/enum-mappings/applicant-gender.d.ts +6 -0
- package/lib/types/enum-mappings/applicant-gender.js +11 -0
- package/lib/types/enum-mappings/applicant-type.d.ts +6 -0
- package/lib/types/enum-mappings/applicant-type.js +10 -0
- package/lib/types/enum-mappings/asset-type.d.ts +3 -0
- package/lib/types/enum-mappings/asset-type.js +17 -0
- package/lib/types/enum-mappings/builder-type.d.ts +7 -0
- package/lib/types/enum-mappings/builder-type.js +9 -0
- package/lib/types/enum-mappings/company-structure.d.ts +7 -0
- package/lib/types/enum-mappings/company-structure.js +10 -0
- package/lib/types/enum-mappings/company-type.d.ts +7 -0
- package/lib/types/enum-mappings/company-type.js +11 -0
- package/lib/types/enum-mappings/construction-type.d.ts +7 -0
- package/lib/types/enum-mappings/construction-type.js +10 -0
- package/lib/types/enum-mappings/country-code.d.ts +7 -0
- package/lib/types/enum-mappings/country-code.js +246 -0
- package/lib/types/enum-mappings/employment-basis.d.ts +7 -0
- package/lib/types/enum-mappings/employment-basis.js +12 -0
- package/lib/types/enum-mappings/expense-frequency.d.ts +7 -0
- package/lib/types/enum-mappings/expense-frequency.js +11 -0
- package/lib/types/enum-mappings/funding-position.d.ts +18 -0
- package/lib/types/enum-mappings/funding-position.js +36 -0
- package/lib/types/enum-mappings/government-benefits.d.ts +7 -0
- package/lib/types/enum-mappings/government-benefits.js +10 -0
- package/lib/types/enum-mappings/guarantor-relationship-type.d.ts +3 -0
- package/lib/types/enum-mappings/guarantor-relationship-type.js +16 -0
- package/lib/types/enum-mappings/housing-status.d.ts +7 -0
- package/lib/types/enum-mappings/housing-status.js +15 -0
- package/lib/types/enum-mappings/income-type.d.ts +7 -0
- package/lib/types/enum-mappings/income-type.js +16 -0
- package/lib/types/enum-mappings/index.d.ts +27 -0
- package/lib/types/enum-mappings/index.js +43 -0
- package/lib/types/enum-mappings/liability-payment-type.d.ts +7 -0
- package/lib/types/enum-mappings/liability-payment-type.js +9 -0
- package/lib/types/enum-mappings/liability-type.d.ts +7 -0
- package/lib/types/enum-mappings/liability-type.js +21 -0
- package/lib/types/enum-mappings/living-expense.d.ts +7 -0
- package/lib/types/enum-mappings/living-expense.js +31 -0
- package/lib/types/enum-mappings/marital-status.d.ts +7 -0
- package/lib/types/enum-mappings/marital-status.js +12 -0
- package/lib/types/enum-mappings/postcode.d.ts +6 -0
- package/lib/types/enum-mappings/postcode.js +15 -0
- package/lib/types/enum-mappings/preferred-repayment.d.ts +7 -0
- package/lib/types/enum-mappings/preferred-repayment.js +10 -0
- package/lib/types/enum-mappings/proof-of-identity.d.ts +7 -0
- package/lib/types/enum-mappings/proof-of-identity.js +10 -0
- package/lib/types/enum-mappings/property-expense-category.d.ts +7 -0
- package/lib/types/enum-mappings/property-expense-category.js +11 -0
- package/lib/types/enum-mappings/public-financial-asset.d.ts +7 -0
- package/lib/types/enum-mappings/public-financial-asset.js +12 -0
- package/lib/types/enum-mappings/public-primary-purpose.d.ts +7 -0
- package/lib/types/enum-mappings/public-primary-purpose.js +9 -0
- package/lib/types/enum-mappings/public-property-status.d.ts +7 -0
- package/lib/types/enum-mappings/public-property-status.js +11 -0
- package/lib/types/enum-mappings/public-property-type.d.ts +7 -0
- package/lib/types/enum-mappings/public-property-type.js +23 -0
- package/lib/types/enum-mappings/residency-status.d.ts +7 -0
- package/lib/types/enum-mappings/residency-status.js +11 -0
- package/lib/types/enum-mappings/title-gender.d.ts +7 -0
- package/lib/types/enum-mappings/title-gender.js +13 -0
- package/lib/types/enum-mappings/title.d.ts +7 -0
- package/lib/types/enum-mappings/title.js +13 -0
- package/lib/types/enum-mappings/to-be-purchased.d.ts +5 -0
- package/lib/types/enum-mappings/to-be-purchased.js +8 -0
- package/lib/types/enum-mappings/to-be-used-as-security.d.ts +5 -0
- package/lib/types/enum-mappings/to-be-used-as-security.js +8 -0
- package/lib/types/enum-mappings/transaction-type.d.ts +7 -0
- package/lib/types/enum-mappings/transaction-type.js +9 -0
- package/lib/types/enum-mappings/trust.d.ts +7 -0
- package/lib/types/enum-mappings/trust.js +14 -0
- package/lib/types/enum-mappings/verification.d.ts +3 -0
- package/lib/types/enum-mappings/verification.js +13 -0
- package/lib/types/events/applicant-delete.d.ts +42 -0
- package/lib/types/events/applicant-delete.js +15 -0
- package/lib/types/events/application-workflow.d.ts +233 -0
- package/lib/types/events/application-workflow.js +172 -0
- package/lib/types/events/asset-delete.d.ts +33 -0
- package/lib/types/events/asset-delete.js +15 -0
- package/lib/types/events/asset-liability-relation-delete.d.ts +52 -0
- package/lib/types/events/asset-liability-relation-delete.js +15 -0
- package/lib/types/events/credit-report-retrieved.d.ts +36 -0
- package/lib/types/events/credit-report-retrieved.js +15 -0
- package/lib/types/events/employment-delete.d.ts +19 -0
- package/lib/types/events/employment-delete.js +7 -0
- package/lib/types/events/expense-delete.d.ts +21 -0
- package/lib/types/events/expense-delete.js +7 -0
- package/lib/types/events/funding-position.d.ts +116 -0
- package/lib/types/events/funding-position.js +34 -0
- package/lib/types/events/income-delete.d.ts +33 -0
- package/lib/types/events/income-delete.js +15 -0
- package/lib/types/events/liability-delete.d.ts +17 -0
- package/lib/types/events/liability-delete.js +7 -0
- package/lib/types/events/opportunity.d.ts +102 -0
- package/lib/types/events/opportunity.js +47 -0
- package/lib/types/events/public-applicant.d.ts +628 -0
- package/lib/types/events/public-applicant.js +411 -0
- package/lib/types/events/public-application.d.ts +151 -0
- package/lib/types/events/public-application.js +103 -0
- package/lib/types/events/public-asset-liability-relation.d.ts +52 -0
- package/lib/types/events/public-asset-liability-relation.js +15 -0
- package/lib/types/events/public-asset.d.ts +502 -0
- package/lib/types/events/public-asset.js +348 -0
- package/lib/types/events/public-employment.d.ts +121 -0
- package/lib/types/events/public-employment.js +46 -0
- package/lib/types/events/public-expense.d.ts +84 -0
- package/lib/types/events/public-expense.js +51 -0
- package/lib/types/events/public-funding-position.d.ts +341 -0
- package/lib/types/events/public-funding-position.js +20 -0
- package/lib/types/events/public-income.d.ts +144 -0
- package/lib/types/events/public-income.js +65 -0
- package/lib/types/events/public-liability.d.ts +140 -0
- package/lib/types/events/public-liability.js +68 -0
- package/lib/types/events/public-required-document.d.ts +374 -0
- package/lib/types/events/public-required-document.js +297 -0
- package/lib/types/partial-application.d.ts +3 -0
- package/lib/types/partial-application.js +2 -0
- package/lib/types/recursive-partial.d.ts +3 -0
- package/lib/types/recursive-partial.js +2 -0
- package/lib/update-application/merge-application.d.ts +14 -0
- package/lib/update-application/merge-application.js +175 -0
- package/lib/update-application/remove-ids-not-required.d.ts +11 -0
- package/lib/update-application/remove-ids-not-required.js +63 -0
- package/lib/update-application/update-primary-applicant.d.ts +27 -0
- package/lib/update-application/update-primary-applicant.js +46 -0
- package/lib/utils/address-tools.d.ts +84 -0
- package/lib/utils/address-tools.js +176 -0
- package/lib/utils/clean-up.d.ts +7 -0
- package/lib/utils/clean-up.js +24 -0
- package/lib/utils/errors.d.ts +28 -0
- package/lib/utils/errors.js +43 -0
- package/lib/utils/formatYesNo.d.ts +8 -0
- package/lib/utils/formatYesNo.js +12 -0
- package/lib/utils/generate-address.d.ts +19 -0
- package/lib/utils/generate-address.js +97 -0
- package/lib/utils/get-financial-institution.d.ts +8 -0
- package/lib/utils/get-financial-institution.js +17 -0
- package/lib/utils/is-asset-type.d.ts +25 -0
- package/lib/utils/is-asset-type.js +46 -0
- package/lib/utils/is-income-type.d.ts +73 -0
- package/lib/utils/is-income-type.js +134 -0
- package/lib/utils/iso-date.d.ts +7 -0
- package/lib/utils/iso-date.js +12 -0
- package/lib/utils/normalise-date.d.ts +8 -0
- package/lib/utils/normalise-date.js +17 -0
- package/lib/utils/round-decimal.d.ts +6 -0
- package/lib/utils/round-decimal.js +12 -0
- package/package.json +78 -0
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
"applicationId": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"deleteAssetAndLiabilityRelationDefinition": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"meta": {
|
|
30
|
+
"$ref": "#/definitions/meta"
|
|
31
|
+
},
|
|
32
|
+
"applicationId": {
|
|
33
|
+
"$ref": "#/definitions/applicationId"
|
|
34
|
+
},
|
|
35
|
+
"relation": {
|
|
36
|
+
"$ref": "#/definitions/relation"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": ["applicationId", "relation"],
|
|
40
|
+
"description": "delete Asset And Liability Relation payload"
|
|
41
|
+
},
|
|
42
|
+
"relation": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"assetId": {
|
|
46
|
+
"$ref": "#/definitions/id",
|
|
47
|
+
"description": "uuid of asset"
|
|
48
|
+
},
|
|
49
|
+
"liabilityId": {
|
|
50
|
+
"$ref": "#/definitions/id",
|
|
51
|
+
"description": "uuid of liability"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": ["assetId", "liabilityId"]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"type": "object",
|
|
58
|
+
"title": "The AssetAndLiabilityRelationDeleted event schema",
|
|
59
|
+
"description": "The AssetAndLiabilityRelationDeleted event schema",
|
|
60
|
+
"properties": {
|
|
61
|
+
"version": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "schema version"
|
|
64
|
+
},
|
|
65
|
+
"type": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"enum": ["AssetAndLiabilityRelationDeleted"]
|
|
68
|
+
},
|
|
69
|
+
"payload": {
|
|
70
|
+
"$ref": "#/definitions/deleteAssetAndLiabilityRelationDefinition"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"required": ["version", "payload", "type"]
|
|
74
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"definitions": {
|
|
3
|
+
"id": {
|
|
4
|
+
"type": "string"
|
|
5
|
+
},
|
|
6
|
+
"meta": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"description": "The metadata of the alieo",
|
|
10
|
+
"properties": {
|
|
11
|
+
"actionedBy": {
|
|
12
|
+
"description": "uuid of user who made the action (create/update/delete)",
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"actionedByRole": {
|
|
16
|
+
"description": "role of the user that made the action",
|
|
17
|
+
"enum": ["team", "customer"]
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"required": ["actionedBy", "actionedByRole"]
|
|
21
|
+
},
|
|
22
|
+
"applicationId": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"relation": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"assetId": {
|
|
29
|
+
"$ref": "#/definitions/id",
|
|
30
|
+
"description": "uuid of asset"
|
|
31
|
+
},
|
|
32
|
+
"liabilityId": {
|
|
33
|
+
"$ref": "#/definitions/id",
|
|
34
|
+
"description": "uuid of liability"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required": ["assetId", "liabilityId"]
|
|
38
|
+
},
|
|
39
|
+
"AssetAndLiabilityRelation": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"meta": {
|
|
43
|
+
"$ref": "#/definitions/meta"
|
|
44
|
+
},
|
|
45
|
+
"applicationId": {
|
|
46
|
+
"$ref": "#/definitions/applicationId"
|
|
47
|
+
},
|
|
48
|
+
"relation": {
|
|
49
|
+
"$ref": "#/definitions/relation"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"required": ["applicationId", "relation"],
|
|
53
|
+
"description": "create Asset And Liability Relation payload"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"type": "object",
|
|
57
|
+
"title": "The AssetAndLiabilityRelationCreated event schema",
|
|
58
|
+
"description": "The AssetAndLiabilityRelationCreated event schema",
|
|
59
|
+
"properties": {
|
|
60
|
+
"version": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "schema version"
|
|
63
|
+
},
|
|
64
|
+
"type": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"enum": ["AssetAndLiabilityRelationCreated"]
|
|
67
|
+
},
|
|
68
|
+
"payload": {
|
|
69
|
+
"$ref": "#/definitions/AssetAndLiabilityRelation"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"required": ["version", "payload", "type"]
|
|
73
|
+
}
|