@dynamatix/gb-schemas 1.3.366 → 1.3.367-broker

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.
Files changed (89) hide show
  1. package/README.md +308 -308
  2. package/dist/applicants/applicant-additional-income.model.d.ts +0 -1
  3. package/dist/applicants/applicant-additional-income.model.d.ts.map +1 -1
  4. package/dist/applicants/applicant-commitment-creditCard.model.d.ts +0 -1
  5. package/dist/applicants/applicant-commitment-creditCard.model.d.ts.map +1 -1
  6. package/dist/applicants/applicant-commitment-loan.model.d.ts +0 -1
  7. package/dist/applicants/applicant-commitment-loan.model.d.ts.map +1 -1
  8. package/dist/applicants/applicant-commitment-mortgage.model.d.ts +0 -1
  9. package/dist/applicants/applicant-commitment-mortgage.model.d.ts.map +1 -1
  10. package/dist/applicants/applicant-commitment-residence.model.d.ts +0 -1
  11. package/dist/applicants/applicant-commitment-residence.model.d.ts.map +1 -1
  12. package/dist/applicants/applicant-commitment-secureLoan.model.d.ts +0 -1
  13. package/dist/applicants/applicant-commitment-secureLoan.model.d.ts.map +1 -1
  14. package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts +0 -1
  15. package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts.map +1 -1
  16. package/dist/applicants/applicant-credit-report.model.d.ts +1052 -1568
  17. package/dist/applicants/applicant-credit-report.model.d.ts.map +1 -1
  18. package/dist/applicants/applicant-credit-report.model.js +35 -45
  19. package/dist/applicants/applicant-credit-report.type.d.ts +4 -22
  20. package/dist/applicants/applicant-credit-report.type.d.ts.map +1 -1
  21. package/dist/applicants/applicant-employment-income.model.d.ts +0 -1
  22. package/dist/applicants/applicant-employment-income.model.d.ts.map +1 -1
  23. package/dist/applicants/applicant-employment.model.d.ts +0 -1
  24. package/dist/applicants/applicant-employment.model.d.ts.map +1 -1
  25. package/dist/applicants/applicant-expenditure.model.d.ts +0 -1
  26. package/dist/applicants/applicant-expenditure.model.d.ts.map +1 -1
  27. package/dist/applicants/applicant-expenditure.model.js +2 -2
  28. package/dist/applicants/applicant-income-summary.model.d.ts +0 -1
  29. package/dist/applicants/applicant-income-summary.model.d.ts.map +1 -1
  30. package/dist/applicants/applicant-pension-income.model.d.ts +0 -1
  31. package/dist/applicants/applicant-pension-income.model.d.ts.map +1 -1
  32. package/dist/applicants/applicant-property-income.model.d.ts +0 -1
  33. package/dist/applicants/applicant-property-income.model.d.ts.map +1 -1
  34. package/dist/applicants/applicant-self-employed-income.model.d.ts +0 -1
  35. package/dist/applicants/applicant-self-employed-income.model.d.ts.map +1 -1
  36. package/dist/applicants/applicant-sole-trader-income.model.d.ts +0 -1
  37. package/dist/applicants/applicant-sole-trader-income.model.d.ts.map +1 -1
  38. package/dist/applicants/applicant-uk-tax-credits.model.d.ts +0 -1
  39. package/dist/applicants/applicant-uk-tax-credits.model.d.ts.map +1 -1
  40. package/dist/applicants/applicant.model.d.ts +552 -160
  41. package/dist/applicants/applicant.model.d.ts.map +1 -1
  42. package/dist/applicants/applicant.model.js +26 -28
  43. package/dist/applications/application-company-model.d.ts +108 -1210
  44. package/dist/applications/application-company-model.d.ts.map +1 -1
  45. package/dist/applications/application-company-model.js +21 -21
  46. package/dist/applications/application-direct-debit.model.d.ts +18 -20
  47. package/dist/applications/application-direct-debit.model.d.ts.map +1 -1
  48. package/dist/applications/application-mortgage.model.d.ts +0 -1
  49. package/dist/applications/application-mortgage.model.d.ts.map +1 -1
  50. package/dist/applications/application-mortgage.type.d.ts +0 -1
  51. package/dist/applications/application-mortgage.type.d.ts.map +1 -1
  52. package/dist/applications/application-product.model.js +3 -3
  53. package/dist/applications/application-productfeatures.model.d.ts +180 -180
  54. package/dist/applications/application-productfeatures.model.d.ts.map +1 -1
  55. package/dist/applications/application-productfeatures.model.js +9 -6
  56. package/dist/applications/application-rationale.model.d.ts +24 -24
  57. package/dist/applications/application-rationale.model.js +1 -1
  58. package/dist/applications/application-valuation.model.d.ts +0 -19
  59. package/dist/applications/application-valuation.model.d.ts.map +1 -1
  60. package/dist/applications/application-valuation.model.js +0 -3
  61. package/dist/applications/application.model.d.ts +174 -162
  62. package/dist/applications/application.model.d.ts.map +1 -1
  63. package/dist/applications/application.model.js +38 -27
  64. package/dist/applications/applications-task.model.d.ts +90 -84
  65. package/dist/applications/applications-task.model.d.ts.map +1 -1
  66. package/dist/applications/applications-task.model.js +16 -11
  67. package/dist/applications/solicitor.model.d.ts +0 -2
  68. package/dist/applications/solicitor.model.d.ts.map +1 -1
  69. package/dist/properties/property.model.d.ts +18 -19
  70. package/dist/properties/property.model.d.ts.map +1 -1
  71. package/dist/properties/security.model.js +33 -33
  72. package/dist/shared/workflow.service.d.ts.map +1 -1
  73. package/dist/shared/workflow.service.js +1 -0
  74. package/dist/users/user.model.js +1 -1
  75. package/package.json +87 -87
  76. package/dist/applicants/applicant-income-source.model.d.ts +0 -26
  77. package/dist/applicants/applicant-income-source.model.d.ts.map +0 -1
  78. package/dist/applicants/applicant-income.model.d.ts +0 -160
  79. package/dist/applicants/applicant-income.model.d.ts.map +0 -1
  80. package/dist/applicants/applicant-other-income.model.d.ts +0 -85
  81. package/dist/applicants/applicant-other-income.model.d.ts.map +0 -1
  82. package/dist/applications/application-document.model.d.ts +0 -158
  83. package/dist/applications/application-document.model.d.ts.map +0 -1
  84. package/dist/applications/document.model.d.ts +0 -158
  85. package/dist/applications/document.model.d.ts.map +0 -1
  86. package/dist/applications/productfeatures.model.d.ts +0 -368
  87. package/dist/applications/productfeatures.model.d.ts.map +0 -1
  88. package/dist/shared/document-type-model.d.ts +0 -48
  89. package/dist/shared/document-type-model.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"applicant.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAOhC,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAmQ5D,QAAA,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA+C,CAAC;AACpE,eAAe,cAAc,CAAC"}
