@dynamatix/gb-schemas 2.20.7 → 2.20.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.
@@ -72,6 +72,7 @@ declare const ApplicationModel: mongoose.Model<{
72
72
  withdrawalReasonLid: mongoose.Types.ObjectId;
73
73
  declineReasonLid: mongoose.Types.ObjectId;
74
74
  isPortfolioConfirmed: boolean;
75
+ portfolioConfirmedAt: NativeDate;
75
76
  productId: mongoose.Types.ObjectId;
76
77
  securityId: mongoose.Types.ObjectId;
77
78
  solicitorId: mongoose.Types.ObjectId;
@@ -100,6 +101,10 @@ declare const ApplicationModel: mongoose.Model<{
100
101
  pendingTaskCountForUser: number;
101
102
  applicationFormSignedDate: NativeDate;
102
103
  creditReportId: string;
104
+ isCompanyApplication: boolean;
105
+ requestedApplicantCount: number;
106
+ isIntendToResideInProperty: boolean;
107
+ isIntendToLetProperty: boolean;
103
108
  isAlgbraEligible: boolean;
104
109
  selectedProduct?: string | null | undefined;
105
110
  product?: string | null | undefined;
@@ -171,6 +176,7 @@ declare const ApplicationModel: mongoose.Model<{
171
176
  withdrawalReasonLid: mongoose.Types.ObjectId;
172
177
  declineReasonLid: mongoose.Types.ObjectId;
173
178
  isPortfolioConfirmed: boolean;
179
+ portfolioConfirmedAt: NativeDate;
174
180
  productId: mongoose.Types.ObjectId;
175
181
  securityId: mongoose.Types.ObjectId;
176
182
  solicitorId: mongoose.Types.ObjectId;
@@ -199,6 +205,10 @@ declare const ApplicationModel: mongoose.Model<{
199
205
  pendingTaskCountForUser: number;
200
206
  applicationFormSignedDate: NativeDate;
201
207
  creditReportId: string;
208
+ isCompanyApplication: boolean;
209
+ requestedApplicantCount: number;
210
+ isIntendToResideInProperty: boolean;
211
+ isIntendToLetProperty: boolean;
202
212
  isAlgbraEligible: boolean;
203
213
  selectedProduct?: string | null | undefined;
204
214
  product?: string | null | undefined;
@@ -270,6 +280,7 @@ declare const ApplicationModel: mongoose.Model<{
270
280
  withdrawalReasonLid: mongoose.Types.ObjectId;
271
281
  declineReasonLid: mongoose.Types.ObjectId;
272
282
  isPortfolioConfirmed: boolean;
283
+ portfolioConfirmedAt: NativeDate;
273
284
  productId: mongoose.Types.ObjectId;
274
285
  securityId: mongoose.Types.ObjectId;
275
286
  solicitorId: mongoose.Types.ObjectId;
@@ -298,6 +309,10 @@ declare const ApplicationModel: mongoose.Model<{
298
309
  pendingTaskCountForUser: number;
299
310
  applicationFormSignedDate: NativeDate;
300
311
  creditReportId: string;
312
+ isCompanyApplication: boolean;
313
+ requestedApplicantCount: number;
314
+ isIntendToResideInProperty: boolean;
315
+ isIntendToLetProperty: boolean;
301
316
  isAlgbraEligible: boolean;
302
317
  selectedProduct?: string | null | undefined;
303
318
  product?: string | null | undefined;
@@ -381,6 +396,7 @@ declare const ApplicationModel: mongoose.Model<{
381
396
  withdrawalReasonLid: mongoose.Types.ObjectId;
382
397
  declineReasonLid: mongoose.Types.ObjectId;
383
398
  isPortfolioConfirmed: boolean;
399
+ portfolioConfirmedAt: NativeDate;
384
400
  productId: mongoose.Types.ObjectId;
385
401
  securityId: mongoose.Types.ObjectId;
386
402
  solicitorId: mongoose.Types.ObjectId;
@@ -409,6 +425,10 @@ declare const ApplicationModel: mongoose.Model<{
409
425
  pendingTaskCountForUser: number;
410
426
  applicationFormSignedDate: NativeDate;
411
427
  creditReportId: string;
428
+ isCompanyApplication: boolean;
429
+ requestedApplicantCount: number;
430
+ isIntendToResideInProperty: boolean;
431
+ isIntendToLetProperty: boolean;
412
432
  isAlgbraEligible: boolean;
413
433
  selectedProduct?: string | null | undefined;
414
434
  product?: string | null | undefined;
@@ -480,6 +500,7 @@ declare const ApplicationModel: mongoose.Model<{
480
500
  withdrawalReasonLid: mongoose.Types.ObjectId;
481
501
  declineReasonLid: mongoose.Types.ObjectId;
482
502
  isPortfolioConfirmed: boolean;
503
+ portfolioConfirmedAt: NativeDate;
483
504
  productId: mongoose.Types.ObjectId;
484
505
  securityId: mongoose.Types.ObjectId;
485
506
  solicitorId: mongoose.Types.ObjectId;
@@ -508,6 +529,10 @@ declare const ApplicationModel: mongoose.Model<{
508
529
  pendingTaskCountForUser: number;
509
530
  applicationFormSignedDate: NativeDate;
510
531
  creditReportId: string;
532
+ isCompanyApplication: boolean;
533
+ requestedApplicantCount: number;
534
+ isIntendToResideInProperty: boolean;
535
+ isIntendToLetProperty: boolean;
511
536
  isAlgbraEligible: boolean;
512
537
  selectedProduct?: string | null | undefined;
513
538
  product?: string | null | undefined;
@@ -579,6 +604,7 @@ declare const ApplicationModel: mongoose.Model<{
579
604
  withdrawalReasonLid: mongoose.Types.ObjectId;
580
605
  declineReasonLid: mongoose.Types.ObjectId;
581
606
  isPortfolioConfirmed: boolean;
607
+ portfolioConfirmedAt: NativeDate;
582
608
  productId: mongoose.Types.ObjectId;
583
609
  securityId: mongoose.Types.ObjectId;
584
610
  solicitorId: mongoose.Types.ObjectId;
@@ -607,6 +633,10 @@ declare const ApplicationModel: mongoose.Model<{
607
633
  pendingTaskCountForUser: number;
608
634
  applicationFormSignedDate: NativeDate;
609
635
  creditReportId: string;
636
+ isCompanyApplication: boolean;
637
+ requestedApplicantCount: number;
638
+ isIntendToResideInProperty: boolean;
639
+ isIntendToLetProperty: boolean;
610
640
  isAlgbraEligible: boolean;
611
641
  selectedProduct?: string | null | undefined;
612
642
  product?: string | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"application.model.d.ts","sourceRoot":"","sources":["../../applications/application.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAwRhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAmD,CAAC;AAC1E,eAAe,gBAAgB,CAAC"}
@@ -47,6 +47,7 @@ const applicationSchema = new mongoose.Schema({
47
47
  withdrawalReasonLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
48
48
  declineReasonLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
49
49
  isPortfolioConfirmed: { type: Boolean, default: false },
50
+ portfolioConfirmedAt: { type: Date, default: null },
50
51
  productId: { type: mongoose.Schema.Types.ObjectId, ref: "Product", default: null },
51
52
  product: { type: String },
52
53
  securityId: { type: mongoose.Schema.Types.ObjectId, ref: "Security", default: null },
@@ -115,6 +116,29 @@ const applicationSchema = new mongoose.Schema({
115
116
  default: false
116
117
  },
117
118
  creditReportId: { type: String, default: null },
119
+ // ── Broker journey · Step 1 (Application Setup) ────────────────────────────
120
+ // Captured by the broker-facing Application Setup form. All optional: applications
121
+ // synced from Apprivo never set them, and must keep validating.
122
+ isCompanyApplication: {
123
+ type: Boolean,
124
+ default: null,
125
+ description: "Is the application on behalf of a company? false = Private Individual. Routes the rest of the journey (company record vs individual applicants); does NOT affect applicationTypeLid."
126
+ },
127
+ requestedApplicantCount: {
128
+ type: Number,
129
+ default: null,
130
+ description: "How many applicants will be listed on the application (1-4). Captured before any Applicant records exist, so applicants.length cannot answer it."
131
+ },
132
+ isIntendToResideInProperty: {
133
+ type: Boolean,
134
+ default: null,
135
+ description: "Do you or any close relative intend to reside in the property during the finance term? To provide advice on Home Purchase Plan (HPP) products you must hold specific HPP permissions with the FCA. These permissions are not required for Buy to Let business. true => HPP, false => BTL."
136
+ },
137
+ isIntendToLetProperty: {
138
+ type: Boolean,
139
+ default: null,
140
+ description: "Do you intend to let the property? Asked only for private individual applications where isIntendToResideInProperty is true. true is a hard stop: HPP properties may not be let."
141
+ },
118
142
  isAlgbraEligible: { type: Boolean, default: false },
119
143
  }, {
120
144
  timestamps: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "2.20.7",
3
+ "version": "2.20.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",