@dynamatix/gb-schemas 1.3.356 → 1.3.357
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.
|
@@ -127,10 +127,10 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
127
127
|
toISOString?: {} | null | undefined;
|
|
128
128
|
getVarDate?: {} | null | undefined;
|
|
129
129
|
} | null | undefined;
|
|
130
|
-
applicationId?:
|
|
130
|
+
applicationId?: unknown;
|
|
131
131
|
applicantId?: unknown;
|
|
132
132
|
pageValidFlag?: unknown;
|
|
133
|
-
taxJurisdictionLid?:
|
|
133
|
+
taxJurisdictionLid?: unknown;
|
|
134
134
|
addressPostCode?: unknown;
|
|
135
135
|
addressLine1?: unknown;
|
|
136
136
|
addressLine2?: unknown;
|
|
@@ -157,8 +157,8 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
157
157
|
correspondenceAddressLine2?: unknown;
|
|
158
158
|
correspondenceAddressLine3?: unknown;
|
|
159
159
|
correspondenceAddressPostCode?: unknown;
|
|
160
|
-
countryOfResidenceLid?:
|
|
161
|
-
positionLid?:
|
|
160
|
+
countryOfResidenceLid?: unknown;
|
|
161
|
+
positionLid?: unknown;
|
|
162
162
|
dateOfBirth?: unknown;
|
|
163
163
|
dependant10Age?: unknown;
|
|
164
164
|
dependant1Age?: unknown;
|
|
@@ -199,9 +199,9 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
199
199
|
linkedJurisdictionCountryLid?: mongoose.Types.ObjectId | null | undefined;
|
|
200
200
|
linkedJurisdictionDetails?: unknown;
|
|
201
201
|
maidenName?: unknown;
|
|
202
|
-
maritalStatusLid?:
|
|
202
|
+
maritalStatusLid?: unknown;
|
|
203
203
|
mobileNumber?: unknown;
|
|
204
|
-
nationalityLid?:
|
|
204
|
+
nationalityLid?: unknown;
|
|
205
205
|
netIncome?: unknown;
|
|
206
206
|
niNumber?: unknown;
|
|
207
207
|
numberOfDependants?: unknown;
|
|
@@ -609,10 +609,10 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
609
609
|
toISOString?: {} | null | undefined;
|
|
610
610
|
getVarDate?: {} | null | undefined;
|
|
611
611
|
} | null | undefined;
|
|
612
|
-
applicationId?:
|
|
612
|
+
applicationId?: unknown;
|
|
613
613
|
applicantId?: unknown;
|
|
614
614
|
pageValidFlag?: unknown;
|
|
615
|
-
taxJurisdictionLid?:
|
|
615
|
+
taxJurisdictionLid?: unknown;
|
|
616
616
|
addressPostCode?: unknown;
|
|
617
617
|
addressLine1?: unknown;
|
|
618
618
|
addressLine2?: unknown;
|
|
@@ -639,8 +639,8 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
639
639
|
correspondenceAddressLine2?: unknown;
|
|
640
640
|
correspondenceAddressLine3?: unknown;
|
|
641
641
|
correspondenceAddressPostCode?: unknown;
|
|
642
|
-
countryOfResidenceLid?:
|
|
643
|
-
positionLid?:
|
|
642
|
+
countryOfResidenceLid?: unknown;
|
|
643
|
+
positionLid?: unknown;
|
|
644
644
|
dateOfBirth?: unknown;
|
|
645
645
|
dependant10Age?: unknown;
|
|
646
646
|
dependant1Age?: unknown;
|
|
@@ -681,9 +681,9 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
681
681
|
linkedJurisdictionCountryLid?: mongoose.Types.ObjectId | null | undefined;
|
|
682
682
|
linkedJurisdictionDetails?: unknown;
|
|
683
683
|
maidenName?: unknown;
|
|
684
|
-
maritalStatusLid?:
|
|
684
|
+
maritalStatusLid?: unknown;
|
|
685
685
|
mobileNumber?: unknown;
|
|
686
|
-
nationalityLid?:
|
|
686
|
+
nationalityLid?: unknown;
|
|
687
687
|
netIncome?: unknown;
|
|
688
688
|
niNumber?: unknown;
|
|
689
689
|
numberOfDependants?: unknown;
|
|
@@ -1091,10 +1091,10 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1091
1091
|
toISOString?: {} | null | undefined;
|
|
1092
1092
|
getVarDate?: {} | null | undefined;
|
|
1093
1093
|
} | null | undefined;
|
|
1094
|
-
applicationId?:
|
|
1094
|
+
applicationId?: unknown;
|
|
1095
1095
|
applicantId?: unknown;
|
|
1096
1096
|
pageValidFlag?: unknown;
|
|
1097
|
-
taxJurisdictionLid?:
|
|
1097
|
+
taxJurisdictionLid?: unknown;
|
|
1098
1098
|
addressPostCode?: unknown;
|
|
1099
1099
|
addressLine1?: unknown;
|
|
1100
1100
|
addressLine2?: unknown;
|
|
@@ -1121,8 +1121,8 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1121
1121
|
correspondenceAddressLine2?: unknown;
|
|
1122
1122
|
correspondenceAddressLine3?: unknown;
|
|
1123
1123
|
correspondenceAddressPostCode?: unknown;
|
|
1124
|
-
countryOfResidenceLid?:
|
|
1125
|
-
positionLid?:
|
|
1124
|
+
countryOfResidenceLid?: unknown;
|
|
1125
|
+
positionLid?: unknown;
|
|
1126
1126
|
dateOfBirth?: unknown;
|
|
1127
1127
|
dependant10Age?: unknown;
|
|
1128
1128
|
dependant1Age?: unknown;
|
|
@@ -1163,9 +1163,9 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1163
1163
|
linkedJurisdictionCountryLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1164
1164
|
linkedJurisdictionDetails?: unknown;
|
|
1165
1165
|
maidenName?: unknown;
|
|
1166
|
-
maritalStatusLid?:
|
|
1166
|
+
maritalStatusLid?: unknown;
|
|
1167
1167
|
mobileNumber?: unknown;
|
|
1168
|
-
nationalityLid?:
|
|
1168
|
+
nationalityLid?: unknown;
|
|
1169
1169
|
netIncome?: unknown;
|
|
1170
1170
|
niNumber?: unknown;
|
|
1171
1171
|
numberOfDependants?: unknown;
|
|
@@ -1492,10 +1492,7 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1492
1492
|
createdAt: NativeDate;
|
|
1493
1493
|
updatedAt: NativeDate;
|
|
1494
1494
|
} & {
|
|
1495
|
-
applicationId: mongoose.Types.ObjectId;
|
|
1496
|
-
applicantId: string;
|
|
1497
1495
|
pageValidFlag: boolean;
|
|
1498
|
-
taxJurisdictionLid: mongoose.Types.ObjectId;
|
|
1499
1496
|
addressPostCode: string;
|
|
1500
1497
|
addressLine1: string;
|
|
1501
1498
|
addressLine2: string;
|
|
@@ -1508,9 +1505,6 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1508
1505
|
ccjInLastThreeYearNo: string;
|
|
1509
1506
|
defaultsInLastYearNo: string;
|
|
1510
1507
|
};
|
|
1511
|
-
isUkResident: boolean;
|
|
1512
|
-
email: string;
|
|
1513
|
-
firstName: string;
|
|
1514
1508
|
lastName: string;
|
|
1515
1509
|
incomeSourceId: mongoose.Types.ObjectId;
|
|
1516
1510
|
addressMovedDate: string;
|
|
@@ -1520,9 +1514,6 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1520
1514
|
correspondenceAddressLine2: string;
|
|
1521
1515
|
correspondenceAddressLine3: string;
|
|
1522
1516
|
correspondenceAddressPostCode: string;
|
|
1523
|
-
countryOfResidenceLid: mongoose.Types.ObjectId;
|
|
1524
|
-
positionLid: mongoose.Types.ObjectId;
|
|
1525
|
-
dateOfBirth: string;
|
|
1526
1517
|
dependant10Age: number;
|
|
1527
1518
|
dependant1Age: number;
|
|
1528
1519
|
dependant2Age: number;
|
|
@@ -1562,11 +1553,8 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1562
1553
|
linkedJurisdictionCountryLid: mongoose.Types.ObjectId;
|
|
1563
1554
|
linkedJurisdictionDetails: string;
|
|
1564
1555
|
maidenName: string;
|
|
1565
|
-
maritalStatusLid: mongoose.Types.ObjectId;
|
|
1566
1556
|
mobileNumber: string;
|
|
1567
|
-
nationalityLid: mongoose.Types.ObjectId;
|
|
1568
1557
|
netIncome: number;
|
|
1569
|
-
niNumber: string;
|
|
1570
1558
|
numberOfDependants: number;
|
|
1571
1559
|
isOneYearPrior: boolean;
|
|
1572
1560
|
phoneNumber: string;
|
|
@@ -1586,14 +1574,9 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1586
1574
|
previous2AddressMovedDate: string;
|
|
1587
1575
|
previous2AddressPostCode: string;
|
|
1588
1576
|
previous2AddressPropertyOwnedBy: string;
|
|
1589
|
-
relationshipToOthers: string;
|
|
1590
1577
|
residentialStatusLid: mongoose.Types.ObjectId;
|
|
1591
|
-
retirementAge: string;
|
|
1592
1578
|
taxPayerLid: mongoose.Types.ObjectId;
|
|
1593
|
-
timeResidedAtCountryOfResidence: number;
|
|
1594
|
-
title: string;
|
|
1595
1579
|
isTwoYearPrior: boolean;
|
|
1596
|
-
understandEnglish: boolean;
|
|
1597
1580
|
vulnerabilityNotes: string;
|
|
1598
1581
|
vulnerabilityTypeLids: mongoose.Types.ObjectId[];
|
|
1599
1582
|
proposedFinanceAmount: Pound;
|
|
@@ -1641,17 +1624,31 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1641
1624
|
selfEmployedInformationId: mongoose.Types.ObjectId;
|
|
1642
1625
|
incomeSummaryId: mongoose.Types.ObjectId;
|
|
1643
1626
|
expenseONSVersion: string;
|
|
1627
|
+
applicationId?: mongoose.Types.ObjectId | null | undefined;
|
|
1628
|
+
applicantId?: string | null | undefined;
|
|
1629
|
+
taxJurisdictionLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1630
|
+
isUkResident?: boolean | null | undefined;
|
|
1631
|
+
email?: string | null | undefined;
|
|
1632
|
+
firstName?: string | null | undefined;
|
|
1644
1633
|
isExpenseOwner?: boolean | null | undefined;
|
|
1645
1634
|
serialName?: string | null | undefined;
|
|
1635
|
+
countryOfResidenceLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1636
|
+
positionLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1637
|
+
dateOfBirth?: string | null | undefined;
|
|
1638
|
+
maritalStatusLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1639
|
+
nationalityLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1640
|
+
niNumber?: string | null | undefined;
|
|
1641
|
+
relationshipToOthers?: string | null | undefined;
|
|
1642
|
+
retirementAge?: string | null | undefined;
|
|
1643
|
+
timeResidedAtCountryOfResidence?: number | null | undefined;
|
|
1644
|
+
title?: string | null | undefined;
|
|
1645
|
+
understandEnglish?: boolean | null | undefined;
|
|
1646
1646
|
ukPassportProfessionLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1647
1647
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
1648
1648
|
createdAt: NativeDate;
|
|
1649
1649
|
updatedAt: NativeDate;
|
|
1650
1650
|
} & {
|
|
1651
|
-
applicationId: mongoose.Types.ObjectId;
|
|
1652
|
-
applicantId: string;
|
|
1653
1651
|
pageValidFlag: boolean;
|
|
1654
|
-
taxJurisdictionLid: mongoose.Types.ObjectId;
|
|
1655
1652
|
addressPostCode: string;
|
|
1656
1653
|
addressLine1: string;
|
|
1657
1654
|
addressLine2: string;
|
|
@@ -1664,9 +1661,6 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1664
1661
|
ccjInLastThreeYearNo: string;
|
|
1665
1662
|
defaultsInLastYearNo: string;
|
|
1666
1663
|
};
|
|
1667
|
-
isUkResident: boolean;
|
|
1668
|
-
email: string;
|
|
1669
|
-
firstName: string;
|
|
1670
1664
|
lastName: string;
|
|
1671
1665
|
incomeSourceId: mongoose.Types.ObjectId;
|
|
1672
1666
|
addressMovedDate: string;
|
|
@@ -1676,9 +1670,6 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1676
1670
|
correspondenceAddressLine2: string;
|
|
1677
1671
|
correspondenceAddressLine3: string;
|
|
1678
1672
|
correspondenceAddressPostCode: string;
|
|
1679
|
-
countryOfResidenceLid: mongoose.Types.ObjectId;
|
|
1680
|
-
positionLid: mongoose.Types.ObjectId;
|
|
1681
|
-
dateOfBirth: string;
|
|
1682
1673
|
dependant10Age: number;
|
|
1683
1674
|
dependant1Age: number;
|
|
1684
1675
|
dependant2Age: number;
|
|
@@ -1718,11 +1709,8 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1718
1709
|
linkedJurisdictionCountryLid: mongoose.Types.ObjectId;
|
|
1719
1710
|
linkedJurisdictionDetails: string;
|
|
1720
1711
|
maidenName: string;
|
|
1721
|
-
maritalStatusLid: mongoose.Types.ObjectId;
|
|
1722
1712
|
mobileNumber: string;
|
|
1723
|
-
nationalityLid: mongoose.Types.ObjectId;
|
|
1724
1713
|
netIncome: number;
|
|
1725
|
-
niNumber: string;
|
|
1726
1714
|
numberOfDependants: number;
|
|
1727
1715
|
isOneYearPrior: boolean;
|
|
1728
1716
|
phoneNumber: string;
|
|
@@ -1742,14 +1730,9 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1742
1730
|
previous2AddressMovedDate: string;
|
|
1743
1731
|
previous2AddressPostCode: string;
|
|
1744
1732
|
previous2AddressPropertyOwnedBy: string;
|
|
1745
|
-
relationshipToOthers: string;
|
|
1746
1733
|
residentialStatusLid: mongoose.Types.ObjectId;
|
|
1747
|
-
retirementAge: string;
|
|
1748
1734
|
taxPayerLid: mongoose.Types.ObjectId;
|
|
1749
|
-
timeResidedAtCountryOfResidence: number;
|
|
1750
|
-
title: string;
|
|
1751
1735
|
isTwoYearPrior: boolean;
|
|
1752
|
-
understandEnglish: boolean;
|
|
1753
1736
|
vulnerabilityNotes: string;
|
|
1754
1737
|
vulnerabilityTypeLids: mongoose.Types.ObjectId[];
|
|
1755
1738
|
proposedFinanceAmount: Pound;
|
|
@@ -1797,17 +1780,31 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1797
1780
|
selfEmployedInformationId: mongoose.Types.ObjectId;
|
|
1798
1781
|
incomeSummaryId: mongoose.Types.ObjectId;
|
|
1799
1782
|
expenseONSVersion: string;
|
|
1783
|
+
applicationId?: mongoose.Types.ObjectId | null | undefined;
|
|
1784
|
+
applicantId?: string | null | undefined;
|
|
1785
|
+
taxJurisdictionLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1786
|
+
isUkResident?: boolean | null | undefined;
|
|
1787
|
+
email?: string | null | undefined;
|
|
1788
|
+
firstName?: string | null | undefined;
|
|
1800
1789
|
isExpenseOwner?: boolean | null | undefined;
|
|
1801
1790
|
serialName?: string | null | undefined;
|
|
1791
|
+
countryOfResidenceLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1792
|
+
positionLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1793
|
+
dateOfBirth?: string | null | undefined;
|
|
1794
|
+
maritalStatusLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1795
|
+
nationalityLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1796
|
+
niNumber?: string | null | undefined;
|
|
1797
|
+
relationshipToOthers?: string | null | undefined;
|
|
1798
|
+
retirementAge?: string | null | undefined;
|
|
1799
|
+
timeResidedAtCountryOfResidence?: number | null | undefined;
|
|
1800
|
+
title?: string | null | undefined;
|
|
1801
|
+
understandEnglish?: boolean | null | undefined;
|
|
1802
1802
|
ukPassportProfessionLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1803
1803
|
}>, {}> & mongoose.FlatRecord<{
|
|
1804
1804
|
createdAt: NativeDate;
|
|
1805
1805
|
updatedAt: NativeDate;
|
|
1806
1806
|
} & {
|
|
1807
|
-
applicationId: mongoose.Types.ObjectId;
|
|
1808
|
-
applicantId: string;
|
|
1809
1807
|
pageValidFlag: boolean;
|
|
1810
|
-
taxJurisdictionLid: mongoose.Types.ObjectId;
|
|
1811
1808
|
addressPostCode: string;
|
|
1812
1809
|
addressLine1: string;
|
|
1813
1810
|
addressLine2: string;
|
|
@@ -1820,9 +1817,6 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1820
1817
|
ccjInLastThreeYearNo: string;
|
|
1821
1818
|
defaultsInLastYearNo: string;
|
|
1822
1819
|
};
|
|
1823
|
-
isUkResident: boolean;
|
|
1824
|
-
email: string;
|
|
1825
|
-
firstName: string;
|
|
1826
1820
|
lastName: string;
|
|
1827
1821
|
incomeSourceId: mongoose.Types.ObjectId;
|
|
1828
1822
|
addressMovedDate: string;
|
|
@@ -1832,9 +1826,6 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1832
1826
|
correspondenceAddressLine2: string;
|
|
1833
1827
|
correspondenceAddressLine3: string;
|
|
1834
1828
|
correspondenceAddressPostCode: string;
|
|
1835
|
-
countryOfResidenceLid: mongoose.Types.ObjectId;
|
|
1836
|
-
positionLid: mongoose.Types.ObjectId;
|
|
1837
|
-
dateOfBirth: string;
|
|
1838
1829
|
dependant10Age: number;
|
|
1839
1830
|
dependant1Age: number;
|
|
1840
1831
|
dependant2Age: number;
|
|
@@ -1874,11 +1865,8 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1874
1865
|
linkedJurisdictionCountryLid: mongoose.Types.ObjectId;
|
|
1875
1866
|
linkedJurisdictionDetails: string;
|
|
1876
1867
|
maidenName: string;
|
|
1877
|
-
maritalStatusLid: mongoose.Types.ObjectId;
|
|
1878
1868
|
mobileNumber: string;
|
|
1879
|
-
nationalityLid: mongoose.Types.ObjectId;
|
|
1880
1869
|
netIncome: number;
|
|
1881
|
-
niNumber: string;
|
|
1882
1870
|
numberOfDependants: number;
|
|
1883
1871
|
isOneYearPrior: boolean;
|
|
1884
1872
|
phoneNumber: string;
|
|
@@ -1898,14 +1886,9 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1898
1886
|
previous2AddressMovedDate: string;
|
|
1899
1887
|
previous2AddressPostCode: string;
|
|
1900
1888
|
previous2AddressPropertyOwnedBy: string;
|
|
1901
|
-
relationshipToOthers: string;
|
|
1902
1889
|
residentialStatusLid: mongoose.Types.ObjectId;
|
|
1903
|
-
retirementAge: string;
|
|
1904
1890
|
taxPayerLid: mongoose.Types.ObjectId;
|
|
1905
|
-
timeResidedAtCountryOfResidence: number;
|
|
1906
|
-
title: string;
|
|
1907
1891
|
isTwoYearPrior: boolean;
|
|
1908
|
-
understandEnglish: boolean;
|
|
1909
1892
|
vulnerabilityNotes: string;
|
|
1910
1893
|
vulnerabilityTypeLids: mongoose.Types.ObjectId[];
|
|
1911
1894
|
proposedFinanceAmount: Pound;
|
|
@@ -1953,8 +1936,25 @@ declare const ApplicantModel: mongoose.Model<{
|
|
|
1953
1936
|
selfEmployedInformationId: mongoose.Types.ObjectId;
|
|
1954
1937
|
incomeSummaryId: mongoose.Types.ObjectId;
|
|
1955
1938
|
expenseONSVersion: string;
|
|
1939
|
+
applicationId?: mongoose.Types.ObjectId | null | undefined;
|
|
1940
|
+
applicantId?: string | null | undefined;
|
|
1941
|
+
taxJurisdictionLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1942
|
+
isUkResident?: boolean | null | undefined;
|
|
1943
|
+
email?: string | null | undefined;
|
|
1944
|
+
firstName?: string | null | undefined;
|
|
1956
1945
|
isExpenseOwner?: boolean | null | undefined;
|
|
1957
1946
|
serialName?: string | null | undefined;
|
|
1947
|
+
countryOfResidenceLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1948
|
+
positionLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1949
|
+
dateOfBirth?: string | null | undefined;
|
|
1950
|
+
maritalStatusLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1951
|
+
nationalityLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1952
|
+
niNumber?: string | null | undefined;
|
|
1953
|
+
relationshipToOthers?: string | null | undefined;
|
|
1954
|
+
retirementAge?: string | null | undefined;
|
|
1955
|
+
timeResidedAtCountryOfResidence?: number | null | undefined;
|
|
1956
|
+
title?: string | null | undefined;
|
|
1957
|
+
understandEnglish?: boolean | null | undefined;
|
|
1958
1958
|
ukPassportProfessionLid?: mongoose.Types.ObjectId | null | undefined;
|
|
1959
1959
|
}> & {
|
|
1960
1960
|
_id: mongoose.Types.ObjectId;
|
|
@@ -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:
|
|
11
|
-
applicationId: { type: mongoose.Schema.Types.ObjectId, ref: "Application", required:
|
|
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:
|
|
27
|
-
positionLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required:
|
|
28
|
-
dateOfBirth: { type: String, required:
|
|
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:
|
|
39
|
+
email: { type: String, required: false },
|
|
40
40
|
employmentStatusDetails: { type: String, default: null },
|
|
41
|
-
firstName: { type: String, required:
|
|
41
|
+
firstName: { type: String, required: false },
|
|
42
42
|
isFirstTimelandlord: {
|
|
43
43
|
type: Boolean,
|
|
44
44
|
default: false,
|
|
@@ -101,7 +101,7 @@ const applicantSchema = new mongoose.Schema({
|
|
|
101
101
|
},
|
|
102
102
|
isUkResident: {
|
|
103
103
|
type: Boolean,
|
|
104
|
-
required:
|
|
104
|
+
required: false,
|
|
105
105
|
},
|
|
106
106
|
classLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
107
107
|
isExpenseOwner: Boolean,
|
|
@@ -110,11 +110,11 @@ const applicantSchema = new mongoose.Schema({
|
|
|
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:
|
|
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:
|
|
115
|
+
nationalityLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: false },
|
|
116
116
|
netIncome: { type: Number, default: 0.00 },
|
|
117
|
-
niNumber: { type: String, required:
|
|
117
|
+
niNumber: { type: String, required: false },
|
|
118
118
|
numberOfDependants: { type: Number, default: 0 },
|
|
119
119
|
isOneYearPrior: {
|
|
120
120
|
type: Boolean,
|
|
@@ -137,23 +137,23 @@ 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:
|
|
140
|
+
relationshipToOthers: { type: String, required: false },
|
|
141
141
|
residentialStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
142
|
-
retirementAge: { type: String, required:
|
|
143
|
-
taxJurisdictionLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required:
|
|
142
|
+
retirementAge: { type: String, required: false },
|
|
143
|
+
taxJurisdictionLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: false },
|
|
144
144
|
taxPayerLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
145
|
-
timeResidedAtCountryOfResidence: { type: Number, required:
|
|
146
|
-
title: { type: String, required:
|
|
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:
|
|
153
|
+
required: false,
|
|
154
154
|
},
|
|
155
155
|
vulnerabilityNotes: { type: String, default: null },
|
|
156
|
-
vulnerabilityTypeLids: [{ type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required:
|
|
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",
|
|
@@ -35,19 +35,19 @@ declare const ApplicationCompanyModel: mongoose.Model<{
|
|
|
35
35
|
tradingSince: string;
|
|
36
36
|
yearEnd: string;
|
|
37
37
|
applicantShareholding: mongoose.Types.DocumentArray<{
|
|
38
|
-
applicantId: mongoose.Types.ObjectId;
|
|
39
38
|
applicantName: string;
|
|
40
39
|
shareholding: number;
|
|
40
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
41
41
|
directorShareholderLid?: unknown;
|
|
42
42
|
}, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
|
|
43
|
-
applicantId: mongoose.Types.ObjectId;
|
|
44
43
|
applicantName: string;
|
|
45
44
|
shareholding: number;
|
|
45
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
46
46
|
directorShareholderLid?: unknown;
|
|
47
47
|
}> & {
|
|
48
|
-
applicantId: mongoose.Types.ObjectId;
|
|
49
48
|
applicantName: string;
|
|
50
49
|
shareholding: number;
|
|
50
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
51
51
|
directorShareholderLid?: unknown;
|
|
52
52
|
}>;
|
|
53
53
|
sicCodes: string[];
|
|
@@ -99,19 +99,19 @@ declare const ApplicationCompanyModel: mongoose.Model<{
|
|
|
99
99
|
tradingSince: string;
|
|
100
100
|
yearEnd: string;
|
|
101
101
|
applicantShareholding: mongoose.Types.DocumentArray<{
|
|
102
|
-
applicantId: mongoose.Types.ObjectId;
|
|
103
102
|
applicantName: string;
|
|
104
103
|
shareholding: number;
|
|
104
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
105
105
|
directorShareholderLid?: unknown;
|
|
106
106
|
}, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
|
|
107
|
-
applicantId: mongoose.Types.ObjectId;
|
|
108
107
|
applicantName: string;
|
|
109
108
|
shareholding: number;
|
|
109
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
110
110
|
directorShareholderLid?: unknown;
|
|
111
111
|
}> & {
|
|
112
|
-
applicantId: mongoose.Types.ObjectId;
|
|
113
112
|
applicantName: string;
|
|
114
113
|
shareholding: number;
|
|
114
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
115
115
|
directorShareholderLid?: unknown;
|
|
116
116
|
}>;
|
|
117
117
|
sicCodes: string[];
|
|
@@ -163,19 +163,19 @@ declare const ApplicationCompanyModel: mongoose.Model<{
|
|
|
163
163
|
tradingSince: string;
|
|
164
164
|
yearEnd: string;
|
|
165
165
|
applicantShareholding: mongoose.Types.DocumentArray<{
|
|
166
|
-
applicantId: mongoose.Types.ObjectId;
|
|
167
166
|
applicantName: string;
|
|
168
167
|
shareholding: number;
|
|
168
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
169
169
|
directorShareholderLid?: unknown;
|
|
170
170
|
}, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
|
|
171
|
-
applicantId: mongoose.Types.ObjectId;
|
|
172
171
|
applicantName: string;
|
|
173
172
|
shareholding: number;
|
|
173
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
174
174
|
directorShareholderLid?: unknown;
|
|
175
175
|
}> & {
|
|
176
|
-
applicantId: mongoose.Types.ObjectId;
|
|
177
176
|
applicantName: string;
|
|
178
177
|
shareholding: number;
|
|
178
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
179
179
|
directorShareholderLid?: unknown;
|
|
180
180
|
}>;
|
|
181
181
|
sicCodes: string[];
|
|
@@ -241,19 +241,19 @@ declare const ApplicationCompanyModel: mongoose.Model<{
|
|
|
241
241
|
tradingSince: string;
|
|
242
242
|
yearEnd: string;
|
|
243
243
|
applicantShareholding: mongoose.Types.DocumentArray<{
|
|
244
|
-
applicantId: mongoose.Types.ObjectId;
|
|
245
244
|
applicantName: string;
|
|
246
245
|
shareholding: number;
|
|
246
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
247
247
|
directorShareholderLid?: unknown;
|
|
248
248
|
}, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
|
|
249
|
-
applicantId: mongoose.Types.ObjectId;
|
|
250
249
|
applicantName: string;
|
|
251
250
|
shareholding: number;
|
|
251
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
252
252
|
directorShareholderLid?: unknown;
|
|
253
253
|
}> & {
|
|
254
|
-
applicantId: mongoose.Types.ObjectId;
|
|
255
254
|
applicantName: string;
|
|
256
255
|
shareholding: number;
|
|
256
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
257
257
|
directorShareholderLid?: unknown;
|
|
258
258
|
}>;
|
|
259
259
|
sicCodes: string[];
|
|
@@ -305,19 +305,19 @@ declare const ApplicationCompanyModel: mongoose.Model<{
|
|
|
305
305
|
tradingSince: string;
|
|
306
306
|
yearEnd: string;
|
|
307
307
|
applicantShareholding: mongoose.Types.DocumentArray<{
|
|
308
|
-
applicantId: mongoose.Types.ObjectId;
|
|
309
308
|
applicantName: string;
|
|
310
309
|
shareholding: number;
|
|
310
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
311
311
|
directorShareholderLid?: unknown;
|
|
312
312
|
}, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
|
|
313
|
-
applicantId: mongoose.Types.ObjectId;
|
|
314
313
|
applicantName: string;
|
|
315
314
|
shareholding: number;
|
|
315
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
316
316
|
directorShareholderLid?: unknown;
|
|
317
317
|
}> & {
|
|
318
|
-
applicantId: mongoose.Types.ObjectId;
|
|
319
318
|
applicantName: string;
|
|
320
319
|
shareholding: number;
|
|
320
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
321
321
|
directorShareholderLid?: unknown;
|
|
322
322
|
}>;
|
|
323
323
|
sicCodes: string[];
|
|
@@ -369,19 +369,19 @@ declare const ApplicationCompanyModel: mongoose.Model<{
|
|
|
369
369
|
tradingSince: string;
|
|
370
370
|
yearEnd: string;
|
|
371
371
|
applicantShareholding: mongoose.Types.DocumentArray<{
|
|
372
|
-
applicantId: mongoose.Types.ObjectId;
|
|
373
372
|
applicantName: string;
|
|
374
373
|
shareholding: number;
|
|
374
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
375
375
|
directorShareholderLid?: unknown;
|
|
376
376
|
}, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
|
|
377
|
-
applicantId: mongoose.Types.ObjectId;
|
|
378
377
|
applicantName: string;
|
|
379
378
|
shareholding: number;
|
|
379
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
380
380
|
directorShareholderLid?: unknown;
|
|
381
381
|
}> & {
|
|
382
|
-
applicantId: mongoose.Types.ObjectId;
|
|
383
382
|
applicantName: string;
|
|
384
383
|
shareholding: number;
|
|
384
|
+
applicantId?: mongoose.Types.ObjectId | null | undefined;
|
|
385
385
|
directorShareholderLid?: unknown;
|
|
386
386
|
}>;
|
|
387
387
|
sicCodes: string[];
|
|
@@ -2,7 +2,7 @@ import mongoose from "mongoose";
|
|
|
2
2
|
import { Pound, formatPound } from "./../value-objects/pound";
|
|
3
3
|
import { AccountNumber } from "../value-objects/account-number";
|
|
4
4
|
const ApplicantShareholdingSchema = new mongoose.Schema({
|
|
5
|
-
applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required:
|
|
5
|
+
applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: false, default: null },
|
|
6
6
|
applicantName: { type: String, default: "" },
|
|
7
7
|
directorShareholderLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup" },
|
|
8
8
|
shareholding: { type: Number, min: 0, max: 100, default: null }
|
|
@@ -27,7 +27,7 @@ const companySchema = new mongoose.Schema({
|
|
|
27
27
|
addressLine3: { type: String, default: '', maxlength: 35 }, // form
|
|
28
28
|
addressCity: { type: String, default: '', maxlength: 30 }, // form
|
|
29
29
|
addressCountryLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: false }, // form
|
|
30
|
-
applicationTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required:
|
|
30
|
+
applicationTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: false }, // form
|
|
31
31
|
applicantShareholding: [ApplicantShareholdingSchema], // form
|
|
32
32
|
yearEnd1: { type: Number, required: false, max: 9999 }, // form
|
|
33
33
|
turnoverYear1: { type: Pound, required: false, default: 0.00, get: formatPound }, // form
|