SDK changelog
Release history for @relai-team/access-sdk. The current version is 0.16.0.
npm install @relai-team/access-sdk
Versions below 1.0 can change shape between minor releases. Anything that needs a code change on upgrade is marked Breaking; everything else is additive and safe to take.
0.16.0August 7, 20263 changes
- Added
Operating hours on Exchange Zones
open_24_7, operating_hours, is_open_now and next_open_at. Every Exchange Zone is open 24/7 unless its host sets hours. is_open_now and next_open_at are computed server-side in the Exchange Zone's own timezone with daylight saving applied: the device is in the USER's timezone, which is not necessarily the same one, and that arithmetic is where hand-rolled versions go wrong. DayWindow and OperatingHours are exported so an app can render a weekly schedule.
- Added
ez_closed
A new error code, distinct from ez_unavailable: that means the hardware is down and needs a human, this resolves by itself at opening time, and the message carries the next opening. Creating an order is always refused while closed; opening a compartment on an existing order is refused too unless that Exchange Zone allows pick-ups when closed. Override links bypass it.
- Changed
Late fees pause while an Exchange Zone is closed
Late pick-up fees no longer accrue outside operating hours, and an order is not marked abandoned for time it spent behind a locked door. Nothing to handle; worth knowing when a fee is smaller than a wall-clock reading would suggest. Unchanged for 24/7 Exchange Zones, which is all of them by default.
- Added
0.15.0August 6, 20261 change
- Added
List orders
relai.orders.page(), .list() and .all(). Until now the API could create an order and fetch one by id but not list them, so an app had to persist order ids on the device and reinstalling made the user's physical belongings unreachable from the app. all() is an async iterator that follows cursors for you. A secret key lists every order of the app; a publishable key requires a signed-in end user and returns only orders where they are the sender or recipient, because a publishable key ships inside the app binary.
- Added