@dynamatix/gb-schemas 2.20.5 → 2.20.8

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;
@@ -171,6 +172,7 @@ declare const ApplicationModel: mongoose.Model<{
171
172
  withdrawalReasonLid: mongoose.Types.ObjectId;
172
173
  declineReasonLid: mongoose.Types.ObjectId;
173
174
  isPortfolioConfirmed: boolean;
175
+ portfolioConfirmedAt: NativeDate;
174
176
  productId: mongoose.Types.ObjectId;
175
177
  securityId: mongoose.Types.ObjectId;
176
178
  solicitorId: mongoose.Types.ObjectId;
@@ -270,6 +272,7 @@ declare const ApplicationModel: mongoose.Model<{
270
272
  withdrawalReasonLid: mongoose.Types.ObjectId;
271
273
  declineReasonLid: mongoose.Types.ObjectId;
272
274
  isPortfolioConfirmed: boolean;
275
+ portfolioConfirmedAt: NativeDate;
273
276
  productId: mongoose.Types.ObjectId;
274
277
  securityId: mongoose.Types.ObjectId;
275
278
  solicitorId: mongoose.Types.ObjectId;
@@ -381,6 +384,7 @@ declare const ApplicationModel: mongoose.Model<{
381
384
  withdrawalReasonLid: mongoose.Types.ObjectId;
382
385
  declineReasonLid: mongoose.Types.ObjectId;
383
386
  isPortfolioConfirmed: boolean;
387
+ portfolioConfirmedAt: NativeDate;
384
388
  productId: mongoose.Types.ObjectId;
385
389
  securityId: mongoose.Types.ObjectId;
386
390
  solicitorId: mongoose.Types.ObjectId;
@@ -480,6 +484,7 @@ declare const ApplicationModel: mongoose.Model<{
480
484
  withdrawalReasonLid: mongoose.Types.ObjectId;
481
485
  declineReasonLid: mongoose.Types.ObjectId;
482
486
  isPortfolioConfirmed: boolean;
487
+ portfolioConfirmedAt: NativeDate;
483
488
  productId: mongoose.Types.ObjectId;
484
489
  securityId: mongoose.Types.ObjectId;
485
490
  solicitorId: mongoose.Types.ObjectId;
@@ -579,6 +584,7 @@ declare const ApplicationModel: mongoose.Model<{
579
584
  withdrawalReasonLid: mongoose.Types.ObjectId;
580
585
  declineReasonLid: mongoose.Types.ObjectId;
581
586
  isPortfolioConfirmed: boolean;
587
+ portfolioConfirmedAt: NativeDate;
582
588
  productId: mongoose.Types.ObjectId;
583
589
  securityId: mongoose.Types.ObjectId;
584
590
  solicitorId: mongoose.Types.ObjectId;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAmD,CAAC;AAC1E,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"application.model.d.ts","sourceRoot":"","sources":["../../applications/application.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAyRhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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 },
@@ -1 +1 @@
1
- {"version":3,"file":"security.model.d.ts","sourceRoot":"","sources":["../../properties/security.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AA6KhC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6C,CAAC;AACjE,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"security.model.d.ts","sourceRoot":"","sources":["../../properties/security.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAmLhC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6C,CAAC;AACjE,eAAe,aAAa,CAAC"}
@@ -1,5 +1,6 @@
1
1
  // security.model.ts
2
2
  import mongoose from "mongoose";
3
+ import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
3
4
  import { Pound, formatPound } from "../value-objects/pound";
4
5
  import { applyWorkflowPlugin } from "../shared/workflow.plugin";
5
6
  const dataStreetSchema = new mongoose.Schema({
@@ -148,6 +149,10 @@ securitySchema.virtual('lendingType').get(function () {
148
149
  ? null
149
150
  : this.applicationId?.lendingTypeLid?.name || null;
150
151
  });
152
+ // Audit changes to EPC / DataStreet fields (energyEfficiencyRating, epcStatus,
153
+ // epcOverrideReason) via the shared audit middleware. Which fields are tracked
154
+ // is driven by the `Security` AuditConfig document, not by code.
155
+ applyAuditMiddleware(securitySchema, "Security");
151
156
  // Apply workflow plugin to the schema
152
157
  applyWorkflowPlugin(securitySchema, 'security');
153
158
  // Indexes for query optimization
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "2.20.5",
3
+ "version": "2.20.8",
4
4
  "description": "All the schemas for gatehouse bank back-end .",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",