@pdtf/schemas 3.4.1-8 → 3.5.1-1

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.
@@ -13,7 +13,14 @@
13
13
  "Bash(git merge:*)",
14
14
  "Bash(git add:*)",
15
15
  "Bash(git commit:*)",
16
- "Bash(git push:*)"
16
+ "Bash(git push:*)",
17
+ "Bash(git fetch:*)",
18
+ "Bash(git checkout:*)",
19
+ "Bash(gh pr view:*)",
20
+ "WebFetch(domain:github.com)",
21
+ "Bash(tree:*)",
22
+ "Bash(sed:*)",
23
+ "Bash(find:*)"
17
24
  ],
18
25
  "deny": []
19
26
  }
package/README.md CHANGED
@@ -7,18 +7,20 @@ The Property Data Trust Framework (PDTF) Schemas provide standardized JSON Schem
7
7
 
8
8
  ## Project Goals & Status
9
9
 
10
- **Current Version:** 3.4.0 (Schema v3 - Stable)
10
+ **Current Version:** 3.5.0 (3.5.1-1 available as a pre-release on branch/package-tag `next`)
11
11
 
12
12
  This schema framework aims to support the [Home Buying and Selling Group](https://homebuyingandsellinggroup.co.uk) 'Property Pack' initiative, encompassing all requirements starting with the Buyers and Sellers Property Information set ([BASPI v4.0](https://homebuyingandsellinggroup.co.uk/baspi/)).
13
13
 
14
14
  **Key Objectives:**
15
+
15
16
  - 🏠 **Standardize** residential property data exchange across England and Wales
16
- - 🔗 **Enable** frictionless data sharing between software products and services
17
+ - 🔗 **Enable** frictionless data sharing between software products and services
17
18
  - 🛡️ **Maintain** trusted information about data provenance and verification
18
19
  - 📋 **Support** industry-standard forms (BASPI, NTS, Law Society TA forms)
19
20
  - 🧩 **Provide** modular components for flexible implementation
20
21
 
21
22
  **Related Projects:**
23
+
22
24
  - [API Specifications](https://github.com/Property-Data-Trust-Framework/api) - OpenAPI specs for data exchange protocols
23
25
  - [PDTF Website](https://trust.propdata.org.uk) - Official framework documentation
24
26
 
@@ -35,7 +37,7 @@ npm install @pdtf/schemas
35
37
  ### Basic Usage
36
38
 
37
39
  ```javascript
38
- const { getTransactionSchema, getValidator } = require('@pdtf/schemas');
40
+ const { getTransactionSchema, getValidator } = require("@pdtf/schemas");
39
41
 
40
42
  // Get a schema with BASPI v5 overlay
41
43
  const schema = getTransactionSchema(
@@ -45,14 +47,14 @@ const schema = getTransactionSchema(
45
47
 
46
48
  // Create a validator
47
49
  const validator = getValidator(
48
- "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
50
+ "https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json",
49
51
  ["baspiV5"]
50
52
  );
51
53
 
52
54
  // Validate data
53
55
  const isValid = validator(propertyData);
54
56
  if (!isValid) {
55
- console.log('Validation errors:', validator.errors);
57
+ console.log("Validation errors:", validator.errors);
56
58
  }
57
59
  ```
58
60
 
@@ -122,6 +124,7 @@ const schema = getTransactionSchema(
122
124
  ```
123
125
 
124
126
  **Parameters:**
127
+
125
128
  - `schemaId` (string): Schema version URL
126
129
  - `overlays` (array): Array of overlay names or objects
127
130
 
@@ -146,15 +149,15 @@ const errors = validateVerifiedClaims(verifiedClaims, schemaId, ["nts2023"]);
146
149
 
147
150
  #### Main Form Overlays
148
151
 
149
- | Overlay | Description | Version |
150
- |---------|-------------|---------|
151
- | `baspiV4` | Buyers and Sellers Property Information | v4.0 |
152
- | `baspiV5` | Buyers and Sellers Property Information | v5.0 |
153
- | `nts2023` | National Trading Standards | 2023 |
154
- | `nts2025` | National Trading Standards | 2025 |
155
- | `ta6ed4` | Law Society Property Information Form | Edition 4 |
156
- | `ta7ed3` | Law Society Leasehold Information Form | Edition 3 |
157
- | `ta10ed3` | Law Society Fittings and Contents Form | Edition 3 |
152
+ | Overlay | Description | Version |
153
+ | --------- | --------------------------------------- | --------- |
154
+ | `baspiV4` | Buyers and Sellers Property Information | v4.0 |
155
+ | `baspiV5` | Buyers and Sellers Property Information | v5.0 |
156
+ | `nts2023` | National Trading Standards | 2023 |
157
+ | `nts2025` | National Trading Standards | 2025 |
158
+ | `ta6ed4` | Law Society Property Information Form | Edition 4 |
159
+ | `ta7ed3` | Law Society Leasehold Information Form | Edition 3 |
160
+ | `ta10ed3` | Law Society Fittings and Contents Form | Edition 3 |
158
161
 
159
162
  [View all overlays →](src/schemas/v3/overlays/README.md)
160
163
 
@@ -167,16 +170,22 @@ Modular NTS2 features for selective adoption:
167
170
  const schema = getTransactionSchema(schemaId, ["nts2023", "jk", "tf"]);
168
171
 
169
172
  // Multiple specialist issues
170
- const schema = getTransactionSchema(schemaId, ["nts2023", "as", "dr", "jk", "sb"]);
173
+ const schema = getTransactionSchema(schemaId, [
174
+ "nts2023",
175
+ "as",
176
+ "dr",
177
+ "jk",
178
+ "sb",
179
+ ]);
171
180
  ```
172
181
 
173
- | Extension | Code | Description |
174
- |-----------|------|-------------|
182
+ | Extension | Code | Description |
183
+ | ----------------- | ---- | -------------------------------- |
175
184
  | Japanese Knotweed | `jk` | Knotweed presence and management |
176
- | Transfer Fees | `tf` | Additional leasehold fees |
177
- | Managing Agent | `ma` | Leasehold managing agent details |
178
- | Solar Panels | `sl` | Solar panel ownership details |
179
- | Asbestos | `as` | Asbestos presence and management |
185
+ | Transfer Fees | `tf` | Additional leasehold fees |
186
+ | Managing Agent | `ma` | Leasehold managing agent details |
187
+ | Solar Panels | `sl` | Solar panel ownership details |
188
+ | Asbestos | `as` | Asbestos presence and management |
180
189
 
181
190
  [View all extensions →](src/schemas/v3/overlays/README.md#extension-overlays)
182
191
 
@@ -200,22 +209,27 @@ const ntsSchema = getTransactionSchema(schemaId, ["nts2023"]);
200
209
  ```javascript
201
210
  // Selective NTS2 adoption
202
211
  const partialNts2 = getTransactionSchema(schemaId, [
203
- "nts2023", // Base NTS
204
- "jk", // Japanese Knotweed
205
- "tf", // Transfer Fees
206
- "ma" // Managing Agent
212
+ "nts2023", // Base NTS
213
+ "jk", // Japanese Knotweed
214
+ "tf", // Transfer Fees
215
+ "ma", // Managing Agent
207
216
  ]);
208
217
 
209
218
  // Full specialist issues
210
219
  const specialistIssues = getTransactionSchema(schemaId, [
211
- "nts2023", "as", "dr", "jk", "sb", "hs"
220
+ "nts2023",
221
+ "as",
222
+ "dr",
223
+ "jk",
224
+ "sb",
225
+ "hs",
212
226
  ]);
213
227
  ```
214
228
 
215
229
  ### Data Validation
216
230
 
217
231
  ```javascript
218
- const { getValidator } = require('@pdtf/schemas');
232
+ const { getValidator } = require("@pdtf/schemas");
219
233
 
220
234
  const validator = getValidator(schemaId, ["baspiV5"]);
221
235
 
@@ -223,16 +237,16 @@ const propertyData = {
223
237
  propertyPack: {
224
238
  priceInformation: {
225
239
  price: 350000,
226
- priceQualifier: "Freehold"
240
+ priceQualifier: "Freehold",
227
241
  },
228
242
  // ... more property data
229
- }
243
+ },
230
244
  };
231
245
 
232
246
  if (validator(propertyData)) {
233
- console.log('✅ Data is valid');
247
+ console.log("✅ Data is valid");
234
248
  } else {
235
- console.log('❌ Validation errors:', validator.errors);
249
+ console.log("❌ Validation errors:", validator.errors);
236
250
  }
237
251
  ```
238
252
 
@@ -241,39 +255,44 @@ if (validator(propertyData)) {
241
255
  PDTF supports verified claims to maintain data provenance and trust throughout property transactions. Claims package specific property data with verification evidence, enabling traceability back to authoritative sources.
242
256
 
243
257
  ```javascript
244
- const { validateVerifiedClaims } = require('@pdtf/schemas');
258
+ const { validateVerifiedClaims } = require("@pdtf/schemas");
245
259
 
246
260
  // Current verified claims format
247
- const verifiedClaims = [{
248
- id: "claim-12345",
249
- transactionId: "txn-67890",
250
- schemaVersion: "3.4.0",
251
- verification: {
252
- trust_framework: "uk_pdtf",
253
- time: "2024-07-01T10:30:00Z",
254
- evidence: [{
255
- type: "vouch",
256
- attestation: {
257
- type: "digital_attestation",
258
- voucher: { name: "Estate Agent Ltd" }
259
- },
260
- verification_method: { type: "auth" }
261
- }]
261
+ const verifiedClaims = [
262
+ {
263
+ id: "claim-12345",
264
+ transactionId: "txn-67890",
265
+ schemaVersion: "3.4.0",
266
+ verification: {
267
+ trust_framework: "uk_pdtf",
268
+ time: "2024-07-01T10:30:00Z",
269
+ evidence: [
270
+ {
271
+ type: "vouch",
272
+ attestation: {
273
+ type: "digital_attestation",
274
+ voucher: { name: "Estate Agent Ltd" },
275
+ },
276
+ verification_method: { type: "auth" },
277
+ },
278
+ ],
279
+ },
280
+ claims: {
281
+ "/propertyPack/priceInformation/price": 350000,
282
+ "/propertyPack/energyEfficiency/epcRating": "C",
283
+ },
262
284
  },
263
- claims: {
264
- "/propertyPack/priceInformation/price": 350000,
265
- "/propertyPack/energyEfficiency/epcRating": "C"
266
- }
267
- }];
285
+ ];
268
286
 
269
287
  // Validate claims against schema
270
288
  const errors = validateVerifiedClaims(verifiedClaims, schemaId, ["baspiV5"]);
271
289
  if (errors.length === 0) {
272
- console.log('✅ Verified claims are valid');
290
+ console.log("✅ Verified claims are valid");
273
291
  }
274
292
  ```
275
293
 
276
294
  **Key Features:**
295
+
277
296
  - **Schema Path Validation** - Claims reference specific schema paths (e.g., `/propertyPack/priceInformation/price`)
278
297
  - **Provenance Tracking** - Each claim includes verification evidence and source attribution
279
298
  - **Trust Framework Integration** - Claims operate within the UK PDTF trust framework
@@ -281,6 +300,7 @@ if (errors.length === 0) {
281
300
 
282
301
  **Roadmap - W3C Verifiable Credentials:**
283
302
  The next version of the PDTF framework will migrate to [W3C Verifiable Credentials](https://www.w3.org/TR/vc-data-model/) to provide:
303
+
284
304
  - **Enhanced Security** - Cryptographically signed claims with tamper detection
285
305
  - **Granular Permissions** - Fine-grained access control over claim data
286
306
  - **Interoperability** - Standards-based approach for broader ecosystem compatibility
@@ -311,17 +331,17 @@ npm test -- --testPathPattern=extensionOverlays
311
331
  npm test -- --testPathPattern=transactionSchema
312
332
  ```
313
333
 
314
-
315
334
  ## Versioning
316
335
 
317
336
  The schema follows semantic versioning:
337
+
318
338
  - **Patch** (3.4.x): Bug fixes, no breaking changes
319
339
  - **Minor** (3.x.0): New fields, backward compatible
320
340
  - **Major** (x.0.0): Breaking changes, migration required
321
341
 
322
342
  ## Licensing
323
343
 
324
- Licensed under the [MIT License](https://opensource.org/licenses/MIT).
344
+ Licensed under the [MIT License](https://opensource.org/licenses/MIT).
325
345
 
326
346
  **Important:** Overlays contain fields from licensed forms ([BASPI](https://homebuyingsellingcouncil.co.uk/wp-content/uploads/2021/03/Terms-of-Licence-mandatory-download-for-use-of-BASPI.pdf), [PIQ](https://www.propertymark.co.uk/static/14e7c154-98de-4230-957f09bd8d5ddeec/f542b10a-7710-4c37-b3958ccaeec25d4b/property-information-questionnaire-residential-sales.pdf), [Law Society TA](https://www.lawsociety.org.uk/topics/property/transaction-forms)). When rendering data into these forms, ensure compliance with their respective license terms.
327
347
 
@@ -331,4 +351,3 @@ Licensed under the [MIT License](https://opensource.org/licenses/MIT).
331
351
  - 📁 [Example Files](src/examples/)
332
352
  - 🐛 [Issue Tracker](https://github.com/Property-Data-Trust-Framework/schemas/issues)
333
353
  - 🌐 [PDTF Website](https://trust.propdata.org.uk)
334
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdtf/schemas",
3
- "version": "3.4.1-8",
3
+ "version": "3.5.1-1",
4
4
  "description": "Property Data Trust Framework Schemas and Utilities",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -2,6 +2,7 @@
2
2
  "id": "ADC58DEdisuWkmjp9MEJr9",
3
3
  "transactionId": "LnRdGiBUkLbnuNJ89p4CEj",
4
4
  "schemaVersion": "3.2.1",
5
+ "timestamp": 1643116604527,
5
6
  "verification": {
6
7
  "trust_framework": "uk_pdtf",
7
8
  "time": "2022-01-25T13:16:44.527Z",
@@ -2,6 +2,7 @@
2
2
  "id": "DsSaQjKeXTB2qvKkgSfJkh",
3
3
  "transactionId": "LnRdGiBUkLbnuNJ89p4CEj",
4
4
  "schemaVersion": "3.2.1",
5
+ "timestamp": 1643115903108,
5
6
  "verification": {
6
7
  "trust_framework": "uk_pdtf",
7
8
  "time": "2022-01-25T13:05:03.108Z",