@pdtf/schemas 3.6.0-dev.6 → 3.6.0-dev.8

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 (131) hide show
  1. package/busy-spence-79c6bf/CLAUDE.md +101 -0
  2. package/busy-spence-79c6bf/LICENSE +21 -0
  3. package/busy-spence-79c6bf/README.md +435 -0
  4. package/busy-spence-79c6bf/docs/branch-release-workflow.md +138 -0
  5. package/busy-spence-79c6bf/docs/sef25-extensions-ui-spec.md +355 -0
  6. package/busy-spence-79c6bf/index.js +654 -0
  7. package/busy-spence-79c6bf/package-lock.json +7299 -0
  8. package/busy-spence-79c6bf/package.json +44 -0
  9. package/busy-spence-79c6bf/scripts/ta6ed6-titles.js +403 -0
  10. package/busy-spence-79c6bf/scripts/ta7ed5-titles.js +183 -0
  11. package/busy-spence-79c6bf/src/examples/v1/exampleAddParticipantVouch.json +32 -0
  12. package/busy-spence-79c6bf/src/examples/v1/exampleDocumentedVouch.json +40 -0
  13. package/busy-spence-79c6bf/src/examples/v1/exampleElectronicRecord.json +30 -0
  14. package/busy-spence-79c6bf/src/examples/v1/exampleTransaction.json +878 -0
  15. package/busy-spence-79c6bf/src/examples/v1/exampleVouch.json +25 -0
  16. package/busy-spence-79c6bf/src/examples/v2/exampleTransaction.json +901 -0
  17. package/busy-spence-79c6bf/src/examples/v3/exampleAddParticipantVouch.json +38 -0
  18. package/busy-spence-79c6bf/src/examples/v3/exampleCustomOverlay.json +55 -0
  19. package/busy-spence-79c6bf/src/examples/v3/exampleCustomOverlay2.json +93 -0
  20. package/busy-spence-79c6bf/src/examples/v3/exampleDocumentedVouch.json +47 -0
  21. package/busy-spence-79c6bf/src/examples/v3/exampleElectronicRecord.json +36 -0
  22. package/busy-spence-79c6bf/src/examples/v3/exampleTransaction.json +1038 -0
  23. package/busy-spence-79c6bf/src/examples/v3/exampleVouch.json +32 -0
  24. package/busy-spence-79c6bf/src/mappings/SendPropertyDetailsRequestSchema.json +1588 -0
  25. package/busy-spence-79c6bf/src/mappings/adf.js +198 -0
  26. package/busy-spence-79c6bf/src/schemas/v1/GeoJSON.json +1279 -0
  27. package/busy-spence-79c6bf/src/schemas/v1/baspiNotes.html +102 -0
  28. package/busy-spence-79c6bf/src/schemas/v1/energy-performance-certificate.json +124 -0
  29. package/busy-spence-79c6bf/src/schemas/v1/freehold-information.json +2051 -0
  30. package/busy-spence-79c6bf/src/schemas/v1/leasehold-information.json +2064 -0
  31. package/busy-spence-79c6bf/src/schemas/v1/legal-information.json +1045 -0
  32. package/busy-spence-79c6bf/src/schemas/v1/material-facts.json +2109 -0
  33. package/busy-spence-79c6bf/src/schemas/v1/pdtf-transaction-search-results.json +40 -0
  34. package/busy-spence-79c6bf/src/schemas/v1/pdtf-transaction.json +191 -0
  35. package/busy-spence-79c6bf/src/schemas/v1/searches/drainage-and-water.json +261 -0
  36. package/busy-spence-79c6bf/src/schemas/v1/searches/local-land-charges.json +69 -0
  37. package/busy-spence-79c6bf/src/schemas/v1/searches/local-searches-required.json +857 -0
  38. package/busy-spence-79c6bf/src/schemas/v1/searches.json +237 -0
  39. package/busy-spence-79c6bf/src/schemas/v1/title-deed.json +841 -0
  40. package/busy-spence-79c6bf/src/schemas/v2/baspiNotes.html +102 -0
  41. package/busy-spence-79c6bf/src/schemas/v2/combined.json +37731 -0
  42. package/busy-spence-79c6bf/src/schemas/v2/overlays/baspi.json +8132 -0
  43. package/busy-spence-79c6bf/src/schemas/v2/overlays/con29DW.json +705 -0
  44. package/busy-spence-79c6bf/src/schemas/v2/overlays/con29R.json +2956 -0
  45. package/busy-spence-79c6bf/src/schemas/v2/overlays/fme1.json +1259 -0
  46. package/busy-spence-79c6bf/src/schemas/v2/overlays/llc1.json +25 -0
  47. package/busy-spence-79c6bf/src/schemas/v2/overlays/lpe1.json +2171 -0
  48. package/busy-spence-79c6bf/src/schemas/v2/overlays/nts.json +326 -0
  49. package/busy-spence-79c6bf/src/schemas/v2/overlays/oc1.json +2799 -0
  50. package/busy-spence-79c6bf/src/schemas/v2/overlays/piq.json +3419 -0
  51. package/busy-spence-79c6bf/src/schemas/v2/overlays/rds.json +3736 -0
  52. package/busy-spence-79c6bf/src/schemas/v2/overlays/ta10.json +5306 -0
  53. package/busy-spence-79c6bf/src/schemas/v2/overlays/ta6.json +4533 -0
  54. package/busy-spence-79c6bf/src/schemas/v2/overlays/ta7.json +1045 -0
  55. package/busy-spence-79c6bf/src/schemas/v2/pdtf-transaction.json +34351 -0
  56. package/busy-spence-79c6bf/src/schemas/v2/skeleton.json +3973 -0
  57. package/busy-spence-79c6bf/src/schemas/v3/combined.json +48643 -0
  58. package/busy-spence-79c6bf/src/schemas/v3/compactSkeleton.txt +4519 -0
  59. package/busy-spence-79c6bf/src/schemas/v3/overlays/README.md +299 -0
  60. package/busy-spence-79c6bf/src/schemas/v3/overlays/baspi4.json +8030 -0
  61. package/busy-spence-79c6bf/src/schemas/v3/overlays/baspi5.json +8180 -0
  62. package/busy-spence-79c6bf/src/schemas/v3/overlays/con29DW.json +716 -0
  63. package/busy-spence-79c6bf/src/schemas/v3/overlays/con29R.json +2981 -0
  64. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/ac.json +334 -0
  65. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/as.json +74 -0
  66. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/dk.json +33 -0
  67. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/dr.json +73 -0
  68. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/er.json +85 -0
  69. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/fd.json +75 -0
  70. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/hi.json +51 -0
  71. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/hs.json +73 -0
  72. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/ic.json +94 -0
  73. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/jk.json +96 -0
  74. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/la.json +85 -0
  75. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/lc.json +76 -0
  76. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/ma.json +90 -0
  77. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/mc.json +38 -0
  78. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/mi.json +70 -0
  79. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/nd.json +44 -0
  80. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/oa.json +24 -0
  81. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/oc.json +57 -0
  82. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/pc.json +38 -0
  83. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/ph.json +195 -0
  84. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/rw.json +69 -0
  85. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/sb.json +73 -0
  86. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/sc.json +133 -0
  87. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/sd.json +64 -0
  88. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/sf.json +74 -0
  89. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/sl.json +68 -0
  90. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/ta.json +204 -0
  91. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/tf.json +103 -0
  92. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/tr.json +74 -0
  93. package/busy-spence-79c6bf/src/schemas/v3/overlays/extensions/wg.json +351 -0
  94. package/busy-spence-79c6bf/src/schemas/v3/overlays/fme1.json +1266 -0
  95. package/busy-spence-79c6bf/src/schemas/v3/overlays/llc1.json +25 -0
  96. package/busy-spence-79c6bf/src/schemas/v3/overlays/lpe1.json +2199 -0
  97. package/busy-spence-79c6bf/src/schemas/v3/overlays/nts.json +2159 -0
  98. package/busy-spence-79c6bf/src/schemas/v3/overlays/nts2.json +2744 -0
  99. package/busy-spence-79c6bf/src/schemas/v3/overlays/ntsl.json +1815 -0
  100. package/busy-spence-79c6bf/src/schemas/v3/overlays/ntsl2.json +2219 -0
  101. package/busy-spence-79c6bf/src/schemas/v3/overlays/oc1.json +2817 -0
  102. package/busy-spence-79c6bf/src/schemas/v3/overlays/piq.json +3324 -0
  103. package/busy-spence-79c6bf/src/schemas/v3/overlays/rds.json +3668 -0
  104. package/busy-spence-79c6bf/src/schemas/v3/overlays/sef25.json +1653 -0
  105. package/busy-spence-79c6bf/src/schemas/v3/overlays/sr24.json +38 -0
  106. package/busy-spence-79c6bf/src/schemas/v3/overlays/ta10.json +4645 -0
  107. package/busy-spence-79c6bf/src/schemas/v3/overlays/ta6.json +4572 -0
  108. package/busy-spence-79c6bf/src/schemas/v3/overlays/ta6ed6.json +6665 -0
  109. package/busy-spence-79c6bf/src/schemas/v3/overlays/ta7.json +1537 -0
  110. package/busy-spence-79c6bf/src/schemas/v3/overlays/ta7ed5.json +1585 -0
  111. package/busy-spence-79c6bf/src/schemas/v3/pdtf-transaction.json +41570 -0
  112. package/busy-spence-79c6bf/src/schemas/v3/skeleton.json +5767 -0
  113. package/busy-spence-79c6bf/src/schemas/verifiedClaims/README.md +21 -0
  114. package/busy-spence-79c6bf/src/schemas/verifiedClaims/pdtf-verified-claims.json +447 -0
  115. package/busy-spence-79c6bf/src/utils/compactSkeleton.js +84 -0
  116. package/busy-spence-79c6bf/src/utils/countTokens.js +67 -0
  117. package/busy-spence-79c6bf/src/utils/extractExtensionOverlays.js +633 -0
  118. package/busy-spence-79c6bf/src/utils/extractOverlay.js +381 -0
  119. package/busy-spence-79c6bf/src/utils/extractProperties.js +44 -0
  120. package/busy-spence-79c6bf/src/utils/listPathTitles.js +36 -0
  121. package/busy-spence-79c6bf/src/utils/minimalSkeleton.js +85 -0
  122. package/busy-spence-79c6bf/src/utils/pathList.csv +903 -0
  123. package/busy-spence-79c6bf/src/utils/pathSkeleton.js +181 -0
  124. package/busy-spence-79c6bf/ta6ed6-titles-plan.md +118 -0
  125. package/busy-spence-79c6bf/ta7ed5-titles-spec.md +89 -0
  126. package/package.json +1 -1
  127. package/src/schemas/v3/combined.json +228 -50
  128. package/src/schemas/v3/overlays/llc1.json +1 -2
  129. package/src/schemas/v3/overlays/ta6ed6.json +204 -75
  130. package/src/schemas/v3/overlays/ta7ed5.json +54 -20
  131. package/src/schemas/v3/pdtf-transaction.json +7 -7
