@dynamatix/gb-schemas 2.3.406 → 2.3.408
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/applicants/applicant-large-exposure.model.d.ts +6 -0
- package/dist/applicants/applicant-large-exposure.model.d.ts.map +1 -1
- package/dist/applicants/applicant-large-exposure.model.js +1 -0
- package/dist/applicants/applicant-large-exposure.type.d.ts +1 -0
- package/dist/applicants/applicant-large-exposure.type.d.ts.map +1 -1
- package/dist/applicants/applicant.model.d.ts +6 -6
- package/dist/applications/application-direct-debit.model.d.ts.map +1 -1
- package/dist/applications/application-direct-debit.model.js +15 -0
- package/dist/applications/application.model.d.ts +6 -6
- package/package.json +1 -1
|
@@ -127,6 +127,7 @@ declare const ApplicantLargeExposureModel: mongoose.Model<{
|
|
|
127
127
|
getVarDate?: {} | null | undefined;
|
|
128
128
|
} | null | undefined;
|
|
129
129
|
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
130
|
+
isConfirmed?: unknown;
|
|
130
131
|
documentId?: mongoose.Types.ObjectId | null | undefined;
|
|
131
132
|
exposureAmount?: {
|
|
132
133
|
validators: mongoose.Types.DocumentArray<{
|
|
@@ -276,6 +277,7 @@ declare const ApplicantLargeExposureModel: mongoose.Model<{
|
|
|
276
277
|
getVarDate?: {} | null | undefined;
|
|
277
278
|
} | null | undefined;
|
|
278
279
|
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
280
|
+
isConfirmed?: unknown;
|
|
279
281
|
documentId?: mongoose.Types.ObjectId | null | undefined;
|
|
280
282
|
exposureAmount?: {
|
|
281
283
|
validators: mongoose.Types.DocumentArray<{
|
|
@@ -425,6 +427,7 @@ declare const ApplicantLargeExposureModel: mongoose.Model<{
|
|
|
425
427
|
getVarDate?: {} | null | undefined;
|
|
426
428
|
} | null | undefined;
|
|
427
429
|
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
430
|
+
isConfirmed?: unknown;
|
|
428
431
|
documentId?: mongoose.Types.ObjectId | null | undefined;
|
|
429
432
|
exposureAmount?: {
|
|
430
433
|
validators: mongoose.Types.DocumentArray<{
|
|
@@ -486,6 +489,7 @@ declare const ApplicantLargeExposureModel: mongoose.Model<{
|
|
|
486
489
|
updatedAt: NativeDate;
|
|
487
490
|
} & {
|
|
488
491
|
applicantId: mongoose.Types.ObjectId;
|
|
492
|
+
isConfirmed: boolean;
|
|
489
493
|
documentId: mongoose.Types.ObjectId;
|
|
490
494
|
exposureAmount: Pound;
|
|
491
495
|
creditConductLid: mongoose.Types.ObjectId;
|
|
@@ -494,6 +498,7 @@ declare const ApplicantLargeExposureModel: mongoose.Model<{
|
|
|
494
498
|
updatedAt: NativeDate;
|
|
495
499
|
} & {
|
|
496
500
|
applicantId: mongoose.Types.ObjectId;
|
|
501
|
+
isConfirmed: boolean;
|
|
497
502
|
documentId: mongoose.Types.ObjectId;
|
|
498
503
|
exposureAmount: Pound;
|
|
499
504
|
creditConductLid: mongoose.Types.ObjectId;
|
|
@@ -502,6 +507,7 @@ declare const ApplicantLargeExposureModel: mongoose.Model<{
|
|
|
502
507
|
updatedAt: NativeDate;
|
|
503
508
|
} & {
|
|
504
509
|
applicantId: mongoose.Types.ObjectId;
|
|
510
|
+
isConfirmed: boolean;
|
|
505
511
|
documentId: mongoose.Types.ObjectId;
|
|
506
512
|
exposureAmount: Pound;
|
|
507
513
|
creditConductLid: mongoose.Types.ObjectId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicant-large-exposure.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-large-exposure.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"applicant-large-exposure.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-large-exposure.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAyB5D,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGhC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -19,6 +19,7 @@ const applicantLargeExposureSchema = new mongoose.Schema({
|
|
|
19
19
|
default: null,
|
|
20
20
|
required: true,
|
|
21
21
|
},
|
|
22
|
+
isConfirmed: { type: Boolean, required: true, default: false },
|
|
22
23
|
}, { timestamps: true });
|
|
23
24
|
applyWorkflowPlugin(applicantLargeExposureSchema, "applicant_large_exposure");
|
|
24
25
|
const ApplicantLargeExposureModel = mongoose.model("ApplicantLargeExposure", applicantLargeExposureSchema);
|
|
@@ -33,5 +33,6 @@ export default interface IApplicantLargeExposure extends IBaseType {
|
|
|
33
33
|
documentId?: Types.ObjectId;
|
|
34
34
|
exposureAmount?: number;
|
|
35
35
|
creditConductLid?: Types.ObjectId | null;
|
|
36
|
+
isConfirmed?: boolean;
|
|
36
37
|
}
|
|
37
38
|
//# sourceMappingURL=applicant-large-exposure.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicant-large-exposure.type.d.ts","sourceRoot":"","sources":["../../applicants/applicant-large-exposure.type.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,CAAC,OAAO,WAAW,uBAAwB,SAAQ,SAAS;IAChE,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC5B,UAAU,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"applicant-large-exposure.type.d.ts","sourceRoot":"","sources":["../../applicants/applicant-large-exposure.type.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,CAAC,OAAO,WAAW,uBAAwB,SAAQ,SAAS;IAChE,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC5B,UAAU,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -139,10 +139,10 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
139
139
|
addressCountryLid?: mongoose.Types.ObjectId | null | undefined;
|
|
140
140
|
firstName?: unknown;
|
|
141
141
|
lastName?: unknown;
|
|
142
|
+
isUkResident?: unknown;
|
|
142
143
|
email?: unknown;
|
|
143
144
|
creditProfile?: unknown;
|
|
144
145
|
riskNarrative?: unknown;
|
|
145
|
-
isUkResident?: unknown;
|
|
146
146
|
incomeSourceId?: mongoose.Types.ObjectId | null | undefined;
|
|
147
147
|
isExpenseOwner?: unknown;
|
|
148
148
|
creditData?: unknown;
|
|
@@ -490,10 +490,10 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
490
490
|
addressCountryLid?: mongoose.Types.ObjectId | null | undefined;
|
|
491
491
|
firstName?: unknown;
|
|
492
492
|
lastName?: unknown;
|
|
493
|
+
isUkResident?: unknown;
|
|
493
494
|
email?: unknown;
|
|
494
495
|
creditProfile?: unknown;
|
|
495
496
|
riskNarrative?: unknown;
|
|
496
|
-
isUkResident?: unknown;
|
|
497
497
|
incomeSourceId?: mongoose.Types.ObjectId | null | undefined;
|
|
498
498
|
isExpenseOwner?: unknown;
|
|
499
499
|
creditData?: unknown;
|
|
@@ -841,10 +841,10 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
841
841
|
addressCountryLid?: mongoose.Types.ObjectId | null | undefined;
|
|
842
842
|
firstName?: unknown;
|
|
843
843
|
lastName?: unknown;
|
|
844
|
+
isUkResident?: unknown;
|
|
844
845
|
email?: unknown;
|
|
845
846
|
creditProfile?: unknown;
|
|
846
847
|
riskNarrative?: unknown;
|
|
847
|
-
isUkResident?: unknown;
|
|
848
848
|
incomeSourceId?: mongoose.Types.ObjectId | null | undefined;
|
|
849
849
|
isExpenseOwner?: unknown;
|
|
850
850
|
creditData?: unknown;
|
|
@@ -1111,8 +1111,8 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1111
1111
|
addressCountryLid: mongoose.Types.ObjectId;
|
|
1112
1112
|
firstName: string;
|
|
1113
1113
|
lastName: string;
|
|
1114
|
-
email: string;
|
|
1115
1114
|
isUkResident: boolean;
|
|
1115
|
+
email: string;
|
|
1116
1116
|
incomeSourceId: mongoose.Types.ObjectId;
|
|
1117
1117
|
addressMovedDate: string;
|
|
1118
1118
|
correspondenceAddressCity: string;
|
|
@@ -1266,8 +1266,8 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1266
1266
|
addressCountryLid: mongoose.Types.ObjectId;
|
|
1267
1267
|
firstName: string;
|
|
1268
1268
|
lastName: string;
|
|
1269
|
-
email: string;
|
|
1270
1269
|
isUkResident: boolean;
|
|
1270
|
+
email: string;
|
|
1271
1271
|
incomeSourceId: mongoose.Types.ObjectId;
|
|
1272
1272
|
addressMovedDate: string;
|
|
1273
1273
|
correspondenceAddressCity: string;
|
|
@@ -1421,8 +1421,8 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1421
1421
|
addressCountryLid: mongoose.Types.ObjectId;
|
|
1422
1422
|
firstName: string;
|
|
1423
1423
|
lastName: string;
|
|
1424
|
-
email: string;
|
|
1425
1424
|
isUkResident: boolean;
|
|
1425
|
+
email: string;
|
|
1426
1426
|
incomeSourceId: mongoose.Types.ObjectId;
|
|
1427
1427
|
addressMovedDate: string;
|
|
1428
1428
|
correspondenceAddressCity: string;
|
|
@@ -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,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,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;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAwLhE,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA0E,CAAC;AAC5G,eAAe,2BAA2B,CAAC"}
|
|
@@ -146,6 +146,21 @@ const virtualApplicants = applicationDirectDebitSchema.virtual('applicants', {
|
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
148
|
virtualApplicants.description = 'Full Name of the applicant';
|
|
149
|
+
// Virtual property: true only when all applicants on this application have isUkResident === false
|
|
150
|
+
const virtualAllApplicantsNonUkResident = applicationDirectDebitSchema.virtual('allApplicantsNonUkResident').get(async function () {
|
|
151
|
+
const applicationId = this.applicationId;
|
|
152
|
+
if (!applicationId) {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
const Applicant = mongoose.model('Applicant');
|
|
156
|
+
const applicants = await Applicant.find({ applicationId }).select('isUkResident').lean();
|
|
157
|
+
if (!applicants || applicants.length === 0) {
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
// Return true only if every applicant has isUkResident === false
|
|
161
|
+
return applicants.every((applicant) => applicant.isUkResident === false);
|
|
162
|
+
});
|
|
163
|
+
virtualAllApplicantsNonUkResident.description = 'True when all applicants on this application have isUkResident === false';
|
|
149
164
|
// Index for applicationId queries
|
|
150
165
|
applicationDirectDebitSchema.index({ applicationId: 1 });
|
|
151
166
|
applyAuditMiddleware(applicationDirectDebitSchema, "application_directdebit");
|
|
@@ -35,6 +35,7 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
35
35
|
applicationId: string;
|
|
36
36
|
applicationTypeLid: mongoose.Types.ObjectId;
|
|
37
37
|
applicants: mongoose.Types.ObjectId[];
|
|
38
|
+
isUkResident: boolean;
|
|
38
39
|
repaymentTypeLid: mongoose.Types.ObjectId;
|
|
39
40
|
lendingTypeLid: mongoose.Types.ObjectId;
|
|
40
41
|
introducer: string;
|
|
@@ -95,7 +96,6 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
95
96
|
lenderTaskCount: number;
|
|
96
97
|
pendingTaskCountForUser: number;
|
|
97
98
|
applicationFormSignedDate: NativeDate;
|
|
98
|
-
isUkResident: boolean;
|
|
99
99
|
creditReportId: string;
|
|
100
100
|
isAlgbraEligible: boolean;
|
|
101
101
|
selectedProduct?: string | null | undefined;
|
|
@@ -132,6 +132,7 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
132
132
|
applicationId: string;
|
|
133
133
|
applicationTypeLid: mongoose.Types.ObjectId;
|
|
134
134
|
applicants: mongoose.Types.ObjectId[];
|
|
135
|
+
isUkResident: boolean;
|
|
135
136
|
repaymentTypeLid: mongoose.Types.ObjectId;
|
|
136
137
|
lendingTypeLid: mongoose.Types.ObjectId;
|
|
137
138
|
introducer: string;
|
|
@@ -192,7 +193,6 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
192
193
|
lenderTaskCount: number;
|
|
193
194
|
pendingTaskCountForUser: number;
|
|
194
195
|
applicationFormSignedDate: NativeDate;
|
|
195
|
-
isUkResident: boolean;
|
|
196
196
|
creditReportId: string;
|
|
197
197
|
isAlgbraEligible: boolean;
|
|
198
198
|
selectedProduct?: string | null | undefined;
|
|
@@ -229,6 +229,7 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
229
229
|
applicationId: string;
|
|
230
230
|
applicationTypeLid: mongoose.Types.ObjectId;
|
|
231
231
|
applicants: mongoose.Types.ObjectId[];
|
|
232
|
+
isUkResident: boolean;
|
|
232
233
|
repaymentTypeLid: mongoose.Types.ObjectId;
|
|
233
234
|
lendingTypeLid: mongoose.Types.ObjectId;
|
|
234
235
|
introducer: string;
|
|
@@ -289,7 +290,6 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
289
290
|
lenderTaskCount: number;
|
|
290
291
|
pendingTaskCountForUser: number;
|
|
291
292
|
applicationFormSignedDate: NativeDate;
|
|
292
|
-
isUkResident: boolean;
|
|
293
293
|
creditReportId: string;
|
|
294
294
|
isAlgbraEligible: boolean;
|
|
295
295
|
selectedProduct?: string | null | undefined;
|
|
@@ -338,6 +338,7 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
338
338
|
applicationId: string;
|
|
339
339
|
applicationTypeLid: mongoose.Types.ObjectId;
|
|
340
340
|
applicants: mongoose.Types.ObjectId[];
|
|
341
|
+
isUkResident: boolean;
|
|
341
342
|
repaymentTypeLid: mongoose.Types.ObjectId;
|
|
342
343
|
lendingTypeLid: mongoose.Types.ObjectId;
|
|
343
344
|
introducer: string;
|
|
@@ -398,7 +399,6 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
398
399
|
lenderTaskCount: number;
|
|
399
400
|
pendingTaskCountForUser: number;
|
|
400
401
|
applicationFormSignedDate: NativeDate;
|
|
401
|
-
isUkResident: boolean;
|
|
402
402
|
creditReportId: string;
|
|
403
403
|
isAlgbraEligible: boolean;
|
|
404
404
|
selectedProduct?: string | null | undefined;
|
|
@@ -435,6 +435,7 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
435
435
|
applicationId: string;
|
|
436
436
|
applicationTypeLid: mongoose.Types.ObjectId;
|
|
437
437
|
applicants: mongoose.Types.ObjectId[];
|
|
438
|
+
isUkResident: boolean;
|
|
438
439
|
repaymentTypeLid: mongoose.Types.ObjectId;
|
|
439
440
|
lendingTypeLid: mongoose.Types.ObjectId;
|
|
440
441
|
introducer: string;
|
|
@@ -495,7 +496,6 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
495
496
|
lenderTaskCount: number;
|
|
496
497
|
pendingTaskCountForUser: number;
|
|
497
498
|
applicationFormSignedDate: NativeDate;
|
|
498
|
-
isUkResident: boolean;
|
|
499
499
|
creditReportId: string;
|
|
500
500
|
isAlgbraEligible: boolean;
|
|
501
501
|
selectedProduct?: string | null | undefined;
|
|
@@ -532,6 +532,7 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
532
532
|
applicationId: string;
|
|
533
533
|
applicationTypeLid: mongoose.Types.ObjectId;
|
|
534
534
|
applicants: mongoose.Types.ObjectId[];
|
|
535
|
+
isUkResident: boolean;
|
|
535
536
|
repaymentTypeLid: mongoose.Types.ObjectId;
|
|
536
537
|
lendingTypeLid: mongoose.Types.ObjectId;
|
|
537
538
|
introducer: string;
|
|
@@ -592,7 +593,6 @@ declare const ApplicationModel: mongoose.Model<{
|
|
|
592
593
|
lenderTaskCount: number;
|
|
593
594
|
pendingTaskCountForUser: number;
|
|
594
595
|
applicationFormSignedDate: NativeDate;
|
|
595
|
-
isUkResident: boolean;
|
|
596
596
|
creditReportId: string;
|
|
597
597
|
isAlgbraEligible: boolean;
|
|
598
598
|
selectedProduct?: string | null | undefined;
|