@pdtf/schemas 3.6.0-9 → 3.6.0-dev.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 (85) hide show
  1. package/README.md +57 -33
  2. package/docs/branch-release-workflow.md +138 -0
  3. package/docs/sef25-extensions-ui-spec.md +355 -0
  4. package/index.js +131 -75
  5. package/package.json +14 -2
  6. package/src/schemas/v3/combined.json +7952 -1721
  7. package/src/schemas/v3/compactSkeleton.txt +379 -5
  8. package/src/schemas/v3/overlays/baspi4.json +205 -93
  9. package/src/schemas/v3/overlays/baspi5.json +210 -95
  10. package/src/schemas/v3/overlays/extensions/ac.json +334 -0
  11. package/src/schemas/v3/overlays/extensions/as.json +4 -2
  12. package/src/schemas/v3/overlays/extensions/dk.json +33 -0
  13. package/src/schemas/v3/overlays/extensions/dr.json +9 -9
  14. package/src/schemas/v3/overlays/extensions/er.json +4 -2
  15. package/src/schemas/v3/overlays/extensions/fd.json +6 -3
  16. package/src/schemas/v3/overlays/extensions/hi.json +6 -3
  17. package/src/schemas/v3/overlays/extensions/hs.json +4 -2
  18. package/src/schemas/v3/overlays/extensions/ic.json +94 -0
  19. package/src/schemas/v3/overlays/extensions/jk.json +28 -8
  20. package/src/schemas/v3/overlays/extensions/la.json +4 -2
  21. package/src/schemas/v3/overlays/extensions/lc.json +76 -0
  22. package/src/schemas/v3/overlays/extensions/ma.json +6 -3
  23. package/src/schemas/v3/overlays/extensions/mc.json +4 -2
  24. package/src/schemas/v3/overlays/extensions/mi.json +70 -0
  25. package/src/schemas/v3/overlays/extensions/nd.json +44 -0
  26. package/src/schemas/v3/overlays/extensions/oa.json +4 -2
  27. package/src/schemas/v3/overlays/extensions/oc.json +4 -2
  28. package/src/schemas/v3/overlays/extensions/pc.json +38 -0
  29. package/src/schemas/v3/overlays/extensions/ph.json +195 -0
  30. package/src/schemas/v3/overlays/extensions/rw.json +69 -0
  31. package/src/schemas/v3/overlays/extensions/sb.json +4 -2
  32. package/src/schemas/v3/overlays/extensions/sc.json +133 -0
  33. package/src/schemas/v3/overlays/extensions/sd.json +64 -0
  34. package/src/schemas/v3/overlays/extensions/sf.json +4 -2
  35. package/src/schemas/v3/overlays/extensions/sl.json +4 -2
  36. package/src/schemas/v3/overlays/extensions/ta.json +204 -0
  37. package/src/schemas/v3/overlays/extensions/tf.json +6 -3
  38. package/src/schemas/v3/overlays/extensions/tr.json +74 -0
  39. package/src/schemas/v3/overlays/extensions/wg.json +351 -0
  40. package/src/schemas/v3/overlays/fme1.json +16 -14
  41. package/src/schemas/v3/overlays/llc1.json +1 -2
  42. package/src/schemas/v3/overlays/lpe1.json +61 -31
  43. package/src/schemas/v3/overlays/nts.json +71 -2
  44. package/src/schemas/v3/overlays/nts2.json +71 -5
  45. package/src/schemas/v3/overlays/ntsl.json +71 -2
  46. package/src/schemas/v3/overlays/ntsl2.json +71 -5
  47. package/src/schemas/v3/overlays/piq.json +60 -27
  48. package/src/schemas/v3/overlays/rds.json +139 -57
  49. package/src/schemas/v3/overlays/sef25.json +1653 -0
  50. package/src/schemas/v3/overlays/ta10.json +0 -9
  51. package/src/schemas/v3/overlays/ta6.json +83 -85
  52. package/src/schemas/v3/overlays/ta6ed6.json +6641 -0
  53. package/src/schemas/v3/overlays/ta7.json +70 -6
  54. package/src/schemas/v3/overlays/ta7ed5.json +1597 -0
  55. package/src/schemas/v3/pdtf-transaction.json +4525 -1013
  56. package/src/schemas/v3/skeleton.json +512 -40
  57. package/src/utils/extractExtensionOverlays.js +302 -31
  58. package/src/utils/extractOverlay.js +114 -27
  59. package/src/utils/pathSkeleton.js +1 -1
  60. package/.claude/settings.local.json +0 -42
  61. package/.github/workflows/pages.yml +0 -50
  62. package/CNAME +0 -1
  63. package/_config.yml +0 -1
  64. package/src/examples/v1/exampleAddParticipantVouch.json +0 -32
  65. package/src/examples/v1/exampleDocumentedVouch.json +0 -40
  66. package/src/examples/v1/exampleElectronicRecord.json +0 -30
  67. package/src/examples/v1/exampleTransaction.json +0 -878
  68. package/src/examples/v1/exampleVouch.json +0 -25
  69. package/src/examples/v2/exampleTransaction.json +0 -901
  70. package/src/examples/v3/exampleAddParticipantVouch.json +0 -38
  71. package/src/examples/v3/exampleCustomOverlay.json +0 -55
  72. package/src/examples/v3/exampleCustomOverlay2.json +0 -93
  73. package/src/examples/v3/exampleDocumentedVouch.json +0 -47
  74. package/src/examples/v3/exampleElectronicRecord.json +0 -36
  75. package/src/examples/v3/exampleTransaction.json +0 -1038
  76. package/src/examples/v3/exampleVouch.json +0 -32
  77. package/src/mappings/SendPropertyDetailsRequestSchema.json +0 -1588
  78. package/src/mappings/adf.js +0 -198
  79. package/src/tests/v3/caching.test.js +0 -591
  80. package/src/tests/v3/enquiries.test.js +0 -1096
  81. package/src/tests/v3/extensionOverlays.test.js +0 -525
  82. package/src/tests/v3/offers.test.js +0 -823
  83. package/src/tests/v3/patternProperties.test.js +0 -688
  84. package/src/tests/v3/transactionSchema.test.js +0 -615
  85. package/src/tests/v3/verifiedClaimsValidator.test.js +0 -195
