removed requestability logic from AvailabilityResolver
refactored deliveryLocationsResolver into more reusable functions
created RequestabilityResolver, which calls addRecap or addOnsite locations functions from deliveryLocationsResolver
earlier version of this code had an extra scsb call which i realized is not necessary because the recap customer codes are added in the availabilityresolver call. i still think there should be some further centralization of the scsb calls and there should not be batched scsb queries being invoked from functions defined within the resolvers
removed fixPhys and fixEddRequestability functions. phys requestablilty is determined from a non zero length of delivery locations and eddRequestability is determined using functions from the deliveryLocationsResolver
removed support for no-onsite-edd request options
The code has LOTS of unit tests, many of which I've moved around as I've moved parts of the code around. A bunch of the tests in requestability_resolver.test.js came from availabilityResolver, for example. I think even before looking at the code, it would be most useful to go through the test cases and check that the output is in line with our business logic.
NB: To run the tests, run NYPL_CORE_VERSION=romcom-2.0-prerelease npm test
Not in this PR:
consideration for batching
consideration of what happens when the requestabilityResolver is invoked via the responseMassager.
A lot went down:
The code has LOTS of unit tests, many of which I've moved around as I've moved parts of the code around. A bunch of the tests in
requestability_resolver.test.js
came from availabilityResolver, for example. I think even before looking at the code, it would be most useful to go through the test cases and check that the output is in line with our business logic.NB: To run the tests, run
NYPL_CORE_VERSION=romcom-2.0-prerelease npm test
Not in this PR: