Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

Releases: SydneyUniLibrary/sierra-api-as-promised

Version 0.4.2

28 Apr 02:25
3a8bf32
Compare
Choose a tag to compare
Version 0.4.2 Pre-release
Pre-release

Upgrade dependencies to mitigate CVE-2018-3728.

Version 0.4.1

20 Jan 06:00
776e00c
Compare
Choose a tag to compare
Version 0.4.1 Pre-release
Pre-release

Minor bug fix.

  • URLs are no longer being logged to the console.

Support for v5 of the Patron API

11 Dec 10:55
628748a
Compare
Choose a tag to compare
Pre-release

Complete support for the Patron API

In additional to completing support for v4 of the Patron API, this release also extends support to v5.

Updated function names

The naming scheme of the functions in Patron API has been updated.

Support for v5

This has required some structural changes to the library so it can automatically select either v4 or v5 of the API is used, depending on the capabilities of the Sierra API host.

Instead of the library initialising at start up, the library now exports the factory function SierraAPIAsPromised, that returns SierraAPIConnection objects. From an SierraAPIConnection object, you can access the API. SierraAPIAsPromised selects the correct version of the API based on the about info received from the Sierra API host.

Forwards compatibility

Normally the latest API version that both the host and the library supports is selected. This can be controlled with apiMajorVersion configuration option. apiMajorVersion can bring forwards compatibility to library users when the library is updated with newer API versions that bring breaking changes.

Backwards compatability

The new findPatron function has been added to the v5 Patron API. So the findPatronWithBarcode function in the v5 Patron API is emulated by calling findPatron giving b for varFieldTag.

Date/time range convenience

22 Nov 23:38
Compare
Choose a tag to compare
Pre-release

For range-capable date/time parameters, in addition to giving an ISO string or a range string, support passing an array of two: ISO strings, native Date objects, moment.js moment objects
or Luxon DateTime objects.

Also support passing in a Luxon Interval object, and adjusting for the end of Luxon Interval objects being exclusive but the end of Sierra API ranges being inclusive.

Support open-ended ranges.

Similarly for range-capable date parameters, except the time part is truncated for these.

This doesn't create a dependency on either the moment.js or Luxon libraries. Duck-typing is used to detect moement.js and Luxon objects and convert them to ISO strings. There is a dev dependency on these in order to use these objects for testing.

Accept record ids in the patron API functions

20 Nov 06:09
501061d
Compare
Choose a tag to compare

Update the patron API functions to accept record ids from sierra-record-id.

Changlog

  • Add dep on v0.2.0 of sierra-record-id.
  • Update v4/patrons.js to accept record ids.
  • Add getPatronFines and getPatronHolds to v4/patrons.js.
  • Require Node v8 LTS.

Initial release

20 Nov 00:55
Compare
Choose a tag to compare
Initial release Pre-release
Pre-release

Partially exposes the Patron API.