@@ -0,0 +1,198 @@
1
+ const PROPERTY_TYPES = {
2
+ 0: "Not Specified",
3
+ 1: "Terraced House",
4
+ 2: "End of terrace house",
5
+ 3: "Semi-detached house",
6
+ 4: "Detached house",
7
+ 5: "Mews house",
8
+ 6: "Cluster house",
9
+ 7: "Ground floor flat",
10
+ 8: "Flat",
11
+ 9: "Studio flat",
12
+ 10: "Ground floor maisonette",
13
+ 11: "Maisonette",
14
+ 12: "Bungalow",
15
+ 13: "Terraced bungalow",
16
+ 14: "Semi-detached bungalow",
17
+ 15: "Detached bungalow",
18
+ 16: "Mobile home",
19
+ 20: "Land (Residential)",
20
+ 21: "Link detached house",
21
+ 22: "Town house",
22
+ 23: "Cottage",
23
+ 24: "Chalet",
24
+ 25: "Character Property",
25
+ 26: "House (unspecified)",
26
+ 27: "Villa",
27
+ 28: "Apartment",
28
+ 29: "Penthouse",
29
+ 30: "Finca",
30
+ 43: "Barn Conversion",
31
+ 44: "Serviced apartment",
32
+ 45: "Parking",
33
+ 46: "Sheltered Housing",
34
+ 47: "Reteirment property",
35
+ 48: "House share",
36
+ 49: "Flat share",
37
+ 50: "Park home",
38
+ 51: "Garages",
39
+ 52: "Farm House",
40
+ 53: "Equestrian facility",
41
+ 56: "Duplex",
42
+ 59: "Triplex",
43
+ 62: "Longere",
44
+ 65: "Gite",
45
+ 68: "Barn",
46
+ 71: "Trulli",
47
+ 74: "Mill",
48
+ 77: "Ruins",
49
+ 80: "Restaurant",
50
+ 83: "Cafe",
51
+ 86: "Mill",
52
+ 92: "Castle",
53
+ 95: "Village House",
54
+ 101: "Cave House",
55
+ 104: "Cortijo",
56
+ 107: "Farm Land",
57
+ 110: "Plot",
58
+ 113: "Country House",
59
+ 116: "Stone House",
60
+ 117: "Caravan",
61
+ 118: "Lodge",
62
+ 119: "Log Cabin",
63
+ 120: "Manor House",
64
+ 121: "Stately Home",
65
+ 125: "Off-Plan",
66
+ 128: "Semi-detached Villa",
67
+ 131: "Detached Villa",
68
+ 134: "Bar/Nightclub",
69
+ 137: "Shop",
70
+ 140: "Riad",
71
+ 141: "House Boat",
72
+ 142: "Hotel Room",
73
+ 143: "Block of Apartments",
74
+ 144: "Private Halls",
75
+ 178: "Office",
76
+ 181: "Business Park",
77
+ 184: "Serviced Office",
78
+ 187: "Retail Property (High Street)",
79
+ 190: "Retail Property (Out of Town)",
80
+ 193: "Convenience Store",
81
+ // 196: "Garages", duplicated with 51
82
+ 199: "Hairdresser/Barber Shop",
83
+ 202: "Hotel",
84
+ 205: "Petrol Station",
85
+ 208: "Post Office",
86
+ 211: "Pub",
87
+ 214: "Workshop & Retail Space",
88
+ 217: "Distribution Warehouse",
89
+ 220: "Factory",
90
+ 223: "Heavy Industrial",
91
+ 226: "Industrial Park",
92
+ 229: "Light Industrial",
93
+ 232: "Storage",
94
+ 235: "Showroom",
95
+ 238: "Warehouse",
96
+ 241: "Land (Commercial)",
97
+ 244: "Commercial Development",
98
+ 247: "Industrial Development",
99
+ 250: "Residential Development",
100
+ 253: "Commercial Property",
101
+ 256: "Data Centre",
102
+ 259: "Farm",
103
+ 262: "Healthcare Facility",
104
+ 265: "Marine Property",
105
+ 268: "Mixed Use",
106
+ 271: "Research & Development Facility",
107
+ 274: "Science Park",
108
+ 277: "Guest House",
109
+ 280: "Hospitality",
110
+ 283: "Leisure Facility",
111
+ 298: "Takeaway",
112
+ 301: "Childcare Facility",
113
+ 304: "Smallholding",
114
+ 307: "Place of Worship",
115
+ 310: "Trade Counter",
116
+ 511: "Coach House",
117
+ 512: "House of Multiple Occupation",
118
+ 535: "Sports facilities",
119
+ 538: "Spa",
120
+ 541: "Campsite & Holiday Village",
121
+ };
122
+
123
+ const PRICE_QUALIFIER_TYPES = {
124
+ 0: "Default",
125
+ 1: "POA",
126
+ 2: "Guide Price",
127
+ 3: "Fixed Price",
128
+ 4: "Offers in excess of",
129
+ 5: "OIRO",
130
+ 6: "Sale by Tender",
131
+ 7: "From",
132
+ 9: "Shared Ownership",
133
+ 10: "Offers over",
134
+ 11: "Part Buy, Part Rent",
135
+ 12: "Shared Equity",
136
+ 15: "Offers Invited",
137
+ 16: "Coming Soon",
138
+ };
139
+
140
+ const TENURE_TYPES = {
141
+ 1: "Freehold",
142
+ 2: "Leasehold",
143
+ 3: "Feudal",
144
+ 4: "Commonhold",
145
+ 5: "Share of Freehold",
146
+ };
147
+
148
+ const FREQUENCY_TYPES = {
149
+ 1: "Yearly",
150
+ 4: "Quarterly",
151
+ 12: "Monthly",
152
+ 52: "Weekly",
153
+ 365: "Daily",
154
+ };
155
+
156
+ export const adfProperty = (pdtfTransaction) => {
157
+ const materialFacts = pdtfTransaction.propertyPack?.materialFacts;
158
+ return {
159
+ property_type:
160
+ Object.keys(PROPERTY_TYPES).find(
161
+ (key) => PROPERTY_TYPES(key) === materialFacts?.propertyType
162
+ ) || 0,
163
+ new_home: materialFacts?.isNewBuild,
164
+ address: {
165
+ house_name_number: materialFacts?.address?.line1,
166
+ address_2: materialFacts?.address?.line2,
167
+ town: materialFacts?.address?.town,
168
+ postcode_1: materialFacts?.address?.postcode.split(" ")[0],
169
+ postcode_2: materialFacts?.address?.postcode.split(" ")[1],
170
+ display_address: materialFacts?.address?.line1,
171
+ latitude: materialFacts?.location?.latitude,
172
+ longitude: materialFacts?.location?.longitude,
173
+ },
174
+ price_information: {
175
+ price: materialFacts?.price_information?.price,
176
+ price_qualifier: materialFacts?.price_information?.priceQualifier,
177
+ },
178
+ };
179
+ };
180
+
181
+ export const pdtfClaims = (adfProperty) => {
182
+ return {
183
+ "/propertyPack/materialFacts/address": {
184
+ line1: adfProperty?.address?.house_name_number,
185
+ line2: adfProperty?.address?.line2,
186
+ town: adfProperty?.address?.town,
187
+ postcode: `${adfProperty?.address?.postcode_1} ${adfProperty?.address?.postcode_2}`,
188
+ },
189
+ "/propertyPack/materialFacts/location": {
190
+ latitude: adfProperty?.address?.latitude,
191
+ longitude: adfProperty?.address?.longitude,
192
+ },
193
+ "/propertyPack/materialFacts/priceInformation": {
194
+ price: adfProperty?.price_information?.price,
195
+ priceQualifier: adfProperty?.price_information?.price_qualifier,
196
+ },
197
+ };
198
+ };