@pdtf/schemas 3.6.0-9 → 3.6.0-dev.3
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.
- package/CLAUDE.md +101 -0
- package/README.md +57 -33
- package/docs/branch-release-workflow.md +138 -0
- package/docs/sef25-extensions-ui-spec.md +355 -0
- package/index.js +131 -75
- package/package.json +6 -2
- package/pensive-tesla-d0d355/CLAUDE.md +101 -0
- package/pensive-tesla-d0d355/LICENSE +21 -0
- package/pensive-tesla-d0d355/README.md +435 -0
- package/pensive-tesla-d0d355/docs/branch-release-workflow.md +138 -0
- package/pensive-tesla-d0d355/docs/sef25-extensions-ui-spec.md +355 -0
- package/pensive-tesla-d0d355/index.js +654 -0
- package/pensive-tesla-d0d355/package-lock.json +7297 -0
- package/pensive-tesla-d0d355/package.json +44 -0
- package/pensive-tesla-d0d355/src/examples/v1/exampleAddParticipantVouch.json +32 -0
- package/pensive-tesla-d0d355/src/examples/v1/exampleDocumentedVouch.json +40 -0
- package/pensive-tesla-d0d355/src/examples/v1/exampleElectronicRecord.json +30 -0
- package/pensive-tesla-d0d355/src/examples/v1/exampleTransaction.json +878 -0
- package/pensive-tesla-d0d355/src/examples/v1/exampleVouch.json +25 -0
- package/pensive-tesla-d0d355/src/examples/v2/exampleTransaction.json +901 -0
- package/pensive-tesla-d0d355/src/examples/v3/exampleAddParticipantVouch.json +38 -0
- package/pensive-tesla-d0d355/src/examples/v3/exampleCustomOverlay.json +55 -0
- package/pensive-tesla-d0d355/src/examples/v3/exampleCustomOverlay2.json +93 -0
- package/pensive-tesla-d0d355/src/examples/v3/exampleDocumentedVouch.json +47 -0
- package/pensive-tesla-d0d355/src/examples/v3/exampleElectronicRecord.json +36 -0
- package/pensive-tesla-d0d355/src/examples/v3/exampleTransaction.json +1038 -0
- package/pensive-tesla-d0d355/src/examples/v3/exampleVouch.json +32 -0
- package/pensive-tesla-d0d355/src/mappings/SendPropertyDetailsRequestSchema.json +1588 -0
- package/pensive-tesla-d0d355/src/mappings/adf.js +198 -0
- package/pensive-tesla-d0d355/src/schemas/v1/GeoJSON.json +1279 -0
- package/pensive-tesla-d0d355/src/schemas/v1/baspiNotes.html +102 -0
- package/pensive-tesla-d0d355/src/schemas/v1/energy-performance-certificate.json +124 -0
- package/pensive-tesla-d0d355/src/schemas/v1/freehold-information.json +2051 -0
- package/pensive-tesla-d0d355/src/schemas/v1/leasehold-information.json +2064 -0
- package/pensive-tesla-d0d355/src/schemas/v1/legal-information.json +1045 -0
- package/pensive-tesla-d0d355/src/schemas/v1/material-facts.json +2109 -0
- package/pensive-tesla-d0d355/src/schemas/v1/pdtf-transaction-search-results.json +40 -0
- package/pensive-tesla-d0d355/src/schemas/v1/pdtf-transaction.json +191 -0
- package/pensive-tesla-d0d355/src/schemas/v1/searches/drainage-and-water.json +261 -0
- package/pensive-tesla-d0d355/src/schemas/v1/searches/local-land-charges.json +69 -0
- package/pensive-tesla-d0d355/src/schemas/v1/searches/local-searches-required.json +857 -0
- package/pensive-tesla-d0d355/src/schemas/v1/searches.json +237 -0
- package/pensive-tesla-d0d355/src/schemas/v1/title-deed.json +841 -0
- package/pensive-tesla-d0d355/src/schemas/v2/baspiNotes.html +102 -0
- package/pensive-tesla-d0d355/src/schemas/v2/combined.json +37731 -0
- package/pensive-tesla-d0d355/src/schemas/v2/overlays/baspi.json +8132 -0
- package/pensive-tesla-d0d355/src/schemas/v2/overlays/con29DW.json +705 -0
- package/pensive-tesla-d0d355/src/schemas/v2/overlays/con29R.json +2956 -0
- package/pensive-tesla-d0d355/src/schemas/v2/overlays/fme1.json +1259 -0
- package/pensive-tesla-d0d355/src/schemas/v2/overlays/llc1.json +25 -0
- package/pensive-tesla-d0d355/src/schemas/v2/overlays/lpe1.json +2171 -0
- package/pensive-tesla-d0d355/src/schemas/v2/overlays/nts.json +326 -0
- package/pensive-tesla-d0d355/src/schemas/v2/overlays/oc1.json +2799 -0
- package/pensive-tesla-d0d355/src/schemas/v2/overlays/piq.json +3419 -0
- package/pensive-tesla-d0d355/src/schemas/v2/overlays/rds.json +3736 -0
- package/pensive-tesla-d0d355/src/schemas/v2/overlays/ta10.json +5306 -0
- package/pensive-tesla-d0d355/src/schemas/v2/overlays/ta6.json +4533 -0
- package/pensive-tesla-d0d355/src/schemas/v2/overlays/ta7.json +1045 -0
- package/pensive-tesla-d0d355/src/schemas/v2/pdtf-transaction.json +34351 -0
- package/pensive-tesla-d0d355/src/schemas/v2/skeleton.json +3973 -0
- package/pensive-tesla-d0d355/src/schemas/v3/combined.json +48469 -0
- package/pensive-tesla-d0d355/src/schemas/v3/compactSkeleton.txt +4519 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/README.md +299 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/baspi4.json +8025 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/baspi5.json +8175 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/con29DW.json +716 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/con29R.json +2981 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/ac.json +333 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/as.json +74 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/dk.json +32 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/dr.json +73 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/er.json +85 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/fd.json +75 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/hi.json +51 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/hs.json +73 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/ic.json +59 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/jk.json +96 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/la.json +85 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/lc.json +75 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/ma.json +90 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/mc.json +38 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/mi.json +69 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/nd.json +43 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/oa.json +24 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/oc.json +57 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/pc.json +37 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/ph.json +194 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/rw.json +68 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/sb.json +73 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/sc.json +129 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/sd.json +63 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/sf.json +74 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/sl.json +68 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/ta.json +252 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/tf.json +103 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/tr.json +73 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/extensions/wg.json +350 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/fme1.json +1266 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/llc1.json +25 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/lpe1.json +2199 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/nts.json +2157 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/nts2.json +2742 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/ntsl.json +1813 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/ntsl2.json +2217 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/oc1.json +2817 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/piq.json +3322 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/rds.json +3665 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/sef25.json +1639 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/sr24.json +38 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/ta10.json +4654 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/ta6.json +4568 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/ta6ed6.json +6534 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/ta7.json +1537 -0
- package/pensive-tesla-d0d355/src/schemas/v3/overlays/ta7ed5.json +1551 -0
- package/pensive-tesla-d0d355/src/schemas/v3/pdtf-transaction.json +41573 -0
- package/pensive-tesla-d0d355/src/schemas/v3/skeleton.json +5767 -0
- package/pensive-tesla-d0d355/src/schemas/verifiedClaims/README.md +21 -0
- package/pensive-tesla-d0d355/src/schemas/verifiedClaims/pdtf-verified-claims.json +447 -0
- package/pensive-tesla-d0d355/src/utils/compactSkeleton.js +84 -0
- package/pensive-tesla-d0d355/src/utils/countTokens.js +67 -0
- package/pensive-tesla-d0d355/src/utils/extractExtensionOverlays.js +624 -0
- package/pensive-tesla-d0d355/src/utils/extractOverlay.js +381 -0
- package/pensive-tesla-d0d355/src/utils/extractProperties.js +44 -0
- package/pensive-tesla-d0d355/src/utils/listPathTitles.js +36 -0
- package/pensive-tesla-d0d355/src/utils/minimalSkeleton.js +85 -0
- package/pensive-tesla-d0d355/src/utils/pathList.csv +903 -0
- package/pensive-tesla-d0d355/src/utils/pathSkeleton.js +181 -0
- package/src/examples/v3/exampleTransaction.json +3 -3
- package/src/schemas/v3/combined.json +8047 -1982
- package/src/schemas/v3/compactSkeleton.txt +379 -5
- package/src/schemas/v3/overlays/baspi4.json +164 -21
- package/src/schemas/v3/overlays/baspi5.json +169 -23
- package/src/schemas/v3/overlays/extensions/ac.json +333 -0
- package/src/schemas/v3/overlays/extensions/as.json +4 -2
- package/src/schemas/v3/overlays/extensions/dk.json +32 -0
- package/src/schemas/v3/overlays/extensions/dr.json +9 -9
- package/src/schemas/v3/overlays/extensions/er.json +4 -2
- package/src/schemas/v3/overlays/extensions/fd.json +6 -3
- package/src/schemas/v3/overlays/extensions/hi.json +6 -3
- package/src/schemas/v3/overlays/extensions/hs.json +4 -2
- package/src/schemas/v3/overlays/extensions/ic.json +59 -0
- package/src/schemas/v3/overlays/extensions/jk.json +28 -8
- package/src/schemas/v3/overlays/extensions/la.json +4 -2
- package/src/schemas/v3/overlays/extensions/lc.json +75 -0
- package/src/schemas/v3/overlays/extensions/ma.json +6 -3
- package/src/schemas/v3/overlays/extensions/mc.json +4 -2
- package/src/schemas/v3/overlays/extensions/mi.json +69 -0
- package/src/schemas/v3/overlays/extensions/nd.json +43 -0
- package/src/schemas/v3/overlays/extensions/oa.json +4 -2
- package/src/schemas/v3/overlays/extensions/oc.json +4 -2
- package/src/schemas/v3/overlays/extensions/pc.json +37 -0
- package/src/schemas/v3/overlays/extensions/ph.json +194 -0
- package/src/schemas/v3/overlays/extensions/rw.json +68 -0
- package/src/schemas/v3/overlays/extensions/sb.json +4 -2
- package/src/schemas/v3/overlays/extensions/sc.json +129 -0
- package/src/schemas/v3/overlays/extensions/sd.json +63 -0
- package/src/schemas/v3/overlays/extensions/sf.json +4 -2
- package/src/schemas/v3/overlays/extensions/sl.json +4 -2
- package/src/schemas/v3/overlays/extensions/ta.json +204 -0
- package/src/schemas/v3/overlays/extensions/tf.json +6 -3
- package/src/schemas/v3/overlays/extensions/tr.json +73 -0
- package/src/schemas/v3/overlays/extensions/wg.json +350 -0
- package/src/schemas/v3/overlays/fme1.json +16 -14
- package/src/schemas/v3/overlays/lpe1.json +60 -30
- package/src/schemas/v3/overlays/nts.json +68 -1
- package/src/schemas/v3/overlays/nts2.json +68 -4
- package/src/schemas/v3/overlays/ntsl.json +68 -1
- package/src/schemas/v3/overlays/ntsl2.json +68 -4
- package/src/schemas/v3/overlays/piq.json +39 -4
- package/src/schemas/v3/overlays/rds.json +117 -8
- package/src/schemas/v3/overlays/sef25.json +1639 -0
- package/src/schemas/v3/overlays/ta6.json +46 -16
- package/src/schemas/v3/overlays/ta6ed6.json +6534 -0
- package/src/schemas/v3/overlays/ta7.json +70 -6
- package/src/schemas/v3/overlays/ta7ed5.json +1551 -0
- package/src/schemas/v3/pdtf-transaction.json +4565 -1021
- package/src/schemas/v3/skeleton.json +510 -38
- package/src/utils/extractExtensionOverlays.js +293 -31
- package/src/utils/extractOverlay.js +94 -27
- package/src/utils/pathSkeleton.js +1 -1
- package/.claude/settings.local.json +0 -42
- package/.github/workflows/pages.yml +0 -50
- package/CNAME +0 -1
- package/_config.yml +0 -1
- package/src/tests/v3/caching.test.js +0 -591
- package/src/tests/v3/enquiries.test.js +0 -1096
- package/src/tests/v3/extensionOverlays.test.js +0 -525
- package/src/tests/v3/offers.test.js +0 -823
- package/src/tests/v3/patternProperties.test.js +0 -688
- package/src/tests/v3/transactionSchema.test.js +0 -615
- package/src/tests/v3/verifiedClaimsValidator.test.js +0 -195
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance for AI coding agents when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This repository contains the Property Data Trust Framework (PDTF) schemas - JSON Schema-based definitions for digital residential property data exchange in England and Wales. The framework enables frictionless exchange of property data between software products and services.
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
### Testing
|
|
12
|
+
```bash
|
|
13
|
+
npm test # Run all tests
|
|
14
|
+
npm run test:watch # Run tests in watch mode
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Development
|
|
18
|
+
```bash
|
|
19
|
+
npm install # Install dependencies
|
|
20
|
+
npm run extract-overlays # Regenerate v3 schemas and overlays from combined.json
|
|
21
|
+
npm run extract-extension-overlays # Regenerate v3 extension overlays from combined.json
|
|
22
|
+
npm run publish:dev # Publish the dev branch package to npm tag dev
|
|
23
|
+
npm run publish:next # Publish the next branch package to npm tag next
|
|
24
|
+
npm run publish:latest # Publish the main branch package to npm tag latest
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Important**: `src/schemas/v3/combined.json` is the source of truth for v3 schema changes. Never edit generated schema artifacts directly; there are no exceptions. Utility/source files may be edited normally. After changing `combined.json`, always run both overlay extraction commands so derived files stay in sync.
|
|
28
|
+
|
|
29
|
+
## Architecture
|
|
30
|
+
|
|
31
|
+
### Schema System
|
|
32
|
+
The PDTF uses a flexible overlay system where a base transaction schema can be extended with form-specific overlays:
|
|
33
|
+
|
|
34
|
+
- **Base Schema**: Core transaction schema at `/src/schemas/v3/pdtf-transaction.json`
|
|
35
|
+
- **Overlays**: Form-specific extensions in `/src/schemas/v3/overlays/` (e.g., baspi5.json, ta6.json)
|
|
36
|
+
- **Merging**: Overlays are merged with the base schema using deepmerge with custom merge strategies
|
|
37
|
+
- **Generated Files**: `pdtf-transaction.json`, `skeleton.json`, `compactSkeleton.txt`, `src/schemas/v3/overlays/*.json`, and `src/schemas/v3/overlays/extensions/*.json` are generated from `combined.json`
|
|
38
|
+
|
|
39
|
+
### Key Components
|
|
40
|
+
|
|
41
|
+
1. **index.js**: Main module exposing schema utilities
|
|
42
|
+
- `getTransactionSchema(schemaId, overlays)`: Merges base schema with overlays
|
|
43
|
+
- `getValidator(schemaId, overlays)`: Returns AJV validator for schema
|
|
44
|
+
- `validateVerifiedClaims()`: Validates verified claims structure
|
|
45
|
+
|
|
46
|
+
2. **Schema Versions**: Currently on v3, with v2 still supported
|
|
47
|
+
- Use `https://trust.propdata.org.uk/schemas/v3/pdtf-transaction.json` for v3
|
|
48
|
+
|
|
49
|
+
3. **Overlay System**: Supports multiple UK property forms
|
|
50
|
+
- BASPI (v4 and v5)
|
|
51
|
+
- Law Society TA forms (TA6, TA7, TA10)
|
|
52
|
+
- NTS forms (2023 and 2025 versions)
|
|
53
|
+
- CON29R, PIQ, RDS, and others
|
|
54
|
+
|
|
55
|
+
### Testing Approach
|
|
56
|
+
Tests in `/src/tests/` validate:
|
|
57
|
+
- Schema structure with different overlay combinations
|
|
58
|
+
- Path validation for nested properties
|
|
59
|
+
- Custom overlay merging
|
|
60
|
+
- Verified claims validation
|
|
61
|
+
|
|
62
|
+
Use existing test patterns when adding new tests.
|
|
63
|
+
|
|
64
|
+
## Branch And Release Workflow
|
|
65
|
+
|
|
66
|
+
This repository publishes `@pdtf/schemas` through three branches and npm
|
|
67
|
+
dist-tags:
|
|
68
|
+
|
|
69
|
+
- `main` -> npm `latest`: stable PDTF releases for broad industry use.
|
|
70
|
+
- `next` -> npm `next`: tested capabilities proposed for the next managed PDTF
|
|
71
|
+
point release.
|
|
72
|
+
- `dev` -> npm `dev`: the unstable coal face for faster-moving integration work
|
|
73
|
+
and early adopters.
|
|
74
|
+
|
|
75
|
+
PRs may be merged into `dev` to prove out work before it is ready for the managed
|
|
76
|
+
release path. Once a `dev` PR has been tested and is suitable for standards
|
|
77
|
+
review, promote the same change into `next` via a focused PR. Do not treat `dev`
|
|
78
|
+
as the standard, and do not publish `dev` or `next` builds to npm `latest`.
|
|
79
|
+
|
|
80
|
+
Promotion is automatic by default: after a PR is merged into `dev`,
|
|
81
|
+
`.github/workflows/promote-dev-to-next.yml` creates a matching PR into `next` by
|
|
82
|
+
cherry-picking the merged dev PR. Add the `no-promote-next` label before merging
|
|
83
|
+
a dev PR only when it should stay out of the `next` review queue. Reviewers
|
|
84
|
+
should still inspect the promotion PR, resolve conflicts, and adjust
|
|
85
|
+
release/version metadata if needed before merging to `next`.
|
|
86
|
+
|
|
87
|
+
Each npm publish needs a unique semver version. Use `-dev.N` versions on `dev`,
|
|
88
|
+
prerelease versions on `next`, and normal release versions on `main`.
|
|
89
|
+
|
|
90
|
+
Consumer-specific compatibility profiles belong in the consuming application or
|
|
91
|
+
service unless the capability becomes generic PDTF package functionality.
|
|
92
|
+
Consumers should pin/hash supplied schemas and use their own target-profile
|
|
93
|
+
configuration for API calls and webhooks.
|
|
94
|
+
|
|
95
|
+
See `docs/branch-release-workflow.md` for the full workflow.
|
|
96
|
+
|
|
97
|
+
## Important Notes
|
|
98
|
+
|
|
99
|
+
- All schemas use JSON Schema Draft 07
|
|
100
|
+
- The repository publishes to npm as `@pdtf/schemas`
|
|
101
|
+
- Overlays may contain fields from licensed forms (BASPI, PIQ, Law Society) - ensure compliance when rendering data
|
package/README.md
CHANGED
|
@@ -7,7 +7,12 @@ The Property Data Trust Framework (PDTF) Schemas provide standardized JSON Schem
|
|
|
7
7
|
|
|
8
8
|
## Project Goals & Status
|
|
9
9
|
|
|
10
|
-
**Current Version:** 3.5.0
|
|
10
|
+
**Current Version:** 3.5.0 on `main` / npm `latest`.
|
|
11
|
+
|
|
12
|
+
Additional release channels are available for earlier adoption:
|
|
13
|
+
|
|
14
|
+
- `next` branch / npm `next`: tested capabilities proposed for the next PDTF release.
|
|
15
|
+
- `dev` branch / npm `dev`: fast-moving integration work for Moverly and other early adopters. This channel may include changes that are not yet accepted as PDTF standard capability.
|
|
11
16
|
|
|
12
17
|
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
18
|
|
|
@@ -62,7 +67,7 @@ if (!isValid) {
|
|
|
62
67
|
|
|
63
68
|
- **🏗️ Modular Schema System** - Base schemas with flexible overlay composition
|
|
64
69
|
- **📋 Multiple Form Support** - BASPI, NTS, Law Society TA forms, and more
|
|
65
|
-
- **🧩 Extension Overlays** - Granular NTS2 features as individual modules
|
|
70
|
+
- **🧩 Extension Overlays** - Granular NTS2 and SEF25 features as individual modules
|
|
66
71
|
- **✅ JSON Schema Validation** - Full JSON Schema Draft 07 support with AJV
|
|
67
72
|
- **🔗 Verified Claims** - Support for verified data provenance tracking
|
|
68
73
|
- **📚 Comprehensive Documentation** - Detailed usage guides and examples
|
|
@@ -82,7 +87,7 @@ if (!isValid) {
|
|
|
82
87
|
│ │ │ │ └── extensions/ # Modular NTS2 extensions
|
|
83
88
|
│ │ │ │ ├── jk.json # Japanese Knotweed
|
|
84
89
|
│ │ │ │ ├── tf.json # Transfer Fees
|
|
85
|
-
│ │ │ │ └── ... #
|
|
90
|
+
│ │ │ │ └── ... # NTS2 + SEF25 extensions
|
|
86
91
|
│ │ │ └── combined.json # Master schema for generation
|
|
87
92
|
│ │ ├── v2/ # Legacy schema version
|
|
88
93
|
│ │ ├── verifiedClaims/ # Verified claims schemas
|
|
@@ -163,31 +168,56 @@ const errors = validateVerifiedClaims(verifiedClaims, schemaId, ["nts2023"]);
|
|
|
163
168
|
|
|
164
169
|
#### Extension Overlays
|
|
165
170
|
|
|
166
|
-
Modular
|
|
171
|
+
Modular features for selective adoption. Extensions are merged on top of an NTS base overlay.
|
|
167
172
|
|
|
168
173
|
```javascript
|
|
169
|
-
//
|
|
170
|
-
const schema = getTransactionSchema(schemaId, ["nts2023", "jk", "tf"]);
|
|
171
|
-
|
|
172
|
-
//
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
"as",
|
|
176
|
-
"dr",
|
|
177
|
-
"jk",
|
|
178
|
-
"sb",
|
|
179
|
-
]);
|
|
174
|
+
// NTS2 extensions
|
|
175
|
+
const schema = getTransactionSchema(schemaId, ["nts2023", "jk", "tf", "ma"]);
|
|
176
|
+
|
|
177
|
+
// SEF25 extensions (Seller Enquiry Form)
|
|
178
|
+
const sef25 = ["sc", "pc", "ph", "dk", "rw", "sd", "lc", "wg", "ic", "nd", "mi", "tr"];
|
|
179
|
+
const schema = getTransactionSchema(schemaId, ["nts2023", ...sef25]);
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
-
|
|
183
|
-
| ----------------- | ---- | -------------------------------- |
|
|
184
|
-
| Japanese Knotweed | `jk` | Knotweed 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 |
|
|
182
|
+
**NTS2 Extensions:**
|
|
189
183
|
|
|
190
|
-
|
|
184
|
+
| Extension | Code | Description |
|
|
185
|
+
| --- | --- | --- |
|
|
186
|
+
| Japanese Knotweed | `jk` | Knotweed presence and management |
|
|
187
|
+
| Asbestos | `as` | Asbestos presence and management |
|
|
188
|
+
| Dry Rot | `dr` | Dry rot treatment |
|
|
189
|
+
| Subsidence | `sb` | Subsidence or structural fault |
|
|
190
|
+
| Health & Safety | `hs` | Ongoing health or safety issues |
|
|
191
|
+
| Outside Areas | `oa` | Outside areas details |
|
|
192
|
+
| Main Construction | `mc` | Construction type if standard form |
|
|
193
|
+
| Loft Access | `la` | Loft access and details |
|
|
194
|
+
| Spray Foam | `sf` | Spray foam insulation |
|
|
195
|
+
| Solar Panels | `sl` | Solar panel ownership details |
|
|
196
|
+
| Heating Installed | `hi` | Central heating installation date |
|
|
197
|
+
| Flood Defences | `fd` | Flood defence information |
|
|
198
|
+
| Estate Rentcharges | `er` | Estate rentcharges for freehold |
|
|
199
|
+
| Managing Agent | `ma` | Leasehold managing agent details |
|
|
200
|
+
| Transfer Fees | `tf` | Additional leasehold fees |
|
|
201
|
+
| Onward Chain | `oc` | Other property in chain |
|
|
202
|
+
|
|
203
|
+
**SEF25 Extensions (Seller Enquiry Form):**
|
|
204
|
+
|
|
205
|
+
| Extension | Code | Description |
|
|
206
|
+
| --- | --- | --- |
|
|
207
|
+
| Supply Costs | `sc` | Private water/sewerage costs |
|
|
208
|
+
| Parking Permit Cost | `pc` | Parking permit frequency |
|
|
209
|
+
| Property Hazards | `ph` | 4 hazard Yes/No questions |
|
|
210
|
+
| Dropped Kerb | `dk` | Dropped kerb access to parking |
|
|
211
|
+
| Private Right of Way | `rw` | Private right of way |
|
|
212
|
+
| Storm/Fire/Flood Damage | `sd` | Storm, fire or flood damage |
|
|
213
|
+
| Solar Lease Costs | `lc` | Solar panel lease costs |
|
|
214
|
+
| Warranties & Guarantees | `wg` | 7 warranty categories upfront |
|
|
215
|
+
| Insurance Claims | `ic` | Insurance claims upfront |
|
|
216
|
+
| Neighbour Development | `nd` | Neighbour development |
|
|
217
|
+
| Material Issue | `mi` | Other material issue upfront |
|
|
218
|
+
| Title Restrictions | `tr` | Title restrictions for freehold |
|
|
219
|
+
|
|
220
|
+
[View full SEF25 UI spec →](docs/sef25-extensions-ui-spec.md) | [View all extensions →](src/schemas/v3/overlays/README.md#extension-overlays)
|
|
191
221
|
|
|
192
222
|
## Usage Examples
|
|
193
223
|
|
|
@@ -204,7 +234,7 @@ const legalSchema = getTransactionSchema(schemaId, ["ta6ed4", "ta7ed3"]);
|
|
|
204
234
|
const ntsSchema = getTransactionSchema(schemaId, ["nts2023"]);
|
|
205
235
|
```
|
|
206
236
|
|
|
207
|
-
### Modular
|
|
237
|
+
### Modular Extension Features
|
|
208
238
|
|
|
209
239
|
```javascript
|
|
210
240
|
// Selective NTS2 adoption
|
|
@@ -215,15 +245,9 @@ const partialNts2 = getTransactionSchema(schemaId, [
|
|
|
215
245
|
"ma", // Managing Agent
|
|
216
246
|
]);
|
|
217
247
|
|
|
218
|
-
//
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
"as",
|
|
222
|
-
"dr",
|
|
223
|
-
"jk",
|
|
224
|
-
"sb",
|
|
225
|
-
"hs",
|
|
226
|
-
]);
|
|
248
|
+
// SEF25 Seller Enquiry Form extensions
|
|
249
|
+
const sef25 = ["sc", "pc", "ph", "dk", "rw", "sd", "lc", "wg", "ic", "nd", "mi", "tr"];
|
|
250
|
+
const sellerEnquiry = getTransactionSchema(schemaId, ["nts2023", ...sef25]);
|
|
227
251
|
```
|
|
228
252
|
|
|
229
253
|
### Data Validation
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Branch And Release Workflow
|
|
2
|
+
|
|
3
|
+
This repository uses three long-lived release channels for `@pdtf/schemas`.
|
|
4
|
+
|
|
5
|
+
## Branches And npm Tags
|
|
6
|
+
|
|
7
|
+
| Branch | npm dist-tag | Purpose |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `main` | `latest` | Stable PDTF releases for broad industry use. |
|
|
10
|
+
| `next` | `next` | Tested capabilities intended for the next managed PDTF point release. |
|
|
11
|
+
| `dev` | `dev` | Unstable coal face for faster-moving integration work and early adopters. |
|
|
12
|
+
|
|
13
|
+
`dev` is not the standard. It is a proving ground for changes that may later be
|
|
14
|
+
promoted to `next` through focused PRs. Consumers who need the stable standard
|
|
15
|
+
should use `@pdtf/schemas` from `latest`/`main`.
|
|
16
|
+
|
|
17
|
+
## Versioning
|
|
18
|
+
|
|
19
|
+
Every npm publish must have a unique semver version.
|
|
20
|
+
|
|
21
|
+
- `main` publishes normal release versions, for example `3.5.0`, on `latest`.
|
|
22
|
+
- `next` publishes prerelease versions on the `next` tag.
|
|
23
|
+
- `dev` publishes prerelease versions on the `dev` tag, using a `-dev.N`
|
|
24
|
+
suffix, for example `3.6.0-dev.0`.
|
|
25
|
+
|
|
26
|
+
Do not publish `dev` or `next` builds to `latest`.
|
|
27
|
+
|
|
28
|
+
## Dev Fast-Path Workflow
|
|
29
|
+
|
|
30
|
+
Use this workflow when work needs to move faster than the managed PDTF release
|
|
31
|
+
cycle, or when a change needs practical integration testing before it is proposed
|
|
32
|
+
for the standards-track path.
|
|
33
|
+
|
|
34
|
+
1. Open a PR against `dev`.
|
|
35
|
+
2. Treat `dev` as the unstable coal face. Keep the change reviewable and, where
|
|
36
|
+
possible, structured so that accepted parts can later be promoted to `next`.
|
|
37
|
+
3. Change `src/schemas/v3/combined.json` for schema changes, then run both
|
|
38
|
+
extraction scripts:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm run extract-overlays
|
|
42
|
+
npm run extract-extension-overlays
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
4. Add or update tests for schema, overlay, path-validation, and utility
|
|
46
|
+
behaviour.
|
|
47
|
+
5. Bump the package version to the next unique `-dev.N` version if the PR will
|
|
48
|
+
be published from `dev`.
|
|
49
|
+
6. If the change should not enter the `next` review queue after it has landed in
|
|
50
|
+
`dev`, add the `no-promote-next` label before merging.
|
|
51
|
+
7. Merge to `dev`.
|
|
52
|
+
8. If publishing the dev channel, publish from `dev`:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm run publish:dev
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
9. Consumers can use `@pdtf/schemas@dev`, or pin the exact dev version in
|
|
59
|
+
lockfiles when deterministic rollout is required.
|
|
60
|
+
|
|
61
|
+
## Automated Promotion To next
|
|
62
|
+
|
|
63
|
+
The `.github/workflows/promote-dev-to-next.yml` workflow can open the matching
|
|
64
|
+
`next` PR automatically.
|
|
65
|
+
|
|
66
|
+
Trigger:
|
|
67
|
+
|
|
68
|
+
- A PR is merged into `dev`.
|
|
69
|
+
- The merged PR does not have the `no-promote-next` label.
|
|
70
|
+
|
|
71
|
+
Behaviour:
|
|
72
|
+
|
|
73
|
+
1. Check out `next`.
|
|
74
|
+
2. Create a branch named `promote/dev-pr-<number>-to-next`.
|
|
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.
|
|
80
|
+
|
|
81
|
+
The promotion PR is intentionally still reviewed. Before merging to `next`,
|
|
82
|
+
maintainers should:
|
|
83
|
+
|
|
84
|
+
- confirm the change is appropriate for the managed release path;
|
|
85
|
+
- remove any dev-only scaffolding;
|
|
86
|
+
- adjust package version metadata from `-dev.N` to the correct `next`
|
|
87
|
+
prerelease version where needed;
|
|
88
|
+
- run tests and schema extraction checks.
|
|
89
|
+
|
|
90
|
+
## Manual Promotion To next
|
|
91
|
+
|
|
92
|
+
If automation is not used, or if the automated cherry-pick conflicts:
|
|
93
|
+
|
|
94
|
+
1. Branch from `next`.
|
|
95
|
+
2. Cherry-pick the merged dev PR commit or recreate the focused diff.
|
|
96
|
+
3. Remove dev-only changes.
|
|
97
|
+
4. Bump to the next unique `next` prerelease version if the PR will be published
|
|
98
|
+
from `next`.
|
|
99
|
+
5. Open a PR into `next` that links back to the original dev PR.
|
|
100
|
+
6. Merge to `next` after review.
|
|
101
|
+
7. Publish from `next`:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npm run publish:next
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The `next` channel should remain tested and coherent. It can be ahead of
|
|
108
|
+
`main`, but it should not contain unrelated experimental work merely because it
|
|
109
|
+
exists on `dev`.
|
|
110
|
+
|
|
111
|
+
## Promotion To main
|
|
112
|
+
|
|
113
|
+
When the PDTF point-release cycle is ready:
|
|
114
|
+
|
|
115
|
+
1. Select accepted `next` changes for the point release.
|
|
116
|
+
2. Merge or cherry-pick the accepted changes into `main`.
|
|
117
|
+
3. Bump to the release version, for example `3.6.0`.
|
|
118
|
+
4. Publish from `main`:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npm run publish:latest
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Long-running `dev` work should not be merged wholesale into `main` unless the
|
|
125
|
+
full contents have been reviewed and accepted for the PDTF release.
|
|
126
|
+
|
|
127
|
+
## Consumer Compatibility Profiles
|
|
128
|
+
|
|
129
|
+
Consumer-specific compatibility profiles are owned by the consuming application
|
|
130
|
+
or service unless and until they become a reusable PDTF capability.
|
|
131
|
+
|
|
132
|
+
Consumers may pin exact supplied schemas, hash them, and filter outbound API
|
|
133
|
+
calls or webhooks accordingly. That code should not be added to this schema
|
|
134
|
+
package unless the capability is generic and appropriate for PDTF consumers.
|
|
135
|
+
|
|
136
|
+
If a consumer later supports an official PDTF release, its target profile should
|
|
137
|
+
move from the consumer-specific schema to the relevant published
|
|
138
|
+
`@pdtf/schemas` release or prerelease.
|