@pdtf/schemas 3.6.0-4 → 3.6.0-41

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 (64) hide show
  1. package/.claude/plans/not-seeing-associated-costs.md +99 -0
  2. package/.claude/settings.local.json +22 -3
  3. package/README.md +52 -33
  4. package/docs/sef25-extensions-ui-spec.md +355 -0
  5. package/index.js +130 -66
  6. package/package.json +4 -2
  7. package/src/examples/v3/exampleTransaction.json +3 -3
  8. package/src/schemas/v3/combined.json +7651 -1672
  9. package/src/schemas/v3/compactSkeleton.txt +365 -14
  10. package/src/schemas/v3/overlays/baspi4.json +163 -18
  11. package/src/schemas/v3/overlays/baspi5.json +168 -20
  12. package/src/schemas/v3/overlays/extensions/as.json +4 -2
  13. package/src/schemas/v3/overlays/extensions/dk.json +32 -0
  14. package/src/schemas/v3/overlays/extensions/dr.json +9 -9
  15. package/src/schemas/v3/overlays/extensions/er.json +4 -2
  16. package/src/schemas/v3/overlays/extensions/fd.json +6 -3
  17. package/src/schemas/v3/overlays/extensions/hi.json +6 -3
  18. package/src/schemas/v3/overlays/extensions/hs.json +4 -2
  19. package/src/schemas/v3/overlays/extensions/ic.json +59 -0
  20. package/src/schemas/v3/overlays/extensions/jk.json +28 -8
  21. package/src/schemas/v3/overlays/extensions/la.json +4 -2
  22. package/src/schemas/v3/overlays/extensions/lc.json +75 -0
  23. package/src/schemas/v3/overlays/extensions/ma.json +6 -3
  24. package/src/schemas/v3/overlays/extensions/mc.json +4 -2
  25. package/src/schemas/v3/overlays/extensions/mi.json +69 -0
  26. package/src/schemas/v3/overlays/extensions/nd.json +43 -0
  27. package/src/schemas/v3/overlays/extensions/oa.json +4 -2
  28. package/src/schemas/v3/overlays/extensions/oc.json +4 -2
  29. package/src/schemas/v3/overlays/extensions/pc.json +37 -0
  30. package/src/schemas/v3/overlays/extensions/ph.json +194 -0
  31. package/src/schemas/v3/overlays/extensions/rw.json +68 -0
  32. package/src/schemas/v3/overlays/extensions/sb.json +4 -2
  33. package/src/schemas/v3/overlays/extensions/sc.json +129 -0
  34. package/src/schemas/v3/overlays/extensions/sd.json +63 -0
  35. package/src/schemas/v3/overlays/extensions/sf.json +4 -2
  36. package/src/schemas/v3/overlays/extensions/sl.json +4 -2
  37. package/src/schemas/v3/overlays/extensions/tf.json +6 -3
  38. package/src/schemas/v3/overlays/extensions/tr.json +73 -0
  39. package/src/schemas/v3/overlays/extensions/wg.json +350 -0
  40. package/src/schemas/v3/overlays/fme1.json +16 -14
  41. package/src/schemas/v3/overlays/lpe1.json +60 -30
  42. package/src/schemas/v3/overlays/nts.json +68 -1
  43. package/src/schemas/v3/overlays/nts2.json +68 -4
  44. package/src/schemas/v3/overlays/ntsl.json +68 -1
  45. package/src/schemas/v3/overlays/ntsl2.json +68 -4
  46. package/src/schemas/v3/overlays/piq.json +38 -1
  47. package/src/schemas/v3/overlays/rds.json +118 -6
  48. package/src/schemas/v3/overlays/sef25.json +1067 -0
  49. package/src/schemas/v3/overlays/ta6.json +46 -16
  50. package/src/schemas/v3/overlays/ta6ed6.json +6498 -0
  51. package/src/schemas/v3/overlays/ta7.json +70 -6
  52. package/src/schemas/v3/overlays/ta7ed5.json +1539 -0
  53. package/src/schemas/v3/pdtf-transaction.json +4361 -676
  54. package/src/schemas/v3/skeleton.json +505 -36
  55. package/src/tests/v3/buyerCircumstances.test.js +543 -0
  56. package/src/tests/v3/extensionOverlays.test.js +911 -0
  57. package/src/tests/v3/offers.test.js +37 -40
  58. package/src/tests/v3/patternProperties.test.js +149 -30
  59. package/src/tests/v3/ta6ed6.test.js +2317 -0
  60. package/src/tests/v3/ta7ed5.test.js +567 -0
  61. package/src/tests/v3/transactionSchema.test.js +31 -0
  62. package/src/utils/extractExtensionOverlays.js +216 -31
  63. package/src/utils/extractOverlay.js +88 -23
  64. package/src/utils/pathSkeleton.js +1 -1
