@dynamatix/gb-schemas 2.14.13 → 2.14.14

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.
@@ -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>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
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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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 }); // Filter by applicant
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;AA8ChC,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyD,CAAC;AACnF,eAAe,mBAAmB,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
@@ -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;AAqDhC,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6D,CAAC;AACzF,eAAe,qBAAqB,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;AA+DhC,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6D,CAAC;AACzF,eAAe,qBAAqB,CAAC"}
@@ -46,5 +46,11 @@ applyWorkflowPlugin(applicationsTaskSchema, 'applicationstask');
46
46
  // Indexes for query optimization
47
47
  applicationsTaskSchema.index({ applicationId: 1, instanceId: 1 }); // Compound index for findByApplicationIdAndInstanceId queries
48
48
  applicationsTaskSchema.index({ applicationId: 1, createdOn: -1 }); // Compound index for findAll with sort by createdOn descending
49
+ // Unique index to prevent duplicate tasks created by concurrent syncs (background job + frontend-triggered sync).
50
+ // partialFilterExpression excludes internal system tasks (instanceId = "") so they are not affected by this constraint.
51
+ applicationsTaskSchema.index({ instanceId: 1, checkflowId: 1 }, {
52
+ unique: true,
53
+ partialFilterExpression: { instanceId: { $exists: true, $ne: "" } }
54
+ });
49
55
  const ApplicationsTaskModel = mongoose.model("ApplicationsTask", applicationsTaskSchema);
50
56
  export default ApplicationsTaskModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "2.14.13",
3
+ "version": "2.14.14",
4
4
  "description": "All the schemas for gatehouse bank back-end .",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",