@dynamatix/gb-schemas 1.0.7 → 1.0.9

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 (64) hide show
  1. package/dist/applicants/applicant-commitment.model.js +4 -9
  2. package/dist/applicants/applicant-credit-data.model.js +4 -9
  3. package/dist/applicants/applicant-credit-profile.model.js +3 -8
  4. package/dist/applicants/applicant-direct-debit.model.js +3 -8
  5. package/dist/applicants/applicant-employment.model.js +6 -11
  6. package/dist/applicants/applicant-expenditure.model.js +3 -8
  7. package/dist/applicants/applicant-income-source.model.js +4 -9
  8. package/dist/applicants/applicant-income.model.js +3 -8
  9. package/dist/applicants/applicant-other-income.model.js +3 -8
  10. package/dist/applicants/applicant-risk-narrative.model.js +6 -11
  11. package/dist/applicants/applicant.model.js +46 -51
  12. package/dist/applicants/index.js +1 -8
  13. package/dist/applications/application-audit.model.js +5 -10
  14. package/dist/applications/application-checklist-Item.model.js +4 -9
  15. package/dist/applications/application-company-model.js +4 -9
  16. package/dist/applications/application-credit-profile.model.js +3 -8
  17. package/dist/applications/application-direct-debit.model.js +3 -8
  18. package/dist/applications/application-document.model.js +6 -11
  19. package/dist/applications/application-fieldconfig.model.js +4 -9
  20. package/dist/applications/application-illustration-model.js +4 -9
  21. package/dist/applications/application-legal.model.js +4 -9
  22. package/dist/applications/application-mortgage.model.js +6 -11
  23. package/dist/applications/application-note.model.js +10 -15
  24. package/dist/applications/application-offer.model.js +4 -9
  25. package/dist/applications/application-onboarding.model.js +4 -9
  26. package/dist/applications/application-product.model.js +3 -8
  27. package/dist/applications/application-rationale.model.js +13 -18
  28. package/dist/applications/application-risk-narrative.model.js +6 -11
  29. package/dist/applications/application-valuation.model.js +3 -8
  30. package/dist/applications/application.model.js +30 -35
  31. package/dist/applications/broker.model.js +4 -9
  32. package/dist/applications/document.model.js +7 -12
  33. package/dist/applications/index.js +18 -42
  34. package/dist/applications/productfeatures.model.js +8 -13
  35. package/dist/applications/solicitor.model.js +5 -10
  36. package/dist/index.js +7 -23
  37. package/dist/product-catalogues/index.js +3 -12
  38. package/dist/product-catalogues/product-catalogue.model.js +4 -9
  39. package/dist/product-catalogues/product-definitions.model.js +7 -12
  40. package/dist/product-catalogues/product-variant.model.js +5 -10
  41. package/dist/properties/index.js +1 -8
  42. package/dist/properties/property.model.js +9 -14
  43. package/dist/shared/alert.model.js +8 -13
  44. package/dist/shared/apprivo-sync-journey.model.js +6 -11
  45. package/dist/shared/checklist.model.js +8 -13
  46. package/dist/shared/document-type-model.js +6 -11
  47. package/dist/shared/index.js +11 -28
  48. package/dist/shared/job-run.model.js +4 -39
  49. package/dist/shared/job-setting.model.js +5 -10
  50. package/dist/shared/lookup-group.model.js +5 -10
  51. package/dist/shared/lookup.model.js +5 -10
  52. package/dist/shared/system-parameter.model.js +7 -12
  53. package/dist/shared/task-document.model.js +5 -10
  54. package/dist/shared/task.model.js +4 -9
  55. package/dist/underwriter/index.js +1 -8
  56. package/dist/underwriter/underwriter.model.js +4 -9
  57. package/dist/users/auth-log.model.js +4 -9
  58. package/dist/users/index.js +6 -18
  59. package/dist/users/permission.model.js +4 -9
  60. package/dist/users/role-group.model.js +5 -10
  61. package/dist/users/role.model.js +5 -10
  62. package/dist/users/tasks.model.js +11 -16
  63. package/dist/users/user.model.js +8 -13
  64. package/package.json +2 -1