@@ -53,17 +53,20 @@
53
53
  },
54
54
  "required": [
55
55
  "floodDefences"
56
- ]
56
+ ],
57
+ "ntsRef": "C3.1.1"
57
58
  }
58
59
  },
59
60
  "required": [
60
61
  "flooding"
61
- ]
62
+ ],
63
+ "ntsRef": "C3.1"
62
64
  }
63
65
  },
64
66
  "required": [
65
67
  "environmentalIssues"
66
- ]
68
+ ],
69
+ "ntsRef": "0"
67
70
  }
68
71
  },
69
72
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -22,7 +22,8 @@
22
22
  },
23
23
  "required": [
24
24
  "centralHeatingInstalled"
25
- ]
25
+ ],
26
+ "ntsRef": "B3.4.3"
26
27
  }
27
28
  },
28
29
  "required": [
@@ -34,12 +35,14 @@
34
35
  },
35
36
  "required": [
36
37
  "heatingSystem"
37
- ]
38
+ ],
39
+ "ntsRef": "B3.4"
38
40
  }
39
41
  },
40
42
  "required": [
41
43
  "heating"
42
- ]
44
+ ],
45
+ "ntsRef": "0"
43
46
  }
44
47
  },
45
48
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -57,12 +57,14 @@
57
57
  },
58
58
  "required": [
59
59
  "ongoingHealthOrSafetyIssue"
60
- ]
60
+ ],
61
+ "ntsRef": "A5"
61
62
  }
62
63
  },
63
64
  "required": [
64
65
  "specialistIssues"
65
- ]
66
+ ],
67
+ "ntsRef": "0"
66
68
  }
67
69
  },
68
70
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -0,0 +1,59 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "insurance": {
6
+ "oneOf": [
7
+ null,
8
+ {
9
+ "properties": {
10
+ "insuranceClaims": {
11
+ "ntsRef": "I1.1",
12
+ "required": [
13
+ "yesNo"
14
+ ],
15
+ "discriminator": {
16
+ "propertyName": "yesNo"
17
+ },
18
+ "properties": {
19
+ "yesNo": {
20
+ "ntsRef": "I1.1.1",
21
+ "type": "string"
22
+ }
23
+ },
24
+ "oneOf": [
25
+ {
26
+ "properties": {
27
+ "yesNo": {
28
+ "enum": [
29
+ "No"
30
+ ]
31
+ }
32
+ }
33
+ },
34
+ {
35
+ "properties": {
36
+ "yesNo": {
37
+ "enum": [
38
+ "Yes"
39
+ ]
40
+ }
41
+ }
42
+ }
43
+ ],
44
+ "type": "object"
45
+ }
46
+ },
47
+ "required": [
48
+ "insuranceClaims"
49
+ ]
50
+ }
51
+ ]
52
+ }
53
+ }
54
+ }
55
+ },
56
+ "$schema": "http://json-schema.org/draft-07/schema#",
57
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/ic.json",
58
+ "$comment": "Insurance claims upfront for SEF25"
59
+ }
@@ -33,6 +33,9 @@
33
33
  "required": [
34
34
  "managementPlanInPlace"
35
35
  ],
