@dynamatix/gb-schemas 1.0.9 → 1.0.10

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.
@@ -6,6 +6,7 @@ declare const applicantDirectDebitSchema: mongoose.Schema<any, mongoose.Model<an
6
6
  updatedAt: NativeDate;
7
7
  } & {
8
8
  isConfirmDeclaration: string;
9
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
9
10
  addressLine1?: string | null | undefined;
10
11
  addressLine2?: string | null | undefined;
11
12
  accountNumber?: string | null | undefined;
@@ -22,6 +23,7 @@ declare const applicantDirectDebitSchema: mongoose.Schema<any, mongoose.Model<an
22
23
  updatedAt: NativeDate;
23
24
  } & {
24
25
  isConfirmDeclaration: string;
26
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
25
27
  addressLine1?: string | null | undefined;
26
28
  addressLine2?: string | null | undefined;
27
29
  accountNumber?: string | null | undefined;
@@ -38,6 +40,7 @@ declare const applicantDirectDebitSchema: mongoose.Schema<any, mongoose.Model<an
38
40
  updatedAt: NativeDate;
39
41
  } & {
40
42
  isConfirmDeclaration: string;
43
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
41
44
  addressLine1?: string | null | undefined;
42
45
  addressLine2?: string | null | undefined;
43
46
  accountNumber?: string | null | undefined;
@@ -54,5 +57,119 @@ declare const applicantDirectDebitSchema: mongoose.Schema<any, mongoose.Model<an
54
57
  } & {
55
58
  __v: number;
56
59
  }>;
57
- export default applicantDirectDebitSchema;
60
+ declare const DirectDebitModel: mongoose.Model<{
61
+ createdAt: NativeDate;
62
+ updatedAt: NativeDate;
63
+ } & {
64
+ isConfirmDeclaration: string;
65
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
66
+ addressLine1?: string | null | undefined;
67
+ addressLine2?: string | null | undefined;
68
+ accountNumber?: string | null | undefined;
69
+ branch?: string | null | undefined;
70
+ city?: string | null | undefined;
71
+ contactPostcode?: string | null | undefined;
72
+ institution?: string | null | undefined;
73
+ nameOfAccountHolder?: string | null | undefined;
74
+ selectedPaymentDay?: string | null | undefined;
75
+ sortCode?: string | null | undefined;
76
+ Applicants?: string | null | undefined;
77
+ }, {}, {}, {}, mongoose.Document<unknown, {}, {
78
+ createdAt: NativeDate;
79
+ updatedAt: NativeDate;
80
+ } & {
81
+ isConfirmDeclaration: string;
82
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
83
+ addressLine1?: string | null | undefined;
84
+ addressLine2?: string | null | undefined;
85
+ accountNumber?: string | null | undefined;
86
+ branch?: string | null | undefined;
87
+ city?: string | null | undefined;
88
+ contactPostcode?: string | null | undefined;
89
+ institution?: string | null | undefined;
90
+ nameOfAccountHolder?: string | null | undefined;
91
+ selectedPaymentDay?: string | null | undefined;
92
+ sortCode?: string | null | undefined;
93
+ Applicants?: string | null | undefined;
94
+ }> & {
95
+ createdAt: NativeDate;
96
+ updatedAt: NativeDate;
97
+ } & {
98
+ isConfirmDeclaration: string;
99
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
100
+ addressLine1?: string | null | undefined;
101
+ addressLine2?: string | null | undefined;
102
+ accountNumber?: string | null | undefined;
103
+ branch?: string | null | undefined;
104
+ city?: string | null | undefined;
105
+ contactPostcode?: string | null | undefined;
106
+ institution?: string | null | undefined;
107
+ nameOfAccountHolder?: string | null | undefined;
108
+ selectedPaymentDay?: string | null | undefined;
109
+ sortCode?: string | null | undefined;
110
+ Applicants?: string | null | undefined;
111
+ } & {
112
+ _id: mongoose.Types.ObjectId;
113
+ } & {
114
+ __v: number;
115
+ }, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
116
+ timestamps: true;
117
+ }, {
118
+ createdAt: NativeDate;
119
+ updatedAt: NativeDate;
120
+ } & {
121
+ isConfirmDeclaration: string;
122
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
123
+ addressLine1?: string | null | undefined;
124
+ addressLine2?: string | null | undefined;
125
+ accountNumber?: string | null | undefined;
126
+ branch?: string | null | undefined;
127
+ city?: string | null | undefined;
128
+ contactPostcode?: string | null | undefined;
129
+ institution?: string | null | undefined;
130
+ nameOfAccountHolder?: string | null | undefined;
131
+ selectedPaymentDay?: string | null | undefined;
132
+ sortCode?: string | null | undefined;
133
+ Applicants?: string | null | undefined;
134
+ }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
135
+ createdAt: NativeDate;
136
+ updatedAt: NativeDate;
137
+ } & {
138
+ isConfirmDeclaration: string;
139
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
140
+ addressLine1?: string | null | undefined;
141
+ addressLine2?: string | null | undefined;
142
+ accountNumber?: string | null | undefined;
143
+ branch?: string | null | undefined;
144
+ city?: string | null | undefined;
145
+ contactPostcode?: string | null | undefined;
146
+ institution?: string | null | undefined;
147
+ nameOfAccountHolder?: string | null | undefined;
148
+ selectedPaymentDay?: string | null | undefined;
149
+ sortCode?: string | null | undefined;
150
+ Applicants?: string | null | undefined;
151
+ }>> & mongoose.FlatRecord<{
152
+ createdAt: NativeDate;
153
+ updatedAt: NativeDate;
154
+ } & {
155
+ isConfirmDeclaration: string;
156
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
157
+ addressLine1?: string | null | undefined;
158
+ addressLine2?: string | null | undefined;
159
+ accountNumber?: string | null | undefined;
160
+ branch?: string | null | undefined;
161
+ city?: string | null | undefined;
162
+ contactPostcode?: string | null | undefined;
163
+ institution?: string | null | undefined;
164
+ nameOfAccountHolder?: string | null | undefined;
165
+ selectedPaymentDay?: string | null | undefined;
166
+ sortCode?: string | null | undefined;
167
+ Applicants?: string | null | undefined;
168
+ }> & {
169
+ _id: mongoose.Types.ObjectId;
170
+ } & {
171
+ __v: number;
172
+ }>>;
173
+ export default DirectDebitModel;
174
+ export { applicantDirectDebitSchema };
58
175
  //# sourceMappingURL=applicant-direct-debit.model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-direct-debit.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-direct-debit.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaR,CAAC;AAGzB,eAAe,0BAA0B,CAAC"}