@@ -0,0 +1,133 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "waterAndDrainage": {
6
+ "properties": {
7
+ "water": {
8
+ "properties": {
9
+ "mainsWater": {
10
+ "oneOf": [
11
+ {
12
+ "properties": {
13
+ "associatedCost": {
14
+ "ntsRef": "U1.1",
15
+ "required": [
16
+ "frequency"
17
+ ],
18
+ "discriminator": {
19
+ "propertyName": "frequency"
20
+ },
21
+ "properties": {
22
+ "frequency": {
23
+ "ntsRef": "U1.1.2",
24
+ "type": "string"
25
+ }
26
+ },
27
+ "oneOf": [
28
+ {
29
+ "properties": {
30
+ "frequency": {
31
+ "enum": [
32
+ "Not applicable"
33
+ ]
34
+ }
35
+ }
36
+ },
37
+ {
38
+ "properties": {
39
+ "amount": {
40
+ "ntsRef": "U1.1.1",
41
+ "type": "number"
42
+ },
43
+ "frequency": {
44
+ "enum": [
45
+ "Per month",
46
+ "Per year"
47
+ ]
48
+ }
49
+ }
50
+ }
51
+ ],
52
+ "type": "object"
53
+ }
54
+ },
55
+ "required": [
56
+ "associatedCost"
57
+ ]
58
+ }
59
+ ]
60
+ }
61
+ },
62
+ "ntsRef": "B3.2"
63
+ },
64
+ "drainage": {
65
+ "properties": {
66
+ "mainsFoulDrainage": {
67
+ "oneOf": [
68
+ null,
69
+ null,
70
+ {
71
+ "properties": {
72
+ "associatedCost": {
73
+ "ntsRef": "U1.2",
74
+ "required": [
75
+ "frequency"
76
+ ],
77
+ "discriminator": {
78
+ "propertyName": "frequency"
79
+ },
80
+ "properties": {
81
+ "frequency": {
82
+ "ntsRef": "U1.2.2",
83
+ "type": "string"
84
+ }
85
+ },
86
+ "oneOf": [
87
+ {
88
+ "properties": {
89
+ "frequency": {
90
+ "enum": [
91
+ "Not applicable"
92
+ ]
93
+ }
94
+ }
95
+ },
96
+ {
97
+ "properties": {
98
+ "amount": {
99
+ "ntsRef": "U1.2.1",
100
+ "type": "number"
101
+ },
102
+ "frequency": {
103
+ "enum": [
104
+ "Per month",
105
+ "Per year"
106
+ ]
107
+ }
108
+ }
109
+ }
110
+ ],
111
+ "type": "object"
112
+ }
113
+ },
114
+ "required": [
115
+ "associatedCost"
116
+ ]
117
+ }
118
+ ]
119
+ }
120
+ },
121
+ "ntsRef": "B3.3"
122
+ }
123
+ },
124
+ "ntsRef": "B3.2"
125
+ }
126
+ },
127
+ "ntsRef": "0"
128
+ }
129
+ },
130
+ "$schema": "http://json-schema.org/draft-07/schema#",
131
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/sc.json",
132
+ "$comment": "Associated costs for private water and sewerage supply"
133
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "environmentalIssues": {
6
+ "properties": {
7
+ "stormFireFloodDamage": {
8
+ "ntsRef": "E1.1",
9
+ "required": [
10
+ "yesNo"
11
+ ],
12
+ "discriminator": {
13
+ "propertyName": "yesNo"
14
+ },
15
+ "properties": {
16
+ "yesNo": {
17
+ "ntsRef": "E1.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": "E1.1.2",
38
+ "type": "string",
39
+ "minLength": 1
40
+ },
41
+ "yesNo": {
42
+ "enum": [
43
+ "Yes"
44
+ ]
45
+ }
46
+ }
47
+ }
48
+ ],
49
+ "type": "object"
50
+ }
51
+ },
52
+ "required": [
53
+ "stormFireFloodDamage"
54
+ ],
55
+ "ntsRef": "C3.1"
56
+ }
57
+ },
58
+ "ntsRef": "0"
59
+ }
60
+ },
61
+ "$schema": "http://json-schema.org/draft-07/schema#",
62
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/sd.json",
63
+ "$comment": "Storm, fire or flood damage"
64
+ }
@@ -58,12 +58,14 @@
58
58
  },