36
+ "discriminator": {
37
+ "propertyName": "managementPlanInPlace"
38
+ },
36
39
  "properties": {
37
40
  "managementPlanInPlace": {
38
41
  "ntsRef": "A5.3.2",
@@ -47,14 +50,29 @@
47
50
  "enum": [
48
51
  "Yes"
49
52
  ]
53
+ }
54
+ },
55
+ "oneOf": [
56
+ {
57
+ "properties": {
58
+ "managementPlanInPlace": {
59
+ "enum": [
60
+ "No",
61
+ "Not known"
62
+ ]
63
+ }
64
+ }
50
65
  },
51
- "attachments": {
52
- "enum": [
53
- "Attached",
54
- "To follow"
55
- ]
66
+ {
67
+ "properties": {
68
+ "managementPlanInPlace": {
69
+ "enum": [
70
+ "Yes"
71
+ ]
72
+ }
73
+ }
56
74
  }
57
- }
75
+ ]
58
76
  }
59
77
  ],
60
78
  "type": "object"
@@ -62,12 +80,14 @@
62
80
  },
63
81
  "required": [
64
82
  "japaneseKnotweed"
65
- ]
83
+ ],
84
+ "ntsRef": "A5"
66
85
  }
67
86
  },
68
87
  "required": [
69
88
  "specialistIssues"
70
- ]
89
+ ],
90
+ "ntsRef": "0"
71
91
  }
72
92
  },
73
93
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -69,12 +69,14 @@
69
69
  },
70
70
  "required": [
71
71
  "loft"
72
- ]
72
+ ],
73
+ "ntsRef": "A1.2"
73
74
  }
74
75
  },
75
76
  "required": [
76
77
  "typeOfConstruction"
77
- ]
78
+ ],
79
+ "ntsRef": "0"
78
80
  }
79
81
  },
80
82
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -0,0 +1,75 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "electricity": {
6
+ "properties": {
7
+ "solarPanels": {
8
+ "oneOf": [
9
+ null,
10
+ {
11
+ "properties": {
12
+ "panelsOwnedOutright": {
13
+ "oneOf": [
14
+ null,
15
+ {
16
+ "properties": {
17
+ "associatedCost": {
18
+ "ntsRef": "S1.1",
19
+ "required": [
20
+ "frequency"
21
+ ],
22
+ "discriminator": {
23
+ "propertyName": "frequency"
24
+ },
25
+ "properties": {
26
+ "frequency": {
27
+ "ntsRef": "S1.1.2",
28
+ "type": "string"
29
+ }
30
+ },
31
+ "oneOf": [
32
+ {
33
+ "properties": {
34
+ "frequency": {
35
+ "enum": [
36
+ "Not applicable"
37
+ ]
38
+ }
39
+ }
40
+ },
41
+ {
42
+ "properties": {
43
+ "amount": {
44
+ "ntsRef": "S1.1.1",
45
+ "type": "number"
46
+ },
47
+ "frequency": {
48
+ "enum": [
49
+ "Per month",
50
+ "Per year"
51
+ ]
52
+ }
53
+ }
54
+ }
55
+ ],
56
+ "type": "object"
57
+ }
58
+ }
59
+ }
60
+ ]
61
+ }
62
+ }
63
+ }
64
+ ]
65
+ }
66
+ },
67
+ "ntsRef": "S1"
68
+ }
69
+ }
70
+ }
71
+ },
72
+ "$schema": "http://json-schema.org/draft-07/schema#",
73
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/lc.json",
74
+ "$comment": "Solar panel lease costs"
75
+ }
@@ -60,7 +60,8 @@
60
60
  },
61
61
  "required": [
62
62
  "contactDetails"
63
- ]
63
+ ],
64
+ "ntsRef": "A3.2"
64
65
  }
65
66
  },
66
67
  "required": [
@@ -73,12 +74,14 @@
73
74
  },
74
75
  "required": [
75
76
  "ownershipsToBeTransferred"
76
- ]
77
+ ],
78
+ "ntsRef": "A3"
77
79
  }
78
80
  },
79
81
  "required": [
80
82
  "ownership"
81
- ]
83
+ ],
84
+ "ntsRef": "0"
82
85
  }
83
86
  },
84
87
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -22,12 +22,14 @@
22
22
  },
23
23
  "required": [
24
24
  "isStandardForm"
25
- ]
25
+ ],
26
+ "ntsRef": "A1.2"
26
27
  }
27
28
  },
28
29
  "required": [
29
30
  "typeOfConstruction"
30
- ]
31
+ ],
32
+ "ntsRef": "0"
31
33
  }
