Generated SDK exports
The package root re-exports:- Generated operation functions such as
getBooks,getBookById,getBookPages,getSeriesById,getLibraries,getLibraryById,getCollections, andgetReadLists. - Generated DTO, search, page, operation response, and operation error types.
createKomgaClient,AuthConfig, andKomgaClientOptions.KomgaResult,KomgaApiError, andunwrap.- The generated
createClientfunction andGeneratedClientConfigtype for advanced integrations.
getBookById has the shape (parameters: { bookId: string }, options?: Options<never, ThrowOnError>); call it as follows:
{ data, error, request, response }. See Direct API functions for operation examples and Result handling for unwrap.
Read the generated operation contract
The generated function and type names make the transport mapping explicit:ADMIN or FILE_DOWNLOAD, documented status codes, and whether a successful response is a DTO, page, blob, text value, or 204 No Content. Use those generated comments and types rather than assuming every endpoint returns JSON.
Komga server API
The API Reference tab uses the Komga 1.25.0 OpenAPI document:https://raw.githubusercontent.com/gotson/komga/1.25.0/komga/docs/openapi.json
Use it to confirm endpoint parameters, authorization requirements, status codes, and server response schemas. The generated SDK operation names and types are produced from this API contract.
Version alignment
Keep the generated SDK surface and the server reference on the same API version when you document an operation. If you target another Komga server release, verify its OpenAPI document before relying on a parameter or response field; generated types do not validate a newer server response automatically. When upgrading Komga, compare operation signatures and response types, regenerate the client, and re-run application-owned runtime validation fixtures if your integration has them. Keep migration notes focused on actual changed operations rather than reintroducing removed service or schema layers.TypeDoc and source navigation
The package’s generated declarations and TypeScript types are the authoritative SDK reference. TypeDoc can provide symbol-level details for the published source, while this page and the OpenAPI tab explain how to use the generated surface. The generatedsdk.gen.ts file is intentionally mechanical; prefer the examples in Direct API and Quick reference for integration patterns.
Next steps
- Configure the generated client: Fetch configuration
- Browse operation usage: Generated API operations
- Add consumer-owned validation: Runtime validation
- Handle result and media responses: Result handling