59
59
  "required": [
60
60
  "sprayFoamInsulation"
61
- ]
61
+ ],
62
+ "ntsRef": "A1.2"
62
63
  }
63
64
  },
64
65
  "required": [
65
66
  "typeOfConstruction"
66
- ]
67
+ ],
68
+ "ntsRef": "0"
67
69
  }
68
70
  },
69
71
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -52,12 +52,14 @@
52
52
  },
53
53
  "required": [
54
54
  "solarPanels"
55
- ]
55
+ ],
56
+ "ntsRef": "B3.1"
56
57
  }
57
58
  },
58
59
  "required": [
59
60
  "electricity"
60
- ]
61
+ ],
62
+ "ntsRef": "0"
61
63
  }
62
64
  },
63
65
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -0,0 +1,204 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "parking": {
6
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.10",
7
+ "properties": {
8
+ "controlledParking": {
9
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.10.2",
10
+ "required": [
11
+ "yesNo"
12
+ ],
13
+ "discriminator": {
14
+ "propertyName": "yesNo"
15
+ },
16
+ "properties": {
17
+ "yesNo": {
18
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.10.2.1",
19
+ "enum": [
20
+ "Yes",
21
+ "No"
22
+ ],
23
+ "type": "string"
24
+ }
25
+ },
26
+ "oneOf": [
27
+ {
28
+ "properties": {
29
+ "yesNo": {
30
+ "enum": [
31
+ "No"
32
+ ]
33
+ }
34
+ }
35
+ },
36
+ {
37
+ "properties": {
38
+ "yesNo": {
39
+ "enum": [
40
+ "Yes"
41
+ ]
42
+ }
43
+ }
44
+ }
45
+ ]
46
+ }
47
+ },
48
+ "type": "object"
49
+ },
50
+ "heating": {
51
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.11.4",
52
+ "properties": {
53
+ "otherHeatingFeatures": {
54
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.11.4.other",
55
+ "items": {
56
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.11.4.other.item",
57
+ "enum": [
58
+ "None",
59
+ "Air conditioning",
60
+ "Double glazing",
61
+ "Triple glazing",
62
+ "Night storage",
63
+ "Solar water",
64
+ "Underfloor heating",
65
+ "Wood burner",
66
+ "Aga/Rayburn",
67
+ "Open fire",
68
+ "Ground source heat pump",
69
+ "Air source heat pump",
70
+ "Solar thermal",
71
+ "Passive House design",
72
+ "Mains gas",
73
+ "Electricity",
74
+ "Oil",
75
+ "LPG",
76
+ "Biomass"
77
+ ],
78
+ "type": "string"
79
+ },
80
+ "type": "array"
81
+ }
82
+ },
83
+ "type": "object"
84
+ },
85
+ "rightsAndInformalArrangements": {
86
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.9",
87
+ "properties": {
88
+ "sharedContributions": {
89
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.9.2",
90
+ "required": [
91
+ "yesNo"
92
+ ],
93
+ "discriminator": {
94
+ "propertyName": "yesNo"
95
+ },
96
+ "oneOf": [
97
+ {
98
+ "properties": {
99
+ "yesNo": {
100
+ "enum": [
101
+ "No",
102
+ "Not applicable"
103
+ ]
104
+ }
105
+ }
106
+ },
107
+ {
108
+ "properties": {
109
+ "yesNo": {
110
+ "enum": [
111
+ "Yes"
112
+ ]
113
+ }
114
+ }
115
+ }
116
+ ]
117
+ },
118
+ "accessRestrictionAttempts": {
119
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.9.3",
120
+ "required": [
121
+ "yesNo"
122
+ ],
123
+ "discriminator": {
124
+ "propertyName": "yesNo"
125
+ },
126
+ "oneOf": [
127
+ {
128
+ "properties": {
129
+ "yesNo": {
130
+ "enum": [
131
+ "No",
132
+ "Not known"
133
+ ]
134
+ }
135
+ }
136
+ },
137
+ {
138
+ "properties": {
139
+ "yesNo": {
140
+ "enum": [
141
+ "Yes"
142
+ ]
143
+ }
144
+ }
145
+ }
146
+ ]
147
+ }
148
+ },
149
+ "type": "object"
150
+ },
151
+ "legalBoundaries": {
152
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.2",
153
+ "properties": {
154
+ "flyingFreehold": {
155
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.2.4",
156
+ "required": [
157
+ "yesNo"
158
+ ],
159
+ "discriminator": {
160
+ "propertyName": "yesNo"
161
+ },
162
+ "properties": {
163
+ "yesNo": {
164
+ "ta6ed6CompatRef": "TA6ED6-COMPAT.2.4.1",
165
+ "enum": [
166
+ "Yes",
167
+ "No",
168
+ "Not known"
169
+ ],
170
+ "type": "string"
171
+ }
172
+ },
173
+ "oneOf": [
174
+ {
175
+ "properties": {
176
+ "yesNo": {
177
+ "enum": [
178
+ "No",
179
+ "Not known"
180
+ ]
181
+ }
182
+ }
183
+ },
184
+ {
185
+ "properties": {
186
+ "yesNo": {
187
+ "enum": [
188
+ "Yes"
189
+ ]
190
+ }
191
+ }
192
+ }
193
+ ]
194
+ }
195
+ },
196
+ "type": "object"
197
+ }
198
+ }
199
+ }
200
+ },
201
+ "$schema": "http://json-schema.org/draft-07/schema#",
202
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/ta.json",
203
+ "$comment": "Compatibility enum ranges for validating shared PDTF state containing TA6 edition 6 answers"
204
+ }
@@ -73,7 +73,8 @@
73
73
  },
