@dynamatix/gb-schemas 2.0.8 → 2.0.10

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 (56) hide show
  1. package/dist/applicants/applicant-additional-income.model.d.ts +1120 -0
  2. package/dist/applicants/applicant-additional-income.model.d.ts.map +1 -0
  3. package/dist/applicants/applicant-additional-income.model.js +33 -0
  4. package/dist/applicants/applicant-commitment-creditCard.model.d.ts +3 -3
  5. package/dist/applicants/applicant-commitment-creditCard.model.js +1 -1
  6. package/dist/applicants/applicant-commitment-loan.model.d.ts +3 -3
  7. package/dist/applicants/applicant-commitment-loan.model.js +1 -1
  8. package/dist/applicants/applicant-commitment-mortgage.model.d.ts +3 -3
  9. package/dist/applicants/applicant-commitment-mortgage.model.js +1 -1
  10. package/dist/applicants/applicant-employment-income.model.d.ts +6 -6
  11. package/dist/applicants/applicant-employment-income.model.js +1 -1
  12. package/dist/applicants/applicant-income.model.d.ts +48 -0
  13. package/dist/applicants/applicant-income.model.d.ts.map +1 -1
  14. package/dist/applicants/applicant-income.model.js +16 -0
  15. package/dist/applicants/applicant-pension-income.model.d.ts +483 -0
  16. package/dist/applicants/applicant-pension-income.model.d.ts.map +1 -0
  17. package/dist/applicants/applicant-pension-income.model.js +14 -0
  18. package/dist/applicants/applicant-property-income.model.d.ts +871 -13
  19. package/dist/applicants/applicant-property-income.model.d.ts.map +1 -1
  20. package/dist/applicants/applicant-property-income.model.js +7 -5
  21. package/dist/applicants/applicant-uk-tax-credits.model.d.ts +489 -0
  22. package/dist/applicants/applicant-uk-tax-credits.model.d.ts.map +1 -0
  23. package/dist/applicants/applicant-uk-tax-credits.model.js +11 -0
  24. package/dist/applicants/applicant.model.d.ts +94 -6360
  25. package/dist/applicants/applicant.model.d.ts.map +1 -1
  26. package/dist/applicants/applicant.model.js +5 -14
  27. package/dist/applicants/index.d.ts +4 -0
  28. package/dist/applicants/index.d.ts.map +1 -1
  29. package/dist/applicants/index.js +4 -0
  30. package/dist/applications/application-productfeatures.model.d.ts +765 -0
  31. package/dist/applications/application-productfeatures.model.d.ts.map +1 -0
  32. package/dist/applications/application-productfeatures.model.js +96 -0
  33. package/dist/applications/application.model.d.ts +0 -726
  34. package/dist/applications/application.model.d.ts.map +1 -1
  35. package/dist/applications/application.model.js +0 -2
  36. package/dist/applications/index.d.ts +1 -1
  37. package/dist/applications/index.d.ts.map +1 -1
  38. package/dist/applications/index.js +1 -1
  39. package/dist/entities/applicants/index.d.ts +12 -13
  40. package/dist/entities/applicants/index.d.ts.map +1 -1
  41. package/dist/entities/applicants/index.js +10 -11
  42. package/dist/index.d.ts +0 -1
  43. package/dist/index.d.ts.map +1 -1
  44. package/entities/applications/application.entity.ts +5 -1
  45. package/package.json +2 -2
  46. package/prisma/applicants/applicant.prisma +1 -1
  47. package/prisma/applications/application-company.prisma +6 -6
  48. package/prisma/applications/application-document.prisma +23 -23
  49. package/prisma/applications/application.prisma +80 -88
  50. package/prisma/applications/broker.prisma +1 -1
  51. package/prisma/applications/company.prisma +62 -62
  52. package/prisma/applications/solicitor.prisma +1 -1
  53. package/prisma/product-catalogues/product.prisma +1 -1
  54. package/prisma/properties/security.prisma +1 -1
  55. package/prisma/schema.prisma +173 -180
  56. package/prisma/shared/lookup.prisma +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-productfeatures.model.d.ts","sourceRoot":"","sources":["../../applications/application-productfeatures.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAoGhC,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAsE,CAAC;AAC5G,eAAe,+BAA+B,CAAC"}
