@pdtf/schemas 3.6.0-dev.33 → 3.6.0-dev.34

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.
@@ -73,10 +73,17 @@ Behaviour:
73
73
  1. Check out `next`.
74
74
  2. Create a branch named `promote/dev-pr-<number>-to-next`.
75
75
  3. Cherry-pick the merged dev PR's effective diff onto that branch.
76
- 4. Open a PR into `next` with a title and body referencing the original dev PR.
77
-
78
- If the cherry-pick conflicts, the workflow creates an issue instead of a PR so a
79
- maintainer can promote the change manually.
76
+ 4. Keep `next`'s `package.json` and `package-lock.json`, because the two
77
+ channels version independently.
78
+ 5. Leave out generated `src/schemas/v4` files that `next` does not have but the
79
+ dev PR modified. `next` has had no v4 output since PR #160, so every dev PR
80
+ that regenerates v4 would otherwise conflict. v4 files a dev PR adds are kept
81
+ for review, and this step does nothing once v4 is back on `next`.
82
+ 6. Open a PR into `next` with a title and body referencing the original dev PR.
83
+ The body says how many v4 files were left out.
84
+
85
+ If anything else conflicts, the workflow creates an issue instead of a PR,
86
+ listing the conflicting files, so a maintainer can promote the change manually.
80
87
 
81
88
  The promotion PR is intentionally still reviewed. Before merging to `next`,
82
89
  maintainers should:
package/index.js CHANGED
@@ -52,6 +52,7 @@ const extensionOverlays = {
52
52
 
53
53
  // Transaction Extensions
54
54
  oc: require("./src/schemas/v3/overlays/extensions/oc.json"),
55
+ rs: require("./src/schemas/v3/overlays/extensions/rs.json"),
55
56
 
56
57
  // SEF25 Extensions
57
58
  sc: require("./src/schemas/v3/overlays/extensions/sc.json"),
@@ -296,6 +297,7 @@ const extensionOverlayToRefs = {
296
297
  mc: ["ntsRef"],
297
298
  oa: ["ntsRef"],
298
299
  oc: ["ntsRef"],
300
+ rs: ["ntsRef", "rsRef"],
299
301
  sb: ["ntsRef"],
300
302
  sf: ["ntsRef"],
301
303
  sl: ["ntsRef"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdtf/schemas",
3
- "version": "3.6.0-dev.33",
3
+ "version": "3.6.0-dev.34",
4
4
  "description": "Property Data Trust Framework Schemas and Utilities",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -33087,6 +33087,8 @@
33087
33087
  "ta6ed6Ref": "14",
33088
33088
  "ta6ed6v2Ref": "14",
33089
33089
  "nts2Ref": "A1.5.7",
33090
+ "rsRef": "A1.5.7",
33091
+ "rsRequired": ["reasonForSale"],
33090
33092
  "title": "Completion and Moving",
33091
33093
  "ta6ed6Title": "Completion",
33092
33094
  "ta6ed6v2Title": "Completion",
@@ -33312,6 +33314,11 @@
33312
33314
  }
33313
33315
  ]
33314
33316
  },
33317
+ "reasonForSale": {
33318
+ "rsRef": "A1.5.7.2",
33319
+ "title": "What is the reason for the sale?",
33320
+ "type": "string"
33321
+ },
33315
33322
  "moveRestrictionDates": {
33316
33323
  "baspi4Ref": "B7.3",
33317
33324
  "baspi5Ref": "B7.3",
@@ -2711,6 +2711,7 @@
2711
2711
  line3
2712
2712
  town
2713
2713
  postcode
2714
+ reasonForSale
2714
2715
  moveRestrictionDates
2715
2716
  yesNo
2716
2717
  details
@@ -95,6 +95,7 @@ The `extensions/` directory contains modular overlays that add specific NTS2 fea
95
95
  | Extension | String Key | Description | Reference | Usage |
96
96
  |-----------|------------|-------------|-----------|-------|
97
97
  | `oc.json` | `"oc"` | Other Property Chain | - | Chain dependency information |
98
+ | `rs.json` | `"rs"` | Reason For Sale | A1.5.7.2 | Free-text reason for sale (required when the extension is applied) |
98
99
 
99
100
  ## Usage Examples
100
101
 
@@ -0,0 +1,24 @@
1
+ {
2
+ "properties": {
3
+ "propertyPack": {
4
+ "properties": {
5
+ "completionAndMoving": {
6
+ "properties": {
7
+ "reasonForSale": {
8
+ "ntsRef": "A1.5.7.2",
9
+ "type": "string"
10
+ }
11
+ },
12
+ "required": [
13
+ "reasonForSale"
14
+ ],
15
+ "ntsRef": "A1.5.7"
16
+ }
17
+ },
18
+ "ntsRef": "0"
19
+ }
20
+ },
21
+ "$schema": "http://json-schema.org/draft-07/schema#",
22
+ "$id": "https://trust.propdata.org.uk/schemas/v3/overlays/extensions/rs.json",
23
+ "$comment": "Reason for sale, asked alongside the onward-chain question"
24
+ }
@@ -25917,6 +25917,10 @@
25917
25917
  }
