@dynamatix/gb-schemas 2.14.13 → 2.14.16
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-credit-report.model.d.ts +27 -1
- package/dist/applicants/applicant-credit-report.model.d.ts.map +1 -1
- package/dist/applicants/applicant-credit-report.model.js +3 -0
- package/dist/applicants/applicant-self-employment.model.js +1 -1
- package/dist/applications/application-euc.model.d.ts.map +1 -1
- package/dist/applications/application-euc.model.js +0 -2
- package/dist/applications/applications-task.model.d.ts +12 -0
- package/dist/applications/applications-task.model.d.ts.map +1 -1
- package/dist/applications/applications-task.model.js +8 -0
- package/dist/applications/applications-task.type.d.ts +2 -0
- package/dist/applications/applications-task.type.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
29
29
|
import mongoose from 'mongoose';
|
|
30
30
|
declare const ApplicantCreditReportModel: mongoose.Model<{
|
|
31
|
+
createdAt: NativeDate;
|
|
32
|
+
updatedAt: NativeDate;
|
|
33
|
+
} & {
|
|
31
34
|
comment: string;
|
|
32
35
|
applicantId: mongoose.Types.ObjectId;
|
|
33
36
|
applicantName: string;
|
|
@@ -651,8 +654,12 @@ declare const ApplicantCreditReportModel: mongoose.Model<{
|
|
|
651
654
|
} | null | undefined;
|
|
652
655
|
}>;
|
|
653
656
|
isEquifaxData: boolean;
|
|
657
|
+
confirmedAt: NativeDate;
|
|
654
658
|
searchCriteriaDifferences: string;
|
|
655
659
|
}, {}, {}, {}, mongoose.Document<unknown, {}, {
|
|
660
|
+
createdAt: NativeDate;
|
|
661
|
+
updatedAt: NativeDate;
|
|
662
|
+
} & {
|
|
656
663
|
comment: string;
|
|
657
664
|
applicantId: mongoose.Types.ObjectId;
|
|
658
665
|
applicantName: string;
|
|
@@ -1276,8 +1283,12 @@ declare const ApplicantCreditReportModel: mongoose.Model<{
|
|
|
1276
1283
|
} | null | undefined;
|
|
1277
1284
|
}>;
|
|
1278
1285
|
isEquifaxData: boolean;
|
|
1286
|
+
confirmedAt: NativeDate;
|
|
1279
1287
|
searchCriteriaDifferences: string;
|
|
1280
1288
|
}, {}> & {
|
|
1289
|
+
createdAt: NativeDate;
|
|
1290
|
+
updatedAt: NativeDate;
|
|
1291
|
+
} & {
|
|
1281
1292
|
comment: string;
|
|
1282
1293
|
applicantId: mongoose.Types.ObjectId;
|
|
1283
1294
|
applicantName: string;
|
|
@@ -1901,12 +1912,18 @@ declare const ApplicantCreditReportModel: mongoose.Model<{
|
|
|
1901
1912
|
} | null | undefined;
|
|
1902
1913
|
}>;
|
|
1903
1914
|
isEquifaxData: boolean;
|
|
1915
|
+
confirmedAt: NativeDate;
|
|
1904
1916
|
searchCriteriaDifferences: string;
|
|
1905
1917
|
} & {
|
|
1906
1918
|
_id: mongoose.Types.ObjectId;
|
|
1907
1919
|
} & {
|
|
1908
1920
|
__v: number;
|
|
1909
|
-
}, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {},
|
|
1921
|
+
}, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
1922
|
+
timestamps: true;
|
|
1923
|
+
}, {
|
|
1924
|
+
createdAt: NativeDate;
|
|
1925
|
+
updatedAt: NativeDate;
|
|
1926
|
+
} & {
|
|
1910
1927
|
comment: string;
|
|
1911
1928
|
applicantId: mongoose.Types.ObjectId;
|
|
1912
1929
|
applicantName: string;
|
|
@@ -2530,8 +2547,12 @@ declare const ApplicantCreditReportModel: mongoose.Model<{
|
|
|
2530
2547
|
} | null | undefined;
|
|
2531
2548
|
}>;
|
|
2532
2549
|
isEquifaxData: boolean;
|
|
2550
|
+
confirmedAt: NativeDate;
|
|
2533
2551
|
searchCriteriaDifferences: string;
|
|
2534
2552
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
2553
|
+
createdAt: NativeDate;
|
|
2554
|
+
updatedAt: NativeDate;
|
|
2555
|
+
} & {
|
|
2535
2556
|
comment: string;
|
|
2536
2557
|
applicantId: mongoose.Types.ObjectId;
|
|
2537
2558
|
applicantName: string;
|
|
@@ -3155,8 +3176,12 @@ declare const ApplicantCreditReportModel: mongoose.Model<{
|
|
|
3155
3176
|
} | null | undefined;
|
|
3156
3177
|
}>;
|
|
3157
3178
|
isEquifaxData: boolean;
|
|
3179
|
+
confirmedAt: NativeDate;
|
|
3158
3180
|
searchCriteriaDifferences: string;
|
|
3159
3181
|
}>, {}> & mongoose.FlatRecord<{
|
|
3182
|
+
createdAt: NativeDate;
|
|
3183
|
+
updatedAt: NativeDate;
|
|
3184
|
+
} & {
|
|
3160
3185
|
comment: string;
|
|
3161
3186
|
applicantId: mongoose.Types.ObjectId;
|
|
3162
3187
|
applicantName: string;
|
|
@@ -3780,6 +3805,7 @@ declare const ApplicantCreditReportModel: mongoose.Model<{
|
|
|
3780
3805
|
} | null | undefined;
|
|
3781
3806
|
}>;
|
|
3782
3807
|
isEquifaxData: boolean;
|
|
3808
|
+
confirmedAt: NativeDate;
|
|
3783
3809
|
searchCriteriaDifferences: string;
|
|
3784
3810
|
}> & {
|
|
3785
3811
|
_id: mongoose.Types.ObjectId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicant-credit-report.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-credit-report.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"applicant-credit-report.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-credit-report.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAqJhC,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAuE,CAAC;AACxG,eAAe,0BAA0B,CAAC"}
|
|
@@ -112,9 +112,12 @@ const applicantCreditReportSchema = new Schema({
|
|
|
112
112
|
noticeofCorrection: [noticeofCorrectionSchema],
|
|
113
113
|
isEquifaxData: { type: Boolean, default: false },
|
|
114
114
|
isConfirmed: { type: Boolean, default: false },
|
|
115
|
+
confirmedAt: { type: Date, default: null },
|
|
115
116
|
searchDate: { type: Date, default: null },
|
|
116
117
|
searchCriteriaDifferences: { type: String, default: "" },
|
|
117
118
|
comment: { type: String, default: "" },
|
|
119
|
+
}, {
|
|
120
|
+
timestamps: true
|
|
118
121
|
});
|
|
119
122
|
// Apply workflow plugin to the schema
|
|
120
123
|
applicantCreditReportSchema.index({ applicantId: 1 });
|
|
@@ -50,6 +50,6 @@ const applicantSelfEmploymentSchema = new mongoose.Schema({
|
|
|
50
50
|
// Apply workflow plugin to the schema
|
|
51
51
|
applyWorkflowPlugin(applicantSelfEmploymentSchema, 'applicant_self_employment');
|
|
52
52
|
// Add indexes that exist in database but missing from model
|
|
53
|
-
applicantSelfEmploymentSchema.index({ applicantId: 1 }
|
|
53
|
+
applicantSelfEmploymentSchema.index({ applicantId: 1 }, { unique: true });
|
|
54
54
|
const ApplicantSelfEmploymentModel = mongoose.model("Applicant_Self_Employment", applicantSelfEmploymentSchema);
|
|
55
55
|
export default ApplicantSelfEmploymentModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-euc.model.d.ts","sourceRoot":"","sources":["../../applications/application-euc.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"application-euc.model.d.ts","sourceRoot":"","sources":["../../applications/application-euc.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AA2ChC,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyD,CAAC;AACnF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
2
|
import { applyWorkflowPlugin } from "../shared/workflow.plugin";
|
|
3
|
-
import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
|
|
4
3
|
const applicationEucSchema = new mongoose.Schema({
|
|
5
4
|
applicationId: { type: mongoose.Schema.Types.ObjectId, ref: "Application", required: true },
|
|
6
5
|
stressedFinanceRate: { type: Number, default: 0 },
|
|
@@ -30,7 +29,6 @@ const applicationEucSchema = new mongoose.Schema({
|
|
|
30
29
|
btlCountryOfResidenceUsed: { type: String, default: null },
|
|
31
30
|
btlOnsMultiplierApplied: { type: Boolean, default: false },
|
|
32
31
|
});
|
|
33
|
-
applyAuditMiddleware(applicationEucSchema, "ApplicationEUC");
|
|
34
32
|
// Apply workflow plugin to the schema
|
|
35
33
|
applyWorkflowPlugin(applicationEucSchema, 'applicationeuc');
|
|
36
34
|
// Add indexes that exist in database but missing from model
|
|
@@ -51,6 +51,8 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
51
51
|
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
52
52
|
taskType?: "internal" | "broker" | null | undefined;
|
|
53
53
|
acceptedDate?: string | null | undefined;
|
|
54
|
+
acceptedById?: mongoose.Types.ObjectId | null | undefined;
|
|
55
|
+
rejectedById?: mongoose.Types.ObjectId | null | undefined;
|
|
54
56
|
};
|
|
55
57
|
statusDate: string;
|
|
56
58
|
statusReason: string;
|
|
@@ -94,6 +96,8 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
94
96
|
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
95
97
|
taskType?: "internal" | "broker" | null | undefined;
|
|
96
98
|
acceptedDate?: string | null | undefined;
|
|
99
|
+
acceptedById?: mongoose.Types.ObjectId | null | undefined;
|
|
100
|
+
rejectedById?: mongoose.Types.ObjectId | null | undefined;
|
|
97
101
|
};
|
|
98
102
|
statusDate: string;
|
|
99
103
|
statusReason: string;
|
|
@@ -137,6 +141,8 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
137
141
|
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
138
142
|
taskType?: "internal" | "broker" | null | undefined;
|
|
139
143
|
acceptedDate?: string | null | undefined;
|
|
144
|
+
acceptedById?: mongoose.Types.ObjectId | null | undefined;
|
|
145
|
+
rejectedById?: mongoose.Types.ObjectId | null | undefined;
|
|
140
146
|
};
|
|
141
147
|
statusDate: string;
|
|
142
148
|
statusReason: string;
|
|
@@ -186,6 +192,8 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
186
192
|
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
187
193
|
taskType?: "internal" | "broker" | null | undefined;
|
|
188
194
|
acceptedDate?: string | null | undefined;
|
|
195
|
+
acceptedById?: mongoose.Types.ObjectId | null | undefined;
|
|
196
|
+
rejectedById?: mongoose.Types.ObjectId | null | undefined;
|
|
189
197
|
};
|
|
190
198
|
statusDate: string;
|
|
191
199
|
statusReason: string;
|
|
@@ -229,6 +237,8 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
229
237
|
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
230
238
|
taskType?: "internal" | "broker" | null | undefined;
|
|
231
239
|
acceptedDate?: string | null | undefined;
|
|
240
|
+
acceptedById?: mongoose.Types.ObjectId | null | undefined;
|
|
241
|
+
rejectedById?: mongoose.Types.ObjectId | null | undefined;
|
|
232
242
|
};
|
|
233
243
|
statusDate: string;
|
|
234
244
|
statusReason: string;
|
|
@@ -272,6 +282,8 @@ declare const ApplicationsTaskModel: mongoose.Model<{
|
|
|
272
282
|
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
273
283
|
taskType?: "internal" | "broker" | null | undefined;
|
|
274
284
|
acceptedDate?: string | null | undefined;
|
|
285
|
+
acceptedById?: mongoose.Types.ObjectId | null | undefined;
|
|
286
|
+
rejectedById?: mongoose.Types.ObjectId | null | undefined;
|
|
275
287
|
};
|
|
276
288
|
statusDate: string;
|
|
277
289
|
statusReason: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applications-task.model.d.ts","sourceRoot":"","sources":["../../applications/applications-task.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,QAAQ,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"applications-task.model.d.ts","sourceRoot":"","sources":["../../applications/applications-task.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAiEhC,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6D,CAAC;AACzF,eAAe,qBAAqB,CAAC"}
|
|
@@ -16,6 +16,8 @@ const additionalDataSchema = new mongoose.Schema({
|
|
|
16
16
|
required: false
|
|
17
17
|
},
|
|
18
18
|
acceptedDate: { type: String },
|
|
19
|
+
acceptedById: { type: mongoose.Schema.Types.ObjectId, ref: "User", required: false },
|
|
20
|
+
rejectedById: { type: mongoose.Schema.Types.ObjectId, ref: "User", required: false },
|
|
19
21
|
rejectionReason: { type: String, default: null },
|
|
20
22
|
rejectionDate: { type: String, default: null },
|
|
21
23
|
responderRemarks: { type: String, default: "" },
|
|
@@ -46,5 +48,11 @@ applyWorkflowPlugin(applicationsTaskSchema, 'applicationstask');
|
|
|
46
48
|
// Indexes for query optimization
|
|
47
49
|
applicationsTaskSchema.index({ applicationId: 1, instanceId: 1 }); // Compound index for findByApplicationIdAndInstanceId queries
|
|
48
50
|
applicationsTaskSchema.index({ applicationId: 1, createdOn: -1 }); // Compound index for findAll with sort by createdOn descending
|
|
51
|
+
// Unique index to prevent duplicate tasks created by concurrent syncs (background job + frontend-triggered sync).
|
|
52
|
+
// partialFilterExpression excludes internal system tasks (instanceId = "") so they are not affected by this constraint.
|
|
53
|
+
applicationsTaskSchema.index({ instanceId: 1, checkflowId: 1 }, {
|
|
54
|
+
unique: true,
|
|
55
|
+
partialFilterExpression: { instanceId: { $exists: true, $ne: "" } }
|
|
56
|
+
});
|
|
49
57
|
const ApplicationsTaskModel = mongoose.model("ApplicationsTask", applicationsTaskSchema);
|
|
50
58
|
export default ApplicationsTaskModel;
|
|
@@ -43,6 +43,8 @@ export interface IApplicationsTaskAdditionalData extends IBaseType {
|
|
|
43
43
|
requesterFileName?: string | null;
|
|
44
44
|
responderFileName?: string | null;
|
|
45
45
|
respondedDate?: string | null;
|
|
46
|
+
acceptedById?: string | null;
|
|
47
|
+
rejectedById?: string | null;
|
|
46
48
|
}
|
|
47
49
|
export default interface IApplicationsTaskType extends IBaseType {
|
|
48
50
|
checkflowId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applications-task.type.d.ts","sourceRoot":"","sources":["../../applications/applications-task.type.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,WAAW,+BAAgC,SAAQ,SAAS;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC1B,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,qBAAqB,CAAC,E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