74
74
  "required": [
75
75
  "serviceCharge"
76
- ]
76
+ ],
77
+ "ntsRef": "A3.2"
77
78
  }
78
79
  },
79
80
  "required": [
@@ -86,12 +87,14 @@
86
87
  },
87
88
  "required": [
88
89
  "ownershipsToBeTransferred"
89
- ]
90
+ ],
91
+ "ntsRef": "A3"
90
92
  }
91
93
  },
92
94
  "required": [
93
95
  "ownership"
94
- ]
96
+ ],
97
+ "ntsRef": "0"
95
98
  }
96
99
  },
97
100
  "$schema": "http://json-schema.org/draft-07/schema#",
@@ -0,0 +1,74 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "ownership": {
6
+ "properties": {
7
+ "ownershipsToBeTransferred": {
8
+ "items": {
9
+ "oneOf": [
10
+ {
11
+ "properties": {
12
+ "titleRestrictions": {
13
+ "ntsRef": "T1.1",
14
+ "required": [
15
+ "yesNo"
16
+ ],
17
+ "discriminator": {
18
+ "propertyName": "yesNo"
19
+ },
20
+ "properties": {
21
+ "yesNo": {
22
+ "ntsRef": "T1.1.1",
23
+ "type": "string"
24
+ }
25
+ },
26
+ "oneOf": [
27
+ {
28
+ "properties": {
29
+ "yesNo": {
30
+ "enum": [
31
+ "No"
32
+ ]
33
+ }
34
+ }
35
+ },
36
+ {
37
+ "required": [
38
+ "details"
39
+ ],
40
+ "properties": {
41
+ "details": {
42
+ "ntsRef": "T1.1.2",
43
+ "type": "string",
44
+ "minLength": 1
45
+ },
46
+ "yesNo": {
47
+ "enum": [
48
+ "Yes"
49
+ ]
50
+ }
51
+ }
52
+ }
53
+ ],
54
+ "type": "object"
55
+ }
56
+ },
57
+ "required": [
58
+ "titleRestrictions"
59
+ ]
60
+ }
61
+ ]
62
+ }
63
+ }
64
+ },
65
+ "ntsRef": "A3"
66
+ }
67
+ },
68
+ "ntsRef": "0"
69
+ }
70
+ },
71
+ "$schema": "http://json-schema.org/draft-07/schema#",
72
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/tr.json",
73
+ "$comment": "Title restrictions for freehold properties"
74
+ }