A New TypeScript SDK for Jellyfin
I recently published a new project that I have been working on, a TypeScript SDK for Jellyfin. This project is not (currently) an official Jellyfin project. I wanted the project to have a solid set of basic functionality before proposing it to be moved into the organization. This allows me some freedom in making larger changes as I deem necessary while the project is still in early development.
Why another SDK / API client?
I was motivated to start working on a new TypeScript SDK, because in my opinion, the current API clients had some pretty fundamental flaws.
I thought the best option would be to use some of what we learned from the Jellyfin API Client for Axios and make it more like the Kotlin SDK. The core could be generated from the OpenAPI specification but with all the boilerplate and some common utilities included.
What is the current state of the project?
The new TypeScript SDK is at a point where it should be usable and fairly stable. It can be installed from npm today! A basic demo of how to use the SDK can be found in this CodePen. There is also usage documentation in the README and the integration tests can be used as a reference. TypeDoc documentation is available in the repository.
The SDK currently includes utilities for authentication and server discovery and validation. Also included is initial support for device playback profile generation added by @ThibaultNocchi. Generating a complete profile is still a long ways off, but it will be great to handle device profiles in a common place as they are notoriously difficult to get right. I am currently working on a utility to generate item image URLs, so that should be available in the next release.
If you are interested in supporting my work, you can sponsor me on GitHub.