@@ -1,14 +1,9 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const applicantCommitmentSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const applicantCommitmentSchema = new mongoose.Schema({
8
3
  commitmentId: String,
9
4
  doHaveSharedResponsibility: String,
10
5
  lenderName: String,
11
6
  monthlyPayment: String,
12
- commitmentTypeLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
7
+ commitmentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
13
8
  });
14
- exports.default = applicantCommitmentSchema;
9
+ export default applicantCommitmentSchema;
@@ -1,16 +1,11 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const applicantCreditDataSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const applicantCreditDataSchema = new mongoose.Schema({
8
3
  bankruptcy: { type: String },
9
4
  countyCourtJudgment: { type: String },
10
5
  creditDefaults: { type: String },
11
6
  securedArrears: { type: String },
12
- statusLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
7
+ statusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
13
8
  unsecuredArrears: { type: String },
14
9
  valid: { type: String }
15
10
  });
16
- exports.default = applicantCreditDataSchema;
11
+ export default applicantCreditDataSchema;
@@ -1,10 +1,5 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const creditProfileSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const creditProfileSchema = new mongoose.Schema({
8
3
  anyVoluntaryEnforcedPossessionNo: {
9
4
  type: String,
10
5
  required: true
@@ -22,4 +17,4 @@ const creditProfileSchema = new mongoose_1.default.Schema({
22
17
  required: true
23
18
  }
24
19
  });
25
- exports.default = creditProfileSchema;
20
+ export default creditProfileSchema;
@@ -1,10 +1,5 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const applicantDirectDebitSchema = new mongoose_1.default.Schema({
1
+ import mongoose from 'mongoose';
2
+ const applicantDirectDebitSchema = new mongoose.Schema({
8
3
  accountNumber: { type: String },
9
4
  addressLine1: { type: String },
10
5
  addressLine2: { type: String },
@@ -18,4 +13,4 @@ const applicantDirectDebitSchema = new mongoose_1.default.Schema({
18
13
  selectedPaymentDay: { type: String },
19
14
  sortCode: { type: String }
20
15
  }, { timestamps: true });
21
- exports.default = applicantDirectDebitSchema;
16
+ export default applicantDirectDebitSchema;
@@ -1,13 +1,8 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const applicantEmploymentSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const applicantEmploymentSchema = new mongoose.Schema({
8
3
  acceptableIncome: { type: String },
9
4
  addressCity: { type: String },
10
- addressCountryLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
5
+ addressCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
11
6
  addressLine1: { type: String },
12
7
  addressLine2: { type: String },
13
8
  addressLine3: { type: String },
@@ -18,14 +13,14 @@ const applicantEmploymentSchema = new mongoose_1.default.Schema({
18
13
  carAllowance: { type: String },
19
14
  childBenefit: { type: String },
20
15
  childBenefitOrSchoolAllowance: { type: String },
21
- classLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
16
+ classLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
22
17
  contractRemaining: { type: String },
23
18
  dateJoined: { type: String },
24
19
  disabilityLiving: { type: String },
25
20
  employerName: { type: String },
26
21
  employerTelephone: { type: String },
27
22
  housingAllowance: { type: String },
28
- industryLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
23
+ industryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
29
24
  isUnderTerminationNotice: { type: String, default: null },
30
25
  jobTitle: { type: String },
31
26
  maintenance: { type: String },
@@ -51,4 +46,4 @@ const applicantEmploymentSchema = new mongoose_1.default.Schema({
51
46
  travelAllowance: { type: String },
52
47
  underTerminationNoticeNote: { type: String }
53
48
  });
54
- exports.default = applicantEmploymentSchema;
49
+ export default applicantEmploymentSchema;
@@ -1,10 +1,5 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const applicantExpenditureSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const applicantExpenditureSchema = new mongoose.Schema({
8
3
  childCareForDependents: { type: String },
9
4
  insurance: { type: String },
10
5
  other: { type: String },
@@ -12,4 +7,4 @@ const applicantExpenditureSchema = new mongoose_1.default.Schema({
12
7
  transport: { type: String },
13
8
  utilities: { type: String }
14
9
  });
15
- exports.default = applicantExpenditureSchema;
10
+ export default applicantExpenditureSchema;
@@ -1,14 +1,9 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const applicantIncomeSourceSchema = new mongoose_1.default.Schema({
8
- employmentStatusLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
1
+ import mongoose from "mongoose";
2
+ const applicantIncomeSourceSchema = new mongoose.Schema({
3
+ employmentStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
9
4
  incomeFromEmployment: { type: String },
10
5
  incomeFromPension: { type: String },
11
6
  incomeFromProperty: { type: String },
12
7
  incomeFromSavings: { type: String }
13
8
  });
14
- exports.default = applicantIncomeSourceSchema;
9
+ export default applicantIncomeSourceSchema;
@@ -1,10 +1,5 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const incomeSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const incomeSchema = new mongoose.Schema({
8
3
  accountantsAddressLine1: { type: String, default: '' },
9
4
  accountantsAddressLine2: { type: String, default: '' },
10
5
  accountantsAddressLine3: { type: String, default: '' },
@@ -53,4 +48,4 @@ const incomeSchema = new mongoose_1.default.Schema({
53
48
  yearEnd2: { type: String, default: '' },
54
49
  yearEnd3: { type: String, default: '' }
55
50
  });
56
- exports.default = incomeSchema;
51
+ export default incomeSchema;
@@ -1,10 +1,5 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const applicantOtherIncomeSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const applicantOtherIncomeSchema = new mongoose.Schema({
8
3
  amount1: { type: String },
9
4
  amount2: { type: String },
10
5
  amount3: { type: String },
@@ -25,4 +20,4 @@ const applicantOtherIncomeSchema = new mongoose_1.default.Schema({
25
20
  sourceDetails4: { type: String },
26
21
  taxCredits: { type: String }
27
22
  });
28
- exports.default = applicantOtherIncomeSchema;
23
+ export default applicantOtherIncomeSchema;
@@ -1,18 +1,13 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const applicantRiskNarrativeSchema = new mongoose_1.default.Schema({
8
- call2StatusLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
1
+ import mongoose from 'mongoose';
2
+ const applicantRiskNarrativeSchema = new mongoose.Schema({
3
+ call2StatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
9
4
  clientReference: { type: String },
10
- docVerificationStatusLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
5
+ docVerificationStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
11
6
  isPoaTaskGenerated: { type: String },
12
7
  link: { type: String },
13
8
  riskLevel: { type: String },
14
9
  riskRating: { type: String },
15
- statusLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
10
+ statusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
16
11
  verificationLinkSentOn: { type: String }
17
12
  });
18
- exports.default = applicantRiskNarrativeSchema;
13
+ export default applicantRiskNarrativeSchema;
@@ -1,23 +1,18 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const applicant_credit_data_model_1 = __importDefault(require("./applicant-credit-data.model"));
8
- const applicant_risk_narrative_model_1 = __importDefault(require("./applicant-risk-narrative.model"));
9
- const applicant_other_income_model_1 = __importDefault(require("./applicant-other-income.model"));
10
- const applicant_income_source_model_1 = __importDefault(require("./applicant-income-source.model"));
11
- const applicant_expenditure_model_1 = __importDefault(require("./applicant-expenditure.model"));
12
- const applicant_employment_model_1 = __importDefault(require("./applicant-employment.model"));
13
- const applicant_commitment_model_1 = __importDefault(require("./applicant-commitment.model"));
14
- const applicant_direct_debit_model_1 = __importDefault(require("./applicant-direct-debit.model"));
15
- const applicant_credit_profile_model_1 = __importDefault(require("./applicant-credit-profile.model"));
16
- const applicant_income_model_1 = __importDefault(require("./applicant-income.model"));
17
- const applicantSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ import applicantCreditDataSchema from "./applicant-credit-data.model";
3
+ import applicantRiskNarrativeSchema from "./applicant-risk-narrative.model";
4
+ import applicantOtherIncomeSchema from "./applicant-other-income.model";
5
+ import applicantIncomeSourceSchema from "./applicant-income-source.model";
6
+ import applicantExpenditureSchema from "./applicant-expenditure.model";
7
+ import applicantEmploymentSchema from "./applicant-employment.model";
8
+ import applicantCommitmentSchema from "./applicant-commitment.model";
9
+ import applicantDirectDebitSchema from "./applicant-direct-debit.model";
10
+ import creditProfileSchema from "./applicant-credit-profile.model";
11
+ import incomeSchema from "./applicant-income.model";
12
+ const applicantSchema = new mongoose.Schema({
18
13
  applicantId: { type: String, required: true },
19
14
  addressCity: { type: String, default: null },
20
- addressCountryLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
15
+ addressCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
21
16
  addressLine1: { type: String, default: null },
22
17
  addressLine2: { type: String, default: null },
23
18
  addressLine3: { type: String, default: null },
@@ -29,7 +24,7 @@ const applicantSchema = new mongoose_1.default.Schema({
29
24
  correspondenceAddressLine2: { type: String, default: null },
30
25
  correspondenceAddressLine3: { type: String, default: null },
31
26
  correspondenceAddressPostCode: { type: String, default: null },
32
- countryOfResidenceLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
27
+ countryOfResidenceLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
33
28
  dateOfBirth: { type: String, default: null },
34
29
  dependant10Age: { type: String, default: 0 },
35
30
  dependant1Age: { type: String, default: 0 },
@@ -64,16 +59,16 @@ const applicantSchema = new mongoose_1.default.Schema({
64
59
  linkedJurisdictionCountry: { type: String, default: null },
65
60
  linkedJurisdictionDetails: { type: String, default: null },
66
61
  maidenName: { type: String, default: null },
67
- maritalStatusLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
62
+ maritalStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
68
63
  mobileNumber: { type: String, default: null },
69
- nationalityLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
64
+ nationalityLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
70
65
  netIncome: { type: String },
71
66
  niNumber: { type: String, default: null },
72
67
  numberOfDependants: { type: String, default: 0 },
73
68
  isOneYearPrior: { type: String, default: false },
74
69
  phoneNumber: { type: String, default: null },
75
70
  previous1AddressCity: { type: String, default: null },
76
- previous1AddressCountryLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
71
+ previous1AddressCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
77
72
  previous1AddressLine1: { type: String, default: null },
78
73
  previous1AddressLine2: { type: String, default: null },
79
74
  previous1AddressLine3: { type: String, default: null },
@@ -81,74 +76,74 @@ const applicantSchema = new mongoose_1.default.Schema({
81
76
  previous1AddressPostCode: { type: String, default: null },
82
77
  previous1AddressPropertyOwnedBy: { type: String, default: null },
83
78
  previous2AddressCity: { type: String, default: null },
84
- previous2AddressCountryLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
79
+ previous2AddressCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
85
80
  previous2AddressLine1: { type: String, default: null },
86
81
  previous2AddressLine2: { type: String, default: null },
87
82
  previous2AddressLine3: { type: String, default: null },
88
83
  previous2AddressMovedDate: { type: String, default: null },
89
84
  previous2AddressPostCode: { type: String, default: null },
90
85
  previous2AddressPropertyOwnedBy: { type: String, default: null },
91
- relationshipToOthersLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
92
- residentialStatusLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
86
+ relationshipToOthersLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
87
+ residentialStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
93
88
  retirementAge: { type: String, default: 0 },
94
89
  taxJurisdiction: { type: String, default: null },
95
- taxPayerLid: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null },
90
+ taxPayerLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
96
91
  timeResidedAtCountryOfResidence: { type: String, default: null },
97
92
  title: { type: String, default: null },
98
93
  isTwoYearPrior: { type: String, default: false },
99
94
  understandEnglish: { type: String, default: true },
100
95
  vulnerabilityNotes: { type: String, default: null },
101
- vulnerabilityTypeLids: [{ type: mongoose_1.default.Schema.Types.ObjectId, ref: "Lookup", default: null }],
102
- creditData: applicant_credit_data_model_1.default,
103
- riskNarrative: applicant_risk_narrative_model_1.default,
104
- otherIncome: applicant_other_income_model_1.default,
105
- incomeSource: applicant_income_source_model_1.default,
106
- expenditure: applicant_expenditure_model_1.default,
107
- employment: applicant_employment_model_1.default,
108
- commitments: [applicant_commitment_model_1.default],
109
- directDebit: applicant_direct_debit_model_1.default,
110
- creditProfile: applicant_credit_profile_model_1.default,
111
- income: applicant_income_model_1.default
96
+ vulnerabilityTypeLids: [{ type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null }],
97
+ creditData: applicantCreditDataSchema,
98
+ riskNarrative: applicantRiskNarrativeSchema,
99
+ otherIncome: applicantOtherIncomeSchema,
100
+ incomeSource: applicantIncomeSourceSchema,
101
+ expenditure: applicantExpenditureSchema,
102
+ employment: applicantEmploymentSchema,
103
+ commitments: [applicantCommitmentSchema],
104
+ directDebit: applicantDirectDebitSchema,
105
+ creditProfile: creditProfileSchema,
106
+ income: incomeSchema
112
107
  }, {
113
108
  timestamps: true,
114
109
  toJSON: { virtuals: true },
115
110
  toObject: { virtuals: true }
116
111
  });
117
112
  applicantSchema.virtual('nationality').get(function () {
118
- return this.nationalityLid instanceof mongoose_1.default.Types.ObjectId ? null : this.nationalityLid?.name ?? null;
113
+ return this.nationalityLid instanceof mongoose.Types.ObjectId ? null : this.nationalityLid?.name ?? null;
119
114
  });
120
115
  applicantSchema.virtual('residence').get(function () {
121
- return this.countryOfResidenceLid instanceof mongoose_1.default.Types.ObjectId ? null : this.countryOfResidenceLid?.name ?? null;
116
+ return this.countryOfResidenceLid instanceof mongoose.Types.ObjectId ? null : this.countryOfResidenceLid?.name ?? null;
122
117
  });
123
118
  applicantSchema.virtual('industry').get(function () {
124
- return this.employment?.industryLid instanceof mongoose_1.default.Types.ObjectId ? null : this.employment?.industryLid?.name ?? null;
119
+ return this.employment?.industryLid instanceof mongoose.Types.ObjectId ? null : this.employment?.industryLid?.name ?? null;
125
120
  });
126
121
  applicantSchema.virtual('employmentClass').get(function () {
127
- return this.employment?.classLid instanceof mongoose_1.default.Types.ObjectId ? null : this.employment?.classLid?.name ?? null;
122
+ return this.employment?.classLid instanceof mongoose.Types.ObjectId ? null : this.employment?.classLid?.name ?? null;
128
123
  });
129
124
  applicantSchema.virtual('addressCountry').get(function () {
130
- return this.addressCountryLid instanceof mongoose_1.default.Types.ObjectId ? null : this.addressCountryLid?.name ?? null;
125
+ return this.addressCountryLid instanceof mongoose.Types.ObjectId ? null : this.addressCountryLid?.name ?? null;
131
126
  });
132
127
  applicantSchema.virtual('previous1AddressCountry').get(function () {
133
- return this.previous1AddressCountryLid instanceof mongoose_1.default.Types.ObjectId ? null : this.previous1AddressCountryLid?.name ?? null;
128
+ return this.previous1AddressCountryLid instanceof mongoose.Types.ObjectId ? null : this.previous1AddressCountryLid?.name ?? null;
134
129
  });
135
130
  applicantSchema.virtual('previous2AddressCountry').get(function () {
136
- return this.previous2AddressCountryLid instanceof mongoose_1.default.Types.ObjectId ? null : this.previous2AddressCountryLid?.name ?? null;
131
+ return this.previous2AddressCountryLid instanceof mongoose.Types.ObjectId ? null : this.previous2AddressCountryLid?.name ?? null;
137
132
  });
138
133
  applicantSchema.virtual('maritalStatus').get(function () {
139
- return this.maritalStatusLid instanceof mongoose_1.default.Types.ObjectId ? null : this.maritalStatusLid?.name ?? null;
134
+ return this.maritalStatusLid instanceof mongoose.Types.ObjectId ? null : this.maritalStatusLid?.name ?? null;
140
135
  });
141
136
  applicantSchema.virtual('relationshipToOthers').get(function () {
142
- return this.relationshipToOthersLid instanceof mongoose_1.default.Types.ObjectId ? null : this.relationshipToOthersLid?.name ?? null;
137
+ return this.relationshipToOthersLid instanceof mongoose.Types.ObjectId ? null : this.relationshipToOthersLid?.name ?? null;
143
138
  });
144
139
  applicantSchema.virtual('residentialStatus').get(function () {
145
- return this.residentialStatusLid instanceof mongoose_1.default.Types.ObjectId ? null : this.residentialStatusLid?.name ?? null;
140
+ return this.residentialStatusLid instanceof mongoose.Types.ObjectId ? null : this.residentialStatusLid?.name ?? null;
146
141
  });
147
142
  applicantSchema.virtual('taxPayer').get(function () {
148
- return this.taxPayerLid instanceof mongoose_1.default.Types.ObjectId ? null : this.taxPayerLid?.name ?? null;
143
+ return this.taxPayerLid instanceof mongoose.Types.ObjectId ? null : this.taxPayerLid?.name ?? null;
149
144
  });
150
145
  applicantSchema.virtual('vulnerabilityType').get(function () {
151
- return this.vulnerabilityTypeLids?.map(v => (v instanceof mongoose_1.default.Types.ObjectId ? null : v.name)) ?? null;
146
+ return this.vulnerabilityTypeLids?.map(v => (v instanceof mongoose.Types.ObjectId ? null : v.name)) ?? null;
152
147
  });
153
- const ApplicantModel = mongoose_1.default.model("Applicant", applicantSchema);
154
- exports.default = ApplicantModel;
148
+ const ApplicantModel = mongoose.model("Applicant", applicantSchema);
149
+ export default ApplicantModel;
@@ -1,8 +1 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ApplicantModel = void 0;
7
- var applicant_model_1 = require("./applicant.model");
8
- Object.defineProperty(exports, "ApplicantModel", { enumerable: true, get: function () { return __importDefault(applicant_model_1).default; } });
1
+ export { default as ApplicantModel } from './applicant.model';
@@ -1,10 +1,5 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const applicationAuditSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const applicationAuditSchema = new mongoose.Schema({
8
3
  auditId: {
9
4
  type: String,
10
5
  required: true
@@ -26,7 +21,7 @@ const applicationAuditSchema = new mongoose_1.default.Schema({
26
21
  required: true
27
22
  },
28
23
  applicationId: {
29
- type: mongoose_1.default.Schema.Types.ObjectId,
24
+ type: mongoose.Schema.Types.ObjectId,
30
25
  ref: 'Application',
31
26
  required: true
32
27
  },
@@ -43,5 +38,5 @@ const applicationAuditSchema = new mongoose_1.default.Schema({
43
38
  required: true
44
39
  }
45
40
  }, { timestamps: true });
46
- const ApplicationAuditModel = mongoose_1.default.model('ApplicationAudit', applicationAuditSchema);
47
- exports.default = ApplicationAuditModel;
41
+ const ApplicationAuditModel = mongoose.model('ApplicationAudit', applicationAuditSchema);
42
+ export default ApplicationAuditModel;
@@ -1,10 +1,5 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const checkListItemSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const checkListItemSchema = new mongoose.Schema({
8
3
  additionalOfferConditions: { type: String, default: "" },
9
4
  appFormSignedNotes: { type: String, default: "" },
10
5
  applicationCompletionDate: { type: String },
@@ -46,5 +41,5 @@ const checkListItemSchema = new mongoose_1.default.Schema({
46
41
  valuationScheduledDate: { type: String },
47
42
  valuationSurveyorDetails: { type: String, default: "" }
48
43
  });
49
- const ApplicationCheckListModel = mongoose_1.default.model("ApplicationCheckList", checkListItemSchema);
50
- exports.default = ApplicationCheckListModel;
44
+ const ApplicationCheckListModel = mongoose.model("ApplicationCheckList", checkListItemSchema);
45
+ export default ApplicationCheckListModel;
@@ -1,10 +1,5 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const companySchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const companySchema = new mongoose.Schema({
8
3
  addressCity: { type: String, default: "" },
9
4
  addressCountry: { type: String, default: "" },
10
5
  addressLine1: { type: String, default: "" },
@@ -35,5 +30,5 @@ const companySchema = new mongoose_1.default.Schema({
35
30
  dateOfIncorporation: { type: Date }, // e.g., "2010-06-15"
36
31
  existingMortgage: { type: String } // e.g., "2"
37
32
  });
38
- const ApplicationCompanyModel = mongoose_1.default.model("ApplicationCompany", companySchema);
39
- exports.default = ApplicationCompanyModel;
33
+ const ApplicationCompanyModel = mongoose.model("ApplicationCompany", companySchema);
34
+ export default ApplicationCompanyModel;
@@ -1,10 +1,5 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const creditProfileSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const creditProfileSchema = new mongoose.Schema({
8
3
  companyAnyVoluntaryEnforcedPossessionNo: { type: String, default: false },
9
4
  companyAnyVoluntaryEnforcedPossessionYes: { type: String, default: "" },
10
5
  companyBankruptcyNo: { type: String, default: false },
@@ -14,4 +9,4 @@ const creditProfileSchema = new mongoose_1.default.Schema({
14
9
  companyDefaultsInLastYearNo: { type: String, default: false },
15
10
  companyDefaultsInLastYearYes: { type: String, default: "" }
16
11
  });
17
- exports.default = creditProfileSchema;
12
+ export default creditProfileSchema;
@@ -1,10 +1,5 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const directDebitSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const directDebitSchema = new mongoose.Schema({
8
3
  accountNumber: { type: String, default: "" },
9
4
  addressLine1: { type: String, default: "" },
10
5
  addressLine2: { type: String, default: "" },
@@ -18,4 +13,4 @@ const directDebitSchema = new mongoose_1.default.Schema({
18
13
  selectedPaymentDay: { type: String, default: null },
19
14
  sortCode: { type: String, default: "" },
20
15
  });
21
- exports.default = directDebitSchema;
16
+ export default directDebitSchema;
@@ -1,19 +1,14 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const documentSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const documentSchema = new mongoose.Schema({
8
3
  applicationId: {
9
- type: mongoose_1.default.Schema.Types.ObjectId,
4
+ type: mongoose.Schema.Types.ObjectId,
10
5
  ref: "Application",
11
6
  required: false,
12
7
  },
13
8
  documentId: { type: String, required: true },
14
9
  owningEntityId: { type: String, required: false },
15
10
  documentTypeLid: {
16
- type: mongoose_1.default.Schema.Types.ObjectId,
11
+ type: mongoose.Schema.Types.ObjectId,
17
12
  ref: "Lookup",
18
13
  required: false,
19
14
  },
@@ -36,5 +31,5 @@ const documentSchema = new mongoose_1.default.Schema({
36
31
  }, {
37
32
  timestamps: true
38
33
  });
39
- const ApplicationDocumentModel = mongoose_1.default.model("ApplicationDocument", documentSchema);
40
- exports.default = ApplicationDocumentModel;
34
+ const ApplicationDocumentModel = mongoose.model("ApplicationDocument", documentSchema);
35
+ export default ApplicationDocumentModel;
@@ -1,12 +1,7 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const fieldConfigSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const fieldConfigSchema = new mongoose.Schema({
8
3
  fieldName: { type: String, required: true, unique: true },
9
4
  validateProductOnChange: { type: String, default: true }
10
5
  });
11
- const ApplicationFieldConfigModel = mongoose_1.default.model('FieldConfig', fieldConfigSchema);
12
- exports.default = ApplicationFieldConfigModel;
6
+ const ApplicationFieldConfigModel = mongoose.model('FieldConfig', fieldConfigSchema);
7
+ export default ApplicationFieldConfigModel;
@@ -1,11 +1,6 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const illustrationSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const illustrationSchema = new mongoose.Schema({
8
3
  date: { type: Date } // e.g., the date of illustration
9
4
  });
10
- const IllustrationModel = mongoose_1.default.model("Illustration", illustrationSchema);
11
- exports.default = IllustrationModel;
5
+ const IllustrationModel = mongoose.model("Illustration", illustrationSchema);
6
+ export default IllustrationModel;
@@ -1,12 +1,7 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = __importDefault(require("mongoose"));
7
- const legalSchema = new mongoose_1.default.Schema({
1
+ import mongoose from "mongoose";
2
+ const legalSchema = new mongoose.Schema({
8
3
  assignedSolicitor: { type: String, default: "" },
9
4
  solicitorsReference: { type: String, default: "" }
10
5
  });
11
- const LegalModel = mongoose_1.default.model("Legal", legalSchema);
12
- exports.default = LegalModel;
6
+ const LegalModel = mongoose.model("Legal", legalSchema);
7
+ export default LegalModel;