@pdtf/schemas 3.6.0-dev.3 → 3.6.0-dev.32

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 (193) hide show
  1. package/docs/ta6-certificate-permit-contract.md +51 -0
  2. package/docs/v4-mapping-and-recomposition.md +476 -0
  3. package/index.js +212 -0
  4. package/package.json +10 -1
  5. package/src/schemas/v3/combined.json +2267 -658
  6. package/src/schemas/v3/compactSkeleton.txt +120 -51
  7. package/src/schemas/v3/overlays/baspi4.json +54 -74
  8. package/src/schemas/v3/overlays/baspi5.json +54 -74
  9. package/src/schemas/v3/overlays/extensions/ac.json +2 -1
  10. package/src/schemas/v3/overlays/extensions/dk.json +3 -2
  11. package/src/schemas/v3/overlays/extensions/fd.json +2 -1
  12. package/src/schemas/v3/overlays/extensions/ic.json +44 -9
  13. package/src/schemas/v3/overlays/extensions/lc.json +3 -2
  14. package/src/schemas/v3/overlays/extensions/mi.json +2 -1
  15. package/src/schemas/v3/overlays/extensions/nd.json +3 -2
  16. package/src/schemas/v3/overlays/extensions/pc.json +3 -2
  17. package/src/schemas/v3/overlays/extensions/ph.json +2 -1
  18. package/src/schemas/v3/overlays/extensions/rw.json +4 -3
  19. package/src/schemas/v3/overlays/extensions/sc.json +8 -4
  20. package/src/schemas/v3/overlays/extensions/sd.json +3 -2
  21. package/src/schemas/v3/overlays/extensions/tr.json +3 -2
  22. package/src/schemas/v3/overlays/extensions/wg.json +2 -1
  23. package/src/schemas/v3/overlays/llc1.json +1 -2
  24. package/src/schemas/v3/overlays/lpe1.json +3 -2
  25. package/src/schemas/v3/overlays/nts.json +7 -3
  26. package/src/schemas/v3/overlays/nts2.json +9 -4
  27. package/src/schemas/v3/overlays/ntsl.json +5 -2
  28. package/src/schemas/v3/overlays/ntsl2.json +7 -3
  29. package/src/schemas/v3/overlays/piq.json +34 -25
  30. package/src/schemas/v3/overlays/rds.json +24 -50
  31. package/src/schemas/v3/overlays/sef25.json +16 -2
  32. package/src/schemas/v3/overlays/ta10.json +0 -9
  33. package/src/schemas/v3/overlays/ta6.json +39 -70
  34. package/src/schemas/v3/overlays/ta6ed6.json +331 -307
  35. package/{pensive-tesla-d0d355/src/schemas/v3/overlays/ta6.json → src/schemas/v3/overlays/ta6ed6v2.json} +1574 -1464
  36. package/src/schemas/v3/overlays/ta7.json +2 -1
  37. package/src/schemas/v3/overlays/ta7ed5.json +77 -21
  38. package/src/schemas/v3/pdtf-transaction.json +1030 -492
  39. package/src/schemas/v3/skeleton.json +163 -57
  40. package/src/schemas/v4/Gift.json +88 -0
  41. package/src/schemas/v4/Offer.json +425 -0
  42. package/src/schemas/v4/Organisation.json +167 -0
  43. package/src/schemas/v4/Person.json +321 -0
  44. package/src/schemas/v4/Property.json +27813 -0
  45. package/src/schemas/v4/PropertyTitleLink.json +183 -0
  46. package/src/schemas/v4/Representation.json +67 -0
  47. package/src/schemas/v4/SellerCapacity.json +193 -0
  48. package/src/schemas/v4/Title.json +14675 -0
  49. package/src/schemas/v4/Transaction.json +1612 -0
  50. package/src/schemas/v4/TransactionRole.json +59 -0
  51. package/src/schemas/v4/mapping.json +1188 -0
  52. package/src/utils/checkTa6OmissionCompatibility.js +146 -0
  53. package/src/utils/extractExtensionOverlays.js +11 -2
  54. package/src/utils/extractOverlay.js +21 -0
  55. package/src/utils/generateV4Schemas.js +1561 -0
  56. package/src/utils/syncTa6ed6v2Markers.js +92 -0
  57. package/src/utils/v4.js +956 -0
  58. package/CLAUDE.md +0 -101
  59. package/pensive-tesla-d0d355/CLAUDE.md +0 -101
  60. package/pensive-tesla-d0d355/LICENSE +0 -21
  61. package/pensive-tesla-d0d355/README.md +0 -435
  62. package/pensive-tesla-d0d355/docs/branch-release-workflow.md +0 -138
  63. package/pensive-tesla-d0d355/docs/sef25-extensions-ui-spec.md +0 -355
  64. package/pensive-tesla-d0d355/index.js +0 -654
  65. package/pensive-tesla-d0d355/package-lock.json +0 -7297
  66. package/pensive-tesla-d0d355/package.json +0 -44
  67. package/pensive-tesla-d0d355/src/examples/v1/exampleAddParticipantVouch.json +0 -32
  68. package/pensive-tesla-d0d355/src/examples/v1/exampleDocumentedVouch.json +0 -40
  69. package/pensive-tesla-d0d355/src/examples/v1/exampleElectronicRecord.json +0 -30
  70. package/pensive-tesla-d0d355/src/examples/v1/exampleTransaction.json +0 -878
  71. package/pensive-tesla-d0d355/src/examples/v1/exampleVouch.json +0 -25
  72. package/pensive-tesla-d0d355/src/examples/v2/exampleTransaction.json +0 -901
  73. package/pensive-tesla-d0d355/src/examples/v3/exampleAddParticipantVouch.json +0 -38
  74. package/pensive-tesla-d0d355/src/examples/v3/exampleCustomOverlay.json +0 -55
  75. package/pensive-tesla-d0d355/src/examples/v3/exampleCustomOverlay2.json +0 -93
  76. package/pensive-tesla-d0d355/src/examples/v3/exampleDocumentedVouch.json +0 -47
  77. package/pensive-tesla-d0d355/src/examples/v3/exampleElectronicRecord.json +0 -36
  78. package/pensive-tesla-d0d355/src/examples/v3/exampleTransaction.json +0 -1038
  79. package/pensive-tesla-d0d355/src/examples/v3/exampleVouch.json +0 -32
  80. package/pensive-tesla-d0d355/src/mappings/SendPropertyDetailsRequestSchema.json +0 -1588
  81. package/pensive-tesla-d0d355/src/mappings/adf.js +0 -198
  82. package/pensive-tesla-d0d355/src/schemas/v1/GeoJSON.json +0 -1279
  83. package/pensive-tesla-d0d355/src/schemas/v1/baspiNotes.html +0 -102
  84. package/pensive-tesla-d0d355/src/schemas/v1/energy-performance-certificate.json +0 -124
  85. package/pensive-tesla-d0d355/src/schemas/v1/freehold-information.json +0 -2051
  86. package/pensive-tesla-d0d355/src/schemas/v1/leasehold-information.json +0 -2064
  87. package/pensive-tesla-d0d355/src/schemas/v1/legal-information.json +0 -1045
  88. package/pensive-tesla-d0d355/src/schemas/v1/material-facts.json +0 -2109
  89. package/pensive-tesla-d0d355/src/schemas/v1/pdtf-transaction-search-results.json +0 -40
  90. package/pensive-tesla-d0d355/src/schemas/v1/pdtf-transaction.json +0 -191
  91. package/pensive-tesla-d0d355/src/schemas/v1/searches/drainage-and-water.json +0 -261
  92. package/pensive-tesla-d0d355/src/schemas/v1/searches/local-land-charges.json +0 -69
  93. package/pensive-tesla-d0d355/src/schemas/v1/searches/local-searches-required.json +0 -857
  94. package/pensive-tesla-d0d355/src/schemas/v1/searches.json +0 -237
  95. package/pensive-tesla-d0d355/src/schemas/v1/title-deed.json +0 -841
  96. package/pensive-tesla-d0d355/src/schemas/v2/baspiNotes.html +0 -102
  97. package/pensive-tesla-d0d355/src/schemas/v2/combined.json +0 -37731
  98. package/pensive-tesla-d0d355/src/schemas/v2/overlays/baspi.json +0 -8132
  99. package/pensive-tesla-d0d355/src/schemas/v2/overlays/con29DW.json +0 -705
  100. package/pensive-tesla-d0d355/src/schemas/v2/overlays/con29R.json +0 -2956
  101. package/pensive-tesla-d0d355/src/schemas/v2/overlays/fme1.json +0 -1259
  102. package/pensive-tesla-d0d355/src/schemas/v2/overlays/llc1.json +0 -25
  103. package/pensive-tesla-d0d355/src/schemas/v2/overlays/lpe1.json +0 -2171
  104. package/pensive-tesla-d0d355/src/schemas/v2/overlays/nts.json +0 -326
  105. package/pensive-tesla-d0d355/src/schemas/v2/overlays/oc1.json +0 -2799
  106. package/pensive-tesla-d0d355/src/schemas/v2/overlays/piq.json +0 -3419
  107. package/pensive-tesla-d0d355/src/schemas/v2/overlays/rds.json +0 -3736
  108. package/pensive-tesla-d0d355/src/schemas/v2/overlays/ta10.json +0 -5306
  109. package/pensive-tesla-d0d355/src/schemas/v2/overlays/ta6.json +0 -4533
  110. package/pensive-tesla-d0d355/src/schemas/v2/overlays/ta7.json +0 -1045
  111. package/pensive-tesla-d0d355/src/schemas/v2/pdtf-transaction.json +0 -34351
  112. package/pensive-tesla-d0d355/src/schemas/v2/skeleton.json +0 -3973
  113. package/pensive-tesla-d0d355/src/schemas/v3/combined.json +0 -48469
  114. package/pensive-tesla-d0d355/src/schemas/v3/compactSkeleton.txt +0 -4519
  115. package/pensive-tesla-d0d355/src/schemas/v3/overlays/README.md +0 -299
  116. package/pensive-tesla-d0d355/src/schemas/v3/overlays/baspi4.json +0 -8025
  117. package/pensive-tesla-d0d355/src/schemas/v3/overlays/baspi5.json +0 -8175
  118. package/pensive-tesla-d0d355/src/schemas/v3/overlays/con29DW.json +0 -716
  119. package/pensive-tesla-d0d355/src/schemas/v3/overlays/con29R.json +0 -2981
  120. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/ac.json +0 -333
  121. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/as.json +0 -74
  122. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/dk.json +0 -32
  123. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/dr.json +0 -73
  124. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/er.json +0 -85
  125. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/fd.json +0 -75
  126. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/hi.json +0 -51
  127. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/hs.json +0 -73
  128. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/ic.json +0 -59
  129. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/jk.json +0 -96
  130. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/la.json +0 -85
  131. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/lc.json +0 -75
  132. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/ma.json +0 -90
  133. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/mc.json +0 -38
  134. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/mi.json +0 -69
  135. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/nd.json +0 -43
  136. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/oa.json +0 -24
  137. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/oc.json +0 -57
  138. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/pc.json +0 -37
  139. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/ph.json +0 -194
  140. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/rw.json +0 -68
  141. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/sb.json +0 -73
  142. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/sc.json +0 -129
  143. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/sd.json +0 -63
  144. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/sf.json +0 -74
  145. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/sl.json +0 -68
  146. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/ta.json +0 -252
  147. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/tf.json +0 -103
  148. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/tr.json +0 -73
  149. package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/wg.json +0 -350
  150. package/pensive-tesla-d0d355/src/schemas/v3/overlays/fme1.json +0 -1266
  151. package/pensive-tesla-d0d355/src/schemas/v3/overlays/llc1.json +0 -25
  152. package/pensive-tesla-d0d355/src/schemas/v3/overlays/lpe1.json +0 -2199
  153. package/pensive-tesla-d0d355/src/schemas/v3/overlays/nts.json +0 -2157
  154. package/pensive-tesla-d0d355/src/schemas/v3/overlays/nts2.json +0 -2742
  155. package/pensive-tesla-d0d355/src/schemas/v3/overlays/ntsl.json +0 -1813
  156. package/pensive-tesla-d0d355/src/schemas/v3/overlays/ntsl2.json +0 -2217
  157. package/pensive-tesla-d0d355/src/schemas/v3/overlays/oc1.json +0 -2817
  158. package/pensive-tesla-d0d355/src/schemas/v3/overlays/piq.json +0 -3322
  159. package/pensive-tesla-d0d355/src/schemas/v3/overlays/rds.json +0 -3665
  160. package/pensive-tesla-d0d355/src/schemas/v3/overlays/sef25.json +0 -1639
  161. package/pensive-tesla-d0d355/src/schemas/v3/overlays/sr24.json +0 -38
  162. package/pensive-tesla-d0d355/src/schemas/v3/overlays/ta10.json +0 -4654
  163. package/pensive-tesla-d0d355/src/schemas/v3/overlays/ta6ed6.json +0 -6534
  164. package/pensive-tesla-d0d355/src/schemas/v3/overlays/ta7.json +0 -1537
  165. package/pensive-tesla-d0d355/src/schemas/v3/overlays/ta7ed5.json +0 -1551
  166. package/pensive-tesla-d0d355/src/schemas/v3/pdtf-transaction.json +0 -41573
  167. package/pensive-tesla-d0d355/src/schemas/v3/skeleton.json +0 -5767
  168. package/pensive-tesla-d0d355/src/schemas/verifiedClaims/README.md +0 -21
  169. package/pensive-tesla-d0d355/src/schemas/verifiedClaims/pdtf-verified-claims.json +0 -447
  170. package/pensive-tesla-d0d355/src/utils/compactSkeleton.js +0 -84
  171. package/pensive-tesla-d0d355/src/utils/countTokens.js +0 -67
  172. package/pensive-tesla-d0d355/src/utils/extractExtensionOverlays.js +0 -624
  173. package/pensive-tesla-d0d355/src/utils/extractOverlay.js +0 -381
  174. package/pensive-tesla-d0d355/src/utils/extractProperties.js +0 -44
  175. package/pensive-tesla-d0d355/src/utils/listPathTitles.js +0 -36
  176. package/pensive-tesla-d0d355/src/utils/minimalSkeleton.js +0 -85
  177. package/pensive-tesla-d0d355/src/utils/pathList.csv +0 -903
  178. package/pensive-tesla-d0d355/src/utils/pathSkeleton.js +0 -181
  179. package/src/examples/v1/exampleAddParticipantVouch.json +0 -32
  180. package/src/examples/v1/exampleDocumentedVouch.json +0 -40
  181. package/src/examples/v1/exampleElectronicRecord.json +0 -30
  182. package/src/examples/v1/exampleTransaction.json +0 -878
  183. package/src/examples/v1/exampleVouch.json +0 -25
  184. package/src/examples/v2/exampleTransaction.json +0 -901
  185. package/src/examples/v3/exampleAddParticipantVouch.json +0 -38
  186. package/src/examples/v3/exampleCustomOverlay.json +0 -55
  187. package/src/examples/v3/exampleCustomOverlay2.json +0 -93
  188. package/src/examples/v3/exampleDocumentedVouch.json +0 -47
  189. package/src/examples/v3/exampleElectronicRecord.json +0 -36
  190. package/src/examples/v3/exampleTransaction.json +0 -1038
  191. package/src/examples/v3/exampleVouch.json +0 -32
  192. package/src/mappings/SendPropertyDetailsRequestSchema.json +0 -1588
  193. package/src/mappings/adf.js +0 -198
