@dynamatix/gb-schemas 1.3.213 → 1.3.215

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.
@@ -506,11 +506,11 @@ declare const CreditCardCommitmentModel: mongoose.Model<{
506
506
  outstandingBalance: Pound;
507
507
  commitmentId: string;
508
508
  commitmentTypeLid: mongoose.Types.ObjectId;
509
- lenderName: string;
510
509
  creditLimit: Pound;
511
510
  creditCardRepaymentTypeLid: mongoose.Types.ObjectId;
512
511
  monthlyPayment: Pound;
513
512
  jointNames: boolean;
513
+ lenderName?: string | null | undefined;
514
514
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
515
515
  isSelected: boolean;
516
516
  source: "Broker" | "Credit Report" | "Underwriter";
@@ -518,11 +518,11 @@ declare const CreditCardCommitmentModel: mongoose.Model<{
518
518
  outstandingBalance: Pound;
519
519
  commitmentId: string;
520
520
  commitmentTypeLid: mongoose.Types.ObjectId;
521
- lenderName: string;
522
521
  creditLimit: Pound;
523
522
  creditCardRepaymentTypeLid: mongoose.Types.ObjectId;
524
523
  monthlyPayment: Pound;
525
524
  jointNames: boolean;
525
+ lenderName?: string | null | undefined;
526
526
  }>, {}> & mongoose.FlatRecord<{
527
527
  isSelected: boolean;
528
528
  source: "Broker" | "Credit Report" | "Underwriter";
@@ -530,11 +530,11 @@ declare const CreditCardCommitmentModel: mongoose.Model<{
530
530
  outstandingBalance: Pound;
531
531
  commitmentId: string;
532
532
  commitmentTypeLid: mongoose.Types.ObjectId;
533
- lenderName: string;
534
533
  creditLimit: Pound;
535
534
  creditCardRepaymentTypeLid: mongoose.Types.ObjectId;
536
535
  monthlyPayment: Pound;
537
536
  jointNames: boolean;
537
+ lenderName?: string | null | undefined;
538
538
  }> & {
539
539
  _id: mongoose.Types.ObjectId;
540
540
  } & {
@@ -5,7 +5,7 @@ const creditCardCommitmentSchema = new mongoose.Schema({
5
5
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
6
6
  commitmentId: { type: String, default: null },
7
7
  commitmentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
8
- lenderName: { type: String, required: true }, // Provider Name / Provider category
8
+ lenderName: { type: String }, // Provider Name / Provider category
9
9
  creditLimit: { type: Pound, required: true },
10
10
  outstandingBalance: { type: Pound, required: true }, // Balance
11
11
  creditCardRepaymentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
@@ -380,7 +380,6 @@ declare const LoanCommitmentModel: mongoose.Model<{
380
380
  outstandingBalance: Pound;
381
381
  commitmentId: string;
382
382
  commitmentTypeLid: mongoose.Types.ObjectId;
383
- lenderName: string;
384
383
  monthlyPayment: Pound;
385
384
  loanTypeLid: mongoose.Types.ObjectId;
386
385
  securityDetails: string;
@@ -390,6 +389,7 @@ declare const LoanCommitmentModel: mongoose.Model<{
390
389
  remainingTerm: string;
391
390
  startDate: string;
392
391
  loanRationale: string;
392
+ lenderName?: string | null | undefined;
393
393
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
394
394
  isSelected: boolean;
395
395
  source: "Broker" | "Credit Report" | "Underwriter";
@@ -397,7 +397,6 @@ declare const LoanCommitmentModel: mongoose.Model<{
397
397
  outstandingBalance: Pound;
398
398
  commitmentId: string;
399
399
  commitmentTypeLid: mongoose.Types.ObjectId;
400
- lenderName: string;
401
400
  monthlyPayment: Pound;
402
401
  loanTypeLid: mongoose.Types.ObjectId;
403
402
  securityDetails: string;
@@ -407,6 +406,7 @@ declare const LoanCommitmentModel: mongoose.Model<{
407
406
  remainingTerm: string;
408
407
  startDate: string;
409
408
  loanRationale: string;
409
+ lenderName?: string | null | undefined;
410
410
  }>, {}> & mongoose.FlatRecord<{
411
411
  isSelected: boolean;
412
412
  source: "Broker" | "Credit Report" | "Underwriter";
@@ -414,7 +414,6 @@ declare const LoanCommitmentModel: mongoose.Model<{
414
414
  outstandingBalance: Pound;
415
415
  commitmentId: string;
416
416
  commitmentTypeLid: mongoose.Types.ObjectId;
417
- lenderName: string;
418
417
  monthlyPayment: Pound;
419
418
  loanTypeLid: mongoose.Types.ObjectId;
420
419
  securityDetails: string;
@@ -424,6 +423,7 @@ declare const LoanCommitmentModel: mongoose.Model<{
424
423
  remainingTerm: string;
425
424
  startDate: string;
426
425
  loanRationale: string;
426
+ lenderName?: string | null | undefined;
427
427
  }> & {
428
428
  _id: mongoose.Types.ObjectId;
429
429
  } & {
@@ -5,7 +5,7 @@ const loanCommitmentSchema = new mongoose.Schema({
5
5
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
6
6
  commitmentId: { type: String, default: null },
7
7
  commitmentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
8
- lenderName: { type: String, required: true }, // Provider Name / Provider category
8
+ lenderName: { type: String }, // Provider Name / Provider category
9
9
  loanTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
10
10
  securityDetails: { type: String, default: null },
11
11
  purpose: { type: String, default: null },
@@ -686,7 +686,6 @@ declare const ResidenceCommitmentModel: mongoose.Model<{
686
686
  outstandingBalance: Pound;
687
687
  fixedTerm: string;
688
688
  commitmentId: string;
689
- lenderName: string;
690
689
  monthlyPayment: Pound;
691
690
  doHaveSharedResponsibility: boolean;
692
691
  sharedMortgage: string;
@@ -706,13 +705,13 @@ declare const ResidenceCommitmentModel: mongoose.Model<{
706
705
  financeHomeTypeLid: mongoose.Types.ObjectId;
707
706
  remainingTermMonth: number;
708
707
  chargeTypeLid: mongoose.Types.ObjectId;
708
+ lenderName?: string | null | undefined;
709
709
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
710
710
  applicantId: mongoose.Types.ObjectId;
711
711
  pageValidFlag: boolean;
712
712
  outstandingBalance: Pound;
713
713
  fixedTerm: string;
714
714
  commitmentId: string;
715
- lenderName: string;
716
715
  monthlyPayment: Pound;
717
716
  doHaveSharedResponsibility: boolean;
718
717
  sharedMortgage: string;
@@ -732,13 +731,13 @@ declare const ResidenceCommitmentModel: mongoose.Model<{
732
731
  financeHomeTypeLid: mongoose.Types.ObjectId;
733
732
  remainingTermMonth: number;
734
733
  chargeTypeLid: mongoose.Types.ObjectId;
734
+ lenderName?: string | null | undefined;
735
735
  }>, {}> & mongoose.FlatRecord<{
736
736
  applicantId: mongoose.Types.ObjectId;
737
737
  pageValidFlag: boolean;
738
738
  outstandingBalance: Pound;
739
739
  fixedTerm: string;
740
740
  commitmentId: string;
741
- lenderName: string;
742
741
  monthlyPayment: Pound;
743
742
  doHaveSharedResponsibility: boolean;
744
743
  sharedMortgage: string;
@@ -758,6 +757,7 @@ declare const ResidenceCommitmentModel: mongoose.Model<{
758
757
  financeHomeTypeLid: mongoose.Types.ObjectId;
759
758
  remainingTermMonth: number;
760
759
  chargeTypeLid: mongoose.Types.ObjectId;
760
+ lenderName?: string | null | undefined;
761
761
  }> & {
762
762
  _id: mongoose.Types.ObjectId;
763
763
  } & {
@@ -5,7 +5,7 @@ const residenceCommitmentSchema = new mongoose.Schema({
5
5
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
6
6
  pageValidFlag: { type: Boolean, default: false },
7
7
  financeTypeHppLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
8
- lenderName: { type: String, required: true },
8
+ lenderName: { type: String },
9
9
  propertyValue: { type: Pound, required: true, get: formatPound },
10
10
  hppRepaymentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
11
11
  mortgageTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
@@ -375,7 +375,6 @@ declare const SecuredLoanCommitmentModel: mongoose.Model<{
375
375
  outstandingBalance: Pound;
376
376
  commitmentId: string;
377
377
  commitmentTypeLid: mongoose.Types.ObjectId;
378
- lenderName: string;
379
378
  monthlyPayment: Pound;
380
379
  loanTypeLid: mongoose.Types.ObjectId;
381
380
  securityDetails: string;
@@ -384,6 +383,7 @@ declare const SecuredLoanCommitmentModel: mongoose.Model<{
384
383
  sharedMortgage: string;
385
384
  remainingTerm: number;
386
385
  startDate: string;
386
+ lenderName?: string | null | undefined;
387
387
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
388
388
  isSelected: boolean;
389
389
  source: "Broker" | "Credit Report" | "Underwriter";
@@ -391,7 +391,6 @@ declare const SecuredLoanCommitmentModel: mongoose.Model<{
391
391
  outstandingBalance: Pound;
392
392
  commitmentId: string;
393
393
  commitmentTypeLid: mongoose.Types.ObjectId;
394
- lenderName: string;
395
394
  monthlyPayment: Pound;
396
395
  loanTypeLid: mongoose.Types.ObjectId;
397
396
  securityDetails: string;
@@ -400,6 +399,7 @@ declare const SecuredLoanCommitmentModel: mongoose.Model<{
400
399
  sharedMortgage: string;
401
400
  remainingTerm: number;
402
401
  startDate: string;
402
+ lenderName?: string | null | undefined;
403
403
  }>, {}> & mongoose.FlatRecord<{
404
404
  isSelected: boolean;
405
405
  source: "Broker" | "Credit Report" | "Underwriter";
@@ -407,7 +407,6 @@ declare const SecuredLoanCommitmentModel: mongoose.Model<{
407
407
  outstandingBalance: Pound;
408
408
  commitmentId: string;
409
409
  commitmentTypeLid: mongoose.Types.ObjectId;
410
- lenderName: string;
411
410
  monthlyPayment: Pound;
412
411
  loanTypeLid: mongoose.Types.ObjectId;
413
412
  securityDetails: string;
@@ -416,6 +415,7 @@ declare const SecuredLoanCommitmentModel: mongoose.Model<{
416
415
  sharedMortgage: string;
417
416
  remainingTerm: number;
418
417
  startDate: string;
418
+ lenderName?: string | null | undefined;
419
419
  }> & {
420
420
  _id: mongoose.Types.ObjectId;
421
421
  } & {
@@ -3,7 +3,7 @@ import { Pound, formatPound } from "../value-objects/pound";
3
3
  import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
4
4
  const securedLoanCommitmentSchema = new mongoose.Schema({
5
5
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
6
- lenderName: { type: String, required: true }, // Provider Name / Provider category
6
+ lenderName: { type: String }, // Provider Name / Provider category
7
7
  commitmentId: { type: String, default: null },
8
8
  securityDetails: { type: String, default: null },
9
9
  purpose: { type: String, default: null },
@@ -375,7 +375,6 @@ declare const UnsecuredLoanCommitmentModel: mongoose.Model<{
375
375
  outstandingBalance: Pound;
376
376
  commitmentId: string;
377
377
  commitmentTypeLid: mongoose.Types.ObjectId;
378
- lenderName: string;
379
378
  monthlyPayment: Pound;
380
379
  loanTypeLid: mongoose.Types.ObjectId;
381
380
  securityDetails: string;
@@ -384,6 +383,7 @@ declare const UnsecuredLoanCommitmentModel: mongoose.Model<{
384
383
  sharedMortgage: string;
385
384
  remainingTerm: number;
386
385
  startDate: string;
386
+ lenderName?: string | null | undefined;
387
387
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
388
388
  isSelected: boolean;
389
389
  source: "Broker" | "Credit Report" | "Underwriter";
@@ -391,7 +391,6 @@ declare const UnsecuredLoanCommitmentModel: mongoose.Model<{
391
391
  outstandingBalance: Pound;
392
392
  commitmentId: string;
393
393
  commitmentTypeLid: mongoose.Types.ObjectId;
394
- lenderName: string;
395
394
  monthlyPayment: Pound;
396
395
  loanTypeLid: mongoose.Types.ObjectId;
397
396
  securityDetails: string;
@@ -400,6 +399,7 @@ declare const UnsecuredLoanCommitmentModel: mongoose.Model<{
400
399
  sharedMortgage: string;
401
400
  remainingTerm: number;
402
401
  startDate: string;
402
+ lenderName?: string | null | undefined;
403
403
  }>, {}> & mongoose.FlatRecord<{
404
404
  isSelected: boolean;
405
405
  source: "Broker" | "Credit Report" | "Underwriter";
@@ -407,7 +407,6 @@ declare const UnsecuredLoanCommitmentModel: mongoose.Model<{
407
407
  outstandingBalance: Pound;
408
408
  commitmentId: string;
409
409
  commitmentTypeLid: mongoose.Types.ObjectId;
410
- lenderName: string;
411
410
  monthlyPayment: Pound;
412
411
  loanTypeLid: mongoose.Types.ObjectId;
413
412
  securityDetails: string;
@@ -416,6 +415,7 @@ declare const UnsecuredLoanCommitmentModel: mongoose.Model<{
416
415
  sharedMortgage: string;
417
416
  remainingTerm: number;
418
417
  startDate: string;
418
+ lenderName?: string | null | undefined;
419
419
  }> & {
420
420
  _id: mongoose.Types.ObjectId;
421
421
  } & {
@@ -3,7 +3,7 @@ import { Pound, formatPound } from "../value-objects/pound";
3
3
  import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
4
4
  const unsecuredLoanCommitmentSchema = new mongoose.Schema({
5
5
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true },
6
- lenderName: { type: String, required: true }, // Provider Name / Provider category
6
+ lenderName: { type: String }, // Provider Name / Provider category
7
7
  commitmentId: { type: String, default: null },
8
8
  purpose: { type: String, default: null },
9
9
  doHaveSharedResponsibility: { type: Boolean, default: false },
@@ -32,7 +32,7 @@ declare const ApplicantPropertyIncomeModel: mongoose.Model<{
32
32
  yearEnd1?: unknown;
33
33
  yearEnd2?: unknown;
34
34
  yearEnd3?: unknown;
35
- rentalIncome1?: {
35
+ netProfitAfterTax1?: {
36
36
  validators: mongoose.Types.DocumentArray<{
37
37
  type?: unknown;
38
38
  message?: unknown;
@@ -128,7 +128,7 @@ declare const ApplicantPropertyIncomeModel: mongoose.Model<{
128
128
  validateAll?: {} | null | undefined;
129
129
  defaultOptions?: unknown;
130
130
  } | null | undefined;
131
- rentalIncome2?: {
131
+ netProfitAfterTax2?: {
132
132
  validators: mongoose.Types.DocumentArray<{
133
133
  type?: unknown;
134
134
  message?: unknown;
@@ -224,7 +224,7 @@ declare const ApplicantPropertyIncomeModel: mongoose.Model<{
224
224
  validateAll?: {} | null | undefined;
225
225
  defaultOptions?: unknown;
226
226
  } | null | undefined;
227
- rentalIncome3?: {
227
+ netProfitAfterTax3?: {
228
228
  validators: mongoose.Types.DocumentArray<{
229
229
  type?: unknown;
230
230
  message?: unknown;
@@ -325,7 +325,7 @@ declare const ApplicantPropertyIncomeModel: mongoose.Model<{
325
325
  yearEnd1?: unknown;
326
326
  yearEnd2?: unknown;
327
327
  yearEnd3?: unknown;
328
- rentalIncome1?: {
328
+ netProfitAfterTax1?: {
329
329
  validators: mongoose.Types.DocumentArray<{
330
330
  type?: unknown;
331
331
  message?: unknown;
@@ -421,7 +421,7 @@ declare const ApplicantPropertyIncomeModel: mongoose.Model<{
421
421
  validateAll?: {} | null | undefined;
422
422
  defaultOptions?: unknown;
423
423
  } | null | undefined;
424
- rentalIncome2?: {
424
+ netProfitAfterTax2?: {
425
425
  validators: mongoose.Types.DocumentArray<{
426
426
  type?: unknown;
427
427
  message?: unknown;
@@ -517,7 +517,7 @@ declare const ApplicantPropertyIncomeModel: mongoose.Model<{
517
517
  validateAll?: {} | null | undefined;
518
518
  defaultOptions?: unknown;
519
519
  } | null | undefined;
520
- rentalIncome3?: {
520
+ netProfitAfterTax3?: {
521
521
  validators: mongoose.Types.DocumentArray<{
522
522
  type?: unknown;
523
523
  message?: unknown;
@@ -618,7 +618,7 @@ declare const ApplicantPropertyIncomeModel: mongoose.Model<{
618
618
  yearEnd1?: unknown;
619
619
  yearEnd2?: unknown;
620
620
  yearEnd3?: unknown;
621
- rentalIncome1?: {
621
+ netProfitAfterTax1?: {
622
622
  validators: mongoose.Types.DocumentArray<{
623
623
  type?: unknown;
624
624
  message?: unknown;
@@ -714,7 +714,7 @@ declare const ApplicantPropertyIncomeModel: mongoose.Model<{
714
714
  validateAll?: {} | null | undefined;
715
715
  defaultOptions?: unknown;
716
716
  } | null | undefined;
717
- rentalIncome2?: {
717
+ netProfitAfterTax2?: {
718
718
  validators: mongoose.Types.DocumentArray<{
719
719
  type?: unknown;
720
720
  message?: unknown;
@@ -810,7 +810,7 @@ declare const ApplicantPropertyIncomeModel: mongoose.Model<{
810
810
  validateAll?: {} | null | undefined;
811
811
  defaultOptions?: unknown;
812
812
  } | null | undefined;
813
- rentalIncome3?: {
813
+ netProfitAfterTax3?: {
814
814
  validators: mongoose.Types.DocumentArray<{
815
815
  type?: unknown;
816
816
  message?: unknown;
@@ -915,33 +915,33 @@ declare const ApplicantPropertyIncomeModel: mongoose.Model<{
915
915
  yearEnd1: number;
916
916
  yearEnd2: number;
917
917
  yearEnd3: number;
918
- rentalIncome1: Pound;
918
+ netProfitAfterTax1: Pound;
919
919
  netProfit1: Pound;
920
- rentalIncome2: Pound;
920
+ netProfitAfterTax2: Pound;
921
921
  netProfit2: Pound;
922
- rentalIncome3: Pound;
922
+ netProfitAfterTax3: Pound;
923
923
  netProfit3: Pound;
924
924
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
925
925
  applicantId: mongoose.Types.ObjectId;
926
926
  yearEnd1: number;
927
927
  yearEnd2: number;
928
928
  yearEnd3: number;
929
- rentalIncome1: Pound;
929
+ netProfitAfterTax1: Pound;
930
930
  netProfit1: Pound;
931
- rentalIncome2: Pound;
931
+ netProfitAfterTax2: Pound;
932
932
  netProfit2: Pound;
933
- rentalIncome3: Pound;
933
+ netProfitAfterTax3: Pound;
934
934
  netProfit3: Pound;
935
935
  }>, {}> & mongoose.FlatRecord<{
936
936
  applicantId: mongoose.Types.ObjectId;
937
937
  yearEnd1: number;
938
938
  yearEnd2: number;
939
939
  yearEnd3: number;
940
- rentalIncome1: Pound;
940
+ netProfitAfterTax1: Pound;
941
941
  netProfit1: Pound;
942
- rentalIncome2: Pound;
942
+ netProfitAfterTax2: Pound;
943
943
  netProfit2: Pound;
944
- rentalIncome3: Pound;
944
+ netProfitAfterTax3: Pound;
945
945
  netProfit3: Pound;
946
946
  }> & {
947
947
  _id: mongoose.Types.ObjectId;
@@ -8,15 +8,15 @@ const propertyIncomeSchema = new mongoose.Schema({
8
8
  },
9
9
  // Latest tax year
10
10
  yearEnd1: { type: Number, required: true },
11
- rentalIncome1: { type: Pound, required: true, get: formatPound },
11
+ netProfitAfterTax1: { type: Pound, required: true, get: formatPound },
12
12
  netProfit1: { type: Pound, required: true, get: formatPound },
13
13
  // Previous tax year
14
14
  yearEnd2: { type: Number, required: true },
15
- rentalIncome2: { type: Pound, required: true, get: formatPound },
15
+ netProfitAfterTax2: { type: Pound, required: true, get: formatPound },
16
16
  netProfit2: { type: Pound, required: true, get: formatPound },
17
17
  // Previous tax year
18
18
  yearEnd3: { type: Number, required: true },
19
- rentalIncome3: { type: Pound, required: true, get: formatPound },
19
+ netProfitAfterTax3: { type: Pound, required: true, get: formatPound },
20
20
  netProfit3: { type: Pound, required: true, get: formatPound }
21
21
  });
22
22
  propertyIncomeSchema.virtual('incomeSourceId').get(function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "1.3.213",
3
+ "version": "1.3.215",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",