@@ -7,8 +7,8 @@ import { Pound, formatPound } from "../value-objects/pound";
7
7
  import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
8
8
  import { applyWorkflowPlugin } from "../shared/workflow.plugin";
9
9
  const applicantSchema = new mongoose.Schema({
10
- applicantId: { type: String, required: true },
11
- applicationId: { type: mongoose.Schema.Types.ObjectId, ref: "Application", required: true },
10
+ applicantId: { type: String, required: false },
11
+ applicationId: { type: mongoose.Schema.Types.ObjectId, ref: "Application", required: false },
12
12
  serialName: { type: String },
13
13
  addressCity: { type: String, default: null },
14
14
  addressCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
@@ -23,9 +23,9 @@ const applicantSchema = new mongoose.Schema({
23
23
  correspondenceAddressLine2: { type: String, default: null },
24
24
  correspondenceAddressLine3: { type: String, default: null },
25
25
  correspondenceAddressPostCode: { type: String, default: null },
26
- countryOfResidenceLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
27
- positionLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
28
- dateOfBirth: { type: String, required: true },
26
+ countryOfResidenceLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: false },
27
+ positionLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: false },
28
+ dateOfBirth: { type: String, required: false },
29
29
  dependant10Age: { type: Number, default: 0 },
30
30
  dependant1Age: { type: Number, default: 0 },
31
31
  dependant2Age: { type: Number, default: 0 },
@@ -36,9 +36,9 @@ const applicantSchema = new mongoose.Schema({
36
36
  dependant7Age: { type: Number, default: 0 },
37
37
  dependant8Age: { type: Number, default: 0 },
38
38
  dependant9Age: { type: Number, default: 0 },
39
- email: { type: String, required: true },
39
+ email: { type: String, required: false },
40
40
  employmentStatusDetails: { type: String, default: null },
41
- firstName: { type: String, required: true },
41
+ firstName: { type: String, required: false },
42
42
  isFirstTimelandlord: {
43
43
  type: Boolean,
44
44
  default: false,
@@ -60,7 +60,7 @@ const applicantSchema = new mongoose.Schema({
60
60
  type: Boolean,
61
61
  default: false,
62
62
  },
63
- gender: { type: String, required: true },
63
+ gender: { type: String, required: false },
64
64
  hasBrokerGivenConsentForVulnerabilities: {
65
65
  type: Boolean,
66
66
  default: false,
@@ -101,20 +101,20 @@ const applicantSchema = new mongoose.Schema({
101
101
  },
102
102
  isUkResident: {
103
103
  type: Boolean,
104
- required: true,
104
+ default: false
105
105
  },
106
106
  classLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
107
107
  isExpenseOwner: Boolean,
108
108
  pageValidFlag: { type: Boolean, default: false },
109
- lastName: { type: String, required: true },
109
+ lastName: { type: String, required: false },
110
110
  linkedJurisdictionCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
111
111
  linkedJurisdictionDetails: { type: String, default: null },
112
112
  maidenName: { type: String, default: null },
113
- maritalStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
113
+ maritalStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: false },
114
114
  mobileNumber: { type: String, default: null },
115
- nationalityLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
115
+ nationalityLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: false },
116
116
  netIncome: { type: Number, default: 0.00 },
117
- niNumber: { type: String, required: true },
117
+ niNumber: { type: String, required: false },
118
118
  numberOfDependants: { type: Number, default: 0 },
119
119
  isOneYearPrior: {
120
120
  type: Boolean,
@@ -137,38 +137,36 @@ const applicantSchema = new mongoose.Schema({
137
137
  previous2AddressMovedDate: { type: String, default: null },
138
138
  previous2AddressPostCode: { type: String, default: null },
139
139
  previous2AddressPropertyOwnedBy: { type: String, default: null },
140
- relationshipToOthers: { type: String, required: true },
140
+ relationshipToOthers: { type: String, required: false },
141
141
  residentialStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
142
- retirementAge: { type: String, required: true },
143
- taxJurisdictionLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
144
- taxPayerLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
145
- timeResidedAtCountryOfResidence: { type: Number, required: true },
146
- title: { type: String, required: true },
142
+ retirementAge: { type: String, required: false },
143
+ taxJurisdictionLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: false },
144
+ taxPayerLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: false },
145
+ timeResidedAtCountryOfResidence: { type: Number, required: false },
146
+ title: { type: String, required: false },
147
147
  isTwoYearPrior: {
148
148
  type: Boolean,
149
149
  default: false,
150
150
  },
151
151
  understandEnglish: {
152
152
  type: Boolean,
153
- required: true,
153
+ required: false,
154
154
  },
155
155
  vulnerabilityNotes: { type: String, default: null },
156
- vulnerabilityTypeLids: [{ type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true }],
156
+ vulnerabilityTypeLids: [{ type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: false }],
157
157
  ukPassportProfessionLid: {
158
158
  type: mongoose.Schema.Types.ObjectId,
159
159
  ref: "Lookup",
160
- required: function () {
161
- return this.isUkResident;
162
- }
160
+ required: false
163
161
  },
164
162
  proposedFinanceAmount: { type: Pound, default: 0, description: "Proposed finance amount for fixed expenditures, defaults to 0.", get: formatPound },
165
163
  topupAmount: { type: Pound, default: 0, description: "Top-up amount for fixed expenditures, defaults to 0.", get: formatPound },
166
164
  creditCommitments: { type: Pound, default: 0, description: "Total credit commitments amount, defaults to 0.", get: formatPound },
167
- creditData: applicantCreditDataSchema,
168
- riskNarrative: applicantRiskNarrativeSchema,
165
+ creditData: { type: applicantCreditDataSchema, default: null },
166
+ riskNarrative: { type: applicantRiskNarrativeSchema, default: null },
169
167
  incomeSourceId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant_IncomeSettings", default: null },
170
- directDebit: applicantDirectDebitSchema,
171
- creditProfile: creditProfileSchema,
168
+ directDebit: { type: applicantDirectDebitSchema, default: null },
169
+ creditProfile: { type: creditProfileSchema, default: null },
172
170
  employmentInformationId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant_Employment_Information", default: null },
173
171
  selfEmployedInformationId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant_Self_Employment", default: null },
174
172
  incomeSummaryId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant_Income_Summary", default: null },