@dynamatix/gb-schemas 1.3.204 → 1.3.206

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.
@@ -701,7 +701,7 @@ declare const ApplicantIncomeModel: mongoose.Model<{
701
701
  defaultOptions?: unknown;
702
702
  } | null | undefined;
703
703
  soleTraderIncomeRationale?: unknown;
704
- soleTraderIncomeConfirmed?: unknown;
704
+ isSoleTraderIncomeConfirmed?: unknown;
705
705
  soleTraderGrossIncome?: {
706
706
  validators: mongoose.Types.DocumentArray<{
707
707
  type?: unknown;
@@ -1472,7 +1472,7 @@ declare const ApplicantIncomeModel: mongoose.Model<{
1472
1472
  defaultOptions?: unknown;
1473
1473
  } | null | undefined;
1474
1474
  soleTraderIncomeRationale?: unknown;
1475
- soleTraderIncomeConfirmed?: unknown;
1475
+ isSoleTraderIncomeConfirmed?: unknown;
1476
1476
  soleTraderGrossIncome?: {
1477
1477
  validators: mongoose.Types.DocumentArray<{
1478
1478
  type?: unknown;
@@ -2243,7 +2243,7 @@ declare const ApplicantIncomeModel: mongoose.Model<{
2243
2243
  defaultOptions?: unknown;
2244
2244
  } | null | undefined;
2245
2245
  soleTraderIncomeRationale?: unknown;
2246
- soleTraderIncomeConfirmed?: unknown;
2246
+ isSoleTraderIncomeConfirmed?: unknown;
2247
2247
  soleTraderGrossIncome?: {
2248
2248
  validators: mongoose.Types.DocumentArray<{
2249
2249
  type?: unknown;
@@ -2385,7 +2385,7 @@ declare const ApplicantIncomeModel: mongoose.Model<{
2385
2385
  totalSelfEmployedGrossIncome: Pound;
2386
2386
  totalSelfEmployedNetIncome: Pound;
2387
2387
  soleTraderIncomeRationale: string;
2388
- soleTraderIncomeConfirmed: boolean;
2388
+ isSoleTraderIncomeConfirmed: boolean;
2389
2389
  soleTraderGrossIncome: Pound;
2390
2390
  soleTraderNetIncome: Pound;
2391
2391
  businessTypeLid?: mongoose.Types.ObjectId | null | undefined;
@@ -2451,7 +2451,7 @@ declare const ApplicantIncomeModel: mongoose.Model<{
2451
2451
  totalSelfEmployedGrossIncome: Pound;
2452
2452
  totalSelfEmployedNetIncome: Pound;
2453
2453
  soleTraderIncomeRationale: string;
2454
- soleTraderIncomeConfirmed: boolean;
2454
+ isSoleTraderIncomeConfirmed: boolean;
2455
2455
  soleTraderGrossIncome: Pound;
2456
2456
  soleTraderNetIncome: Pound;
2457
2457
  businessTypeLid?: mongoose.Types.ObjectId | null | undefined;
@@ -2517,7 +2517,7 @@ declare const ApplicantIncomeModel: mongoose.Model<{
2517
2517
  totalSelfEmployedGrossIncome: Pound;
2518
2518
  totalSelfEmployedNetIncome: Pound;
2519
2519
  soleTraderIncomeRationale: string;
2520
- soleTraderIncomeConfirmed: boolean;
2520
+ isSoleTraderIncomeConfirmed: boolean;
2521
2521
  soleTraderGrossIncome: Pound;
2522
2522
  soleTraderNetIncome: Pound;
2523
2523
  businessTypeLid?: mongoose.Types.ObjectId | null | undefined;
@@ -70,7 +70,7 @@ const incomeSchema = new mongoose.Schema({
70
70
  totalSelfEmployedGrossIncome: { type: Pound, default: 0.00 },
71
71
  totalSelfEmployedNetIncome: { type: Pound, default: 0.00 },
72
72
  soleTraderIncomeRationale: { type: String, default: null },
73
- soleTraderIncomeConfirmed: { type: Boolean, default: false },
73
+ isSoleTraderIncomeConfirmed: { type: Boolean, default: false },
74
74
  soleTraderGrossIncome: { type: Pound, default: 0.00 },
75
75
  soleTraderNetIncome: { type: Pound, default: 0.00 },
76
76
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"account-number.d.ts","sourceRoot":"","sources":["../../value-objects/account-number.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,QAAQ,UAAU,CAAC;IACtB,UAAU,MAAM,CAAC;QACb,UAAU,KAAK,CAAC;YACZ,MAAM,aAAc,SAAQ,UAAU;aAAI;SAC7C;KACJ;CACJ;AAED,cAAM,aAAc,SAAQ,QAAQ,CAAC,UAAU;gBAC/B,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,SAAS,GAAG,SAAS;IAIhE,IAAI,CAAC,GAAG,EAAE,GAAG;CAkChB;AAKD,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"account-number.d.ts","sourceRoot":"","sources":["../../value-objects/account-number.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,QAAQ,UAAU,CAAC;IACtB,UAAU,MAAM,CAAC;QACb,UAAU,KAAK,CAAC;YACZ,MAAM,aAAc,SAAQ,UAAU;aAAI;SAC7C;KACJ;CACJ;AAED,cAAM,aAAc,SAAQ,QAAQ,CAAC,UAAU;gBAC/B,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,SAAS,GAAG,SAAS;IAIhE,IAAI,CAAC,GAAG,EAAE,GAAG;CAwBhB;AAKD,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -15,10 +15,6 @@ class AccountNumber extends mongoose.SchemaType {
15
15
  if (typeof input !== 'string') {
16
16
  throw new mongoose.Error.CastError('AccountNumber', val, this.path, new Error('AccountNumber must be a string or number'));
17
17
  }
18
- // Validate that the input is exactly 8 digits
19
- if (!input.match(/^\d{8}$/)) {
20
- throw new mongoose.Error.CastError('AccountNumber', val, this.path, new Error(`${val} is not a valid account number. Must be exactly 8 digits.`));
21
- }
22
18
  // Return the input as-is to preserve leading zeros
23
19
  return input;
24
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "1.3.204",
3
+ "version": "1.3.206",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",