@@ -0,0 +1,88 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://trust.propdata.org.uk/schemas/v4/entities/gift.json",
4
+ "type": "object",
5
+ "title": "Gift Entity",
6
+ "description": "A gift of funds towards a purchase, made by a giftor. Implies the Giftor role.",
7
+ "x-pdtf-source": {
8
+ "packageName": "@pdtf/schemas",
9
+ "packageVersion": "3.6.0-dev.32",
10
+ "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
+ "combinedPath": "src/schemas/v3/combined.json",
12
+ "combinedSha256": "83f31fddf82e57e67f2bc92844459095041b254b970d8881dd4318248c188f67"
13
+ },
14
+ "properties": {
15
+ "id": {
16
+ "title": "Gift URN",
17
+ "description": "Uniform Resource Name identifier for the gift",
18
+ "type": "string",
19
+ "pattern": "^urn:[a-z0-9][a-z0-9-]{0,31}:[a-zA-Z0-9._~:/?#\\[\\]@!$&'()*+,;=-]+$"
20
+ },
21
+ "donor": {
22
+ "title": "Donor Reference",
23
+ "description": "DID referencing the Person or Organisation making the gift",
24
+ "type": "string",
25
+ "pattern": "^did:[a-z0-9]+:(?:(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})+$"
26
+ },
27
+ "offerId": {
28
+ "title": "Offer id",
29
+ "type": "string",
30
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:+-]*$",
31
+ "description": "The offer this gift is contributing towards, as keyed in Transaction.offers. Held here rather than on Offer so that an Offer credential always implies the Buyer role."
32
+ },
33
+ "giftDetails": {
34
+ "title": "Details of the gift being made towards the purchase",
35
+ "description": "The terms on which a giftor is contributing funds. These are the questions a conveyancer must resolve before reporting to a lender: whether the money is truly a gift rather than a loan, and whether the donor acquires any interest in or occupation of the property.",
36
+ "type": "object",
37
+ "properties": {
38
+ "amount": {
39
+ "title": "Amount being gifted",
40
+ "type": "number",
41
+ "minimum": 0
42
+ },
43
+ "currency": {
44
+ "title": "Currency of the gift",
45
+ "type": "string",
46
+ "default": "GBP"
47
+ },
48
+ "relationshipToBuyer": {
49
+ "title": "Donor's relationship to the buyer",
50
+ "type": "string"
51
+ },
52
+ "fundsTransferred": {
53
+ "title": "Whether the gift has been paid to the buyer yet",
54
+ "type": "string",
55
+ "enum": [
56
+ "None",
57
+ "Part",
58
+ "All"
59
+ ]
60
+ },
61
+ "repayable": {
62
+ "title": "Whether the buyer must repay the money",
63
+ "description": "If true the funds are a loan rather than a gift, which most lenders treat differently.",
64
+ "type": "boolean"
65
+ },
66
+ "confersBeneficialInterest": {
67
+ "title": "Whether the donor acquires an interest in the property",
68
+ "type": "boolean"
69
+ },
70
+ "willOccupyProperty": {
71
+ "title": "Whether the donor will live in the property after completion",
72
+ "description": "An adult occupier who is not a legal owner may be required to sign a deed of consent or waiver of rights.",
73
+ "type": "boolean"
74
+ }
75
+ }
76
+ },
77
+ "transaction": {
78
+ "title": "Transaction Reference",
79
+ "description": "DID referencing the Transaction entity",
80
+ "type": "string",
81
+ "pattern": "^did:[a-z0-9]+:(?:(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})+$"
82
+ }
83
+ },
84
+ "required": [
85
+ "donor",
86
+ "transaction"
87
+ ]
88
+ }
@@ -0,0 +1,425 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://trust.propdata.org.uk/schemas/v4/entities/offer.json",
4
+ "type": "object",
5
+ "title": "Offer Entity",
6
+ "description": "An offer made by a prospective buyer in a property transaction.",
7
+ "x-pdtf-source": {
8
+ "packageName": "@pdtf/schemas",
9
+ "packageVersion": "3.6.0-dev.32",
10
+ "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
+ "combinedPath": "src/schemas/v3/combined.json",
12
+ "combinedSha256": "83f31fddf82e57e67f2bc92844459095041b254b970d8881dd4318248c188f67"
13
+ },
14
+ "properties": {
15
+ "id": {
16
+ "title": "Offer URN",
17
+ "description": "Uniform Resource Name identifier for the offer",
18
+ "type": "string",
19
+ "pattern": "^urn:[a-z0-9][a-z0-9-]{0,31}:[a-zA-Z0-9._~:/?#\\[\\]@!$&'()*+,;=-]+$"
20
+ },
21
+ "offerId": {
22
+ "title": "Offer id",
23
+ "type": "string",
24
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:+-]*$",
25
+ "description": "The V3 offers object key for this offer, as referenced by participants[].offerId"
26
+ },
27
+ "buyer": {
28
+ "title": "Buyer Reference",
29
+ "description": "DID referencing the Person or Organisation making the offer",
30
+ "type": "string",
31
+ "pattern": "^did:[a-z0-9]+:(?:(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})+$"
32
+ },
33
+ "transaction": {
34
+ "title": "Transaction Reference",
35
+ "description": "DID referencing the Transaction entity",
36
+ "type": "string",
37
+ "pattern": "^did:[a-z0-9]+:(?:(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})+$"
38
+ },
39
+ "amount": {
40
+ "type": "number",
41
+ "minimum": 0
42
+ },
43
+ "currency": {
44
+ "type": "string",
45
+ "pattern": "^[A-Z]{3}$"
46
+ },
47
+ "status": {
48
+ "type": "string",
49
+ "enum": [
50
+ "Pending",
51
+ "Withdrawn",
52
+ "Rejected",
53
+ "Accepted",
54
+ "Note of Interest"
55
+ ]
56
+ },
57
+ "inclusions": {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "string"
61
+ }
62
+ },
63
+ "exclusions": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "string"
67
+ }
68
+ },
69
+ "conditions": {
70
+ "type": "array",
71
+ "items": {
72
+ "type": "string"
73
+ }
74
+ },
75
+ "metadata": {
76
+ "title": "Offer metadata",
77
+ "description": "Flexible container for vendor-specific metadata items relating to this offer, keyed by vendor namespace (e.g. /offers/{id}/metadata/Moverly/lenderCompatibilityAnalysis). Values may be strings, numbers, booleans or nested objects. Paths are addressable up to three levels below metadata (e.g. /offers/{id}/metadata/vendor/item/field).",
78
+ "type": "object",
79
+ "patternProperties": {
80
+ ".*": {
81
+ "oneOf": [
82
+ {
83
+ "type": "string"
84
+ },
85
+ {
86
+ "type": "number"
87
+ },
88
+ {
89
+ "type": "boolean"
90
+ },
91
+ {
92
+ "type": "object",
93
+ "patternProperties": {
94
+ ".*": {
95
+ "oneOf": [
96
+ {
97
+ "type": "string"
98
+ },
99
+ {
100
+ "type": "number"
101
+ },
102
+ {
103
+ "type": "boolean"
104
+ },
105
+ {
106
+ "type": "array"
107
+ },
108
+ {
109
+ "type": "null"
110
+ },
111
+ {
112
+ "type": "object",
113
+ "patternProperties": {
114
+ ".*": {}
115
+ }
116
+ }
117
+ ]
118
+ }
119
+ }
120
+ }
121
+ ]
122
+ }
123
+ }
124
+ },
125
+ "buyerCircumstances": {
126
+ "title": "Buyer circumstances",
127
+ "description": "Information about the buyer's circumstances for lender compatibility analysis and conveyancing quotes",
128
+ "type": "object",
129
+ "properties": {
130
+ "intendedUse": {
131
+ "type": "string",
132
+ "title": "Intended use of property",
133
+ "description": "The primary purpose of the purchase: whether the buyer will live at the property as their main home, and if not, on what basis it is held. Other circumstances are recorded in the separate fields below and are never values of this field. A home-worker is \"Owner occupied\" with intendsBusiness true. A property bought for a relative to live in is \"Second home\" (no rent) or \"Buy-to-let\" (rent paid), with occupiedByFamilyMember true. A purchase to renovate and sell is \"Second home\" with intendsAlterations and intendsResale true.",
134
+ "enum": [
135
+ "Owner occupied",
136
+ "Buy-to-let",
137
+ "Holiday let",
138
+ "Second home"
139
+ ]
140
+ },
141
+ "firstTimeBuyer": {
142
+ "type": "boolean",
143
+ "title": "First-time buyer"
144
+ },
145
+ "rightToBuy": {
146
+ "type": "boolean",
147
+ "title": "Right to Buy purchase"
148
+ },
149
+ "ltdCompanyPurchase": {
150
+ "type": "boolean",
151
+ "title": "Limited company purchase"
152
+ },
153
+ "numberOfOwners": {
154
+ "type": "integer",
155
+ "title": "Number of owners",
156
+ "nullable": true
157
+ },
158
+ "numberOfExpats": {
159
+ "type": "integer",
160
+ "title": "Number of expat buyers",
161
+ "nullable": true
162
+ },
163
+ "giftedEquity": {
164
+ "type": "boolean",
165
+ "title": "Gifted equity"
166
+ },
167
+ "numberOfGiftedDeposits": {
168
+ "type": "integer",
169
+ "title": "Number of gifted deposits",
170
+ "nullable": true
171
+ },
172
+ "requiresMortgage": {
173
+ "type": "string",
174
+ "title": "Requires mortgage",
175
+ "enum": [
176
+ "Yes",
177
+ "No"
178
+ ]
179
+ },
180
+ "isAdditionalProperty": {
181
+ "type": "boolean",
182
+ "title": "Additional property purchase",
183
+ "description": "Whether the buyer already owns residential property (SDLT higher rates apply)"
184
+ },
185
+ "dependentOnSale": {
186
+ "type": "boolean",
187
+ "title": "Buyer needs to sell a property to proceed",
188
+ "description": "Whether the buyer's purchase depends on the sale of another property, i.e. the buyer's side of the chain. False positively records that it does not, for example a first-time buyer or a buyer who has already sold; absent means the buyer's position is not known. Owning another property is not the same thing: see isAdditionalProperty. The property or properties being sold are recorded in chain.buyersSale."
189
+ },
190
+ "hasPets": {
191
+ "type": "boolean",
192
+ "title": "Buyer has pets",
193
+ "description": "Relevant to lease and covenant pet restriction assessment"
194
+ },
195
+ "petDetails": {
196
+ "type": "string",
197
+ "title": "Pets or other animals",
198
+ "description": "The pets, horses or other animals the buyer intends to keep at the property, and how many (e.g. \"2 dogs, 1 cat\")"
199
+ },
200
+ "occupiedByFamilyMember": {
201
+ "type": "boolean",
202
+ "title": "Occupied by a member of the buyer's family",
203
+ "description": "Whether a member of the buyer's family, rather than the buyer, will live at the property. Recorded with intendedUse \"Second home\" when no rent is paid, or \"Buy-to-let\" when it is. Relevant to lender acceptability, occupancy and tax assessment"
204
+ },
205
+ "intendsSublet": {
206
+ "type": "boolean",
207
+ "title": "Buyer intends to sublet",
208
+ "description": "Relevant to lease and covenant subletting restriction assessment"
209
+ },
210
+ "subletType": {
211
+ "type": "string",
212
+ "title": "Type of subletting intended",
213
+ "enum": [
214
+ "AST",
215
+ "Lodger",
216
+ "Airbnb",
217
+ "HMO",
218
+ "Company let",
219
+ "Other"
220
+ ]
221
+ },
222
+ "intendsBusiness": {
223
+ "type": "boolean",
224
+ "title": "Buyer intends business use",
225
+ "description": "Relevant to covenant and lease business-use restriction assessment"
226
+ },
227
+ "businessType": {
228
+ "type": "string",
229
+ "title": "Type of business intended"
230
+ },
231
+ "businessUseType": {
232
+ "type": "string",
233
+ "title": "Extent of intended business use",
234
+ "description": "How the business use recorded in intendsBusiness will affect the property: working from home with no visitors, clients or staff visiting, or using the property or part of it as business premises such as a shop, office or surgery. For a mixed-use purchase, intendedUse records the residential occupation and this field records the business part. Relevant to use covenants, lease restrictions and planning use class",
235
+ "enum": [
236
+ "Working from home",
237
+ "Clients or staff visit",
238
+ "Business premises"
239
+ ]
240
+ },
241
+ "intendsAlterations": {
242
+ "type": "boolean",
243
+ "title": "Buyer intends significant alterations",
244
+ "description": "Relevant to covenant, planning and building regulations assessment"
245
+ },
246
+ "alterationDescription": {
247
+ "type": "string",
248
+ "title": "Planned alterations",
249
+ "description": "What the buyer intends to alter, extend or develop"
250
+ },
251
+ "intendsResale": {
252
+ "type": "boolean",
253
+ "title": "Buyer intends to sell after works",
254
+ "description": "Whether the buyer intends to sell the property, or parts of it, once planned works are complete, rather than live in it or let it. Relevant to covenant, planning, lender and tax assessment"
255
+ },
256
+ "vehicleRequirements": {
257
+ "type": "string",
258
+ "title": "Vehicles to keep at the property",
259
+ "description": "Any caravan, motorhome, commercial vehicle or boat the buyer intends to keep at the property. Relevant to parking and use covenants"
260
+ },
261
+ "financingMethod": {
262
+ "type": "string",
263
+ "title": "Primary financing method",
264
+ "description": "How the purchase is funded, distinct from intendedUse (how the property will be used)",
265
+ "enum": [
266
+ "Mortgage",
267
+ "Cash",
268
+ "Shared ownership",
269
+ "Help to Buy",
270
+ "Right to Buy"
271
+ ]
272
+ }
273
+ },
274
+ "discriminator": {
275
+ "propertyName": "requiresMortgage"
276
+ },
277
+ "required": [
278
+ "requiresMortgage"
279
+ ],
280
+ "oneOf": [
281
+ {
282
+ "properties": {
283
+ "requiresMortgage": {
284
+ "enum": [
285
+ "No"
286
+ ]
287
+ }
288
+ }
289
+ },
290
+ {
291
+ "properties": {
292
+ "requiresMortgage": {
293
+ "enum": [
294
+ "Yes"
295
+ ]
296
+ },
297
+ "helpToBuyEquityLoan": {
298
+ "type": "boolean",
299
+ "title": "Help to Buy equity loan"
300
+ },
301
+ "armedForcesHelpToBuy": {
302
+ "type": "boolean",
303
+ "title": "Armed Forces Help to Buy"
304
+ },
305
+ "numberOfHelpToBuyIsas": {
306
+ "type": "integer",
307
+ "title": "Number of Help to Buy ISAs",
308
+ "nullable": true
309
+ },
310
+ "bridgingFinanceRepresentation": {
311
+ "type": "string",
312
+ "title": "Bridging finance representation",
313
+ "enum": [
314
+ "Dual",
315
+ "Separate"
316
+ ],
317
+ "nullable": true
318
+ },
319
+ "depositAmount": {
320
+ "type": "number",
321
+ "title": "Deposit amount",
322
+ "minimum": 0
323
+ },
324
+ "loanToValue": {
325
+ "type": "number",
326
+ "title": "Loan-to-Value (LTV)",
327
+ "minimum": 0,
328
+ "maximum": 100
329
+ },
330
+ "numberOfBorrowers": {
331
+ "type": "integer",
332
+ "title": "Number of borrowers",
333
+ "minimum": 1,
334
+ "maximum": 4,
335
+ "default": 1
336
+ },
337
+ "jointProprietorSoleMortgagor": {
338
+ "type": "boolean",
339
+ "title": "Joint proprietor, sole mortgagor"
340
+ },
341
+ "soleProprietorJointMortgagor": {
342
+ "type": "boolean",
343
+ "title": "Sole proprietor, joint mortgagor"
344
+ },
345
+ "deedOfPostponement": {
346
+ "type": "boolean",
347
+ "title": "Deed of postponement required"
348
+ },
349
+ "separateRepresentation": {
350
+ "type": "boolean",
351
+ "title": "Separate legal representation required",
352
+ "nullable": true
353
+ },
354
+ "oldestBorrowerAge": {
355
+ "type": "integer",
356
+ "title": "Oldest borrower age",
357
+ "minimum": 18,
358
+ "maximum": 85
359
+ },
360
+ "mortgageTerm": {
361
+ "type": "integer",
362
+ "title": "Mortgage term",
363
+ "minimum": 5,
364
+ "maximum": 40
365
+ },
366
+ "adverseCredit": {
367
+ "type": "string",
368
+ "title": "Adverse credit",
369
+ "enum": [
370
+ "No",
371
+ "Yes",
372
+ "Prefer not to say"
373
+ ]
374
+ },
375
+ "employmentType": {
376
+ "type": "string",
377
+ "title": "Employment type",
378
+ "enum": [
379
+ "Employed",
380
+ "Self-employed",
381
+ "Retired",
382
+ "Contractor",
383
+ "Other"
384
+ ]
385
+ },
386
+ "existingMortgagedProperties": {
387
+ "type": "integer",
388
+ "title": "Existing mortgaged properties",
389
+ "minimum": 0
390
+ },
391
+ "annualIncome": {
392
+ "type": "number",
393
+ "title": "Annual gross income",
394
+ "minimum": 0
395
+ },
396
+ "residencyStatus": {
397
+ "type": "string",
398
+ "title": "Residency status",
399
+ "enum": [
400
+ "UK citizen",
401
+ "Permanent resident",
402
+ "Visa holder",
403
+ "Non-resident"
404
+ ]
405
+ },
406
+ "nominatedLender": {
407
+ "type": "string",
408
+ "title": "Nominated lender",
409
+ "description": "The nominated lender's name as entered or selected"
410
+ },
411
+ "nominatedLenderHandbookId": {
412
+ "type": "string",
413
+ "title": "Nominated lender (UK Finance Handbook id)",
414
+ "description": "The nominated lender's identifier in the UK Finance Mortgage Lenders' Handbook, e.g. nationwide-building-society, so lender requirements can be looked up without matching on name"
415
+ }
416
+ }
417
+ }
418
+ ]
419
+ }
420
+ },
421
+ "required": [
422
+ "buyer",
423
+ "transaction"
424
+ ]
425
+ }
@@ -0,0 +1,167 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://trust.propdata.org.uk/schemas/v4/entities/organisation.json",
4
+ "type": "object",
5
+ "title": "Organisation Entity",
6
+ "description": "A legal entity (company, firm, partnership) participating in a property transaction.",
7
+ "x-pdtf-source": {
8
+ "packageName": "@pdtf/schemas",
9
+ "packageVersion": "3.6.0-dev.32",
10
+ "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
+ "combinedPath": "src/schemas/v3/combined.json",
12
+ "combinedSha256": "83f31fddf82e57e67f2bc92844459095041b254b970d8881dd4318248c188f67"
13
+ },
14
+ "properties": {
15
+ "id": {
16
+ "title": "Organisation DID",
17
+ "description": "Decentralised Identifier for the organisation",
18
+ "type": "string",
19
+ "pattern": "^did:[a-z0-9]+:(?:(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[a-zA-Z0-9._-]|%[0-9A-Fa-f]{2})+$"
20
+ },
21
+ "name": {
22
+ "title": "Organisation name",
23
+ "description": "The legal / registered name of the organisation",
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "tradingName": {
28
+ "title": "Trading name",
29
+ "description": "Trading name, if different from the registered legal name",
30
+ "type": "string"
31
+ },
32
+ "organisationType": {
33
+ "title": "Organisation type",
34
+ "type": "string",
35
+ "enum": [
36
+ "Limited Company",
37
+ "Limited Liability Partnership",
38
+ "Partnership",
39
+ "Sole Trader",
40
+ "Public Limited Company",
41
+ "Charity",
42
+ "Public Body",
43
+ "Trust",
44
+ "Other"
45
+ ]
46
+ },
47
+ "companiesHouseNumber": {
48
+ "title": "Companies House registration number",
49
+ "description": "UK Companies House company registration number (or equivalent)",
50
+ "type": "string"
51
+ },
52
+ "vatNumber": {
53
+ "title": "VAT registration number",
54
+ "type": "string"
55
+ },
56
+ "regulatoryIds": {
57
+ "title": "Regulatory identifiers",
58
+ "description": "Identifiers for the professional / regulatory bodies the organisation is registered with",
59
+ "type": "object",
60
+ "properties": {
61
+ "sraNumber": {
62
+ "title": "Solicitors Regulation Authority (SRA) number",
63
+ "type": "string"
64
+ },
65
+ "clcNumber": {
66
+ "title": "Council for Licensed Conveyancers (CLC) number",
67
+ "type": "string"
68
+ },
69
+ "ricsNumber": {
70
+ "title": "Royal Institution of Chartered Surveyors (RICS) number",
71
+ "type": "string"
72
+ },
73
+ "fcaNumber": {
74
+ "title": "Financial Conduct Authority (FCA) reference number",
75
+ "type": "string"
76
+ },
77
+ "tpoNumber": {
78
+ "title": "The Property Ombudsman (TPO) membership number",
79
+ "type": "string"
80
+ },
81
+ "icoNumber": {
82
+ "title": "Information Commissioner's Office (ICO) registration number",
83
+ "type": "string"
84
+ }
85
+ }
86
+ },
87
+ "registeredAddress": {
88
+ "title": "Registered address",
89
+ "type": "object",
90
+ "properties": {
91
+ "buildingNumber": {
92
+ "title": "Building number",
93
+ "type": "string"
94
+ },
95
+ "buildingName": {
96
+ "title": "Building name",
97
+ "type": "string"
98
+ },
99
+ "subBuilding": {
100
+ "title": "Sub building name",
101
+ "type": "string"
102
+ },
103
+ "street": {
104
+ "title": "Street",
105
+ "type": "string"
106
+ },
107
+ "line1": {
108
+ "title": "Address 1",
109
+ "type": "string"
110
+ },
111
+ "line2": {
112
+ "title": "Address 2",
113
+ "type": "string"
114
+ },
115
+ "line3": {
116
+ "title": "Address 3",
117
+ "type": "string"
118
+ },
119
+ "town": {
120
+ "title": "Town",
121
+ "type": "string"
122
+ },
123
+ "postcode": {
124
+ "title": "Postcode",
125
+ "type": "string"
126
+ },
127
+ "homeNation": {
128
+ "title": "Home nation",
129
+ "type": "string",
130
+ "enum": [
131
+ "England",
132
+ "Wales",
133
+ "Scotland",
134
+ "Northern Ireland"
135
+ ]
136
+ },
137
+ "countryCode": {
138
+ "title": "Country code",
139
+ "description": "ISO 3166-1 alpha-3 country code",
140
+ "type": "string",
141
+ "minLength": 3,
142
+ "maxLength": 3
143
+ }
144
+ }
145
+ },
146
+ "phone": {
147
+ "title": "Primary phone number",
148
+ "type": "string"
149
+ },
150
+ "email": {
151
+ "title": "Primary email address",
152
+ "type": "string",
153
+ "format": "email"
154
+ },
155
+ "website": {
156
+ "title": "Website",
157
+ "type": "string",
158
+ "format": "uri"
159
+ },
160
+ "externalIds": {
161
+ "type": "object"
162
+ }
163
+ },
164
+ "required": [
165
+ "name"
166
+ ]
167
+ }