mark-thomas / vestaboard-api

Vestaboard API wrapper
13 stars 4 forks source link

Better exports of types #29

Closed mark-thomas closed 9 months ago

mark-thomas commented 9 months ago

Exposing some more of the api types, and wrapping some of the types from @Vestaboard/Installable which will make this easier to use in concert with that app, particularly on the client.

These are copied in rather than a dependency because @Vestaboard/Installable has a dependency on @mui/styles which can cause a lot of havoc. I'm still not really happy with how it's set up, but I'll be working on something using it over the coming weeks and will update from here.

Now there is a VestaboardChar alias that maps to the IKeyCode, and VestboardLayout which is the BoardCharArray (from this lib) or the IBoard from @Vestaboard/Installable.

I've also added more error handling in the r/w api, particularly for the 304 code which is the 'not modified' code.

There is also a new helper that calculates the difference between two boards and returns an array of board layouts with a single bit difference between them.

Also, When creating your vestaboard control class, we require the VestaboardControlMode explicitly.