1
+ {"version":3,"file":"applicant-direct-debit.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-direct-debit.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcR,CAAC;AAGzB,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA4D,CAAC;AACnF,eAAe,gBAAgB,CAAC;AAChC,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import mongoose from 'mongoose';
2
2
  const applicantDirectDebitSchema = new mongoose.Schema({
3
+ applicationId: { type: mongoose.Schema.Types.ObjectId, ref: 'Application' },
3
4
  accountNumber: { type: String },
4
5
  addressLine1: { type: String },
5
6
  addressLine2: { type: String },
@@ -13,4 +14,6 @@ const applicantDirectDebitSchema = new mongoose.Schema({
13
14
  selectedPaymentDay: { type: String },
14
15
  sortCode: { type: String }
15
16
  }, { timestamps: true });
16
- export default applicantDirectDebitSchema;
17
+ const DirectDebitModel = mongoose.model("DirectDebit", applicantDirectDebitSchema);
18
+ export default DirectDebitModel;
19
+ export { applicantDirectDebitSchema };
@@ -105,23 +105,6 @@ declare const ApplicantModel: mongoose.Model<{
105
105
  lenderName?: string | null | undefined;
106
106
  monthlyPayment?: string | null | undefined;
107
107
  }>;
108
- directDebit?: ({
109
- createdAt: NativeDate;
110
- updatedAt: NativeDate;
111
- } & {
112
- isConfirmDeclaration: string;
113
- addressLine1?: string | null | undefined;
114
- addressLine2?: string | null | undefined;
115
- accountNumber?: string | null | undefined;
116
- branch?: string | null | undefined;
117
- city?: string | null | undefined;
118
- contactPostcode?: string | null | undefined;
119
- institution?: string | null | undefined;
120
- nameOfAccountHolder?: string | null | undefined;
121
- selectedPaymentDay?: string | null | undefined;
122
- sortCode?: string | null | undefined;
123
- Applicants?: string | null | undefined;
124
- }) | null | undefined;
125
108
  creditProfile?: {
126
109
  anyVoluntaryEnforcedPossessionNo: string;
127
110
  bankruptcyNo: string;
@@ -231,6 +214,24 @@ declare const ApplicantModel: mongoose.Model<{
231
214
  travelAllowance?: string | null | undefined;
232
215
  underTerminationNoticeNote?: string | null | undefined;
233
216
  } | null | undefined;
217
+ directDebit?: ({
218
+ createdAt: NativeDate;
219
+ updatedAt: NativeDate;
220
+ } & {
221
+ isConfirmDeclaration: string;
222
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
223
+ addressLine1?: string | null | undefined;
224
+ addressLine2?: string | null | undefined;
225
+ accountNumber?: string | null | undefined;
226
+ branch?: string | null | undefined;
227
+ city?: string | null | undefined;
228
+ contactPostcode?: string | null | undefined;
229
+ institution?: string | null | undefined;
230
+ nameOfAccountHolder?: string | null | undefined;
231
+ selectedPaymentDay?: string | null | undefined;
232
+ sortCode?: string | null | undefined;
233
+ Applicants?: string | null | undefined;
234
+ }) | null | undefined;
234
235
  income?: {
235
236
  businessType: string;
236
237
  natureOfBusiness: string;
@@ -387,23 +388,6 @@ declare const ApplicantModel: mongoose.Model<{
387
388
  lenderName?: string | null | undefined;
388
389
  monthlyPayment?: string | null | undefined;
389
390
  }>;
390
- directDebit?: ({
391
- createdAt: NativeDate;
392
- updatedAt: NativeDate;
393
- } & {
394
- isConfirmDeclaration: string;
395
- addressLine1?: string | null | undefined;
396
- addressLine2?: string | null | undefined;
397
- accountNumber?: string | null | undefined;
398
- branch?: string | null | undefined;
399
- city?: string | null | undefined;
400
- contactPostcode?: string | null | undefined;
401
- institution?: string | null | undefined;
402
- nameOfAccountHolder?: string | null | undefined;
403
- selectedPaymentDay?: string | null | undefined;
404
- sortCode?: string | null | undefined;
405
- Applicants?: string | null | undefined;
406
- }) | null | undefined;
407
391
  creditProfile?: {
408
392
  anyVoluntaryEnforcedPossessionNo: string;
409
393
  bankruptcyNo: string;
@@ -513,6 +497,24 @@ declare const ApplicantModel: mongoose.Model<{
513
497
  travelAllowance?: string | null | undefined;
514
498
  underTerminationNoticeNote?: string | null | undefined;
515
499
  } | null | undefined;
500
+ directDebit?: ({
501
+ createdAt: NativeDate;
502
+ updatedAt: NativeDate;
503
+ } & {
504
+ isConfirmDeclaration: string;
505
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
506
+ addressLine1?: string | null | undefined;
507
+ addressLine2?: string | null | undefined;
508
+ accountNumber?: string | null | undefined;
509
+ branch?: string | null | undefined;
510
+ city?: string | null | undefined;
511
+ contactPostcode?: string | null | undefined;
512
+ institution?: string | null | undefined;
513
+ nameOfAccountHolder?: string | null | undefined;
514
+ selectedPaymentDay?: string | null | undefined;
515
+ sortCode?: string | null | undefined;
516
+ Applicants?: string | null | undefined;
517
+ }) | null | undefined;
516
518
  income?: {
517
519
  businessType: string;
518
520
  natureOfBusiness: string;
@@ -669,23 +671,6 @@ declare const ApplicantModel: mongoose.Model<{
669
671
  lenderName?: string | null | undefined;
670
672
  monthlyPayment?: string | null | undefined;
671
673
  }>;
672
- directDebit?: ({
673
- createdAt: NativeDate;
674
- updatedAt: NativeDate;
675
- } & {
676
- isConfirmDeclaration: string;
677
- addressLine1?: string | null | undefined;
678
- addressLine2?: string | null | undefined;
679
- accountNumber?: string | null | undefined;
680
- branch?: string | null | undefined;
681
- city?: string | null | undefined;
682
- contactPostcode?: string | null | undefined;
683
- institution?: string | null | undefined;
684
- nameOfAccountHolder?: string | null | undefined;
685
- selectedPaymentDay?: string | null | undefined;
686
- sortCode?: string | null | undefined;
687
- Applicants?: string | null | undefined;
688
- }) | null | undefined;
689
674
  creditProfile?: {
690
675
  anyVoluntaryEnforcedPossessionNo: string;
691
676
  bankruptcyNo: string;
@@ -795,6 +780,24 @@ declare const ApplicantModel: mongoose.Model<{
795
780
  travelAllowance?: string | null | undefined;
796
781
  underTerminationNoticeNote?: string | null | undefined;
797
782
  } | null | undefined;
783
+ directDebit?: ({
784
+ createdAt: NativeDate;
785
+ updatedAt: NativeDate;
786
+ } & {
787
+ isConfirmDeclaration: string;
788
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
789
+ addressLine1?: string | null | undefined;
790
+ addressLine2?: string | null | undefined;
791
+ accountNumber?: string | null | undefined;
792
+ branch?: string | null | undefined;
793
+ city?: string | null | undefined;
794
+ contactPostcode?: string | null | undefined;
795
+ institution?: string | null | undefined;
796
+ nameOfAccountHolder?: string | null | undefined;
797
+ selectedPaymentDay?: string | null | undefined;
798
+ sortCode?: string | null | undefined;
799
+ Applicants?: string | null | undefined;
800
+ }) | null | undefined;
798
801
  income?: {
799
802
  businessType: string;
800
803
  natureOfBusiness: string;
@@ -963,23 +966,6 @@ declare const ApplicantModel: mongoose.Model<{
963
966
  lenderName?: string | null | undefined;
964
967
  monthlyPayment?: string | null | undefined;
965
968
  }>;
966
- directDebit?: ({
967
- createdAt: NativeDate;
968
- updatedAt: NativeDate;
969
- } & {
970
- isConfirmDeclaration: string;
971
- addressLine1?: string | null | undefined;
972
- addressLine2?: string | null | undefined;
973
- accountNumber?: string | null | undefined;
974
- branch?: string | null | undefined;
975
- city?: string | null | undefined;
976
- contactPostcode?: string | null | undefined;
977
- institution?: string | null | undefined;
978
- nameOfAccountHolder?: string | null | undefined;
979
- selectedPaymentDay?: string | null | undefined;
980
- sortCode?: string | null | undefined;
981
- Applicants?: string | null | undefined;
982
- }) | null | undefined;
983
969
  creditProfile?: {
984
970
  anyVoluntaryEnforcedPossessionNo: string;
985
971
  bankruptcyNo: string;
@@ -1089,6 +1075,24 @@ declare const ApplicantModel: mongoose.Model<{
1089
1075
  travelAllowance?: string | null | undefined;
1090
1076
  underTerminationNoticeNote?: string | null | undefined;
1091
1077
  } | null | undefined;
1078
+ directDebit?: ({
1079
+ createdAt: NativeDate;
1080
+ updatedAt: NativeDate;
1081
+ } & {
1082
+ isConfirmDeclaration: string;
1083
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
1084
+ addressLine1?: string | null | undefined;
1085
+ addressLine2?: string | null | undefined;
1086
+ accountNumber?: string | null | undefined;
1087
+ branch?: string | null | undefined;
1088
+ city?: string | null | undefined;
1089
+ contactPostcode?: string | null | undefined;
1090
+ institution?: string | null | undefined;
1091
+ nameOfAccountHolder?: string | null | undefined;
1092
+ selectedPaymentDay?: string | null | undefined;
1093
+ sortCode?: string | null | undefined;
1094
+ Applicants?: string | null | undefined;
1095
+ }) | null | undefined;
1092
1096
  income?: {
1093
1097
  businessType: string;
1094
1098
  natureOfBusiness: string;
@@ -1245,23 +1249,6 @@ declare const ApplicantModel: mongoose.Model<{
1245
1249
  lenderName?: string | null | undefined;
1246
1250
  monthlyPayment?: string | null | undefined;
1247
1251
  }>;
1248
- directDebit?: ({
1249
- createdAt: NativeDate;
1250
- updatedAt: NativeDate;
1251
- } & {
1252
- isConfirmDeclaration: string;
1253
- addressLine1?: string | null | undefined;
1254
- addressLine2?: string | null | undefined;
1255
- accountNumber?: string | null | undefined;
1256
- branch?: string | null | undefined;
1257
- city?: string | null | undefined;
1258
- contactPostcode?: string | null | undefined;
1259
- institution?: string | null | undefined;
1260
- nameOfAccountHolder?: string | null | undefined;
1261
- selectedPaymentDay?: string | null | undefined;
1262
- sortCode?: string | null | undefined;
1263
- Applicants?: string | null | undefined;
1264
- }) | null | undefined;
1265
1252
  creditProfile?: {
1266
1253
  anyVoluntaryEnforcedPossessionNo: string;
1267
1254
  bankruptcyNo: string;
@@ -1371,6 +1358,24 @@ declare const ApplicantModel: mongoose.Model<{
1371
1358
  travelAllowance?: string | null | undefined;
1372
1359
  underTerminationNoticeNote?: string | null | undefined;
1373
1360
  } | null | undefined;
1361
+ directDebit?: ({
1362
+ createdAt: NativeDate;
1363
+ updatedAt: NativeDate;
1364
+ } & {
1365
+ isConfirmDeclaration: string;
1366
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
1367
+ addressLine1?: string | null | undefined;
1368
+ addressLine2?: string | null | undefined;
1369
+ accountNumber?: string | null | undefined;
1370
+ branch?: string | null | undefined;
1371
+ city?: string | null | undefined;
1372
+ contactPostcode?: string | null | undefined;
1373
+ institution?: string | null | undefined;
1374
+ nameOfAccountHolder?: string | null | undefined;
1375
+ selectedPaymentDay?: string | null | undefined;
1376
+ sortCode?: string | null | undefined;
1377
+ Applicants?: string | null | undefined;
1378
+ }) | null | undefined;
1374
1379
  income?: {
1375
1380
  businessType: string;
1376
1381
  natureOfBusiness: string;
@@ -1527,23 +1532,6 @@ declare const ApplicantModel: mongoose.Model<{
1527
1532
  lenderName?: string | null | undefined;
1528
1533
  monthlyPayment?: string | null | undefined;
1529
1534
  }>;
1530
- directDebit?: ({
1531
- createdAt: NativeDate;
1532
- updatedAt: NativeDate;
1533
- } & {
1534
- isConfirmDeclaration: string;
1535
- addressLine1?: string | null | undefined;
1536
- addressLine2?: string | null | undefined;
1537
- accountNumber?: string | null | undefined;
1538
- branch?: string | null | undefined;
1539
- city?: string | null | undefined;
1540
- contactPostcode?: string | null | undefined;
1541
- institution?: string | null | undefined;
1542
- nameOfAccountHolder?: string | null | undefined;
1543
- selectedPaymentDay?: string | null | undefined;
1544
- sortCode?: string | null | undefined;
1545
- Applicants?: string | null | undefined;
1546
- }) | null | undefined;
1547
1535
  creditProfile?: {
1548
1536
  anyVoluntaryEnforcedPossessionNo: string;
1549
1537
  bankruptcyNo: string;
@@ -1653,6 +1641,24 @@ declare const ApplicantModel: mongoose.Model<{
1653
1641
  travelAllowance?: string | null | undefined;
1654
1642
  underTerminationNoticeNote?: string | null | undefined;
1655
1643
  } | null | undefined;
1644
+ directDebit?: ({
1645
+ createdAt: NativeDate;
1646
+ updatedAt: NativeDate;
1647
+ } & {
1648
+ isConfirmDeclaration: string;
1649
+ applicationId?: mongoose.Types.ObjectId | null | undefined;
1650
+ addressLine1?: string | null | undefined;
1651
+ addressLine2?: string | null | undefined;
1652
+ accountNumber?: string | null | undefined;
1653
+ branch?: string | null | undefined;
1654
+ city?: string | null | undefined;
1655
+ contactPostcode?: string | null | undefined;
1656
+ institution?: string | null | undefined;
1657
+ nameOfAccountHolder?: string | null | undefined;
1658
+ selectedPaymentDay?: string | null | undefined;
1659
+ sortCode?: string | null | undefined;
1660
+ Applicants?: string | null | undefined;
1661
+ }) | null | undefined;
1656
1662
  income?: {
1657
1663
  businessType: string;
1658
1664
  natureOfBusiness: string;
@@ -1 +1 @@
1
- {"version":3,"file":"applicant.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAwLhC,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC"}
@@ -6,7 +6,7 @@ import applicantIncomeSourceSchema from "./applicant-income-source.model";
6
6
  import applicantExpenditureSchema from "./applicant-expenditure.model";
7
7
  import applicantEmploymentSchema from "./applicant-employment.model";
8
8
  import applicantCommitmentSchema from "./applicant-commitment.model";
9
- import applicantDirectDebitSchema from "./applicant-direct-debit.model";
9
+ import { applicantDirectDebitSchema } from "./applicant-direct-debit.model";
10
10
  import creditProfileSchema from "./applicant-credit-profile.model";
11
11
  import incomeSchema from "./applicant-income.model";
12
12
  const applicantSchema = new mongoose.Schema({
@@ -110,40 +110,40 @@ const applicantSchema = new mongoose.Schema({
110
110
  toObject: { virtuals: true }
111
111
  });
112
112
  applicantSchema.virtual('nationality').get(function () {
113
- return this.nationalityLid instanceof mongoose.Types.ObjectId ? null : this.nationalityLid?.name ?? null;
113
+ return this.nationalityLid?.name ?? null;
114
114
  });
115
115
  applicantSchema.virtual('residence').get(function () {
116
- return this.countryOfResidenceLid instanceof mongoose.Types.ObjectId ? null : this.countryOfResidenceLid?.name ?? null;
116
+ return this.countryOfResidenceLid?.name ?? null;
117
117
  });
118
118
  applicantSchema.virtual('industry').get(function () {
119
- return this.employment?.industryLid instanceof mongoose.Types.ObjectId ? null : this.employment?.industryLid?.name ?? null;
119
+ return this.employment?.industryLid?.name ?? null;
120
120
  });
121
121
  applicantSchema.virtual('employmentClass').get(function () {
122
- return this.employment?.classLid instanceof mongoose.Types.ObjectId ? null : this.employment?.classLid?.name ?? null;
122
+ return this.employment?.classLid?.name ?? null;
123
123
  });
124
124
  applicantSchema.virtual('addressCountry').get(function () {
125
- return this.addressCountryLid instanceof mongoose.Types.ObjectId ? null : this.addressCountryLid?.name ?? null;
125
+ return this.addressCountryLid?.name ?? null;
126
126
  });
127
127
  applicantSchema.virtual('previous1AddressCountry').get(function () {
128
- return this.previous1AddressCountryLid instanceof mongoose.Types.ObjectId ? null : this.previous1AddressCountryLid?.name ?? null;
128
+ return this.previous1AddressCountryLid?.name ?? null;
129
129
  });
130
130
  applicantSchema.virtual('previous2AddressCountry').get(function () {
131
- return this.previous2AddressCountryLid instanceof mongoose.Types.ObjectId ? null : this.previous2AddressCountryLid?.name ?? null;
131
+ return this.previous2AddressCountryLid?.name ?? null;
132
132
  });
133
133
  applicantSchema.virtual('maritalStatus').get(function () {
134
- return this.maritalStatusLid instanceof mongoose.Types.ObjectId ? null : this.maritalStatusLid?.name ?? null;
134
+ return this.maritalStatusLid?.name ?? null;
135
135
  });
136
136
  applicantSchema.virtual('relationshipToOthers').get(function () {
137
- return this.relationshipToOthersLid instanceof mongoose.Types.ObjectId ? null : this.relationshipToOthersLid?.name ?? null;
137
+ return this.relationshipToOthersLid?.name ?? null;
138
138
  });
139
139
  applicantSchema.virtual('residentialStatus').get(function () {
140
- return this.residentialStatusLid instanceof mongoose.Types.ObjectId ? null : this.residentialStatusLid?.name ?? null;
140
+ return this.residentialStatusLid?.name ?? null;
141
141
  });
142
142
  applicantSchema.virtual('taxPayer').get(function () {
143
- return this.taxPayerLid instanceof mongoose.Types.ObjectId ? null : this.taxPayerLid?.name ?? null;
143
+ return this.taxPayerLid?.name ?? null;
144
144
  });
145
145
  applicantSchema.virtual('vulnerabilityType').get(function () {
146
- return this.vulnerabilityTypeLids?.map(v => (v instanceof mongoose.Types.ObjectId ? null : v.name)) ?? null;
146
+ return this.vulnerabilityTypeLids?.map((v) => v.name);
147
147
  });
148
148
  const ApplicantModel = mongoose.model("Applicant", applicantSchema);
149
149
  export default ApplicantModel;
@@ -1,5 +1,48 @@
1
1
  import mongoose from "mongoose";
2
- declare const directDebitSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
2
+ declare const DirectDebitModel: mongoose.Model<{
3
+ addressLine1: string;
4
+ addressLine2: string;
5
+ accountNumber: string;
6
+ applicants: string;
7
+ branch: string;
8
+ city: string;
9
+ contactPostcode: string;
10
+ institution: string;
11
+ isConfirmDeclaration: string;
12
+ nameOfAccountHolder: string;
13
+ selectedPaymentDay: string;
14
+ sortCode: string;
15
+ }, {}, {}, {}, mongoose.Document<unknown, {}, {
16
+ addressLine1: string;
17
+ addressLine2: string;
18
+ accountNumber: string;
19
+ applicants: string;
20
+ branch: string;
21
+ city: string;
22
+ contactPostcode: string;
23
+ institution: string;
24
+ isConfirmDeclaration: string;
25
+ nameOfAccountHolder: string;
26
+ selectedPaymentDay: string;
27
+ sortCode: string;
28
+ }> & {
29
+ addressLine1: string;
30
+ addressLine2: string;
31
+ accountNumber: string;
32
+ applicants: string;
33
+ branch: string;
34
+ city: string;
35
+ contactPostcode: string;
36
+ institution: string;
37
+ isConfirmDeclaration: string;
38
+ nameOfAccountHolder: string;
39
+ selectedPaymentDay: string;
40
+ sortCode: string;
41
+ } & {
42
+ _id: mongoose.Types.ObjectId;
43
+ } & {
44
+ __v: number;
45
+ }, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
3
46
  addressLine1: string;
4
47
  addressLine2: string;
5
48
  accountNumber: string;
@@ -42,6 +85,6 @@ declare const directDebitSchema: mongoose.Schema<any, mongoose.Model<any, any, a
42
85
  _id: mongoose.Types.ObjectId;
43
86
  } & {
44
87
  __v: number;
45
- }>;
46
- export default directDebitSchema;
88
+ }>>;
89
+ export default DirectDebitModel;
47
90
  //# sourceMappingURL=application-direct-debit.model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"application-direct-debit.model.d.ts","sourceRoot":"","sources":["../../applications/application-direct-debit.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcrB,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"application-direct-debit.model.d.ts","sourceRoot":"","sources":["../../applications/application-direct-debit.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAkBhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAmD,CAAC;AAC1E,eAAe,gBAAgB,CAAC"}
@@ -13,4 +13,5 @@ const directDebitSchema = new mongoose.Schema({
13
13
  selectedPaymentDay: { type: String, default: null },
14
14
  sortCode: { type: String, default: "" },
15
15
  });
16
- export default directDebitSchema;
16
+ const DirectDebitModel = mongoose.model("DirectDebit", directDebitSchema);
17
+ export default DirectDebitModel;
@@ -1,5 +1,5 @@
1
1
  import mongoose from "mongoose";
2
- declare const mortgageSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
2
+ declare const MortgageModel: mongoose.Model<{
3
3
  estimatedValue: string;
4
4
  fundRaisedFor: string;
5
5
  giftDetails: string;
@@ -18,6 +18,92 @@ declare const mortgageSchema: mongoose.Schema<any, mongoose.Model<any, any, any,
18
18
  sourceOfFundDetails: string;
19
19
  sourceOfFundsLid: mongoose.Types.ObjectId;
20
20
  vendorsName: string;
21
+ applicationid?: mongoose.Types.ObjectId | null | undefined;
22
+ depositComeFrom?: string | null | undefined;
23
+ exitStrategy?: string | null | undefined;
24
+ loanRequired?: string | null | undefined;
25
+ monthlyRentalIncome?: string | null | undefined;
26
+ proposedTenants?: string | null | undefined;
27
+ purchasePrice?: string | null | undefined;
28
+ telephoneNumber?: string | null | undefined;
29
+ }, {}, {}, {}, mongoose.Document<unknown, {}, {
30
+ estimatedValue: string;
31
+ fundRaisedFor: string;
32
+ giftDetails: string;
33
+ ifOtherDetails: string;
34
+ isDistressedSale: string;
35
+ isGovernmentInitiative: string;
36
+ isPurchasedAsSale: string;
37
+ isPurchasedBelowMarketValue: string;
38
+ isReadyToSell: string;
39
+ isTheIntentionToLet: string;
40
+ leaseTypeLid: mongoose.Types.ObjectId;
41
+ propertyValuationDetails: string;
42
+ repaymentTypeLid: mongoose.Types.ObjectId;
43
+ repaymentVehicle: string;
44
+ saleMade: string;
45
+ sourceOfFundDetails: string;
46
+ sourceOfFundsLid: mongoose.Types.ObjectId;
47
+ vendorsName: string;
48
+ applicationid?: mongoose.Types.ObjectId | null | undefined;
49
+ depositComeFrom?: string | null | undefined;
50
+ exitStrategy?: string | null | undefined;
51
+ loanRequired?: string | null | undefined;
52
+ monthlyRentalIncome?: string | null | undefined;
53
+ proposedTenants?: string | null | undefined;
54
+ purchasePrice?: string | null | undefined;
55
+ telephoneNumber?: string | null | undefined;
56
+ }> & {
57
+ estimatedValue: string;
58
+ fundRaisedFor: string;
59
+ giftDetails: string;
60
+ ifOtherDetails: string;
61
+ isDistressedSale: string;
62
+ isGovernmentInitiative: string;
63
+ isPurchasedAsSale: string;
64
+ isPurchasedBelowMarketValue: string;
65
+ isReadyToSell: string;
66
+ isTheIntentionToLet: string;
67
+ leaseTypeLid: mongoose.Types.ObjectId;
68
+ propertyValuationDetails: string;
69
+ repaymentTypeLid: mongoose.Types.ObjectId;
70
+ repaymentVehicle: string;
71
+ saleMade: string;
72
+ sourceOfFundDetails: string;
73
+ sourceOfFundsLid: mongoose.Types.ObjectId;
74
+ vendorsName: string;
75
+ applicationid?: mongoose.Types.ObjectId | null | undefined;
76
+ depositComeFrom?: string | null | undefined;
77
+ exitStrategy?: string | null | undefined;
78
+ loanRequired?: string | null | undefined;
79
+ monthlyRentalIncome?: string | null | undefined;
80
+ proposedTenants?: string | null | undefined;
81
+ purchasePrice?: string | null | undefined;
82
+ telephoneNumber?: string | null | undefined;
83
+ } & {
84
+ _id: mongoose.Types.ObjectId;
85
+ } & {
86
+ __v: number;
87
+ }, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
88
+ estimatedValue: string;
89
+ fundRaisedFor: string;
90
+ giftDetails: string;
91
+ ifOtherDetails: string;
92
+ isDistressedSale: string;
93
+ isGovernmentInitiative: string;
94
+ isPurchasedAsSale: string;
95
+ isPurchasedBelowMarketValue: string;
96
+ isReadyToSell: string;
97
+ isTheIntentionToLet: string;
98
+ leaseTypeLid: mongoose.Types.ObjectId;
99
+ propertyValuationDetails: string;
100
+ repaymentTypeLid: mongoose.Types.ObjectId;
101
+ repaymentVehicle: string;
102
+ saleMade: string;
103
+ sourceOfFundDetails: string;
104
+ sourceOfFundsLid: mongoose.Types.ObjectId;
105
+ vendorsName: string;
106
+ applicationid?: mongoose.Types.ObjectId | null | undefined;
21
107
  depositComeFrom?: string | null | undefined;
22
108
  exitStrategy?: string | null | undefined;
23
109
  loanRequired?: string | null | undefined;
@@ -44,6 +130,7 @@ declare const mortgageSchema: mongoose.Schema<any, mongoose.Model<any, any, any,
44
130
  sourceOfFundDetails: string;
45
131
  sourceOfFundsLid: mongoose.Types.ObjectId;
46
132
  vendorsName: string;
133
+ applicationid?: mongoose.Types.ObjectId | null | undefined;
47
134
  depositComeFrom?: string | null | undefined;
48
135
  exitStrategy?: string | null | undefined;
49
136
  loanRequired?: string | null | undefined;
@@ -70,6 +157,7 @@ declare const mortgageSchema: mongoose.Schema<any, mongoose.Model<any, any, any,
70
157
  sourceOfFundDetails: string;
71
158
  sourceOfFundsLid: mongoose.Types.ObjectId;
72
159
  vendorsName: string;
160
+ applicationid?: mongoose.Types.ObjectId | null | undefined;
73
161
  depositComeFrom?: string | null | undefined;
74
162
  exitStrategy?: string | null | undefined;
75
163
  loanRequired?: string | null | undefined;
@@ -81,6 +169,6 @@ declare const mortgageSchema: mongoose.Schema<any, mongoose.Model<any, any, any,
81
169
  _id: mongoose.Types.ObjectId;
82
170
  } & {
83
171
  __v: number;
84
- }>;
85
- export default mortgageSchema;
172
+ }>>;
173
+ export default MortgageModel;
86
174
  //# sourceMappingURL=application-mortgage.model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"application-mortgage.model.d.ts","sourceRoot":"","sources":["../../applications/application-mortgage.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAGhC,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"application-mortgage.model.d.ts","sourceRoot":"","sources":["../../applications/application-mortgage.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAgChC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6C,CAAC;AACjE,eAAe,aAAa,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import mongoose from "mongoose";
2
2
  const mortgageSchema = new mongoose.Schema({
3
+ applicationid: { type: mongoose.Schema.Types.ObjectId, ref: "Application" },
3
4
  depositComeFrom: { type: String },
4
5
  estimatedValue: { type: String, default: "" },
5
6
  exitStrategy: { type: String },
@@ -26,4 +27,5 @@ const mortgageSchema = new mongoose.Schema({
26
27
  telephoneNumber: { type: String },
27
28
  vendorsName: { type: String, default: "" }
28
29
  });
29
- export default mortgageSchema;
30
+ const MortgageModel = mongoose.model("Mortgage", mortgageSchema);
31
+ export default MortgageModel;
@@ -167,20 +167,6 @@ declare const ApplicationModel: mongoose.Model<{
167
167
  } | null | undefined;
168
168
  } | null | undefined;
169
169
  } | null | undefined;
170
- directDebit?: {
171
- addressLine1: string;
172
- addressLine2: string;
173
- accountNumber: string;
174
- applicants: string;
175
- branch: string;
176
- city: string;
177
- contactPostcode: string;
178
- institution: string;
179
- isConfirmDeclaration: string;
180
- nameOfAccountHolder: string;
181
- selectedPaymentDay: string;
182
- sortCode: string;
183
- } | null | undefined;
184
170
  creditProfile?: {
185
171
  companyAnyVoluntaryEnforcedPossessionNo: string;
186
172
  companyAnyVoluntaryEnforcedPossessionYes: string;
@@ -191,38 +177,13 @@ declare const ApplicationModel: mongoose.Model<{
191
177
  companyDefaultsInLastYearNo: string;
192
178
  companyDefaultsInLastYearYes: string;
193
179
  } | null | undefined;
194
- mortgage?: {
195
- estimatedValue: string;
196
- fundRaisedFor: string;
197
- giftDetails: string;
198
- ifOtherDetails: string;
199
- isDistressedSale: string;
200
- isGovernmentInitiative: string;
201
- isPurchasedAsSale: string;
202
- isPurchasedBelowMarketValue: string;
203
- isReadyToSell: string;
204
- isTheIntentionToLet: string;
205
- leaseTypeLid: mongoose.Types.ObjectId;
206
- propertyValuationDetails: string;
207
- repaymentTypeLid: mongoose.Types.ObjectId;
208
- repaymentVehicle: string;
209
- saleMade: string;
210
- sourceOfFundDetails: string;
211
- sourceOfFundsLid: mongoose.Types.ObjectId;
212
- vendorsName: string;
213
- depositComeFrom?: string | null | undefined;
214
- exitStrategy?: string | null | undefined;
215
- loanRequired?: string | null | undefined;
216
- monthlyRentalIncome?: string | null | undefined;
217
- proposedTenants?: string | null | undefined;
218
- purchasePrice?: string | null | undefined;
219
- telephoneNumber?: string | null | undefined;
220
- } | null | undefined;
221
180
  assignedToUserId?: mongoose.Types.ObjectId | null | undefined;
222
181
  lastUpdated?: string | null | undefined;
223
182
  submittedDate?: string | null | undefined;
224
183
  productId?: mongoose.Types.ObjectId | null | undefined;
225
184
  product?: string | null | undefined;
185
+ directDebitId?: mongoose.Types.ObjectId | null | undefined;
186
+ mortgageId?: mongoose.Types.ObjectId | null | undefined;
226
187
  companyId?: mongoose.Types.ObjectId | null | undefined;
227
188
  rationaleId?: mongoose.Types.ObjectId | null | undefined;
228
189
  }, {}, {}, {}, mongoose.Document<unknown, {}, {
@@ -393,20 +354,6 @@ declare const ApplicationModel: mongoose.Model<{
393
354
  } | null | undefined;
394
355
  } | null | undefined;
395
356
  } | null | undefined;
396
- directDebit?: {
397
- addressLine1: string;
398
- addressLine2: string;
399
- accountNumber: string;
400
- applicants: string;
401
- branch: string;
402
- city: string;
403
- contactPostcode: string;
404
- institution: string;
405
- isConfirmDeclaration: string;
406
- nameOfAccountHolder: string;
407
- selectedPaymentDay: string;
408
- sortCode: string;
409
- } | null | undefined;
410
357
  creditProfile?: {
411
358
  companyAnyVoluntaryEnforcedPossessionNo: string;
412
359
  companyAnyVoluntaryEnforcedPossessionYes: string;
@@ -417,38 +364,13 @@ declare const ApplicationModel: mongoose.Model<{
417
364
  companyDefaultsInLastYearNo: string;
418
365
  companyDefaultsInLastYearYes: string;
419
366
  } | null | undefined;
420
- mortgage?: {
421
- estimatedValue: string;
422
- fundRaisedFor: string;
423
- giftDetails: string;
424
- ifOtherDetails: string;
425
- isDistressedSale: string;
426
- isGovernmentInitiative: string;
427
- isPurchasedAsSale: string;
428
- isPurchasedBelowMarketValue: string;
429
- isReadyToSell: string;
430
- isTheIntentionToLet: string;
431
- leaseTypeLid: mongoose.Types.ObjectId;
432
- propertyValuationDetails: string;
433
- repaymentTypeLid: mongoose.Types.ObjectId;
434
- repaymentVehicle: string;
435
- saleMade: string;
436
- sourceOfFundDetails: string;
437
- sourceOfFundsLid: mongoose.Types.ObjectId;
438
- vendorsName: string;
439
- depositComeFrom?: string | null | undefined;
440
- exitStrategy?: string | null | undefined;
441
- loanRequired?: string | null | undefined;
442
- monthlyRentalIncome?: string | null | undefined;
443
- proposedTenants?: string | null | undefined;
444
- purchasePrice?: string | null | undefined;
445
- telephoneNumber?: string | null | undefined;
446
- } | null | undefined;
447
367
  assignedToUserId?: mongoose.Types.ObjectId | null | undefined;
448
368
  lastUpdated?: string | null | undefined;
449
369
  submittedDate?: string | null | undefined;
450
370
  productId?: mongoose.Types.ObjectId | null | undefined;
451
371
  product?: string | null | undefined;
372
+ directDebitId?: mongoose.Types.ObjectId | null | undefined;
373
+ mortgageId?: mongoose.Types.ObjectId | null | undefined;
452
374
  companyId?: mongoose.Types.ObjectId | null | undefined;
453
375
  rationaleId?: mongoose.Types.ObjectId | null | undefined;
454
376
  }> & {
@@ -619,20 +541,6 @@ declare const ApplicationModel: mongoose.Model<{
619
541
  } | null | undefined;
620
542
  } | null | undefined;
621
543
  } | null | undefined;
622
- directDebit?: {
623
- addressLine1: string;
624
- addressLine2: string;
625
- accountNumber: string;
626
- applicants: string;
627
- branch: string;
628
- city: string;
629
- contactPostcode: string;
630
- institution: string;
631
- isConfirmDeclaration: string;
632
- nameOfAccountHolder: string;
633
- selectedPaymentDay: string;
634
- sortCode: string;
635
- } | null | undefined;
636
544
  creditProfile?: {
637
545
  companyAnyVoluntaryEnforcedPossessionNo: string;
638
546
  companyAnyVoluntaryEnforcedPossessionYes: string;
@@ -643,38 +551,13 @@ declare const ApplicationModel: mongoose.Model<{
643
551
  companyDefaultsInLastYearNo: string;
644
552
  companyDefaultsInLastYearYes: string;
645
553
  } | null | undefined;
646
- mortgage?: {
647
- estimatedValue: string;
648
- fundRaisedFor: string;
649
- giftDetails: string;
650
- ifOtherDetails: string;
651
- isDistressedSale: string;
652
- isGovernmentInitiative: string;
653
- isPurchasedAsSale: string;
654
- isPurchasedBelowMarketValue: string;
655
- isReadyToSell: string;
656
- isTheIntentionToLet: string;
657
- leaseTypeLid: mongoose.Types.ObjectId;
658
- propertyValuationDetails: string;
659
- repaymentTypeLid: mongoose.Types.ObjectId;
660
- repaymentVehicle: string;
661
- saleMade: string;
662
- sourceOfFundDetails: string;
663
- sourceOfFundsLid: mongoose.Types.ObjectId;
664
- vendorsName: string;
665
- depositComeFrom?: string | null | undefined;
666
- exitStrategy?: string | null | undefined;
667
- loanRequired?: string | null | undefined;
668
- monthlyRentalIncome?: string | null | undefined;
669
- proposedTenants?: string | null | undefined;
670
- purchasePrice?: string | null | undefined;
671
- telephoneNumber?: string | null | undefined;
672
- } | null | undefined;
673
554
  assignedToUserId?: mongoose.Types.ObjectId | null | undefined;
674
555
  lastUpdated?: string | null | undefined;
675
556
  submittedDate?: string | null | undefined;
676
557
  productId?: mongoose.Types.ObjectId | null | undefined;
677
558
  product?: string | null | undefined;
559
+ directDebitId?: mongoose.Types.ObjectId | null | undefined;
560
+ mortgageId?: mongoose.Types.ObjectId | null | undefined;
678
561
  companyId?: mongoose.Types.ObjectId | null | undefined;
679
562
  rationaleId?: mongoose.Types.ObjectId | null | undefined;
680
563
  } & {
@@ -857,20 +740,6 @@ declare const ApplicationModel: mongoose.Model<{
857
740
  } | null | undefined;
858
741
  } | null | undefined;
859
742
  } | null | undefined;
860
- directDebit?: {
861
- addressLine1: string;
862
- addressLine2: string;
863
- accountNumber: string;
864
- applicants: string;
865
- branch: string;
866
- city: string;
867
- contactPostcode: string;
868
- institution: string;
869
- isConfirmDeclaration: string;
870
- nameOfAccountHolder: string;
871
- selectedPaymentDay: string;
872
- sortCode: string;
873
- } | null | undefined;
874
743
  creditProfile?: {
875
744
  companyAnyVoluntaryEnforcedPossessionNo: string;
876
745
  companyAnyVoluntaryEnforcedPossessionYes: string;
@@ -881,38 +750,13 @@ declare const ApplicationModel: mongoose.Model<{
881
750
  companyDefaultsInLastYearNo: string;
882
751
  companyDefaultsInLastYearYes: string;
883
752
  } | null | undefined;
884
- mortgage?: {
885
- estimatedValue: string;
886
- fundRaisedFor: string;
887
- giftDetails: string;
888
- ifOtherDetails: string;
889
- isDistressedSale: string;
890
- isGovernmentInitiative: string;
891
- isPurchasedAsSale: string;
892
- isPurchasedBelowMarketValue: string;
893
- isReadyToSell: string;
894
- isTheIntentionToLet: string;
895
- leaseTypeLid: mongoose.Types.ObjectId;
896
- propertyValuationDetails: string;
897
- repaymentTypeLid: mongoose.Types.ObjectId;
898
- repaymentVehicle: string;
899
- saleMade: string;
900
- sourceOfFundDetails: string;
901
- sourceOfFundsLid: mongoose.Types.ObjectId;
902
- vendorsName: string;
903
- depositComeFrom?: string | null | undefined;
904
- exitStrategy?: string | null | undefined;
905
- loanRequired?: string | null | undefined;
906
- monthlyRentalIncome?: string | null | undefined;
907
- proposedTenants?: string | null | undefined;
908
- purchasePrice?: string | null | undefined;
909
- telephoneNumber?: string | null | undefined;
910
- } | null | undefined;
911
753
  assignedToUserId?: mongoose.Types.ObjectId | null | undefined;
912
754
  lastUpdated?: string | null | undefined;
913
755
  submittedDate?: string | null | undefined;
914
756
  productId?: mongoose.Types.ObjectId | null | undefined;
915
757
  product?: string | null | undefined;
758
+ directDebitId?: mongoose.Types.ObjectId | null | undefined;
759
+ mortgageId?: mongoose.Types.ObjectId | null | undefined;
916
760
  companyId?: mongoose.Types.ObjectId | null | undefined;
917
761
  rationaleId?: mongoose.Types.ObjectId | null | undefined;
918
762
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
@@ -1083,20 +927,6 @@ declare const ApplicationModel: mongoose.Model<{
1083
927
  } | null | undefined;
1084
928
  } | null | undefined;
1085
929
  } | null | undefined;
1086
- directDebit?: {
1087
- addressLine1: string;
1088
- addressLine2: string;
1089
- accountNumber: string;
1090
- applicants: string;
1091
- branch: string;
1092
- city: string;
1093
- contactPostcode: string;
1094
- institution: string;
1095
- isConfirmDeclaration: string;
1096
- nameOfAccountHolder: string;
1097
- selectedPaymentDay: string;
1098
- sortCode: string;
1099
- } | null | undefined;
1100
930
  creditProfile?: {
1101
931
  companyAnyVoluntaryEnforcedPossessionNo: string;
1102
932
  companyAnyVoluntaryEnforcedPossessionYes: string;
@@ -1107,38 +937,13 @@ declare const ApplicationModel: mongoose.Model<{
1107
937
  companyDefaultsInLastYearNo: string;
1108
938
  companyDefaultsInLastYearYes: string;
1109
939
  } | null | undefined;
1110
- mortgage?: {
1111
- estimatedValue: string;
1112
- fundRaisedFor: string;
1113
- giftDetails: string;
1114
- ifOtherDetails: string;
1115
- isDistressedSale: string;
1116
- isGovernmentInitiative: string;
1117
- isPurchasedAsSale: string;
1118
- isPurchasedBelowMarketValue: string;
1119
- isReadyToSell: string;
1120
- isTheIntentionToLet: string;
1121
- leaseTypeLid: mongoose.Types.ObjectId;
1122
- propertyValuationDetails: string;
1123
- repaymentTypeLid: mongoose.Types.ObjectId;
1124
- repaymentVehicle: string;
1125
- saleMade: string;
1126
- sourceOfFundDetails: string;
1127
- sourceOfFundsLid: mongoose.Types.ObjectId;
1128
- vendorsName: string;
1129
- depositComeFrom?: string | null | undefined;
1130
- exitStrategy?: string | null | undefined;
1131
- loanRequired?: string | null | undefined;
1132
- monthlyRentalIncome?: string | null | undefined;
1133
- proposedTenants?: string | null | undefined;
1134
- purchasePrice?: string | null | undefined;
1135
- telephoneNumber?: string | null | undefined;
1136
- } | null | undefined;
1137
940
  assignedToUserId?: mongoose.Types.ObjectId | null | undefined;
1138
941
  lastUpdated?: string | null | undefined;
1139
942
  submittedDate?: string | null | undefined;
1140
943
  productId?: mongoose.Types.ObjectId | null | undefined;
1141
944
  product?: string | null | undefined;
945
+ directDebitId?: mongoose.Types.ObjectId | null | undefined;
946
+ mortgageId?: mongoose.Types.ObjectId | null | undefined;
1142
947
  companyId?: mongoose.Types.ObjectId | null | undefined;
1143
948
  rationaleId?: mongoose.Types.ObjectId | null | undefined;
1144
949
  }>> & mongoose.FlatRecord<{
@@ -1309,20 +1114,6 @@ declare const ApplicationModel: mongoose.Model<{
1309
1114
  } | null | undefined;
1310
1115
  } | null | undefined;
1311
1116
  } | null | undefined;
1312
- directDebit?: {
1313
- addressLine1: string;
1314
- addressLine2: string;
1315
- accountNumber: string;
1316
- applicants: string;
1317
- branch: string;
1318
- city: string;
1319
- contactPostcode: string;
1320
- institution: string;
1321
- isConfirmDeclaration: string;
1322
- nameOfAccountHolder: string;
1323
- selectedPaymentDay: string;
1324
- sortCode: string;
1325
- } | null | undefined;
1326
1117
  creditProfile?: {
1327
1118
  companyAnyVoluntaryEnforcedPossessionNo: string;
1328
1119
  companyAnyVoluntaryEnforcedPossessionYes: string;
@@ -1333,38 +1124,13 @@ declare const ApplicationModel: mongoose.Model<{
1333
1124
  companyDefaultsInLastYearNo: string;
1334
1125
  companyDefaultsInLastYearYes: string;
1335
1126
  } | null | undefined;
1336
- mortgage?: {
1337
- estimatedValue: string;
1338
- fundRaisedFor: string;
1339
- giftDetails: string;
1340
- ifOtherDetails: string;
1341
- isDistressedSale: string;
1342
- isGovernmentInitiative: string;
1343
- isPurchasedAsSale: string;
1344
- isPurchasedBelowMarketValue: string;
1345
- isReadyToSell: string;
1346
- isTheIntentionToLet: string;
1347
- leaseTypeLid: mongoose.Types.ObjectId;
1348
- propertyValuationDetails: string;
1349
- repaymentTypeLid: mongoose.Types.ObjectId;
1350
- repaymentVehicle: string;
1351
- saleMade: string;
1352
- sourceOfFundDetails: string;
1353
- sourceOfFundsLid: mongoose.Types.ObjectId;
1354
- vendorsName: string;
1355
- depositComeFrom?: string | null | undefined;
1356
- exitStrategy?: string | null | undefined;
1357
- loanRequired?: string | null | undefined;
1358
- monthlyRentalIncome?: string | null | undefined;
1359
- proposedTenants?: string | null | undefined;
1360
- purchasePrice?: string | null | undefined;
1361
- telephoneNumber?: string | null | undefined;
1362
- } | null | undefined;
1363
1127
  assignedToUserId?: mongoose.Types.ObjectId | null | undefined;
1364
1128
  lastUpdated?: string | null | undefined;
1365
1129
  submittedDate?: string | null | undefined;
1366
1130
  productId?: mongoose.Types.ObjectId | null | undefined;
1367
1131
  product?: string | null | undefined;
1132
+ directDebitId?: mongoose.Types.ObjectId | null | undefined;
1133
+ mortgageId?: mongoose.Types.ObjectId | null | undefined;
1368
1134
  companyId?: mongoose.Types.ObjectId | null | undefined;
1369
1135
  rationaleId?: mongoose.Types.ObjectId | null | undefined;
1370
1136
  }> & {
@@ -1 +1 @@
1
- {"version":3,"file":"application.model.d.ts","sourceRoot":"","sources":["../../applications/application.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAwKhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAmD,CAAC;AAC1E,eAAe,gBAAgB,CAAC"}
@@ -1,7 +1,5 @@
1
1
  import mongoose from "mongoose";
2
- import directDebitSchema from "./application-direct-debit.model";
3
2
  import creditProfileSchema from "./application-credit-profile.model";
4
- import mortgageSchema from "./application-mortgage.model";
5
3
  import productFeaturesSchema from "./productfeatures.model";
6
4
  const applicationSchema = new mongoose.Schema({
7
5
  queueId: [{
@@ -58,9 +56,9 @@ const applicationSchema = new mongoose.Schema({
58
56
  isUkResident: { type: String, default: true },
59
57
  riskRating: { type: String },
60
58
  productFeatures: productFeaturesSchema,
61
- directDebit: directDebitSchema,
59
+ directDebitId: { type: mongoose.Schema.Types.ObjectId, ref: "DirectDebit" },
62
60
  creditProfile: creditProfileSchema,
63
- mortgage: mortgageSchema,
61
+ mortgageId: { type: mongoose.Schema.Types.ObjectId, ref: "Mortgage" },
64
62
  companyId: { type: mongoose.Schema.Types.ObjectId, ref: "ApplicationCompany" },
65
63
  rationaleId: { type: mongoose.Schema.Types.ObjectId, ref: "ApplicationRationale" },
66
64
  newAuditRecordsCount: { type: String, default: 0 } // Ensure it is a Number
@@ -98,8 +96,8 @@ applicationSchema.pre('findOne', function () {
98
96
  });
99
97
  // Virtual property 'LTV %'
100
98
  applicationSchema.virtual('ltv').get(function () {
101
- const purchasePrice = this.mortgage?.purchasePrice;
102
- const loanRequired = this.mortgage?.loanRequired;
99
+ const purchasePrice = this.mortgageId?.purchasePrice;
100
+ const loanRequired = this.mortgageId?.loanRequired;
103
101
  if (purchasePrice && loanRequired) {
104
102
  const parseCurrency = (value) => {
105
103
  if (typeof value === 'string') {
@@ -16,4 +16,6 @@ export { default as ApplicationDocumentModel } from './application-document.mode
16
16
  export { default as ApplicationRiskNarrativeModel } from './application-risk-narrative.model';
17
17
  export { default as ApplicationFieldConfigModel } from './application-fieldconfig.model';
18
18
  export { default as DocumentModel } from './document.model';
19
+ export { default as DirectDebitModel } from './application-direct-debit.model';
20
+ export { default as MortgageModel } from './application-mortgage.model';
19
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../applications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAC,MAAM,kCAAkC,CAAA;AACxF,OAAO,EAAE,OAAO,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E,OAAO,IAAI,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,8BAA8B,CAAC"}
@@ -16,3 +16,5 @@ export { default as ApplicationDocumentModel } from './application-document.mode
16
16
  export { default as ApplicationRiskNarrativeModel } from './application-risk-narrative.model';
17
17
  export { default as ApplicationFieldConfigModel } from './application-fieldconfig.model';
18
18
  export { default as DocumentModel } from './document.model';
19
+ export { default as DirectDebitModel } from './application-direct-debit.model';
20
+ export { default as MortgageModel } from './application-mortgage.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,7 +21,8 @@
21
21
  "homepage": "https://github.com/DynamatixAnalyticsPvtLtd/gb-schemas#readme",
22
22
  "dependencies": {
23
23
  "mongodb": "^6.14.2",
24
- "mongoose": "^8.9.5"
24
+ "mongoose": "^8.9.5",
25
+ "ts-node": "^10.9.2"
25
26
  },
26
27
  "files": [
27
28
  "dist"
@@ -1 +0,0 @@
1
- export { encryptObject, decryptObject } from './encryption.js';