@dynamatix/gb-schemas 2.3.237 → 2.3.239
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 +309 -0
- package/dist/applicants/applicant-additional-income.model.d.ts +13 -12
- package/dist/applicants/applicant-additional-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-additional-income.model.js +3 -0
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts +19 -18
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-creditCard.model.js +3 -0
- package/dist/applicants/applicant-commitment-loan.model.d.ts +19 -18
- package/dist/applicants/applicant-commitment-loan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-loan.model.js +3 -0
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts +19 -18
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-mortgage.model.js +3 -0
- package/dist/applicants/applicant-commitment-residence.model.d.ts +31 -30
- package/dist/applicants/applicant-commitment-residence.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-residence.model.js +3 -0
- package/dist/applicants/applicant-commitment-secureLoan.model.d.ts +19 -18
- package/dist/applicants/applicant-commitment-secureLoan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-secureLoan.model.js +3 -0
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts +19 -18
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.js +3 -0
- package/dist/applicants/applicant-credit-data.model.d.ts +3 -3
- package/dist/applicants/applicant-credit-report.model.d.ts +3754 -0
- package/dist/applicants/{applicant-income.model.d.ts.map → applicant-credit-report.model.d.ts.map} +1 -1
- package/dist/applicants/applicant-credit-report.model.js +116 -0
- package/dist/applicants/applicant-credit-report.type.d.ts +140 -0
- package/dist/applicants/applicant-credit-report.type.d.ts.map +1 -0
- package/dist/applicants/applicant-credit-report.type.js +1 -0
- package/dist/applicants/applicant-employment-income.model.d.ts +7 -6
- package/dist/applicants/applicant-employment-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-employment-income.model.js +3 -0
- package/dist/applicants/applicant-employment.model.d.ts +88 -87
- package/dist/applicants/applicant-employment.model.d.ts.map +1 -1
- package/dist/applicants/applicant-employment.model.js +19 -19
- package/dist/applicants/applicant-expenditure.model.d.ts +7 -0
- package/dist/applicants/applicant-expenditure.model.d.ts.map +1 -1
- package/dist/applicants/applicant-expenditure.model.js +77 -0
- package/dist/applicants/applicant-expenditure.type.d.ts +42 -0
- package/dist/applicants/applicant-expenditure.type.d.ts.map +1 -0
- package/dist/applicants/applicant-expenditure.type.js +1 -0
- package/dist/applicants/applicant-income-settings.model.d.ts.map +1 -1
- package/dist/applicants/applicant-income-settings.model.js +3 -0
- package/dist/applicants/applicant-income-settings.type.d.ts +40 -0
- package/dist/applicants/applicant-income-settings.type.d.ts.map +1 -0
- package/dist/applicants/applicant-income-settings.type.js +1 -0
- package/dist/applicants/applicant-income-summary.model.d.ts +73 -72
- package/dist/applicants/applicant-income-summary.model.d.ts.map +1 -1
- package/dist/applicants/applicant-income-summary.model.js +3 -0
- package/dist/applicants/applicant-income-summary.type.d.ts +60 -0
- package/dist/applicants/applicant-income-summary.type.d.ts.map +1 -0
- package/dist/applicants/applicant-income-summary.type.js +1 -0
- package/dist/applicants/applicant-pension-income.model.d.ts +19 -18
- package/dist/applicants/applicant-pension-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-pension-income.model.js +3 -0
- package/dist/applicants/applicant-pension-income.type.d.ts +40 -0
- package/dist/applicants/applicant-pension-income.type.d.ts.map +1 -0
- package/dist/applicants/applicant-pension-income.type.js +1 -0
- package/dist/applicants/applicant-property-income.model.d.ts +37 -36
- package/dist/applicants/applicant-property-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-property-income.model.js +3 -0
- package/dist/applicants/applicant-self-employed-income.model.d.ts +7 -6
- package/dist/applicants/applicant-self-employed-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-self-employed-income.model.js +3 -0
- package/dist/applicants/applicant-self-employed-income.type.d.ts +37 -0
- package/dist/applicants/applicant-self-employed-income.type.d.ts.map +1 -0
- package/dist/applicants/applicant-self-employed-income.type.js +1 -0
- package/dist/applicants/applicant-self-employment.model.d.ts +6 -6
- package/dist/applicants/applicant-self-employment.model.d.ts.map +1 -1
- package/dist/applicants/applicant-self-employment.model.js +4 -1
- package/dist/applicants/applicant-sole-trader-income.model.d.ts +7 -6
- package/dist/applicants/applicant-sole-trader-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-sole-trader-income.model.js +3 -0
- package/dist/applicants/applicant-sole-trader-income.type.d.ts +37 -0
- package/dist/applicants/applicant-sole-trader-income.type.d.ts.map +1 -0
- package/dist/applicants/applicant-sole-trader-income.type.js +1 -0
- package/dist/applicants/applicant-uk-tax-credits.model.d.ts +19 -18
- package/dist/applicants/applicant-uk-tax-credits.model.d.ts.map +1 -1
- package/dist/applicants/applicant-uk-tax-credits.model.js +3 -0
- package/dist/applicants/applicant-uk-tax-credits.type.d.ts +39 -0
- package/dist/applicants/applicant-uk-tax-credits.type.d.ts.map +1 -0
- package/dist/applicants/applicant-uk-tax-credits.type.js +1 -0
- package/dist/applicants/applicant-welcome-call.model.d.ts +288 -0
- package/dist/applicants/applicant-welcome-call.model.d.ts.map +1 -0
- package/dist/applicants/applicant-welcome-call.model.js +263 -0
- package/dist/applicants/applicant-welcome-call.type.d.ts +66 -0
- package/dist/applicants/applicant-welcome-call.type.d.ts.map +1 -0
- package/dist/applicants/applicant-welcome-call.type.js +1 -0
- package/dist/applicants/applicant.model.d.ts +49 -42
- package/dist/applicants/applicant.model.d.ts.map +1 -1
- package/dist/applicants/applicant.model.js +5 -1
- package/dist/applicants/applicant.type.d.ts +158 -0
- package/dist/applicants/applicant.type.d.ts.map +1 -0
- package/dist/applicants/applicant.type.js +1 -0
- package/dist/applicants/index.d.ts +14 -0
- package/dist/applicants/index.d.ts.map +1 -1
- package/dist/applicants/index.js +2 -0
- package/dist/applications/application-audit.model.d.ts +6 -6
- package/dist/applications/application-audit.model.d.ts.map +1 -1
- package/dist/applications/application-audit.model.js +3 -0
- package/dist/applications/application-checklist-Item.model.d.ts +6 -0
- package/dist/applications/application-checklist-Item.model.d.ts.map +1 -1
- package/dist/applications/application-checklist-Item.model.js +4 -0
- package/dist/applications/application-company-model.d.ts +64 -57
- package/dist/applications/application-company-model.d.ts.map +1 -1
- package/dist/applications/application-company-model.js +1 -0
- package/dist/applications/application-direct-debit.model.d.ts +29 -27
- package/dist/applications/application-direct-debit.model.d.ts.map +1 -1
- package/dist/applications/application-direct-debit.model.js +3 -0
- package/dist/applications/application-euc.model.d.ts.map +1 -1
- package/dist/applications/application-euc.model.js +3 -0
- package/dist/applications/application-fieldconfig.model.d.ts.map +1 -1
- package/dist/applications/application-fieldconfig.model.js +3 -0
- package/dist/applications/application-legal.model.d.ts.map +1 -1
- package/dist/applications/application-legal.model.js +3 -0
- package/dist/applications/application-mortgage.model.d.ts +1 -0
- package/dist/applications/application-mortgage.model.d.ts.map +1 -1
- package/dist/applications/application-mortgage.model.js +3 -0
- package/dist/applications/application-mortgage.type.d.ts +76 -0
- package/dist/applications/application-mortgage.type.d.ts.map +1 -0
- package/dist/applications/application-mortgage.type.js +1 -0
- package/dist/applications/application-note.model.d.ts +36 -24
- package/dist/applications/application-note.model.d.ts.map +1 -1
- package/dist/applications/application-note.model.js +12 -3
- package/dist/applications/application-note.type.d.ts +55 -0
- package/dist/applications/application-note.type.d.ts.map +1 -0
- package/dist/applications/application-note.type.js +1 -0
- package/dist/applications/application-offer.model.d.ts.map +1 -1
- package/dist/applications/application-offer.model.js +3 -0
- package/dist/applications/application-onboarding.model.d.ts.map +1 -1
- package/dist/applications/application-onboarding.model.js +3 -0
- package/dist/applications/application-product.model.d.ts +77 -13
- package/dist/applications/application-product.model.d.ts.map +1 -1
- package/dist/applications/application-product.model.js +16 -3
- package/dist/applications/application-product.type.d.ts +58 -0
- package/dist/applications/application-product.type.d.ts.map +1 -0
- package/dist/applications/application-product.type.js +1 -0
- package/dist/applications/application-productfeatures.model.d.ts +12 -6
- package/dist/applications/application-productfeatures.model.d.ts.map +1 -1
- package/dist/applications/application-productfeatures.model.js +5 -1
- package/dist/applications/application-productfeatures.type.d.ts +125 -0
- package/dist/applications/application-productfeatures.type.d.ts.map +1 -0
- package/dist/applications/application-productfeatures.type.js +1 -0
- package/dist/applications/application-rationale.model.d.ts +6 -12
- package/dist/applications/application-rationale.model.d.ts.map +1 -1
- package/dist/applications/application-rationale.model.js +11 -20
- package/dist/applications/application-rationale.type.d.ts +7 -7
- package/dist/applications/application-rationale.type.d.ts.map +1 -1
- package/dist/applications/application-risk-narrative.model.d.ts.map +1 -1
- package/dist/applications/application-risk-narrative.model.js +3 -0
- package/dist/applications/application-valuation-report.model.d.ts +1246 -0
- package/dist/applications/application-valuation-report.model.d.ts.map +1 -0
- package/dist/applications/application-valuation-report.model.js +269 -0
- package/dist/applications/application-valuation-report.type.d.ts +108 -0
- package/dist/applications/application-valuation-report.type.d.ts.map +1 -0
- package/dist/applications/application-valuation-report.type.js +1 -0
- package/dist/applications/application-valuation.model.d.ts +695 -18
- package/dist/applications/application-valuation.model.d.ts.map +1 -1
- package/dist/applications/application-valuation.model.js +33 -7
- package/dist/applications/application-valuation.type.d.ts +54 -0
- package/dist/applications/application-valuation.type.d.ts.map +1 -0
- package/dist/applications/application-valuation.type.js +1 -0
- package/dist/applications/application.model.d.ts +36 -30
- package/dist/applications/application.model.d.ts.map +1 -1
- package/dist/applications/application.model.js +17 -4
- package/dist/applications/applications-task.model.d.ts +171 -67
- package/dist/applications/applications-task.model.d.ts.map +1 -1
- package/dist/applications/applications-task.model.js +36 -45
- package/dist/applications/applications-task.type.d.ts +57 -0
- package/dist/applications/applications-task.type.d.ts.map +1 -0
- package/dist/applications/applications-task.type.js +1 -0
- package/dist/applications/broker.model.d.ts.map +1 -1
- package/dist/applications/broker.model.js +3 -0
- package/dist/applications/index.d.ts +10 -3
- package/dist/applications/index.d.ts.map +1 -1
- package/dist/applications/index.js +2 -3
- package/dist/applications/solicitor.model.d.ts +2 -0
- package/dist/applications/solicitor.model.d.ts.map +1 -1
- package/dist/applications/solicitor.model.js +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/product-catalogues/index.d.ts +3 -0
- package/dist/product-catalogues/index.d.ts.map +1 -1
- package/dist/product-catalogues/product-catalogue.type.d.ts +15 -0
- package/dist/product-catalogues/product-catalogue.type.d.ts.map +1 -0
- package/dist/product-catalogues/product-catalogue.type.js +1 -0
- package/dist/product-catalogues/product-definitions.type.d.ts +53 -0
- package/dist/product-catalogues/product-definitions.type.d.ts.map +1 -0
- package/dist/product-catalogues/product-definitions.type.js +1 -0
- package/dist/product-catalogues/product-variant.type.d.ts +38 -0
- package/dist/product-catalogues/product-variant.type.d.ts.map +1 -0
- package/dist/product-catalogues/product-variant.type.js +1 -0
- package/dist/properties/property.model.d.ts +52 -51
- package/dist/properties/property.model.d.ts.map +1 -1
- package/dist/properties/property.model.js +1 -2
- package/dist/properties/security.model.d.ts +6 -0
- package/dist/properties/security.model.d.ts.map +1 -1
- package/dist/properties/security.model.js +1 -0
- package/dist/shared/alert.model.d.ts +12 -12
- package/dist/shared/api-log.model.d.ts +118 -0
- package/dist/shared/api-log.model.d.ts.map +1 -0
- package/dist/shared/api-log.model.js +21 -0
- package/dist/shared/apprivo-sync-journey.model.d.ts +6 -6
- package/dist/shared/checklist.model.d.ts +6 -6
- package/dist/shared/index.d.ts +5 -1
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +4 -1
- package/dist/shared/job-setting.model.d.ts +6 -6
- package/dist/shared/lookup-group.model.d.ts +25 -25
- package/dist/shared/lookup-group.model.d.ts.map +1 -1
- package/dist/shared/lookup-group.model.js +3 -0
- package/dist/shared/schema-doc.model.d.ts +6 -6
- package/dist/shared/system-parameter.model.d.ts +6 -6
- package/dist/shared/task-document.model.d.ts +6 -6
- package/dist/shared/task.model.d.ts +6 -6
- package/dist/shared/{document-type-model.d.ts → webhook-event.model.d.ts} +6 -45
- package/dist/shared/webhook-event.model.d.ts.map +1 -0
- package/dist/shared/webhook-event.model.js +53 -0
- package/dist/shared/webhook-event.type.d.ts +15 -0
- package/dist/shared/webhook-event.type.d.ts.map +1 -0
- package/dist/shared/webhook-event.type.js +1 -0
- package/dist/shared/workflow-trigger.model.d.ts +32 -0
- package/dist/shared/workflow-trigger.model.d.ts.map +1 -0
- package/dist/shared/workflow-trigger.model.js +45 -0
- package/dist/shared/workflow-trigger.type.d.ts +59 -0
- package/dist/shared/workflow-trigger.type.d.ts.map +1 -0
- package/dist/shared/workflow-trigger.type.js +1 -0
- package/dist/shared/workflow.init.d.ts +21 -0
- package/dist/shared/workflow.init.d.ts.map +1 -0
- package/dist/shared/workflow.init.js +41 -0
- package/dist/shared/workflow.middleware.d.ts +107 -0
- package/dist/shared/workflow.middleware.d.ts.map +1 -0
- package/dist/shared/workflow.middleware.js +230 -0
- package/dist/shared/workflow.plugin.d.ts +46 -0
- package/dist/shared/workflow.plugin.d.ts.map +1 -0
- package/dist/shared/workflow.plugin.js +102 -0
- package/dist/shared/workflow.service.d.ts +39 -0
- package/dist/shared/workflow.service.d.ts.map +1 -0
- package/dist/shared/workflow.service.js +115 -0
- package/dist/value-objects/pound.d.ts.map +1 -1
- package/package.json +14 -3
- package/dist/applicants/applicant-income.model.d.ts +0 -2558
- package/dist/applicants/applicant-income.model.js +0 -82
- package/dist/applications/application-document.model.d.ts +0 -186
- package/dist/applications/application-document.model.d.ts.map +0 -1
- package/dist/applications/application-document.model.js +0 -35
- package/dist/applications/document.model.d.ts +0 -186
- package/dist/applications/document.model.d.ts.map +0 -1
- package/dist/applications/document.model.js +0 -35
- package/dist/shared/document-type-model.d.ts.map +0 -1
- package/dist/shared/document-type-model.js +0 -10
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/// <reference path="../value-objects/pound.d.ts" />
|
|
2
|
+
/// <reference path="../value-objects/account-number.d.ts" />
|
|
3
|
+
/// <reference path="../value-objects/sort-code.d.ts" />
|
|
4
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
5
|
+
/// <reference types="mongoose/types/callback" />
|
|
6
|
+
/// <reference types="mongoose/types/collection" />
|
|
7
|
+
/// <reference types="mongoose/types/connection" />
|
|
8
|
+
/// <reference types="mongoose/types/cursor" />
|
|
9
|
+
/// <reference types="mongoose/types/document" />
|
|
10
|
+
/// <reference types="mongoose/types/error" />
|
|
11
|
+
/// <reference types="mongoose/types/expressions" />
|
|
12
|
+
/// <reference types="mongoose/types/helpers" />
|
|
13
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
14
|
+
/// <reference types="mongoose/types/indexes" />
|
|
15
|
+
/// <reference types="mongoose/types/models" />
|
|
16
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
17
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
18
|
+
/// <reference types="mongoose/types/populate" />
|
|
19
|
+
/// <reference types="mongoose/types/query" />
|
|
20
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
21
|
+
/// <reference types="mongoose/types/session" />
|
|
22
|
+
/// <reference types="mongoose/types/types" />
|
|
23
|
+
/// <reference types="mongoose/types/utility" />
|
|
24
|
+
/// <reference types="mongoose/types/validation" />
|
|
25
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
26
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
27
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
28
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
29
|
+
import mongoose from "mongoose";
|
|
30
|
+
declare const WelcomeCallModel: mongoose.Model<{
|
|
31
|
+
createdAt: NativeDate;
|
|
32
|
+
updatedAt: NativeDate;
|
|
33
|
+
} & {
|
|
34
|
+
applicationId: mongoose.Types.ObjectId;
|
|
35
|
+
applicantId: mongoose.Types.ObjectId;
|
|
36
|
+
applicantName: string;
|
|
37
|
+
lendingTypeLid: mongoose.Types.ObjectId;
|
|
38
|
+
purchaseTypeLid: mongoose.Types.ObjectId;
|
|
39
|
+
bepReference: string;
|
|
40
|
+
firstCallAttemptDate: string;
|
|
41
|
+
callCompletedDate: string;
|
|
42
|
+
failedCallReason: string;
|
|
43
|
+
customerFullNameStatusLid: mongoose.Types.ObjectId;
|
|
44
|
+
customerDOBStatusLid: mongoose.Types.ObjectId;
|
|
45
|
+
residentialAddressStatusLid: mongoose.Types.ObjectId;
|
|
46
|
+
contactNumberStatusLid: mongoose.Types.ObjectId;
|
|
47
|
+
emailAddressStatusLid: mongoose.Types.ObjectId;
|
|
48
|
+
financePaymentTypeStatusLid: mongoose.Types.ObjectId;
|
|
49
|
+
amountOfFinanceStatusLid: mongoose.Types.ObjectId;
|
|
50
|
+
otherApplicantDetailsStatusLid: mongoose.Types.ObjectId;
|
|
51
|
+
employerNameStatusLid: mongoose.Types.ObjectId;
|
|
52
|
+
securityPropertyPurchasePriceLid: mongoose.Types.ObjectId;
|
|
53
|
+
idvPassedStatusLid: mongoose.Types.ObjectId;
|
|
54
|
+
highRiskCountryStatusLid: mongoose.Types.ObjectId;
|
|
55
|
+
securityPropertyAddressStatusLid: mongoose.Types.ObjectId;
|
|
56
|
+
monthlyFinancePaymentStatusLid: mongoose.Types.ObjectId;
|
|
57
|
+
propertyResidents: string;
|
|
58
|
+
propertyTypeStatusLid: mongoose.Types.ObjectId;
|
|
59
|
+
productFixedPeriodStatusLid: mongoose.Types.ObjectId;
|
|
60
|
+
fullFinanceTermStatusLid: mongoose.Types.ObjectId;
|
|
61
|
+
productRentalRateStatusLid: mongoose.Types.ObjectId;
|
|
62
|
+
underwritingQuestions: string;
|
|
63
|
+
vulnerabilityImpact: string;
|
|
64
|
+
vulnerabilityIndicatorsStatusLid: mongoose.Types.ObjectId;
|
|
65
|
+
financeSummaryStatusLid: mongoose.Types.ObjectId;
|
|
66
|
+
nextStepsStatusLid: mongoose.Types.ObjectId;
|
|
67
|
+
customerQuestions: string;
|
|
68
|
+
underwriterName: string;
|
|
69
|
+
failedCallDate: string;
|
|
70
|
+
}, {}, {}, {}, mongoose.Document<unknown, {}, {
|
|
71
|
+
createdAt: NativeDate;
|
|
72
|
+
updatedAt: NativeDate;
|
|
73
|
+
} & {
|
|
74
|
+
applicationId: mongoose.Types.ObjectId;
|
|
75
|
+
applicantId: mongoose.Types.ObjectId;
|
|
76
|
+
applicantName: string;
|
|
77
|
+
lendingTypeLid: mongoose.Types.ObjectId;
|
|
78
|
+
purchaseTypeLid: mongoose.Types.ObjectId;
|
|
79
|
+
bepReference: string;
|
|
80
|
+
firstCallAttemptDate: string;
|
|
81
|
+
callCompletedDate: string;
|
|
82
|
+
failedCallReason: string;
|
|
83
|
+
customerFullNameStatusLid: mongoose.Types.ObjectId;
|
|
84
|
+
customerDOBStatusLid: mongoose.Types.ObjectId;
|
|
85
|
+
residentialAddressStatusLid: mongoose.Types.ObjectId;
|
|
86
|
+
contactNumberStatusLid: mongoose.Types.ObjectId;
|
|
87
|
+
emailAddressStatusLid: mongoose.Types.ObjectId;
|
|
88
|
+
financePaymentTypeStatusLid: mongoose.Types.ObjectId;
|
|
89
|
+
amountOfFinanceStatusLid: mongoose.Types.ObjectId;
|
|
90
|
+
otherApplicantDetailsStatusLid: mongoose.Types.ObjectId;
|
|
91
|
+
employerNameStatusLid: mongoose.Types.ObjectId;
|
|
92
|
+
securityPropertyPurchasePriceLid: mongoose.Types.ObjectId;
|
|
93
|
+
idvPassedStatusLid: mongoose.Types.ObjectId;
|
|
94
|
+
highRiskCountryStatusLid: mongoose.Types.ObjectId;
|
|
95
|
+
securityPropertyAddressStatusLid: mongoose.Types.ObjectId;
|
|
96
|
+
monthlyFinancePaymentStatusLid: mongoose.Types.ObjectId;
|
|
97
|
+
propertyResidents: string;
|
|
98
|
+
propertyTypeStatusLid: mongoose.Types.ObjectId;
|
|
99
|
+
productFixedPeriodStatusLid: mongoose.Types.ObjectId;
|
|
100
|
+
fullFinanceTermStatusLid: mongoose.Types.ObjectId;
|
|
101
|
+
productRentalRateStatusLid: mongoose.Types.ObjectId;
|
|
102
|
+
underwritingQuestions: string;
|
|
103
|
+
vulnerabilityImpact: string;
|
|
104
|
+
vulnerabilityIndicatorsStatusLid: mongoose.Types.ObjectId;
|
|
105
|
+
financeSummaryStatusLid: mongoose.Types.ObjectId;
|
|
106
|
+
nextStepsStatusLid: mongoose.Types.ObjectId;
|
|
107
|
+
customerQuestions: string;
|
|
108
|
+
underwriterName: string;
|
|
109
|
+
failedCallDate: string;
|
|
110
|
+
}, {}> & {
|
|
111
|
+
createdAt: NativeDate;
|
|
112
|
+
updatedAt: NativeDate;
|
|
113
|
+
} & {
|
|
114
|
+
applicationId: mongoose.Types.ObjectId;
|
|
115
|
+
applicantId: mongoose.Types.ObjectId;
|
|
116
|
+
applicantName: string;
|
|
117
|
+
lendingTypeLid: mongoose.Types.ObjectId;
|
|
118
|
+
purchaseTypeLid: mongoose.Types.ObjectId;
|
|
119
|
+
bepReference: string;
|
|
120
|
+
firstCallAttemptDate: string;
|
|
121
|
+
callCompletedDate: string;
|
|
122
|
+
failedCallReason: string;
|
|
123
|
+
customerFullNameStatusLid: mongoose.Types.ObjectId;
|
|
124
|
+
customerDOBStatusLid: mongoose.Types.ObjectId;
|
|
125
|
+
residentialAddressStatusLid: mongoose.Types.ObjectId;
|
|
126
|
+
contactNumberStatusLid: mongoose.Types.ObjectId;
|
|
127
|
+
emailAddressStatusLid: mongoose.Types.ObjectId;
|
|
128
|
+
financePaymentTypeStatusLid: mongoose.Types.ObjectId;
|
|
129
|
+
amountOfFinanceStatusLid: mongoose.Types.ObjectId;
|
|
130
|
+
otherApplicantDetailsStatusLid: mongoose.Types.ObjectId;
|
|
131
|
+
employerNameStatusLid: mongoose.Types.ObjectId;
|
|
132
|
+
securityPropertyPurchasePriceLid: mongoose.Types.ObjectId;
|
|
133
|
+
idvPassedStatusLid: mongoose.Types.ObjectId;
|
|
134
|
+
highRiskCountryStatusLid: mongoose.Types.ObjectId;
|
|
135
|
+
securityPropertyAddressStatusLid: mongoose.Types.ObjectId;
|
|
136
|
+
monthlyFinancePaymentStatusLid: mongoose.Types.ObjectId;
|
|
137
|
+
propertyResidents: string;
|
|
138
|
+
propertyTypeStatusLid: mongoose.Types.ObjectId;
|
|
139
|
+
productFixedPeriodStatusLid: mongoose.Types.ObjectId;
|
|
140
|
+
fullFinanceTermStatusLid: mongoose.Types.ObjectId;
|
|
141
|
+
productRentalRateStatusLid: mongoose.Types.ObjectId;
|
|
142
|
+
underwritingQuestions: string;
|
|
143
|
+
vulnerabilityImpact: string;
|
|
144
|
+
vulnerabilityIndicatorsStatusLid: mongoose.Types.ObjectId;
|
|
145
|
+
financeSummaryStatusLid: mongoose.Types.ObjectId;
|
|
146
|
+
nextStepsStatusLid: mongoose.Types.ObjectId;
|
|
147
|
+
customerQuestions: string;
|
|
148
|
+
underwriterName: string;
|
|
149
|
+
failedCallDate: string;
|
|
150
|
+
} & {
|
|
151
|
+
_id: mongoose.Types.ObjectId;
|
|
152
|
+
} & {
|
|
153
|
+
__v: number;
|
|
154
|
+
}, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
155
|
+
timestamps: true;
|
|
156
|
+
toJSON: {
|
|
157
|
+
virtuals: true;
|
|
158
|
+
};
|
|
159
|
+
toObject: {
|
|
160
|
+
virtuals: true;
|
|
161
|
+
};
|
|
162
|
+
}, {
|
|
163
|
+
createdAt: NativeDate;
|
|
164
|
+
updatedAt: NativeDate;
|
|
165
|
+
} & {
|
|
166
|
+
applicationId: mongoose.Types.ObjectId;
|
|
167
|
+
applicantId: mongoose.Types.ObjectId;
|
|
168
|
+
applicantName: string;
|
|
169
|
+
lendingTypeLid: mongoose.Types.ObjectId;
|
|
170
|
+
purchaseTypeLid: mongoose.Types.ObjectId;
|
|
171
|
+
bepReference: string;
|
|
172
|
+
firstCallAttemptDate: string;
|
|
173
|
+
callCompletedDate: string;
|
|
174
|
+
failedCallReason: string;
|
|
175
|
+
customerFullNameStatusLid: mongoose.Types.ObjectId;
|
|
176
|
+
customerDOBStatusLid: mongoose.Types.ObjectId;
|
|
177
|
+
residentialAddressStatusLid: mongoose.Types.ObjectId;
|
|
178
|
+
contactNumberStatusLid: mongoose.Types.ObjectId;
|
|
179
|
+
emailAddressStatusLid: mongoose.Types.ObjectId;
|
|
180
|
+
financePaymentTypeStatusLid: mongoose.Types.ObjectId;
|
|
181
|
+
amountOfFinanceStatusLid: mongoose.Types.ObjectId;
|
|
182
|
+
otherApplicantDetailsStatusLid: mongoose.Types.ObjectId;
|
|
183
|
+
employerNameStatusLid: mongoose.Types.ObjectId;
|
|
184
|
+
securityPropertyPurchasePriceLid: mongoose.Types.ObjectId;
|
|
185
|
+
idvPassedStatusLid: mongoose.Types.ObjectId;
|
|
186
|
+
highRiskCountryStatusLid: mongoose.Types.ObjectId;
|
|
187
|
+
securityPropertyAddressStatusLid: mongoose.Types.ObjectId;
|
|
188
|
+
monthlyFinancePaymentStatusLid: mongoose.Types.ObjectId;
|
|
189
|
+
propertyResidents: string;
|
|
190
|
+
propertyTypeStatusLid: mongoose.Types.ObjectId;
|
|
191
|
+
productFixedPeriodStatusLid: mongoose.Types.ObjectId;
|
|
192
|
+
fullFinanceTermStatusLid: mongoose.Types.ObjectId;
|
|
193
|
+
productRentalRateStatusLid: mongoose.Types.ObjectId;
|
|
194
|
+
underwritingQuestions: string;
|
|
195
|
+
vulnerabilityImpact: string;
|
|
196
|
+
vulnerabilityIndicatorsStatusLid: mongoose.Types.ObjectId;
|
|
197
|
+
financeSummaryStatusLid: mongoose.Types.ObjectId;
|
|
198
|
+
nextStepsStatusLid: mongoose.Types.ObjectId;
|
|
199
|
+
customerQuestions: string;
|
|
200
|
+
underwriterName: string;
|
|
201
|
+
failedCallDate: string;
|
|
202
|
+
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
203
|
+
createdAt: NativeDate;
|
|
204
|
+
updatedAt: NativeDate;
|
|
205
|
+
} & {
|
|
206
|
+
applicationId: mongoose.Types.ObjectId;
|
|
207
|
+
applicantId: mongoose.Types.ObjectId;
|
|
208
|
+
applicantName: string;
|
|
209
|
+
lendingTypeLid: mongoose.Types.ObjectId;
|
|
210
|
+
purchaseTypeLid: mongoose.Types.ObjectId;
|
|
211
|
+
bepReference: string;
|
|
212
|
+
firstCallAttemptDate: string;
|
|
213
|
+
callCompletedDate: string;
|
|
214
|
+
failedCallReason: string;
|
|
215
|
+
customerFullNameStatusLid: mongoose.Types.ObjectId;
|
|
216
|
+
customerDOBStatusLid: mongoose.Types.ObjectId;
|
|
217
|
+
residentialAddressStatusLid: mongoose.Types.ObjectId;
|
|
218
|
+
contactNumberStatusLid: mongoose.Types.ObjectId;
|
|
219
|
+
emailAddressStatusLid: mongoose.Types.ObjectId;
|
|
220
|
+
financePaymentTypeStatusLid: mongoose.Types.ObjectId;
|
|
221
|
+
amountOfFinanceStatusLid: mongoose.Types.ObjectId;
|
|
222
|
+
otherApplicantDetailsStatusLid: mongoose.Types.ObjectId;
|
|
223
|
+
employerNameStatusLid: mongoose.Types.ObjectId;
|
|
224
|
+
securityPropertyPurchasePriceLid: mongoose.Types.ObjectId;
|
|
225
|
+
idvPassedStatusLid: mongoose.Types.ObjectId;
|
|
226
|
+
highRiskCountryStatusLid: mongoose.Types.ObjectId;
|
|
227
|
+
securityPropertyAddressStatusLid: mongoose.Types.ObjectId;
|
|
228
|
+
monthlyFinancePaymentStatusLid: mongoose.Types.ObjectId;
|
|
229
|
+
propertyResidents: string;
|
|
230
|
+
propertyTypeStatusLid: mongoose.Types.ObjectId;
|
|
231
|
+
productFixedPeriodStatusLid: mongoose.Types.ObjectId;
|
|
232
|
+
fullFinanceTermStatusLid: mongoose.Types.ObjectId;
|
|
233
|
+
productRentalRateStatusLid: mongoose.Types.ObjectId;
|
|
234
|
+
underwritingQuestions: string;
|
|
235
|
+
vulnerabilityImpact: string;
|
|
236
|
+
vulnerabilityIndicatorsStatusLid: mongoose.Types.ObjectId;
|
|
237
|
+
financeSummaryStatusLid: mongoose.Types.ObjectId;
|
|
238
|
+
nextStepsStatusLid: mongoose.Types.ObjectId;
|
|
239
|
+
customerQuestions: string;
|
|
240
|
+
underwriterName: string;
|
|
241
|
+
failedCallDate: string;
|
|
242
|
+
}>, {}> & mongoose.FlatRecord<{
|
|
243
|
+
createdAt: NativeDate;
|
|
244
|
+
updatedAt: NativeDate;
|
|
245
|
+
} & {
|
|
246
|
+
applicationId: mongoose.Types.ObjectId;
|
|
247
|
+
applicantId: mongoose.Types.ObjectId;
|
|
248
|
+
applicantName: string;
|
|
249
|
+
lendingTypeLid: mongoose.Types.ObjectId;
|
|
250
|
+
purchaseTypeLid: mongoose.Types.ObjectId;
|
|
251
|
+
bepReference: string;
|
|
252
|
+
firstCallAttemptDate: string;
|
|
253
|
+
callCompletedDate: string;
|
|
254
|
+
failedCallReason: string;
|
|
255
|
+
customerFullNameStatusLid: mongoose.Types.ObjectId;
|
|
256
|
+
customerDOBStatusLid: mongoose.Types.ObjectId;
|
|
257
|
+
residentialAddressStatusLid: mongoose.Types.ObjectId;
|
|
258
|
+
contactNumberStatusLid: mongoose.Types.ObjectId;
|
|
259
|
+
emailAddressStatusLid: mongoose.Types.ObjectId;
|
|
260
|
+
financePaymentTypeStatusLid: mongoose.Types.ObjectId;
|
|
261
|
+
amountOfFinanceStatusLid: mongoose.Types.ObjectId;
|
|
262
|
+
otherApplicantDetailsStatusLid: mongoose.Types.ObjectId;
|
|
263
|
+
employerNameStatusLid: mongoose.Types.ObjectId;
|
|
264
|
+
securityPropertyPurchasePriceLid: mongoose.Types.ObjectId;
|
|
265
|
+
idvPassedStatusLid: mongoose.Types.ObjectId;
|
|
266
|
+
highRiskCountryStatusLid: mongoose.Types.ObjectId;
|
|
267
|
+
securityPropertyAddressStatusLid: mongoose.Types.ObjectId;
|
|
268
|
+
monthlyFinancePaymentStatusLid: mongoose.Types.ObjectId;
|
|
269
|
+
propertyResidents: string;
|
|
270
|
+
propertyTypeStatusLid: mongoose.Types.ObjectId;
|
|
271
|
+
productFixedPeriodStatusLid: mongoose.Types.ObjectId;
|
|
272
|
+
fullFinanceTermStatusLid: mongoose.Types.ObjectId;
|
|
273
|
+
productRentalRateStatusLid: mongoose.Types.ObjectId;
|
|
274
|
+
underwritingQuestions: string;
|
|
275
|
+
vulnerabilityImpact: string;
|
|
276
|
+
vulnerabilityIndicatorsStatusLid: mongoose.Types.ObjectId;
|
|
277
|
+
financeSummaryStatusLid: mongoose.Types.ObjectId;
|
|
278
|
+
nextStepsStatusLid: mongoose.Types.ObjectId;
|
|
279
|
+
customerQuestions: string;
|
|
280
|
+
underwriterName: string;
|
|
281
|
+
failedCallDate: string;
|
|
282
|
+
}> & {
|
|
283
|
+
_id: mongoose.Types.ObjectId;
|
|
284
|
+
} & {
|
|
285
|
+
__v: number;
|
|
286
|
+
}>>;
|
|
287
|
+
export default WelcomeCallModel;
|
|
288
|
+
//# sourceMappingURL=applicant-welcome-call.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applicant-welcome-call.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-welcome-call.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAyRhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA4D,CAAC;AAEnF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
import { applyWorkflowPlugin } from "../shared/workflow.plugin";
|
|
3
|
+
// Welcome Call Schema
|
|
4
|
+
const welcomeCallSchema = new mongoose.Schema({
|
|
5
|
+
applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
|
|
6
|
+
applicationId: { type: mongoose.Schema.Types.ObjectId, ref: "Application", required: true },
|
|
7
|
+
bepReference: {
|
|
8
|
+
type: String,
|
|
9
|
+
description: "BEP reference",
|
|
10
|
+
default: null
|
|
11
|
+
},
|
|
12
|
+
applicantName: {
|
|
13
|
+
type: String,
|
|
14
|
+
description: "Applicant Name",
|
|
15
|
+
default: null
|
|
16
|
+
},
|
|
17
|
+
firstCallAttemptDate: {
|
|
18
|
+
type: String,
|
|
19
|
+
description: "Call Started Date",
|
|
20
|
+
default: null
|
|
21
|
+
},
|
|
22
|
+
callCompletedDate: {
|
|
23
|
+
type: String,
|
|
24
|
+
description: "Call Completed Date",
|
|
25
|
+
default: null
|
|
26
|
+
},
|
|
27
|
+
failedCallReason: {
|
|
28
|
+
type: String,
|
|
29
|
+
description: "Failed Call Reason",
|
|
30
|
+
default: null
|
|
31
|
+
},
|
|
32
|
+
customerFullNameStatusLid: {
|
|
33
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
34
|
+
},
|
|
35
|
+
customerDOBStatusLid: {
|
|
36
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
37
|
+
},
|
|
38
|
+
residentialAddressStatusLid: {
|
|
39
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
40
|
+
},
|
|
41
|
+
contactNumberStatusLid: {
|
|
42
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
43
|
+
},
|
|
44
|
+
emailAddressStatusLid: {
|
|
45
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
46
|
+
},
|
|
47
|
+
financePaymentTypeStatusLid: {
|
|
48
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
49
|
+
},
|
|
50
|
+
amountOfFinanceStatusLid: {
|
|
51
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
52
|
+
},
|
|
53
|
+
otherApplicantDetailsStatusLid: {
|
|
54
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
55
|
+
},
|
|
56
|
+
employerNameStatusLid: {
|
|
57
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
58
|
+
},
|
|
59
|
+
securityPropertyPurchasePriceLid: {
|
|
60
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null,
|
|
61
|
+
description: "security property purchase price/estimated value"
|
|
62
|
+
},
|
|
63
|
+
idvPassedStatusLid: {
|
|
64
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
65
|
+
},
|
|
66
|
+
highRiskCountryStatusLid: {
|
|
67
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null,
|
|
68
|
+
description: "applicant you are speaking is residing in high risk country"
|
|
69
|
+
},
|
|
70
|
+
securityPropertyAddressStatusLid: {
|
|
71
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
72
|
+
},
|
|
73
|
+
monthlyFinancePaymentStatusLid: {
|
|
74
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
75
|
+
},
|
|
76
|
+
propertyResidents: {
|
|
77
|
+
type: String,
|
|
78
|
+
description: "Who will reside in the property? N.B. This should align with the finance type and other application details",
|
|
79
|
+
default: null
|
|
80
|
+
},
|
|
81
|
+
propertyTypeStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
82
|
+
productFixedPeriodStatusLid: {
|
|
83
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
84
|
+
},
|
|
85
|
+
fullFinanceTermStatusLid: {
|
|
86
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
87
|
+
},
|
|
88
|
+
productRentalRateStatusLid: {
|
|
89
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
90
|
+
},
|
|
91
|
+
underwritingQuestions: {
|
|
92
|
+
type: String,
|
|
93
|
+
description: "Underwriting questions",
|
|
94
|
+
default: null
|
|
95
|
+
},
|
|
96
|
+
vulnerabilityImpact: {
|
|
97
|
+
type: String,
|
|
98
|
+
description: "Is there anything you feel the Bank should be aware of that could impact your finances or your ability to deal with your account either now or in the future?",
|
|
99
|
+
default: null
|
|
100
|
+
},
|
|
101
|
+
vulnerabilityIndicatorsStatusLid: {
|
|
102
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
103
|
+
},
|
|
104
|
+
financeSummaryStatusLid: {
|
|
105
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
106
|
+
},
|
|
107
|
+
nextStepsStatusLid: {
|
|
108
|
+
type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null
|
|
109
|
+
},
|
|
110
|
+
purchaseTypeLid: {
|
|
111
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
112
|
+
ref: "Lookup",
|
|
113
|
+
required: true
|
|
114
|
+
},
|
|
115
|
+
lendingTypeLid: {
|
|
116
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
117
|
+
ref: "Lookup",
|
|
118
|
+
required: true
|
|
119
|
+
},
|
|
120
|
+
customerQuestions: {
|
|
121
|
+
type: String,
|
|
122
|
+
description: "Ask the customer if they have any questions",
|
|
123
|
+
default: null
|
|
124
|
+
},
|
|
125
|
+
underwriterName: {
|
|
126
|
+
type: String,
|
|
127
|
+
description: "Name of underwriter",
|
|
128
|
+
default: null
|
|
129
|
+
},
|
|
130
|
+
failedCallDate: {
|
|
131
|
+
type: String,
|
|
132
|
+
description: "Failed Call Date",
|
|
133
|
+
default: null
|
|
134
|
+
}
|
|
135
|
+
}, {
|
|
136
|
+
timestamps: true,
|
|
137
|
+
toJSON: { virtuals: true },
|
|
138
|
+
toObject: { virtuals: true }
|
|
139
|
+
});
|
|
140
|
+
// virtual property for full name
|
|
141
|
+
welcomeCallSchema.virtual('fullName').get(function () {
|
|
142
|
+
if (this.applicantId && typeof this.applicantId === 'object') {
|
|
143
|
+
const applicant = this.applicantId;
|
|
144
|
+
const firstName = applicant.firstName || '';
|
|
145
|
+
const lastName = applicant.lastName || '';
|
|
146
|
+
return `${firstName} ${lastName}`.trim();
|
|
147
|
+
}
|
|
148
|
+
return null;
|
|
149
|
+
});
|
|
150
|
+
// Virtual property for current address
|
|
151
|
+
welcomeCallSchema.virtual('customerCurrentResidentialAddress').get(function () {
|
|
152
|
+
if (this.applicantId && typeof this.applicantId === 'object') {
|
|
153
|
+
const applicant = this.applicantId;
|
|
154
|
+
// Use only regular address fields (addressLine1, addressLine2, addressLine3)
|
|
155
|
+
if (applicant.addressLine1) {
|
|
156
|
+
const addressParts = [
|
|
157
|
+
applicant.addressLine1,
|
|
158
|
+
applicant.addressLine2,
|
|
159
|
+
applicant.addressLine3,
|
|
160
|
+
applicant.addressCity,
|
|
161
|
+
applicant.addressPostCode
|
|
162
|
+
].filter(part => part && part.trim() !== '');
|
|
163
|
+
return addressParts.join(', ');
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return null;
|
|
167
|
+
});
|
|
168
|
+
// Virtual property for Customer's Contact Numbers (Phone and Mobile)
|
|
169
|
+
welcomeCallSchema.virtual('customerContactNumbers').get(function () {
|
|
170
|
+
if (this.applicantId && typeof this.applicantId === 'object') {
|
|
171
|
+
const phoneNumber = this.applicantId.phoneNumber;
|
|
172
|
+
const mobileNumber = this.applicantId.mobileNumber;
|
|
173
|
+
if (phoneNumber && mobileNumber) {
|
|
174
|
+
return `${phoneNumber}/${mobileNumber}`;
|
|
175
|
+
}
|
|
176
|
+
else if (phoneNumber) {
|
|
177
|
+
return phoneNumber;
|
|
178
|
+
}
|
|
179
|
+
else if (mobileNumber) {
|
|
180
|
+
return mobileNumber;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return null;
|
|
184
|
+
});
|
|
185
|
+
// Virtual property for all applicants name/DOB when there are multiple applicants
|
|
186
|
+
welcomeCallSchema.virtual('allApplicantsNameAndDOB').get(function () {
|
|
187
|
+
// For single applicant, return the current applicant's name and DOB
|
|
188
|
+
if (this.applicantId && typeof this.applicantId === 'object') {
|
|
189
|
+
const applicant = this.applicantId;
|
|
190
|
+
const name = applicant.firstName && applicant.lastName
|
|
191
|
+
? `${applicant.firstName} ${applicant.lastName}`
|
|
192
|
+
: 'Unknown Name';
|
|
193
|
+
const dob = applicant.dateOfBirth || 'Unknown DOB';
|
|
194
|
+
return `${name}/${dob}`;
|
|
195
|
+
}
|
|
196
|
+
return null;
|
|
197
|
+
});
|
|
198
|
+
// Virtual property for broker name and firm
|
|
199
|
+
welcomeCallSchema.virtual('brokerNameAndFirm').get(function () {
|
|
200
|
+
if (this.applicantId && typeof this.applicantId === 'object' && this.applicantId.applicationId) {
|
|
201
|
+
const application = this.applicantId.applicationId;
|
|
202
|
+
let brokerName = '';
|
|
203
|
+
let solicitorFirmName = '';
|
|
204
|
+
// Get broker name
|
|
205
|
+
if (application && application.brokerId && typeof application.brokerId === 'object') {
|
|
206
|
+
const broker = application.brokerId;
|
|
207
|
+
if (broker.firstName && broker.lastName) {
|
|
208
|
+
brokerName = `${broker.firstName} ${broker.lastName}`;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
// Get solicitor firm name
|
|
212
|
+
if (application && application.solicitorId && typeof application.solicitorId === 'object') {
|
|
213
|
+
const solicitor = application.solicitorId;
|
|
214
|
+
if (solicitor.nameOfFirm) {
|
|
215
|
+
solicitorFirmName = solicitor.nameOfFirm;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
// Combine in format "Broker name / nameOfFirm"
|
|
219
|
+
if (brokerName && solicitorFirmName) {
|
|
220
|
+
return `${brokerName} / ${solicitorFirmName}`;
|
|
221
|
+
}
|
|
222
|
+
else if (brokerName) {
|
|
223
|
+
return brokerName;
|
|
224
|
+
}
|
|
225
|
+
else if (solicitorFirmName) {
|
|
226
|
+
return solicitorFirmName;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return null;
|
|
230
|
+
});
|
|
231
|
+
// Virtual property for account holder and Bank
|
|
232
|
+
welcomeCallSchema.virtual('accountHolderAndBank').get(function () {
|
|
233
|
+
if (this.applicantId && typeof this.applicantId === 'object' && this.applicantId.applicationId) {
|
|
234
|
+
const application = this.applicantId.applicationId;
|
|
235
|
+
let accountHolderName = '';
|
|
236
|
+
let institutionName = '';
|
|
237
|
+
// Get solicitor information
|
|
238
|
+
if (application && application.solicitorId && typeof application.solicitorId === 'object') {
|
|
239
|
+
const solicitor = application.solicitorId;
|
|
240
|
+
if (solicitor.nameOfAccountHolder) {
|
|
241
|
+
accountHolderName = solicitor.nameOfAccountHolder;
|
|
242
|
+
}
|
|
243
|
+
if (solicitor.institution) {
|
|
244
|
+
institutionName = solicitor.institution;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
// Combine in format "account holder / institution"
|
|
248
|
+
if (accountHolderName && institutionName) {
|
|
249
|
+
return `${accountHolderName} / ${institutionName}`;
|
|
250
|
+
}
|
|
251
|
+
else if (accountHolderName) {
|
|
252
|
+
return accountHolderName;
|
|
253
|
+
}
|
|
254
|
+
else if (institutionName) {
|
|
255
|
+
return institutionName;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return null;
|
|
259
|
+
});
|
|
260
|
+
// Apply workflow plugin to the schema
|
|
261
|
+
applyWorkflowPlugin(welcomeCallSchema, 'applicantwelcomecall');
|
|
262
|
+
const WelcomeCallModel = mongoose.model('ApplicantWelcomeCall', welcomeCallSchema);
|
|
263
|
+
export default WelcomeCallModel;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/// <reference path="../value-objects/pound.d.ts" />
|
|
2
|
+
/// <reference path="../value-objects/account-number.d.ts" />
|
|
3
|
+
/// <reference path="../value-objects/sort-code.d.ts" />
|
|
4
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
5
|
+
/// <reference types="mongoose/types/callback" />
|
|
6
|
+
/// <reference types="mongoose/types/collection" />
|
|
7
|
+
/// <reference types="mongoose/types/connection" />
|
|
8
|
+
/// <reference types="mongoose/types/cursor" />
|
|
9
|
+
/// <reference types="mongoose/types/document" />
|
|
10
|
+
/// <reference types="mongoose/types/error" />
|
|
11
|
+
/// <reference types="mongoose/types/expressions" />
|
|
12
|
+
/// <reference types="mongoose/types/helpers" />
|
|
13
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
14
|
+
/// <reference types="mongoose/types/indexes" />
|
|
15
|
+
/// <reference types="mongoose/types/models" />
|
|
16
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
17
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
18
|
+
/// <reference types="mongoose/types/populate" />
|
|
19
|
+
/// <reference types="mongoose/types/query" />
|
|
20
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
21
|
+
/// <reference types="mongoose/types/session" />
|
|
22
|
+
/// <reference types="mongoose/types/types" />
|
|
23
|
+
/// <reference types="mongoose/types/utility" />
|
|
24
|
+
/// <reference types="mongoose/types/validation" />
|
|
25
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
26
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
27
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
28
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
29
|
+
import { Types } from "mongoose";
|
|
30
|
+
import { IBaseType } from "../types/base.types";
|
|
31
|
+
export default interface IApplicantWelcomeCall extends IBaseType {
|
|
32
|
+
applicantId: Types.ObjectId;
|
|
33
|
+
bepReference?: string;
|
|
34
|
+
applicantName?: string;
|
|
35
|
+
firstCallAttemptDate?: string;
|
|
36
|
+
callCompletedDate?: string;
|
|
37
|
+
dependants?: string;
|
|
38
|
+
customerFullName?: string;
|
|
39
|
+
customerDOB?: string;
|
|
40
|
+
residentialAddress?: string;
|
|
41
|
+
contactNumber?: string;
|
|
42
|
+
emailAddress?: string;
|
|
43
|
+
financePaymentType?: string;
|
|
44
|
+
amountOfFinance?: string;
|
|
45
|
+
otherApplicantDetails?: string;
|
|
46
|
+
employerName?: string;
|
|
47
|
+
monthlyRepayments?: string;
|
|
48
|
+
idvPassed: string;
|
|
49
|
+
highRiskCountry: string;
|
|
50
|
+
securityPropertyAddress?: string;
|
|
51
|
+
monthlyFinancePayment?: string;
|
|
52
|
+
propertyResidents?: string;
|
|
53
|
+
propertyType?: string;
|
|
54
|
+
productFixedPeriod?: string;
|
|
55
|
+
fullFinanceTerm?: string;
|
|
56
|
+
productRentalRate?: string;
|
|
57
|
+
underwritingQuestions?: string;
|
|
58
|
+
vulnerabilityImpact?: string;
|
|
59
|
+
vulnerabilityIndicators?: string;
|
|
60
|
+
financeSummary?: string;
|
|
61
|
+
nextSteps?: string;
|
|
62
|
+
customerQuestions?: string;
|
|
63
|
+
underwriterName?: string;
|
|
64
|
+
finalCallCompletedDate?: string;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=applicant-welcome-call.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applicant-welcome-call.type.d.ts","sourceRoot":"","sources":["../../applicants/applicant-welcome-call.type.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD,MAAM,CAAC,OAAO,WAAW,qBAAsB,SAAQ,SAAS;IAC5D,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|