@pdtf/schemas 2.0.0-24 → 2.0.0-25

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdtf/schemas",
3
- "version": "2.0.0-24",
3
+ "version": "2.0.0-25",
4
4
  "description": "Property Data Trust Framework Schemas and Utilities",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -144,6 +144,10 @@
144
144
  "disputesAndComplaints": {
145
145
  "hasDisputesAndComplaints": {
146
146
  "yesNo": "No"
147
+ },
148
+ "leadingToDisputesAndComplaints": {
149
+ "yesNo": "Yes",
150
+ "details": "Neighbour's dog barking"
147
151
  }
148
152
  },
149
153
  "alterationsAndChanges": {
@@ -4,9 +4,8 @@
4
4
  "type": "object",
5
5
  "title": "Property Data Trust Framework Transaction Schema",
6
6
  "description": "A schema defining the PDTF transaction data structure, supporting mapping to BASPI, Law Society and RICS Data Schema elements.",
7
- "baspiRequired": ["transactionId", "status", "participants", "propertyPack"],
8
- "ta6Required": ["transactionId", "status", "participants", "propertyPack"],
9
-
7
+ "baspiRequired": ["participants", "propertyPack"],
8
+ "ta6Required": ["participants", "propertyPack"],
10
9
  "properties": {
11
10
  "$schema": {
12
11
  "type": "string"
@@ -127,8 +126,11 @@
127
126
  },
128
127
  "propertyPack": {
129
128
  "baspiRef": "-",
129
+ "ta6Ref": "-",
130
130
  "title": "Property Pack",
131
131
  "type": "object",
132
+ "baspiRequired": ["materialFacts", "additionalLegalInfo"],
133
+ "ta6Required": ["materialFacts", "additionalLegalInfo"],
132
134
  "properties": {
133
135
  "materialFacts": {
134
136
  "type": "object",
@@ -162,9 +164,7 @@
162
164
  "consumerProtectionRegulationsDeclaration"
163
165
  ],
164
166
  "ta6Required": [
165
- "uprn",
166
167
  "address",
167
- "delayFactors",
168
168
  "ownership",
169
169
  "parking",
170
170
  "listingAndConservation",
@@ -175,13 +175,13 @@
175
175
  "alterationsAndChanges",
176
176
  "notices",
177
177
  "specialistIssues",
178
- "fixturesAndFittings",
179
178
  "waterAndDrainage",
180
179
  "connectedUtilities",
181
180
  "centralHeating",
182
181
  "insurance",
183
182
  "rightsAndInformalArrangements",
184
- "environmentalIssues"
183
+ "environmentalIssues",
184
+ "additionalInformation"
185
185
  ],
186
186
  "properties": {
187
187
  "address": {
@@ -8133,8 +8133,14 @@
8133
8133
  "ta6Ref": "2",
8134
8134
  "title": "Disputes and Complaints",
8135
8135
  "type": "object",
8136
- "baspiRequired": ["hasDisputesAndComplaints"],
8137
- "ta6Required": ["hasDisputesAndComplaints"],
8136
+ "baspiRequired": [
8137
+ "hasDisputesAndComplaints",
8138
+ "leadingToDisputesAndComplaints"
8139
+ ],
8140
+ "ta6Required": [
8141
+ "hasDisputesAndComplaints",
8142
+ "leadingToDisputesAndComplaints"
8143
+ ],
8138
8144
  "properties": {
8139
8145
  "hasDisputesAndComplaints": {
8140
8146
  "baspiRef": "A2.1.1",
@@ -8291,7 +8297,7 @@
8291
8297
  },
8292
8298
  "details": {
8293
8299
  "baspiRef": "A3.1.2",
8294
- "ta6Ref": "4.1a1",
8300
+ "ta6Ref": "4.1a2",
8295
8301
  "title": "Please give details including dates of all work undertaken",
8296
8302
  "type": "string",
8297
8303
  "minLength": 1
@@ -8324,7 +8330,7 @@
8324
8330
  },
8325
8331
  "attachments": {
8326
8332
  "baspiRef": "A3.5.1.3",
8327
- "ta6Ref": "4.2.2",
8333
+ "ta6Ref": "4.2a",
8328
8334
  "title": "Please provide a copy of the documents",
8329
8335
  "type": "string",
8330
8336
  "enum": ["Attached", "To follow"]
@@ -8340,7 +8346,7 @@
8340
8346
  },
8341
8347
  "details": {
8342
8348
  "baspiRef": "A3.5.1.2",
8343
- "ta6Ref": "4.2.3",
8349
+ "ta6Ref": "4.2b",
8344
8350
  "title": "Please outline the reasons why",
8345
8351
  "description": "e.g. the work was exempt from Building Regulations",
8346
8352
  "type": "string",
@@ -8379,7 +8385,7 @@
8379
8385
  },
8380
8386
  "attachments": {
8381
8387
  "baspiRef": "A3.5.2.3",
8382
- "ta6Ref": "4.2.2",
8388
+ "ta6Ref": "4.2a",
8383
8389
  "title": "Please provide a copy of the documents",
8384
8390
  "type": "string",
8385
8391
  "enum": ["Attached", "To follow"]
@@ -8395,7 +8401,7 @@
8395
8401
  },
8396
8402
  "details": {
8397
8403
  "baspiRef": "A3.5.2.2",
8398
- "ta6Ref": "4.2.3",
8404
+ "ta6Ref": "4.2b",
8399
8405
  "title": "Please outline the reasons why",
8400
8406
  "description": "e.g. permitted development rights applied",
8401
8407
  "type": "string",
@@ -8593,7 +8599,7 @@
8593
8599
  },
8594
8600
  "attachments": {
8595
8601
  "baspiRef": "A3.5.1.3",
8596
- "ta6Ref": "4.2.2",
8602
+ "ta6Ref": "4.2a",
8597
8603
  "title": "Please provide a copy of the documents",
8598
8604
  "type": "string",
8599
8605
  "enum": ["Attached", "To follow"]
@@ -8609,7 +8615,7 @@
8609
8615
  },
8610
8616
  "details": {
8611
8617
  "baspiRef": "A3.5.1.2",
8612
- "ta6Ref": "4.2.3",
8618
+ "ta6Ref": "4.2b",
8613
8619
  "title": "Please outline the reasons why",
8614
8620
  "description": "e.g. the work was exempt from Building Regulations",
8615
8621
  "type": "string",
@@ -8649,7 +8655,7 @@
8649
8655
  },
8650
8656
  "attachments": {
8651
8657
  "baspiRef": "A3.5.1.3",
8652
- "ta6Ref": "4.2.2",
8658
+ "ta6Ref": "4.2a",
8653
8659
  "title": "Please provide a copy of the documents",
8654
8660
  "type": "string",
8655
8661
  "enum": ["Attached", "To follow"]
@@ -8665,7 +8671,7 @@
8665
8671
  },
8666
8672
  "details": {
8667
8673
  "baspiRef": "A3.5.2.2",
8668
- "ta6Ref": "4.2.3",
8674
+ "ta6Ref": "4.2b",
8669
8675
  "title": "Please outline the reasons why",
8670
8676
  "description": "e.g. permitted development rights applied",
8671
8677
  "type": "string",
@@ -8863,7 +8869,7 @@
8863
8869
  },
8864
8870
  "attachments": {
8865
8871
  "baspiRef": "A3.5.1.3",
8866
- "ta6Ref": "4.2.2",
8872
+ "ta6Ref": "4.2a",
8867
8873
  "title": "Please provide a copy of the documents",
8868
8874
  "type": "string",
8869
8875
  "enum": ["Attached", "To follow"]
@@ -8879,7 +8885,7 @@
8879
8885
  },
8880
8886
  "details": {
8881
8887
  "baspiRef": "A3.5.1.2",
8882
- "ta6Ref": "4.2.3",
8888
+ "ta6Ref": "4.2b",
8883
8889
  "title": "Please outline the reasons why",
8884
8890
  "description": "e.g. the work was exempt from Building Regulations",
8885
8891
  "type": "string",
@@ -8919,7 +8925,7 @@
8919
8925
  },
8920
8926
  "attachments": {
8921
8927
  "baspiRef": "A3.5.2.3",
8922
- "ta6Ref": "4.2.2",
8928
+ "ta6Ref": "4.2a",
8923
8929
  "title": "Please provide a copy of the documents",
8924
8930
  "type": "string",
8925
8931
  "enum": ["Attached", "To follow"]
@@ -8935,7 +8941,7 @@
8935
8941
  },
8936
8942
  "details": {
8937
8943
  "baspiRef": "A3.5.2.2",
8938
- "ta6Ref": "4.2.3",
8944
+ "ta6Ref": "4.2b",
8939
8945
  "title": "Please outline the reasons why",
8940
8946
  "description": "e.g. permitted development rights applied",
8941
8947
  "type": "string",
@@ -9133,7 +9139,7 @@
9133
9139
  },
9134
9140
  "attachments": {
9135
9141
  "baspiRef": "A3.5.1.3",
9136
- "ta6Ref": "4.2.2",
9142
+ "ta6Ref": "4.2a",
9137
9143
  "title": "Please provide a copy of the documents",
9138
9144
  "type": "string",
9139
9145
  "enum": ["Attached", "To follow"]
@@ -9149,7 +9155,7 @@
9149
9155
  },
9150
9156
  "details": {
9151
9157
  "baspiRef": "A3.5.1.2",
9152
- "ta6Ref": "4.2.3",
9158
+ "ta6Ref": "4.2b",
9153
9159
  "title": "Please outline the reasons why",
9154
9160
  "description": "e.g. the work was exempt from Building Regulations",
9155
9161
  "type": "string",
@@ -9189,7 +9195,7 @@
9189
9195
  },
9190
9196
  "attachments": {
9191
9197
  "baspiRef": "A3.5.2.3",
9192
- "ta6Ref": "4.2.2",
9198
+ "ta6Ref": "4.2a",
9193
9199
  "title": "Please provide a copy of the documents",
9194
9200
  "type": "string",
9195
9201
  "enum": ["Attached", "To follow"]
@@ -9205,7 +9211,7 @@
9205
9211
  },
9206
9212
  "details": {
9207
9213
  "baspiRef": "A3.5.2.2",
9208
- "ta6Ref": "4.2.3",
9214
+ "ta6Ref": "4.2b",
9209
9215
  "title": "Please outline the reasons why",
9210
9216
  "description": "e.g. permitted development rights applied",
9211
9217
  "type": "string",
@@ -9839,6 +9845,7 @@
9839
9845
  },
9840
9846
  "attachments": {
9841
9847
  "baspiRef": "A4.6.3",
9848
+ "ta6Ref": "1.6.3",
9842
9849
  "title": "Attachments",
9843
9850
  "type": "string",
9844
9851
  "enum": ["Attached", "To follow"]
@@ -19624,7 +19631,6 @@
19624
19631
  "legalBoundaries",
19625
19632
  "servicesCrossing",
19626
19633
  "energyAndMeters",
19627
- "smartHomeSystems",
19628
19634
  "guaranteesWarrantiesAndIndemnityInsurances",
19629
19635
  "occupiers",
19630
19636
  "completionAndMoving",
@@ -2,8 +2,6 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://trust.propdata.org.uk/schemas/v2/overlays/baspi.json",
4
4
  "required": [
5
- "transactionId",
6
- "status",
7
5
  "participants",
8
6
  "propertyPack"
9
7
  ],
@@ -34,6 +32,10 @@
34
32
  "propertyPack": {
35
33
  "baspiRef": "-",
36
34
  "title": "Property Pack",
35
+ "required": [
36
+ "materialFacts",
37
+ "additionalLegalInfo"
38
+ ],
37
39
  "properties": {
38
40
  "materialFacts": {
39
41
  "baspiRef": "A",
@@ -1844,7 +1846,8 @@
1844
1846
  "baspiRef": "A2",
1845
1847
  "title": "Disputes and Complaints",
1846
1848
  "required": [
1847
- "hasDisputesAndComplaints"
1849
+ "hasDisputesAndComplaints",
1850
+ "leadingToDisputesAndComplaints"
1848
1851
  ],
1849
1852
  "properties": {
1850
1853
  "hasDisputesAndComplaints": {
@@ -2,19 +2,21 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://trust.propdata.org.uk/schemas/v2/overlays/ta6.json",
4
4
  "required": [
5
- "transactionId",
6
- "status",
7
5
  "participants",
8
6
  "propertyPack"
9
7
  ],
10
8
  "properties": {
11
9
  "propertyPack": {
10
+ "ta6Ref": "-",
11
+ "title": "Property Pack",
12
+ "required": [
13
+ "materialFacts",
14
+ "additionalLegalInfo"
15
+ ],
12
16
  "properties": {
13
17
  "materialFacts": {
14
18
  "required": [
15
- "uprn",
16
19
  "address",
17
- "delayFactors",
18
20
  "ownership",
19
21
  "parking",
20
22
  "listingAndConservation",
@@ -25,13 +27,13 @@
25
27
  "alterationsAndChanges",
26
28
  "notices",
27
29
  "specialistIssues",
28
- "fixturesAndFittings",
29
30
  "waterAndDrainage",
30
31
  "connectedUtilities",
31
32
  "centralHeating",
32
33
  "insurance",
33
34
  "rightsAndInformalArrangements",
34
- "environmentalIssues"
35
+ "environmentalIssues",
36
+ "additionalInformation"
35
37
  ],
36
38
  "properties": {
37
39
  "address": {
@@ -488,7 +490,8 @@
488
490
  "ta6Ref": "2",
489
491
  "title": "Disputes and Complaints",
490
492
  "required": [
491
- "hasDisputesAndComplaints"
493
+ "hasDisputesAndComplaints",
494
+ "leadingToDisputesAndComplaints"
492
495
  ],
493
496
  "properties": {
494
497
  "hasDisputesAndComplaints": {
@@ -624,7 +627,7 @@
624
627
  ]
625
628
  },
626
629
  "details": {
627
- "ta6Ref": "4.1a1",
630
+ "ta6Ref": "4.1a2",
628
631
  "title": "Please give details including dates of all work undertaken"
629
632
  },
630
633
  "buildingRegApproval": {
@@ -642,7 +645,7 @@
642
645
  ]
643
646
  },
644
647
  "attachments": {
645
- "ta6Ref": "4.2.2",
648
+ "ta6Ref": "4.2a",
646
649
  "title": "Please provide a copy of the documents",
647
650
  "enum": [
648
651
  "Attached",
@@ -663,7 +666,7 @@
663
666
  ]
664
667
  },
665
668
  "details": {
666
- "ta6Ref": "4.2.3",
669
+ "ta6Ref": "4.2b",
667
670
  "title": "Please outline the reasons why",
668
671
  "description": "e.g. the work was exempt from Building Regulations"
669
672
  }
@@ -702,7 +705,7 @@
702
705
  ]
703
706
  },
704
707
  "attachments": {
705
- "ta6Ref": "4.2.2",
708
+ "ta6Ref": "4.2a",
706
709
  "title": "Please provide a copy of the documents",
707
710
  "enum": [
708
711
  "Attached",
@@ -723,7 +726,7 @@
723
726
  ]
724
727
  },
725
728
  "details": {
726
- "ta6Ref": "4.2.3",
729
+ "ta6Ref": "4.2b",
727
730
  "title": "Please outline the reasons why",
728
731
  "description": "e.g. permitted development rights applied"
729
732
  }
@@ -809,7 +812,7 @@
809
812
  ]
810
813
  },
811
814
  "attachments": {
812
- "ta6Ref": "4.2.2",
815
+ "ta6Ref": "4.2a",
813
816
  "title": "Please provide a copy of the documents",
814
817
  "enum": [
815
818
  "Attached",
@@ -830,7 +833,7 @@
830
833
  ]
831
834
  },
832
835
  "details": {
833
- "ta6Ref": "4.2.3",
836
+ "ta6Ref": "4.2b",
834
837
  "title": "Please outline the reasons why",
835
838
  "description": "e.g. the work was exempt from Building Regulations"
836
839
  }
@@ -869,7 +872,7 @@
869
872
  ]
870
873
  },
871
874
  "attachments": {
872
- "ta6Ref": "4.2.2",
875
+ "ta6Ref": "4.2a",
873
876
  "title": "Please provide a copy of the documents",
874
877
  "enum": [
875
878
  "Attached",
@@ -890,7 +893,7 @@
890
893
  ]
891
894
  },
892
895
  "details": {
893
- "ta6Ref": "4.2.3",
896
+ "ta6Ref": "4.2b",
894
897
  "title": "Please outline the reasons why",
895
898
  "description": "e.g. permitted development rights applied"
896
899
  }
@@ -977,7 +980,7 @@
977
980
  ]
978
981
  },
979
982
  "attachments": {
980
- "ta6Ref": "4.2.2",
983
+ "ta6Ref": "4.2a",
981
984
  "title": "Please provide a copy of the documents",
982
985
  "enum": [
983
986
  "Attached",
@@ -998,7 +1001,7 @@
998
1001
  ]
999
1002
  },
1000
1003
  "details": {
1001
- "ta6Ref": "4.2.3",
1004
+ "ta6Ref": "4.2b",
1002
1005
  "title": "Please outline the reasons why",
1003
1006
  "description": "e.g. the work was exempt from Building Regulations"
1004
1007
  }
@@ -1037,7 +1040,7 @@
1037
1040
  ]
1038
1041
  },
1039
1042
  "attachments": {
1040
- "ta6Ref": "4.2.2",
1043
+ "ta6Ref": "4.2a",
1041
1044
  "title": "Please provide a copy of the documents",
1042
1045
  "enum": [
1043
1046
  "Attached",
@@ -1058,7 +1061,7 @@
1058
1061
  ]
1059
1062
  },
1060
1063
  "details": {
1061
- "ta6Ref": "4.2.3",
1064
+ "ta6Ref": "4.2b",
1062
1065
  "title": "Please outline the reasons why",
1063
1066
  "description": "e.g. permitted development rights applied"
1064
1067
  }
@@ -1145,7 +1148,7 @@
1145
1148
  ]
1146
1149
  },
1147
1150
  "attachments": {
1148
- "ta6Ref": "4.2.2",
1151
+ "ta6Ref": "4.2a",
1149
1152
  "title": "Please provide a copy of the documents",
1150
1153
  "enum": [
1151
1154
  "Attached",
@@ -1166,7 +1169,7 @@
1166
1169
  ]
1167
1170
  },
1168
1171
  "details": {
1169
- "ta6Ref": "4.2.3",
1172
+ "ta6Ref": "4.2b",
1170
1173
  "title": "Please outline the reasons why",
1171
1174
  "description": "e.g. the work was exempt from Building Regulations"
1172
1175
  }
@@ -1205,7 +1208,7 @@
1205
1208
  ]
1206
1209
  },
1207
1210
  "attachments": {
1208
- "ta6Ref": "4.2.2",
1211
+ "ta6Ref": "4.2a",
1209
1212
  "title": "Please provide a copy of the documents",
1210
1213
  "enum": [
1211
1214
  "Attached",
@@ -1226,7 +1229,7 @@
1226
1229
  ]
1227
1230
  },
1228
1231
  "details": {
1229
- "ta6Ref": "4.2.3",
1232
+ "ta6Ref": "4.2b",
1230
1233
  "title": "Please outline the reasons why",
1231
1234
  "description": "e.g. permitted development rights applied"
1232
1235
  }
@@ -1681,6 +1684,14 @@
1681
1684
  "details": {
1682
1685
  "ta6Ref": "1.6.2",
1683
1686
  "title": "Details"
1687
+ },
1688
+ "attachments": {
1689
+ "ta6Ref": "1.6.3",
1690
+ "title": "Attachments",
1691
+ "enum": [
1692
+ "Attached",
1693
+ "To follow"
1694
+ ]
1684
1695
  }
1685
1696
  },
1686
1697
  "required": [
@@ -3774,7 +3785,6 @@
3774
3785
  "legalBoundaries",
3775
3786
  "servicesCrossing",
3776
3787
  "energyAndMeters",
3777
- "smartHomeSystems",
3778
3788
  "guaranteesWarrantiesAndIndemnityInsurances",
3779
3789
  "occupiers",
3780
3790
  "completionAndMoving",
@@ -202,7 +202,6 @@ test("correctly gets a subschema validator for a TA6 overlay", () => {
202
202
  test("correctly gets a subschema validator for a TA6 overlay which validates", () => {
203
203
  const path =
204
204
  "/propertyPack/additionalLegalInfo/guaranteesWarrantiesAndIndemnityInsurances/subsidenceWork";
205
- const subSchema = getSubschema(path, exampleTransaction.$schema, ["ta6ed4"]);
206
205
  const data = { yesNo: "Yes" };
207
206
  const validator = getSubschemaValidator(path, exampleTransaction.$schema, [
208
207
  "ta6ed4",
@@ -214,6 +213,48 @@ test("correctly gets a subschema validator for a TA6 overlay which validates", (
214
213
  );
215
214
  });
216
215
 
216
+ test("correctly gets a subschema validator for a TA6 overlay which validates with non-TA6 field missing", () => {
217
+ const path = "/propertyPack";
218
+ const clonedExampleTransaction = JSON.parse(
219
+ JSON.stringify(exampleTransaction)
220
+ );
221
+ const data = jp.get(exampleTransaction, path);
222
+ data.materialFacts.uprn = undefined;
223
+ const validator = getSubschemaValidator(path, exampleTransaction.$schema, [
224
+ "ta6ed4",
225
+ ]);
226
+ let isValid = validator(data);
227
+ expect(isValid).toBe(true);
228
+ });
229
+
230
+ test("correctly gets a subschema validator for a TA6 overlay which validates with non-TA6 section missing", () => {
231
+ const path = "/propertyPack";
232
+ const clonedExampleTransaction = JSON.parse(
233
+ JSON.stringify(exampleTransaction)
234
+ );
235
+ const data = jp.get(clonedExampleTransaction, path);
236
+ data.additionalLegalInfo.smartHomeSystems = undefined;
237
+ const validator = getSubschemaValidator(path, exampleTransaction.$schema, [
238
+ "ta6ed4",
239
+ ]);
240
+ let isValid = validator(data);
241
+ expect(isValid).toBe(true);
242
+ });
243
+
244
+ test("correctly gets a subschema validator for a TA6 overlay which fails to validate with BASPI/TA6 section missing", () => {
245
+ const path = "/propertyPack";
246
+ const clonedExampleTransaction = JSON.parse(
247
+ JSON.stringify(exampleTransaction)
248
+ );
249
+ const data = jp.get(clonedExampleTransaction, path);
250
+ data.materialFacts.waterAndDrainage = {};
251
+ const validator = getSubschemaValidator(path, exampleTransaction.$schema, [
252
+ "ta6ed4",
253
+ ]);
254
+ let isValid = validator(data);
255
+ expect(isValid).toBe(false);
256
+ });
257
+
217
258
  test("correctly gets a subschema validator which validates", () => {
218
259
  const path = "/propertyPack/materialFacts/notices";
219
260
  const validator = getSubschemaValidator(path);
@@ -0,0 +1,341 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft-07/schema#",
3
+ "$id": "http://www.landregistry.gov.uk/LLC/LLCSearchResponseV2_0#",
4
+ "definitions": {
5
+ "ProductResponseCodeType": {
6
+ "type": "object",
7
+ "properties": {
8
+ "Value": {
9
+ "allOf": [
10
+ {"type": "string"},
11
+ {
12
+ "enum": [
13
+ "0",
14
+ "10",
15
+ "20",
16
+ "30"
17
+ ]
18
+ }
19
+ ]
20
+ }
21
+ }
22
+ },
23
+ "IdentifierType": {
24
+ "type": "object",
25
+ "properties": {
26
+ "Value": {"type": "string"},
27
+ "schemeAgencyName": {"type": "string"},
28
+ "schemeName": {"type": "string"}
29
+ }
30
+ },
31
+ "DateTimeType": {
32
+ "type": "object",
33
+ "properties": {
34
+ "Value": {
35
+ "type": "string",
36
+ "format": "date-time"
37
+ }
38
+ }
39
+ },
40
+ "TextType": {
41
+ "type": "object",
42
+ "properties": {
43
+ "Value": {"type": "string"}
44
+ }
45
+ },
46
+ "Q1AcknowledgementDetailsType": {
47
+ "type": "object",
48
+ "required": [
49
+ "UniqueID",
50
+ "MessageDescription"
51
+ ],
52
+ "properties": {
53
+ "UniqueID": {"$ref": "#/definitions/IdentifierType"},
54
+ "ExpectedResponseDateTime": {"$ref": "#/definitions/DateTimeType"},
55
+ "MessageDescription": {"$ref": "#/definitions/TextType"}
56
+ }
57
+ },
58
+ "Q1AcknowledgementType": {
59
+ "type": "object",
60
+ "required": ["AcknowledgementDetails"],
61
+ "properties": {
62
+ "AcknowledgementDetails": {"$ref": "#/definitions/Q1AcknowledgementDetailsType"}
63
+ }
64
+ },
65
+ "AmountType": {
66
+ "type": "object",
67
+ "properties": {
68
+ "Value": {"type": "number"},
69
+ "currencyID": {"type": "string"}
70
+ }
71
+ },
72
+ "Q1ActualPriceType": {
73
+ "type": "object",
74
+ "required": ["GrossPriceAmount"],
75
+ "properties": {
76
+ "GrossPriceAmount": {"$ref": "#/definitions/AmountType"},
77
+ "NetPriceAmount": {"$ref": "#/definitions/AmountType"},
78
+ "VATAmount": {"$ref": "#/definitions/AmountType"}
79
+ }
80
+ },
81
+ "Q1ValidationErrorsType": {
82
+ "type": "object",
83
+ "required": [
84
+ "Code",
85
+ "Description"
86
+ ],
87
+ "properties": {
88
+ "Code": {"$ref": "#/definitions/TextType"},
89
+ "Description": {"$ref": "#/definitions/TextType"}
90
+ }
91
+ },
92
+ "Q1RejectionResponseType": {
93
+ "type": "object",
94
+ "required": [
95
+ "Reason",
96
+ "Code"
97
+ ],
98
+ "properties": {
99
+ "Reason": {"$ref": "#/definitions/TextType"},
100
+ "Code": {"$ref": "#/definitions/TextType"},
101
+ "OtherDescription": {"$ref": "#/definitions/TextType"},
102
+ "ValidationErrors": {
103
+ "type": "array",
104
+ "items": {"$ref": "#/definitions/Q1ValidationErrorsType"},
105
+ "minItems": 0
106
+ }
107
+ }
108
+ },
109
+ "Q1RejectionType": {
110
+ "type": "object",
111
+ "required": [
112
+ "ExternalReference",
113
+ "RejectionResponse"
114
+ ],
115
+ "properties": {
116
+ "ExternalReference": {"$ref": "#/definitions/TextType"},
117
+ "ActualPrice": {"$ref": "#/definitions/Q1ActualPriceType"},
118
+ "RejectionResponse": {"$ref": "#/definitions/Q1RejectionResponseType"}
119
+ }
120
+ },
121
+ "CData": {
122
+ "type": "object",
123
+ "properties": {
124
+ "Value": {"type": "string"},
125
+ "format": {"type": "string"}
126
+ }
127
+ },
128
+ "BinaryObjectType": {
129
+ "type": "object",
130
+ "properties": {
131
+ "Value": {
132
+ "type": "array",
133
+ "items": {"type": "integer"}
134
+ },
135
+ "filename": {"type": "string"},
136
+ "format": {"type": "string"},
137
+ "mimeCode": {"type": "string"},
138
+ "characterSetCode": {"type": "string"}
139
+ }
140
+ },
141
+ "DateType": {
142
+ "type": "object",
143
+ "properties": {
144
+ "Value": {
145
+ "type": "string",
146
+ "format": "date"
147
+ }
148
+ }
149
+ },
150
+ "Q1AttachmentType": {
151
+ "type": "object",
152
+ "required": ["EmbeddedFileBinaryObject"],
153
+ "properties": {
154
+ "EmbeddedFileBinaryObject": {"$ref": "#/definitions/BinaryObjectType"},
155
+ "Title": {"$ref": "#/definitions/TextType"},
156
+ "Description": {"$ref": "#/definitions/TextType"},
157
+ "Date": {"$ref": "#/definitions/DateType"},
158
+ "CopyrightNotices": {"$ref": "#/definitions/TextType"}
159
+ }
160
+ },
161
+ "Q1PostcodeZoneType": {
162
+ "type": "object",
163
+ "required": ["Postcode"],
164
+ "properties": {
165
+ "Postcode": {"$ref": "#/definitions/TextType"}
166
+ }
167
+ },
168
+ "NumericType": {
169
+ "type": "object",
170
+ "properties": {
171
+ "Value": {"type": "number"}
172
+ }
173
+ },
174
+ "AddressLineType": {
175
+ "type": "object",
176
+ "properties": {
177
+ "IndexNumeric": {
178
+ "type": "array",
179
+ "items": {"$ref": "#/definitions/NumericType"},
180
+ "minItems": 0
181
+ },
182
+ "Line": {
183
+ "type": "array",
184
+ "items": {"$ref": "#/definitions/TextType"},
185
+ "minItems": 0
186
+ }
187
+ }
188
+ },
189
+ "Q1AddressType": {
190
+ "type": "object",
191
+ "required": ["AddressLine"],
192
+ "properties": {
193
+ "PostcodeZone": {"$ref": "#/definitions/Q1PostcodeZoneType"},
194
+ "AddressLine": {"$ref": "#/definitions/AddressLineType"}
195
+ }
196
+ },
197
+ "DocumentType": {
198
+ "type": "object",
199
+ "required": ["Document"],
200
+ "properties": {
201
+ "Document": {"$ref": "#/definitions/TextType"},
202
+ "StartDate": {
203
+ "type": "string",
204
+ "format": "date"
205
+ },
206
+ "EndDate": {
207
+ "type": "string",
208
+ "format": "date"
209
+ }
210
+ }
211
+ },
212
+ "ServientLandDevelopmentType": {
213
+ "type": "object",
214
+ "required": [
215
+ "Height",
216
+ "CoversAllOrPartOfExtent"
217
+ ],
218
+ "properties": {
219
+ "Height": {"$ref": "#/definitions/TextType"},
220
+ "CoversAllOrPartOfExtent": {"$ref": "#/definitions/TextType"}
221
+ }
222
+ },
223
+ "OtherDataType": {
224
+ "type": "object",
225
+ "required": [
226
+ "DataLabel",
227
+ "Data"
228
+ ],
229
+ "properties": {
230
+ "DataLabel": {"$ref": "#/definitions/TextType"},
231
+ "Data": {"$ref": "#/definitions/TextType"}
232
+ }
233
+ },
234
+ "LocalLandChargeContent": {
235
+ "type": "object",
236
+ "required": [
237
+ "HMLRReference",
238
+ "RegistrationDate",
239
+ "Category",
240
+ "Location",
241
+ "LocationDominantBuilding"
242
+ ],
243
+ "properties": {
244
+ "HMLRReference": {"$ref": "#/definitions/TextType"},
245
+ "OriginatingAuthority": {"$ref": "#/definitions/TextType"},
246
+ "AuthorityReference": {"$ref": "#/definitions/TextType"},
247
+ "CreationDate": {"$ref": "#/definitions/DateType"},
248
+ "RegistrationDate": {"$ref": "#/definitions/DateType"},
249
+ "Category": {"$ref": "#/definitions/TextType"},
250
+ "ChargeSubCategory": {"$ref": "#/definitions/TextType"},
251
+ "Law": {"$ref": "#/definitions/TextType"},
252
+ "LegalDocument": {"$ref": "#/definitions/TextType"},
253
+ "Location": {"$ref": "#/definitions/Q1AddressType"},
254
+ "LocationDominantBuilding": {"$ref": "#/definitions/Q1AddressType"},
255
+ "Description": {"$ref": "#/definitions/TextType"},
256
+ "SourceOfInformation": {"$ref": "#/definitions/TextType"},
257
+ "AvailableDocument": {
258
+ "type": "array",
259
+ "items": {"$ref": "#/definitions/DocumentType"},
260
+ "minItems": 0
261
+ },
262
+ "InterestInLand": {"$ref": "#/definitions/TextType"},
263
+ "ApplicantName": {"$ref": "#/definitions/TextType"},
264
+ "ApplicantAddress": {"$ref": "#/definitions/Q1AddressType"},
265
+ "ServientLandDevelopment": {"$ref": "#/definitions/ServientLandDevelopmentType"},
266
+ "Amount": {"$ref": "#/definitions/TextType"},
267
+ "InterestRate": {"$ref": "#/definitions/TextType"},
268
+ "LandSold": {"$ref": "#/definitions/TextType"},
269
+ "WorksDone": {"$ref": "#/definitions/TextType"},
270
+ "AdvancePayment": {"$ref": "#/definitions/TextType"},
271
+ "TotalCompensation": {"$ref": "#/definitions/TextType"},
272
+ "AgreedOrEstimated": {"$ref": "#/definitions/TextType"},
273
+ "Adjoining": {"type": "boolean"},
274
+ "OtherData": {
275
+ "type": "array",
276
+ "items": {"$ref": "#/definitions/OtherDataType"},
277
+ "minItems": 0
278
+ },
279
+ "ChargeExtent": {"$ref": "#/definitions/CData"}
280
+ }
281
+ },
282
+ "LocalLandChargeType": {
283
+ "type": "object",
284
+ "properties": {
285
+ "LocalLandCharge": {
286
+ "type": "array",
287
+ "items": {"$ref": "#/definitions/LocalLandChargeContent"},
288
+ "minItems": 0
289
+ }
290
+ }
291
+ },
292
+ "Q1ResultsType": {
293
+ "type": "object",
294
+ "required": [
295
+ "ExternalReference",
296
+ "ActualPrice",
297
+ "SearchDateTime",
298
+ "SearchDescription",
299
+ "NumberSearchesFound",
300
+ "SearchReference"
301
+ ],
302
+ "properties": {
303
+ "ExternalReference": {"$ref": "#/definitions/TextType"},
304
+ "ActualPrice": {"$ref": "#/definitions/Q1ActualPriceType"},
305
+ "SearchArea": {"$ref": "#/definitions/CData"},
306
+ "Attachment": {"$ref": "#/definitions/Q1AttachmentType"},
307
+ "SearchDateTime": {"$ref": "#/definitions/DateTimeType"},
308
+ "SearchDescription": {"type": "string"},
309
+ "NumberSearchesFound": {"type": "integer"},
310
+ "Charges": {"$ref": "#/definitions/LocalLandChargeType"},
311
+ "ChargesAlternateFormat": {"$ref": "#/definitions/CData"},
312
+ "SearchReference": {"$ref": "#/definitions/TextType"}
313
+ }
314
+ },
315
+ "Q1GatewayResponseType": {
316
+ "type": "object",
317
+ "required": ["TypeCode"],
318
+ "properties": {
319
+ "TypeCode": {"$ref": "#/definitions/ProductResponseCodeType"},
320
+ "Acknowledgement": {"$ref": "#/definitions/Q1AcknowledgementType"},
321
+ "Rejection": {"$ref": "#/definitions/Q1RejectionType"},
322
+ "Results": {"$ref": "#/definitions/Q1ResultsType"}
323
+ }
324
+ },
325
+ "LLCSearchResponseV2_0Type": {
326
+ "type": "object",
327
+ "required": ["GatewayResponse"],
328
+ "properties": {
329
+ "GatewayResponse": {"$ref": "#/definitions/Q1GatewayResponseType"}
330
+ }
331
+ }
332
+ },
333
+ "anyOf": [
334
+ {
335
+ "type": "object",
336
+ "properties": {
337
+ "LLCSearchResponse": {"$ref": "#/definitions/LLCSearchResponseV2_0Type"}
338
+ }
339
+ }
340
+ ]
341
+ }
@@ -0,0 +1,9 @@
1
+ const { dereference } = require("@jdw/jst");
2
+ const fs = require("fs");
3
+
4
+ const originalSchema = require("./LLCSearchResponseV2_0.xsd.json");
5
+
6
+ const derefed = dereference(originalSchema);
7
+
8
+ fs.writeFileSync("hmlrLLC1.json", JSON.stringify(derefed, null, 2));
9
+ console.log("Derefed schema written to hmlrLLC1.json");
@@ -0,0 +1,275 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft-07/schema#",
3
+ "$id": "http://www.landregistry.gov.uk/LLC/LLCSearchResponseV2_0#",
4
+ "type": "object",
5
+ "properties": {
6
+ "LocalLandCharge": {
7
+ "type": "array",
8
+ "items": {
9
+ "type": "object",
10
+ "required": [
11
+ "HMLRReference",
12
+ "RegistrationDate",
13
+ "Category",
14
+ "Location",
15
+ "LocationDominantBuilding"
16
+ ],
17
+ "properties": {
18
+ "HMLRReference": {
19
+ "type": "string"
20
+ },
21
+ "OriginatingAuthority": {
22
+ "type": "string"
23
+ },
24
+ "AuthorityReference": {
25
+ "type": "string"
26
+ },
27
+ "CreationDate": {
28
+ "type": "object",
29
+ "properties": {
30
+ "Value": {
31
+ "type": "string",
32
+ "format": "date"
33
+ }
34
+ }
35
+ },
36
+ "RegistrationDate": {
37
+ "type": "object",
38
+ "properties": {
39
+ "Value": {
40
+ "type": "string",
41
+ "format": "date"
42
+ }
43
+ }
44
+ },
45
+ "Category": {
46
+ "type": "string"
47
+ },
48
+ "ChargeSubCategory": {
49
+ "type": "string"
50
+ },
51
+ "Law": {
52
+ "type": "string"
53
+ },
54
+ "LegalDocument": {
55
+ "type": "string"
56
+ },
57
+ "Location": {
58
+ "type": "object",
59
+ "required": ["AddressLine"],
60
+ "properties": {
61
+ "PostcodeZone": {
62
+ "type": "object",
63
+ "required": ["Postcode"],
64
+ "properties": {
65
+ "Postcode": {
66
+ "type": "string"
67
+ }
68
+ }
69
+ },
70
+ "AddressLine": {
71
+ "type": "object",
72
+ "properties": {
73
+ "IndexNumeric": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "object",
77
+ "properties": {
78
+ "Value": {
79
+ "type": "number"
80
+ }
81
+ }
82
+ },
83
+ "minItems": 0
84
+ },
85
+ "Line": {
86
+ "type": "array",
87
+ "items": {
88
+ "type": "string"
89
+ },
90
+ "minItems": 0
91
+ }
92
+ }
93
+ }
94
+ }
95
+ },
96
+ "LocationDominantBuilding": {
97
+ "type": "object",
98
+ "required": ["AddressLine"],
99
+ "properties": {
100
+ "PostcodeZone": {
101
+ "type": "object",
102
+ "required": ["Postcode"],
103
+ "properties": {
104
+ "Postcode": {
105
+ "type": "string"
106
+ }
107
+ }
108
+ },
109
+ "AddressLine": {
110
+ "type": "object",
111
+ "properties": {
112
+ "IndexNumeric": {
113
+ "type": "array",
114
+ "items": {
115
+ "type": "number"
116
+ },
117
+ "minItems": 0
118
+ },
119
+ "Line": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "string"
123
+ },
124
+ "minItems": 0
125
+ }
126
+ }
127
+ }
128
+ }
129
+ },
130
+ "Description": {
131
+ "type": "string"
132
+ },
133
+ "SourceOfInformation": {
134
+ "type": "string"
135
+ },
136
+ "AvailableDocument": {
137
+ "type": "array",
138
+ "items": {
139
+ "type": "object",
140
+ "required": ["Document"],
141
+ "properties": {
142
+ "Document": {
143
+ "type": "string"
144
+ },
145
+ "StartDate": {
146
+ "type": "string",
147
+ "format": "date"
148
+ },
149
+ "EndDate": {
150
+ "type": "string",
151
+ "format": "date"
152
+ }
153
+ }
154
+ },
155
+ "minItems": 0
156
+ },
157
+ "InterestInLand": {
158
+ "type": "string"
159
+ },
160
+ "ApplicantName": {
161
+ "type": "string"
162
+ },
163
+ "ApplicantAddress": {
164
+ "type": "object",
165
+ "required": ["AddressLine"],
166
+ "properties": {
167
+ "PostcodeZone": {
168
+ "type": "object",
169
+ "required": ["Postcode"],
170
+ "properties": {
171
+ "Postcode": {
172
+ "type": "string"
173
+ }
174
+ }
175
+ },
176
+ "AddressLine": {
177
+ "type": "object",
178
+ "properties": {
179
+ "IndexNumeric": {
180
+ "type": "array",
181
+ "items": {
182
+ "type": "object",
183
+ "properties": {
184
+ "Value": {
185
+ "type": "number"
186
+ }
187
+ }
188
+ },
189
+ "minItems": 0
190
+ },
191
+ "Line": {
192
+ "type": "array",
193
+ "items": {
194
+ "type": "object",
195
+ "properties": {
196
+ "Value": {
197
+ "type": "string"
198
+ }
199
+ }
200
+ },
201
+ "minItems": 0
202
+ }
203
+ }
204
+ }
205
+ }
206
+ },
207
+ "ServientLandDevelopment": {
208
+ "type": "object",
209
+ "required": ["Height", "CoversAllOrPartOfExtent"],
210
+ "properties": {
211
+ "Height": {
212
+ "type": "string"
213
+ },
214
+ "CoversAllOrPartOfExtent": {
215
+ "type": "string"
216
+ }
217
+ }
218
+ },
219
+ "Amount": {
220
+ "type": "string"
221
+ },
222
+ "InterestRate": {
223
+ "type": "string"
224
+ },
225
+ "LandSold": {
226
+ "type": "string"
227
+ },
228
+ "WorksDone": {
229
+ "type": "string"
230
+ },
231
+ "AdvancePayment": {
232
+ "type": "string"
233
+ },
234
+ "TotalCompensation": {
235
+ "type": "string"
236
+ },
237
+ "AgreedOrEstimated": {
238
+ "type": "string"
239
+ },
240
+ "Adjoining": {
241
+ "type": "boolean"
242
+ },
243
+ "OtherData": {
244
+ "type": "array",
245
+ "items": {
246
+ "type": "object",
247
+ "required": ["DataLabel", "Data"],
248
+ "properties": {
249
+ "DataLabel": {
250
+ "type": "string"
251
+ },
252
+ "Data": {
253
+ "type": "string"
254
+ }
255
+ }
256
+ },
257
+ "minItems": 0
258
+ },
259
+ "ChargeExtent": {
260
+ "type": "object",
261
+ "properties": {
262
+ "Value": {
263
+ "type": "string"
264
+ },
265
+ "format": {
266
+ "type": "string"
267
+ }
268
+ }
269
+ }
270
+ }
271
+ },
272
+ "minItems": 0
273
+ }
274
+ }
275
+ }