@@ -0,0 +1,96 @@
1
+ import mongoose from "mongoose";
2
+ const feeSchema = new mongoose.Schema({
3
+ feeType: { type: String, required: true },
4
+ description: { type: String, required: true },
5
+ feeAmount: { type: String, required: true },
6
+ rate: { type: String, default: 0 },
7
+ addedToLoan: { type: String, default: false },
8
+ allowOverride: { type: String, default: false },
9
+ additionalData: { type: mongoose.Schema.Types.Mixed, default: null }
10
+ });
11
+ const cashflowPeriodSchema = new mongoose.Schema({
12
+ from: { type: String, default: null },
13
+ to: { type: String, default: null },
14
+ instalmentAmount: { type: String, default: null },
15
+ instalmentInterest: { type: String, default: null },
16
+ instalmentCapitalRepaid: { type: String, default: null },
17
+ otherCosts: { type: String, default: 0 },
18
+ outstandingCapital: { type: String, default: null }
19
+ });
20
+ const calculationsSchema = new mongoose.Schema({
21
+ ltv: { type: String, default: null },
22
+ rentalCoverageRatioRate: { type: String, default: null },
23
+ bankContributionRate: { type: String, default: null },
24
+ bankInitialShareRate: { type: String, default: null },
25
+ totalAmountPayable: { type: String, default: null },
26
+ fixedMonthlyPayment: { type: String, default: null },
27
+ fixedMonthlyCapital: { type: String, default: null },
28
+ fixedMonthlyInterest: { type: String, default: null },
29
+ variableMonthlyPayment: { type: String, default: null },
30
+ summaryTotal: { type: String, default: null },
31
+ reimbursementPerPound: { type: String, default: null },
32
+ stressedPayment: { type: String, default: null },
33
+ stressedPaymentRate: { type: String, default: null },
34
+ rentalCoverage: { type: String, default: null },
35
+ rentalCoverageWithoutTopUp: { type: String, default: null }
36
+ });
37
+ const productFeaturesSchema = new mongoose.Schema({
38
+ applicationId: { type: mongoose.Schema.Types.ObjectId, ref: "Application", required: true },
39
+ name: { type: String, required: true },
40
+ clientAdvance: { type: String, required: true },
41
+ ltv: { type: String, required: true },
42
+ repayment: { type: String, required: true },
43
+ variableRepayment: { type: String, required: true },
44
+ reversionRateWithoutBaseRate: { type: String, default: null },
45
+ totalReversionRate: { type: String, default: null },
46
+ initialRate: { type: String, required: true },
47
+ fixedTerm: { type: String, required: true },
48
+ fixedTermEndDate: { type: String, default: null },
49
+ baseRate: { type: String, default: null },
50
+ productRate: { type: String, default: null },
51
+ apr: { type: String, default: null },
52
+ rentalCoverage: { type: String, default: null },
53
+ repaymentType: { type: String, default: null },
54
+ applicationCategory: { type: String, default: null },
55
+ securityType: { type: String, default: null },
56
+ erc: { type: String, default: null },
57
+ loanType: { type: String, default: null },
58
+ maxLtvLimit: { type: String, default: null },
59
+ reimbursement: { type: String, default: null },
60
+ reimbursementPerPound: { type: String, default: null },
61
+ stressedApr: { type: String, default: null },
62
+ stressedRate: { type: String, default: null },
63
+ stressedRepayment: { type: String, default: null },
64
+ liborFloorRate: { type: String, default: null },
65
+ totalTermInMonths: { type: String, default: null },
66
+ chargeType: { type: String, default: '' },
67
+ productCategory: { type: String, default: '' },
68
+ ercCode: { type: String, default: '' },
69
+ variableTerm: { type: String, default: null },
70
+ totalFeePayable: { type: String, default: null },
71
+ dipIssueDate: { type: String, default: null },
72
+ estimatedCompletionDate: { type: String, default: null },
73
+ dipExpiryDate: { type: String, default: null },
74
+ fixedRepaymentUntillDate: { type: String, default: null },
75
+ rentalReviewDate: { type: String, default: null },
76
+ totalReimbursementWithFee: { type: String, default: null },
77
+ finalRentPayment: { type: String, default: null },
78
+ clientDeposit: { type: String, default: null },
79
+ firstRentPayment: { type: String, default: null },
80
+ fees: [feeSchema],
81
+ ercFeatures: { type: mongoose.Schema.Types.Mixed, default: null },
82
+ cashflowPeriods: {
83
+ totalNoOfPayments: { type: String, default: null },
84
+ fixed: cashflowPeriodSchema,
85
+ variable: cashflowPeriodSchema,
86
+ total: cashflowPeriodSchema
87
+ },
88
+ icr: { type: String, default: null },
89
+ ufssProductCode: { type: String, default: null },
90
+ ufssInterestRateCode: { type: String, default: null },
91
+ stressedPayment: { type: String, default: null },
92
+ stressedPaymentRate: { type: String, default: null },
93
+ calculations: calculationsSchema
94
+ });
95
+ const ApplicationProductFeaturesModel = mongoose.model("ApplicationProductFeatures", productFeaturesSchema);
96
+ export default ApplicationProductFeaturesModel;