@dynamatix/gb-schemas 2.3.315 → 2.3.317

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.
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-employment.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-employment.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AA2C5D,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAgF,CAAC;AAE1G,eAAe,mBAAmB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import mongoose from "mongoose";
2
+ import { applyWorkflowPlugin } from "../shared/workflow.plugin";
2
3
  import { Pound, formatPound } from "../value-objects/pound";
3
4
  const applicantEmploymentSchema = new mongoose.Schema({
4
5
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
@@ -40,5 +41,6 @@ const applicantEmploymentSchema = new mongoose.Schema({
40
41
  toJSON: { getters: true },
41
42
  toObject: { getters: true }
42
43
  });
44
+ applyWorkflowPlugin(applicantEmploymentSchema, 'applicant_employment_information');
43
45
  const ApplicantEmployment = mongoose.model("Applicant_Employment_Information", applicantEmploymentSchema);
44
46
  export default ApplicantEmployment;
@@ -72,6 +72,8 @@ declare const ApplicationModel: mongoose.Model<{
72
72
  mandateReviewComments: string;
73
73
  mandateRequestedDate: string;
74
74
  mandateReviewedDate: string;
75
+ isReferred: boolean;
76
+ referredDate: string;
75
77
  brokerTaskCount: number;
76
78
  lenderTaskCount: number;
77
79
  pendingTaskCountForUser: number;
@@ -103,6 +105,7 @@ declare const ApplicationModel: mongoose.Model<{
103
105
  valuationReportId?: mongoose.Types.ObjectId | null | undefined;
104
106
  mandateRequestedByUserId?: mongoose.Types.ObjectId | null | undefined;
105
107
  mandateReviewedByUserId?: mongoose.Types.ObjectId | null | undefined;
108
+ referredByUserId?: mongoose.Types.ObjectId | null | undefined;
106
109
  }, {}, {}, {}, mongoose.Document<unknown, {}, {
107
110
  createdAt: NativeDate;
108
111
  updatedAt: NativeDate;
@@ -148,6 +151,8 @@ declare const ApplicationModel: mongoose.Model<{
148
151
  mandateReviewComments: string;
149
152
  mandateRequestedDate: string;
150
153
  mandateReviewedDate: string;
154
+ isReferred: boolean;
155
+ referredDate: string;
151
156
  brokerTaskCount: number;
152
157
  lenderTaskCount: number;
153
158
  pendingTaskCountForUser: number;
@@ -179,6 +184,7 @@ declare const ApplicationModel: mongoose.Model<{
179
184
  valuationReportId?: mongoose.Types.ObjectId | null | undefined;
180
185
  mandateRequestedByUserId?: mongoose.Types.ObjectId | null | undefined;
181
186
  mandateReviewedByUserId?: mongoose.Types.ObjectId | null | undefined;
187
+ referredByUserId?: mongoose.Types.ObjectId | null | undefined;
182
188
  }, {}> & {
183
189
  createdAt: NativeDate;
184
190
  updatedAt: NativeDate;
@@ -224,6 +230,8 @@ declare const ApplicationModel: mongoose.Model<{
224
230
  mandateReviewComments: string;
225
231
  mandateRequestedDate: string;
226
232
  mandateReviewedDate: string;
233
+ isReferred: boolean;
234
+ referredDate: string;
227
235
  brokerTaskCount: number;
228
236
  lenderTaskCount: number;
229
237
  pendingTaskCountForUser: number;
@@ -255,6 +263,7 @@ declare const ApplicationModel: mongoose.Model<{
255
263
  valuationReportId?: mongoose.Types.ObjectId | null | undefined;
256
264
  mandateRequestedByUserId?: mongoose.Types.ObjectId | null | undefined;
257
265
  mandateReviewedByUserId?: mongoose.Types.ObjectId | null | undefined;
266
+ referredByUserId?: mongoose.Types.ObjectId | null | undefined;
258
267
  } & {
259
268
  _id: mongoose.Types.ObjectId;
260
269
  } & {
@@ -312,6 +321,8 @@ declare const ApplicationModel: mongoose.Model<{
312
321
  mandateReviewComments: string;
313
322
  mandateRequestedDate: string;
314
323
  mandateReviewedDate: string;
324
+ isReferred: boolean;
325
+ referredDate: string;
315
326
  brokerTaskCount: number;
316
327
  lenderTaskCount: number;
317
328
  pendingTaskCountForUser: number;
@@ -343,6 +354,7 @@ declare const ApplicationModel: mongoose.Model<{
343
354
  valuationReportId?: mongoose.Types.ObjectId | null | undefined;
344
355
  mandateRequestedByUserId?: mongoose.Types.ObjectId | null | undefined;
345
356
  mandateReviewedByUserId?: mongoose.Types.ObjectId | null | undefined;
357
+ referredByUserId?: mongoose.Types.ObjectId | null | undefined;
346
358
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
347
359
  createdAt: NativeDate;
348
360
  updatedAt: NativeDate;
@@ -388,6 +400,8 @@ declare const ApplicationModel: mongoose.Model<{
388
400
  mandateReviewComments: string;
389
401
  mandateRequestedDate: string;
390
402
  mandateReviewedDate: string;
403
+ isReferred: boolean;
404
+ referredDate: string;
391
405
  brokerTaskCount: number;
392
406
  lenderTaskCount: number;
393
407
  pendingTaskCountForUser: number;
@@ -419,6 +433,7 @@ declare const ApplicationModel: mongoose.Model<{
419
433
  valuationReportId?: mongoose.Types.ObjectId | null | undefined;
420
434
  mandateRequestedByUserId?: mongoose.Types.ObjectId | null | undefined;
421
435
  mandateReviewedByUserId?: mongoose.Types.ObjectId | null | undefined;
436
+ referredByUserId?: mongoose.Types.ObjectId | null | undefined;
422
437
  }>, {}> & mongoose.FlatRecord<{
423
438
  createdAt: NativeDate;
424
439
  updatedAt: NativeDate;
@@ -464,6 +479,8 @@ declare const ApplicationModel: mongoose.Model<{
464
479
  mandateReviewComments: string;
465
480
  mandateRequestedDate: string;
466
481
  mandateReviewedDate: string;
482
+ isReferred: boolean;
483
+ referredDate: string;
467
484
  brokerTaskCount: number;
468
485
  lenderTaskCount: number;
469
486
  pendingTaskCountForUser: number;
@@ -495,6 +512,7 @@ declare const ApplicationModel: mongoose.Model<{
495
512
  valuationReportId?: mongoose.Types.ObjectId | null | undefined;
496
513
  mandateRequestedByUserId?: mongoose.Types.ObjectId | null | undefined;
497
514
  mandateReviewedByUserId?: mongoose.Types.ObjectId | null | undefined;
515
+ referredByUserId?: mongoose.Types.ObjectId | null | undefined;
498
516
  }> & {
499
517
  _id: mongoose.Types.ObjectId;
500
518
  } & {
@@ -1 +1 @@
1
- {"version":3,"file":"application.model.d.ts","sourceRoot":"","sources":["../../applications/application.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAwPhC,QAAA,MAAM,gBAAgB;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAmD,CAAC;AAC1E,eAAe,gBAAgB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import mongoose from "mongoose";
2
+ import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
2
3
  import creditProfileSchema from "./application-credit-profile.model";
3
4
  import { applyWorkflowPlugin } from "../shared/workflow.plugin";
4
5
  const applicationSchema = new mongoose.Schema({
@@ -65,6 +66,9 @@ const applicationSchema = new mongoose.Schema({
65
66
  mandateRequestedDate: { type: String, default: null },
66
67
  mandateReviewedByUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User" },
67
68
  mandateReviewedDate: { type: String, default: null },
69
+ isReferred: { type: Boolean, default: false },
70
+ referredByUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User" },
71
+ referredDate: { type: String, default: null },
68
72
  brokerTaskCount: {
69
73
  type: Number,
70
74
  default: 0
@@ -91,6 +95,7 @@ const applicationSchema = new mongoose.Schema({
91
95
  toJSON: { virtuals: true },
92
96
  toObject: { virtuals: true }
93
97
  });
98
+ applyAuditMiddleware(applicationSchema, "Application");
94
99
  // Apply workflow plugin to the schema
95
100
  applyWorkflowPlugin(applicationSchema, 'application');
96
101
  // Virtual property 'noOfApplicants'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "2.3.315",
3
+ "version": "2.3.317",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",