25918
25918
  ]
25919
25919
  },
25920
+ "reasonForSale": {
25921
+ "title": "What is the reason for the sale?",
25922
+ "type": "string"
25923
+ },
25920
25924
  "moveRestrictionDates": {
25921
25925
  "title": "Are there any dates on which you cannot move?",
25922
25926
  "description": "Note that: the moving date will not be fixed until contracts are exchanged i.e. have become binding, until then you should only make provisional removal arrangements; you do not need to be physically present on the day of completion so long as the property is cleared; timescales to completion vary depending on the complexity of the transaction, length of the chain and requirements of the people involved.",
@@ -3457,6 +3457,7 @@
3457
3457
  "postcode": "string"
3458
3458
  }
3459
3459
  },
3460
+ "reasonForSale": "string",
3460
3461
  "moveRestrictionDates": {
3461
3462
  "yesNo": "variant",
3462
3463
  "details": "string"
@@ -6,10 +6,10 @@
6
6
  "description": "A gift of funds towards a purchase, made by a giftor. Implies the Giftor role.",
7
7
  "x-pdtf-source": {
8
8
  "packageName": "@pdtf/schemas",
9
- "packageVersion": "3.6.0-dev.33",
9
+ "packageVersion": "3.6.0-dev.34",
10
10
  "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
11
  "combinedPath": "src/schemas/v3/combined.json",
12
- "combinedSha256": "52ce2e5cb67b32ad9e80d6aae2bb7f5baf842d2ea7190ded5e23df72a0dae91b"
12
+ "combinedSha256": "f8c2923c6622efd0082de3da056fa305e0463f43dba4f679509c3d82715f5e39"
13
13
  },
14
14
  "properties": {
15
15
  "id": {
@@ -6,10 +6,10 @@
6
6
  "description": "An offer made by a prospective buyer in a property transaction.",
7
7
  "x-pdtf-source": {
8
8
  "packageName": "@pdtf/schemas",
9
- "packageVersion": "3.6.0-dev.33",
9
+ "packageVersion": "3.6.0-dev.34",
10
10
  "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
11
  "combinedPath": "src/schemas/v3/combined.json",
12
- "combinedSha256": "52ce2e5cb67b32ad9e80d6aae2bb7f5baf842d2ea7190ded5e23df72a0dae91b"
12
+ "combinedSha256": "f8c2923c6622efd0082de3da056fa305e0463f43dba4f679509c3d82715f5e39"
13
13
  },
14
14
  "properties": {
15
15
  "id": {
@@ -6,10 +6,10 @@
6
6
  "description": "A legal entity (company, firm, partnership) participating in a property transaction.",
7
7
  "x-pdtf-source": {
8
8
  "packageName": "@pdtf/schemas",
9
- "packageVersion": "3.6.0-dev.33",
9
+ "packageVersion": "3.6.0-dev.34",
10
10
  "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
11
  "combinedPath": "src/schemas/v3/combined.json",
12
- "combinedSha256": "52ce2e5cb67b32ad9e80d6aae2bb7f5baf842d2ea7190ded5e23df72a0dae91b"
12
+ "combinedSha256": "f8c2923c6622efd0082de3da056fa305e0463f43dba4f679509c3d82715f5e39"
13
13
  },
14
14
  "properties": {
15
15
  "id": {
@@ -6,10 +6,10 @@
6
6
  "description": "A natural person participating in a property transaction — name, contact details, address, verification status.",
7
7
  "x-pdtf-source": {
8
8
  "packageName": "@pdtf/schemas",
9
- "packageVersion": "3.6.0-dev.33",
9
+ "packageVersion": "3.6.0-dev.34",
10
10
  "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
11
  "combinedPath": "src/schemas/v3/combined.json",
12
- "combinedSha256": "52ce2e5cb67b32ad9e80d6aae2bb7f5baf842d2ea7190ded5e23df72a0dae91b"
12
+ "combinedSha256": "f8c2923c6622efd0082de3da056fa305e0463f43dba4f679509c3d82715f5e39"
13
13
  },
14
14
  "properties": {
15
15
  "name": {
@@ -6,10 +6,10 @@
6
6
  "description": "Physical and environmental facts about a property — address, construction, fixtures, services, searches, documents. Excludes ownership, titles, and participants.",
7
7
  "x-pdtf-source": {
8
8
  "packageName": "@pdtf/schemas",
9
- "packageVersion": "3.6.0-dev.33",
9
+ "packageVersion": "3.6.0-dev.34",
10
10
  "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
11
  "combinedPath": "src/schemas/v3/combined.json",
12
- "combinedSha256": "52ce2e5cb67b32ad9e80d6aae2bb7f5baf842d2ea7190ded5e23df72a0dae91b"
12
+ "combinedSha256": "f8c2923c6622efd0082de3da056fa305e0463f43dba4f679509c3d82715f5e39"
13
13
  },
14
14
  "properties": {
15
15
  "address": {
@@ -20351,6 +20351,10 @@
20351
20351
  }
20352
20352
  ]
20353
20353
  },
20354
+ "reasonForSale": {
20355
+ "title": "What is the reason for the sale?",
20356
+ "type": "string"
20357
+ },
20354
20358
  "moveRestrictionDates": {
20355
20359
  "title": "Are there any dates on which you cannot move?",
20356
20360
  "ta6ed6Title": "Do you have any special requirements about a moving date?",
@@ -6,10 +6,10 @@
6
6
  "description": "A standing assertion that a property (UPRN) is related to a title. Many-to-many: one UPRN can sit on several titles, and one title (a block freehold, say) can cover many UPRNs. Issued by HM Land Registry for a registered title, and by the seller's conveyancer, on the epitome of title, for unregistered land. References no Transaction: a Transaction selects the titles being sold from the linked titles through titlesToBeSold, and a linked title it does not select is related but not sold.",
7
7
  "x-pdtf-source": {
8
8
  "packageName": "@pdtf/schemas",
9
- "packageVersion": "3.6.0-dev.33",
9
+ "packageVersion": "3.6.0-dev.34",
10
10
  "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
11
  "combinedPath": "src/schemas/v3/combined.json",
12
- "combinedSha256": "52ce2e5cb67b32ad9e80d6aae2bb7f5baf842d2ea7190ded5e23df72a0dae91b"
12
+ "combinedSha256": "f8c2923c6622efd0082de3da056fa305e0463f43dba4f679509c3d82715f5e39"
13
13
  },
14
14
  "properties": {
15
15
  "id": {
@@ -6,10 +6,10 @@
6
6
  "description": "A professional representation relationship — one party instructed by another, e.g. a conveyancer acting for a seller. One entity per (representative, represented party) pair: a conveyancer instructed jointly by two sellers yields two, and sellers who instruct separate conveyancers yield one each.",
7
7
  "x-pdtf-source": {
8
8
  "packageName": "@pdtf/schemas",
9
- "packageVersion": "3.6.0-dev.33",
9
+ "packageVersion": "3.6.0-dev.34",
10
10
  "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
11
  "combinedPath": "src/schemas/v3/combined.json",
12
- "combinedSha256": "52ce2e5cb67b32ad9e80d6aae2bb7f5baf842d2ea7190ded5e23df72a0dae91b"
12
+ "combinedSha256": "f8c2923c6622efd0082de3da056fa305e0463f43dba4f679509c3d82715f5e39"
13
13
  },
14
14
  "properties": {
15
15
  "id": {
@@ -6,10 +6,10 @@
6
6
  "description": "The legal capacity in which a seller is selling a given title. Derived from the V3 participants 'Seller' branch (sellersCapacity, dateBecameOwnerOrAuthority).",
7
7
  "x-pdtf-source": {
8
8
  "packageName": "@pdtf/schemas",
9
- "packageVersion": "3.6.0-dev.33",
9
+ "packageVersion": "3.6.0-dev.34",
10
10
  "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
11
  "combinedPath": "src/schemas/v3/combined.json",
12
- "combinedSha256": "52ce2e5cb67b32ad9e80d6aae2bb7f5baf842d2ea7190ded5e23df72a0dae91b"
12
+ "combinedSha256": "f8c2923c6622efd0082de3da056fa305e0463f43dba4f679509c3d82715f5e39"
13
13
  },
14
14
  "properties": {
15
15
  "id": {
@@ -6,10 +6,10 @@
6
6
  "description": "HM Land Registry title — register extract, tenure type, and legal interest details for a single title number.",
7
7
  "x-pdtf-source": {
8
8
  "packageName": "@pdtf/schemas",
9
- "packageVersion": "3.6.0-dev.33",
9
+ "packageVersion": "3.6.0-dev.34",
10
10
  "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
11
  "combinedPath": "src/schemas/v3/combined.json",
12
- "combinedSha256": "52ce2e5cb67b32ad9e80d6aae2bb7f5baf842d2ea7190ded5e23df72a0dae91b"
12
+ "combinedSha256": "f8c2923c6622efd0082de3da056fa305e0463f43dba4f679509c3d82715f5e39"
13
13
  },
14
14
  "properties": {
15
15
  "titleNumber": {
@@ -6,10 +6,10 @@
6
6
  "description": "Transaction-level metadata — status, milestones, chain, contracts, offers, enquiries, and sale context.",
7
7
  "x-pdtf-source": {
8
8
  "packageName": "@pdtf/schemas",
9
- "packageVersion": "3.6.0-dev.33",
9
+ "packageVersion": "3.6.0-dev.34",
10
10
  "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
11
  "combinedPath": "src/schemas/v3/combined.json",
12
- "combinedSha256": "52ce2e5cb67b32ad9e80d6aae2bb7f5baf842d2ea7190ded5e23df72a0dae91b"
12
+ "combinedSha256": "f8c2923c6622efd0082de3da056fa305e0463f43dba4f679509c3d82715f5e39"
13
13
  },
14
14
  "properties": {
15
15
  "transactionId": {
@@ -6,10 +6,10 @@
6
6
  "description": "A party's role in a transaction, where no more specific relationship credential applies. Asserts participation in a role, not a relationship to another named party.",
7
7
  "x-pdtf-source": {
8
8
  "packageName": "@pdtf/schemas",
9
- "packageVersion": "3.6.0-dev.33",
9
+ "packageVersion": "3.6.0-dev.34",
10
10
  "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
11
11
  "combinedPath": "src/schemas/v3/combined.json",
12
- "combinedSha256": "52ce2e5cb67b32ad9e80d6aae2bb7f5baf842d2ea7190ded5e23df72a0dae91b"
12
+ "combinedSha256": "f8c2923c6622efd0082de3da056fa305e0463f43dba4f679509c3d82715f5e39"
13
13
  },
14
14
  "properties": {
15
15
  "id": {
@@ -5,10 +5,10 @@
5
5
  "generator": "src/utils/generateV4Schemas.js",
6
6
  "source": {
7
7
  "packageName": "@pdtf/schemas",
8
- "packageVersion": "3.6.0-dev.33",
8
+ "packageVersion": "3.6.0-dev.34",
9
9
  "v3SchemaId": "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
10
10
  "combinedPath": "src/schemas/v3/combined.json",
11
- "combinedSha256": "52ce2e5cb67b32ad9e80d6aae2bb7f5baf842d2ea7190ded5e23df72a0dae91b"
11
+ "combinedSha256": "f8c2923c6622efd0082de3da056fa305e0463f43dba4f679509c3d82715f5e39"
12
12
  },
13
13
  "entities": {
14
14
  "Property": {
@@ -29,6 +29,18 @@ function getRefConfig(refType) {
29
29
  enumKey: "sef25Enum",
30
30
  };
31
31
  }
32
+ if (refType === "rsRef") {
33
+ // Reason-for-sale extension (not on any published form) also appears as
34
+ // ntsRef in output, so it scopes alongside nts2023 + oc
35
+ return {
36
+ ref: "rsRef",
37
+ outputRef: "ntsRef",
38
+ required: "rsRequired",
39
+ title: "rsTitle",
40
+ description: "rsDescription",
41
+ enumKey: "rsEnum",
42
+ };
43
+ }
32
44
  // For other ref types, derive keys by replacing "Ref" suffix
33
45
  return {
34
46
  ref: refType,
@@ -186,6 +198,16 @@ const extensionMappings = {
186
198
  ],
187
199
  },
188
200
 
201
+ // Reason for sale (opt-in, alongside the onward-chain question)
202
+ rs: {
203
+ name: "reasonForSale",
204
+ description: "Reason for sale, asked alongside the onward-chain question",
205
+ refType: "rsRef",
206
+ paths: [
207
+ "/properties/propertyPack/properties/completionAndMoving/properties/reasonForSale",
208
+ ],
209
+ },
210
+
189
211
  // Private supply costs (water & sewerage)
190
212
  sc: {
191
213
  name: "supplyCosts",
@@ -46,7 +46,7 @@ const extractFields = [
46
46
  "sef25",
47
47
  ];
48
48
 
49
- const metadataFields = [...extractFields, "ta6ed6Compat"];
49
+ const metadataFields = [...extractFields, "ta6ed6Compat", "rs"];
50
50
 
51
51
  const flattenSkeleton = (schema) => {
52
52
  if (!schema) return undefined;