@dynamatix/gb-schemas 1.0.1 → 1.0.3

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