-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: extend SiteAddress
type to account for ranges
#3670
Conversation
selectedAddress.SAO_TEXT, // populated in cases of building name only, no street number | ||
] | ||
.filter(Boolean) | ||
.join(""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This updates existing sao
field to be handled same as pao
, whereas previously we only accounted for SAO_TEXT
and would miss SAO_START_NUMBER
or SAO_START_SUFFIX
street?: string; | ||
town?: string; | ||
postcode?: string; | ||
ward?: string; | ||
parish?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to refresh my memory here, so writing it down here too.
These are all (unideally) optional type properties for two reasons:
- This component shares a single
setAddress
set state action for both pages (selecting an existing address
& proposing a new one), despite those pages fundamentally requiring/setting different types. There's definitely a future refactor in here, but bigger and more slippery than I'd like to deal with right now! - OS Docs are quite confusing to make sense of about what's required versus not sometimes - for example,
PARISH_CODE
has a "multiplicity" of 1 (not 0..1) which I understand to mean exactly one parish should always be associated with & returned for a given address, yet it's not found in the example response linked above at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helpful thanks!
Removed vultr server and associated DNS entries |
a392a22
to
3719ed7
Compare
street?: string; | ||
town?: string; | ||
postcode?: string; | ||
ward?: string; | ||
parish?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helpful thanks!
It came up in Idox feedback that we aren't currently supporting address ranges in the ODP Schema. I looked through the OneApp JSON example we have and don't see any instances of it handling ranges either, but nonetheless it's low effort for us to start more carefully checking for these.
So, this PR adds a few extra fields from the OS Places API "LPI" data source to our internal model which we can later decide how to send along in payloads / the ODP Schema (theopensystemslab/digital-planning-data-schemas#236).
Only additive changes here!
saoEnd
paoEnd
ward
parish
Links: