@dynamatix/gb-schemas 1.2.31 → 1.2.32

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.
@@ -125,6 +125,7 @@ declare const PropertyModel: mongoose.Model<{
125
125
  toISOString?: {} | null | undefined;
126
126
  getVarDate?: {} | null | undefined;
127
127
  } | null | undefined;
128
+ pageValidFlag?: unknown;
128
129
  addressLine1?: unknown;
129
130
  addressLine2?: unknown;
130
131
  addressLine3?: unknown;
@@ -471,6 +472,7 @@ declare const PropertyModel: mongoose.Model<{
471
472
  toISOString?: {} | null | undefined;
472
473
  getVarDate?: {} | null | undefined;
473
474
  } | null | undefined;
475
+ pageValidFlag?: unknown;
474
476
  addressLine1?: unknown;
475
477
  addressLine2?: unknown;
476
478
  addressLine3?: unknown;
@@ -817,6 +819,7 @@ declare const PropertyModel: mongoose.Model<{
817
819
  toISOString?: {} | null | undefined;
818
820
  getVarDate?: {} | null | undefined;
819
821
  } | null | undefined;
822
+ pageValidFlag?: unknown;
820
823
  addressLine1?: unknown;
821
824
  addressLine2?: unknown;
822
825
  addressLine3?: unknown;
@@ -1081,6 +1084,7 @@ declare const PropertyModel: mongoose.Model<{
1081
1084
  updatedAt: NativeDate;
1082
1085
  } & {
1083
1086
  applicationId: mongoose.Types.ObjectId;
1087
+ pageValidFlag: boolean;
1084
1088
  addressLine1: string;
1085
1089
  outstandingBalance: Pound;
1086
1090
  remainingTerm: number;
@@ -1103,6 +1107,7 @@ declare const PropertyModel: mongoose.Model<{
1103
1107
  updatedAt: NativeDate;
1104
1108
  } & {
1105
1109
  applicationId: mongoose.Types.ObjectId;
1110
+ pageValidFlag: boolean;
1106
1111
  addressLine1: string;
1107
1112
  outstandingBalance: Pound;
1108
1113
  remainingTerm: number;
@@ -1125,6 +1130,7 @@ declare const PropertyModel: mongoose.Model<{
1125
1130
  updatedAt: NativeDate;
1126
1131
  } & {
1127
1132
  applicationId: mongoose.Types.ObjectId;
1133
+ pageValidFlag: boolean;
1128
1134
  addressLine1: string;
1129
1135
  outstandingBalance: Pound;
1130
1136
  remainingTerm: number;
@@ -1 +1 @@
1
- {"version":3,"file":"property.model.d.ts","sourceRoot":"","sources":["../../properties/property.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAkI/C,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6C,CAAC;AACjE,eAAe,aAAa,CAAC"}
@@ -5,6 +5,13 @@ const propertySchema = new mongoose.Schema({
5
5
  description: "Unique identifier for the application",
6
6
  required: true
7
7
  },
8
+ pageValidFlag: {
9
+ type: Boolean,
10
+ default: true,
11
+ description: "Flag indicating if the page is valid",
12
+ get: (value) => value ? 'Yes' : 'No',
13
+ set: (value) => value.toLowerCase() === 'yes',
14
+ },
8
15
  propertyId: {
9
16
  type: String,
10
17
  required: true,
@@ -114,8 +121,8 @@ propertySchema.virtual('country').get(function () {
114
121
  return this.countryLid instanceof mongoose.Types.ObjectId ? null : this.countryLid?.name || null;
115
122
  });
116
123
  propertySchema.virtual('stressedRCR').get(function () {
117
- const monthlyRentValue = parseFloat(this.monthlyRent.replace('£', '').replace(',', '') || '0');
118
- const monthlyRepaymentValue = parseFloat(this.monthlyRepayment.replace('£', '').replace(',', '') || '0');
124
+ const monthlyRentValue = parseFloat((this.monthlyRent?.toString()).replace('£', '').replace(',', ''));
125
+ const monthlyRepaymentValue = parseFloat((this.monthlyRepayment?.toString()).replace('£', '').replace(',', ''));
119
126
  if (monthlyRepaymentValue === 0) {
120
127
  return 0; // Avoid division by zero
121
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "1.2.31",
3
+ "version": "1.2.32",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",