32
34
  },
33
35
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -0,0 +1,69 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "additionalInformation": {
6
+ "properties": {
7
+ "otherMaterialIssue": {
8
+ "ntsRef": "M1.1",
9
+ "required": [
10
+ "yesNo"
11
+ ],
12
+ "discriminator": {
13
+ "propertyName": "yesNo"
14
+ },
15
+ "properties": {
16
+ "yesNo": {
17
+ "ntsRef": "M1.1.1",
18
+ "type": "string"
19
+ }
20
+ },
21
+ "oneOf": [
22
+ {
23
+ "properties": {
24
+ "yesNo": {
25
+ "enum": [
26
+ "No"
27
+ ]
28
+ }
29
+ }
30
+ },
31
+ {
32
+ "required": [
33
+ "details"
34
+ ],
35
+ "properties": {
36
+ "details": {
37
+ "ntsRef": "M1.1.2",
38
+ "type": "string",
39
+ "minLength": 1
40
+ },
41
+ "yesNo": {
42
+ "enum": [
43
+ "Yes"
44
+ ]
45
+ },
46
+ "attachments": {
47
+ "enum": [
48
+ "Attached",
49
+ "To follow"
50
+ ]
51
+ }
52
+ }
53
+ }
54
+ ],
55
+ "type": "object"
56
+ }
57
+ },
58
+ "required": [
59
+ "otherMaterialIssue"
60
+ ],
61
+ "ntsRef": "M1"
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "$schema": "http://json-schema.org/draft-07/schema#",
67
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/mi.json",
68
+ "$comment": "Other material issue upfront for SEF25"
69
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "notices": {
6
+ "properties": {
7
+ "neighbourDevelopment": {
8
+ "ntsRef": "N1.1",
9
+ "discriminator": {
10
+ "propertyName": "yesNo"
11
+ },
12
+ "oneOf": [
13
+ {
14
+ "properties": {
15
+ "yesNo": {
16
+ "enum": [
17
+ "No"
18
+ ]
19
+ }
20
+ }
21
+ },
22
+ {
23
+ "properties": {
24
+ "yesNo": {
25
+ "enum": [
26
+ "Yes"
27
+ ]
28
+ }
29
+ }
30
+ }
31
+ ],
32
+ "type": "object"
33
+ }
34
+ },
35
+ "ntsRef": "N1"
36
+ }
37
+ }
38
+ }
39
+ },
40
+ "$schema": "http://json-schema.org/draft-07/schema#",
41
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/nd.json",
42
+ "$comment": "Neighbour development upfront for SEF25"
43
+ }
@@ -11,9 +11,11 @@
11
11
  },
12
12
  "required": [
13
13
  "outsideAreas"
14
- ]
14
+ ],
15
+ "ntsRef": "B5"
15
16
  }
16
- }
17
+ },
18
+ "ntsRef": "0"
17
19
  }
18
20
  },
19
21
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -44,9 +44,11 @@
44
44
  },
45
45
  "required": [
46
46
  "otherPropertyInChain"
47
- ]
47
+ ],
48
+ "ntsRef": "A1.5.7"
48
49
  }
49
- }
50
+ },
51
+ "ntsRef": "0"
50
52
  }
51
53
  },
52
54
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -0,0 +1,37 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "parking": {
6
+ "properties": {
7
+ "controlledParking": {
8
+ "oneOf": [
9
+ null,
10
+ {
11
+ "properties": {
12
+ "costOfPermit": {
13
+ "ntsRef": "P1.1",
14
+ "type": "number"
15
+ },
16
+ "costOfPermitFrequency": {
17
+ "ntsRef": "P1.2",
18
+ "type": "string"
19
+ }
20
+ },
21
+ "required": [
22
+ "costOfPermit",
23
+ "costOfPermitFrequency"
24
+ ]
25
+ }
26
+ ]
27
+ }
28
+ },
29
+ "ntsRef": "K1"
30
+ }
31
+ }
32
+ }
33
+ },
34
+ "$schema": "http://json-schema.org/draft-07/schema#",
35
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/pc.json",
36
+ "$comment": "Parking permit cost and frequency"
37
+ }