- GET /version (signed-in users only) answers the version and, when the binary knows it, the commit it was built from and whether the files had uncommitted changes - the commit is read from the build info Go records in a git checkout, so no build flag is needed - the side menu shows the version under the privacy line, and Settings has an About section with it - the menu's own requests (friends, version) are not counted as requests of an admin page in the Shell tests
9387 lines
346 KiB
TypeScript
9387 lines
346 KiB
TypeScript
/**
|
||
* This file was auto-generated by openapi-typescript.
|
||
* Do not make direct changes to the file.
|
||
*/
|
||
|
||
export interface paths {
|
||
"/health": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/** Liveness check */
|
||
get: operations["getHealth"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/version": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Which Sonda is running
|
||
* @description The version, and the commit it was built from when the binary knows it. Only a signed-in
|
||
* user can ask: the version of a server is not told to a stranger.
|
||
*/
|
||
get: operations["getVersion"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/openapi.yaml": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/** This document */
|
||
get: operations["getOpenAPI"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/auth/register": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Create the first user
|
||
* @description Only works while no user exists. The new user is the admin. Afterwards registration is
|
||
* closed and admins create accounts with `POST /users`.
|
||
*/
|
||
post: operations["register"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/auth/login": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/** Open a session */
|
||
post: operations["login"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/auth/refresh": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Renew a session
|
||
* @description Exchanges a refresh token for a new access token and a new refresh token. The old refresh
|
||
* token stops working. Presenting a spent one again, more than ten seconds after it was used,
|
||
* ends every session of that user; inside those ten seconds it only fails, so two tabs
|
||
* refreshing together do not log each other out. This holds for any spent token, including
|
||
* one revoked by logout or by a password change.
|
||
*/
|
||
post: operations["refresh"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/auth/logout": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* End a session
|
||
* @description Revokes one refresh token. Always answers 204, so it never reveals whether the token existed.
|
||
*/
|
||
post: operations["logout"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/auth/me": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/** The signed-in account */
|
||
get: operations["getMe"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/auth/password": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Change your password
|
||
* @description Revokes every refresh token of the account, so no session can be renewed. An access token
|
||
* that was already issued keeps working until it expires (15 minutes by default).
|
||
*/
|
||
post: operations["changePassword"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/users": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List users
|
||
* @description Admin only.
|
||
*/
|
||
get: operations["listUsers"];
|
||
put?: never;
|
||
/**
|
||
* Create a user
|
||
* @description Admin only.
|
||
*/
|
||
post: operations["createUser"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/users/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
post?: never;
|
||
/**
|
||
* Delete a user
|
||
* @description Admin only. Removes the account and its refresh tokens. Access tokens already issued stop
|
||
* working at once on admin routes, `/auth/me`, `/auth/password` and `/listens`; other routes
|
||
* accept them until they expire (15 minutes by default). The last admin cannot be deleted.
|
||
*/
|
||
delete: operations["deleteUser"];
|
||
options?: never;
|
||
head?: never;
|
||
/**
|
||
* Grant or remove the admin role
|
||
* @description Admin only. The last admin cannot be demoted.
|
||
*/
|
||
patch: operations["updateUser"];
|
||
trace?: never;
|
||
};
|
||
"/users/{id}/password": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
/**
|
||
* Reset a user's password
|
||
* @description Admin only. Revokes every refresh token of that user, so no session can be renewed. Access
|
||
* tokens already issued keep working until they expire (15 minutes by default).
|
||
*/
|
||
put: operations["resetUserPassword"];
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/libraries": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List libraries
|
||
* @description Admin only.
|
||
*/
|
||
get: operations["listLibraries"];
|
||
put?: never;
|
||
/**
|
||
* Add a library
|
||
* @description Admin only. The path must be an absolute, existing directory, never the filesystem root,
|
||
* and never inside or around another library (a bad path or an overlap is `400 invalid_input`).
|
||
* A name or path that another library already uses is `409 library_exists`. Names are unique
|
||
* ignoring case.
|
||
*/
|
||
post: operations["createLibrary"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/libraries/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
post?: never;
|
||
/**
|
||
* Remove a library
|
||
* @description Admin only. Removes the library and its index entries. Tracks and listening history stay;
|
||
* the music on disk is never touched. Refused while a scan runs.
|
||
*/
|
||
delete: operations["deleteLibrary"];
|
||
options?: never;
|
||
head?: never;
|
||
/**
|
||
* Rename or move a library
|
||
* @description Admin only. Send `name`, `path` or both. Files keep their identity when the path changes.
|
||
* Changing the path is refused while a scan runs.
|
||
*/
|
||
patch: operations["updateLibrary"];
|
||
trace?: never;
|
||
};
|
||
"/libraries/{id}/scan": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Scan one library
|
||
* @description Admin only. Starts a scan in the background; follow it with `GET /library/scan`. With
|
||
* `full=true` every file is read again, not only the new or changed ones.
|
||
*/
|
||
post: operations["scanLibrary"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/library/covers": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Progress of the job that builds the covers
|
||
* @description Whether the job is running, how far it is (`progress`, only while it runs), and how the last one
|
||
* ended. The job is described at `POST /library/covers`.
|
||
*/
|
||
get: operations["getCoversJob"];
|
||
put?: never;
|
||
/**
|
||
* Build all the covers in the background
|
||
* @description Admin only. Starts, in the background and one at a time like a scan, a job that builds the
|
||
* cover of every album that has something to play and no cover that is still good, instead of
|
||
* waiting for each album to be opened; follow it with `GET /library/covers`. For each album it
|
||
* does what `GET /albums/{id}/cover` does: the pictures in the user's own files first and, only
|
||
* if the album has none and an admin switched the `coverartarchive` provider on, the Cover Art
|
||
* Archive by the release group id of the album's tags. An album whose cover is still good (a
|
||
* found one for a week, "no cover" for a day) is skipped; send `refresh=true` to search every
|
||
* album again.
|
||
*
|
||
* **This goes through the whole library.** With the archive on, it sends
|
||
* the release group id of every album that has no picture in its files, one after the other and
|
||
* spaced out. It gives up, and says why in `last_error`, when the provider fails for five albums
|
||
* in a row, and also when the files cannot be read (an unmounted disk): it never turns that into
|
||
* "no cover" and never replaces a cover that was built. A cover that came from the archive is kept
|
||
* when the provider was switched off since, even with `refresh=true`; only taking its data back
|
||
* (`DELETE /providers/coverartarchive/data`) removes those. `DELETE /library/covers` stops it.
|
||
*/
|
||
post: operations["startCoversJob"];
|
||
/**
|
||
* Stop the job that builds the covers
|
||
* @description Admin only. Asks a running job to end after the album it is on (its requests to the provider may still finish); the covers already built stay.
|
||
* It answers the same when no job is running.
|
||
*/
|
||
delete: operations["stopCoversJob"];
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/library/artist-images": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Progress of the job that looks for the artist pictures
|
||
* @description Whether the job is running, how far it is (`progress`, only while it runs), and how the last one
|
||
* ended. The job is described at `POST /library/artist-images`.
|
||
*/
|
||
get: operations["getArtistImagesJob"];
|
||
put?: never;
|
||
/**
|
||
* Look for all the artist pictures in the background
|
||
* @description Admin only. Starts, in the background and one at a time like a scan, a job that looks for the
|
||
* picture of every artist of the library that has a MusicBrainz id and no answer about its
|
||
* picture that is still good, instead of waiting for each artist to be opened; follow it with
|
||
* `GET /library/artist-images`. For each artist it does what `GET /artists/{id}/image` does, by
|
||
* the artist's MusicBrainz id and never by name: MusicBrainz, Wikidata, then a free picture on
|
||
* Wikimedia Commons. It needs an admin to have switched both the `commons` and the `musicbrainz`
|
||
* providers on; with either off the job ends at once and says so in `last_error`. Artists with
|
||
* no id are not touched. A picture is good for 30 days and "no picture" for a week; send
|
||
* `refresh=true` to search every artist again. A refresh never replaces a stored picture by a
|
||
* failure.
|
||
*
|
||
* **This goes through the whole library.** It sends the MusicBrainz id
|
||
* of every artist, one after the other and spaced out, to MusicBrainz, Wikidata and Commons. It
|
||
* gives up, and says why in `last_error`, when the providers fail for five artists in a row.
|
||
* `DELETE /library/artist-images` stops it.
|
||
*/
|
||
post: operations["startArtistImagesJob"];
|
||
/**
|
||
* Stop the job that looks for the artist pictures
|
||
* @description Admin only. Asks a running job to end after the artist it is on (its requests to the providers may still finish); the pictures already found
|
||
* stay. It answers the same when no job is running.
|
||
*/
|
||
delete: operations["stopArtistImagesJob"];
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/library/descriptions": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Progress of the job that looks for the artist descriptions
|
||
* @description Whether the job is running, how far it is (`progress`, only while it runs), and how the last one
|
||
* ended. The job is described at `POST /library/descriptions`.
|
||
*/
|
||
get: operations["getDescriptionsJob"];
|
||
put?: never;
|
||
/**
|
||
* Look for all the artist descriptions in the background
|
||
* @description Admin only. Starts, in the background and one at a time like a scan, a job that looks for the
|
||
* description of every artist of the library that has a MusicBrainz id and no answer about its
|
||
* description that is still good; follow it with `GET /library/descriptions`. For each artist it
|
||
* does what `GET /artists/{id}/description` does, by the artist's MusicBrainz id and never by
|
||
* name: MusicBrainz, Wikidata, then Wikipedia. It needs an admin to have switched both the
|
||
* `wikipedia` and the `musicbrainz` providers on; with either off the job ends at once and says
|
||
* so in `last_error`. Artists with no id are not touched. A description is good for 30 days and
|
||
* "no description" for a day; send `refresh=true` to read every artist again. A refresh never
|
||
* replaces a stored description by a failure.
|
||
*
|
||
* **This goes through the whole library.** It sends the MusicBrainz id
|
||
* of every artist, one after the other and spaced out, to MusicBrainz, Wikidata and Wikipedia.
|
||
* It gives up, and says why in `last_error`, when the providers fail for five artists in a row.
|
||
* `DELETE /library/descriptions` stops it.
|
||
*/
|
||
post: operations["startDescriptionsJob"];
|
||
/**
|
||
* Stop the job that looks for the artist descriptions
|
||
* @description Admin only. Asks a running job to end after the artist it is on (its requests to the providers may still finish); the descriptions already
|
||
* found stay. It answers the same when no job is running.
|
||
*/
|
||
delete: operations["stopDescriptionsJob"];
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/library/duplicates": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The songs that are in more than one file
|
||
* @description Admin only. Groups of files that are the same song by the same artists, worked out from the index and
|
||
* never from the disk, so it is quick and touches no file. Two files are the same song when they have the
|
||
* same set of main artists, the same title (the key Sonda matches titles by) and durations no more than
|
||
* 3 seconds apart, every pair in a group within that. A file with no duration or no artist never matches,
|
||
* a file flagged as missing does not count, and a copy may be on a different album: `files` says which.
|
||
*
|
||
* Each group says which copy Sonda would keep (`suggested_keep_track_id`): the one without loss (FLAC)
|
||
* before one with loss, then the higher bitrate, then the bigger file, then the oldest. `hashed` is true when
|
||
* every file of the group has been read by the check (`POST /library/duplicates/check`) and `identical` when,
|
||
* besides, they are byte for byte the same. No file path is ever returned.
|
||
*
|
||
* `deletion_allowed` says whether `POST /library/duplicates/clean` can work: with `library.allow_delete`
|
||
* off (the default) the groups can still be seen.
|
||
*/
|
||
get: operations["listDuplicates"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/library/duplicates/check": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Progress of the check that reads the files of the duplicates
|
||
* @description Whether the check is running, how far it is (`progress`, only while it runs), and how the last one ended.
|
||
* The check is described at `POST /library/duplicates/check`.
|
||
*/
|
||
get: operations["getDuplicatesCheck"];
|
||
put?: never;
|
||
/**
|
||
* Read the files of the duplicates, to tell which are identical
|
||
* @description Admin only. Starts, in the background and one at a time like a scan, a job that reads every file that is in
|
||
* a group of copies and keeps its SHA-256, so that a group of files that are byte for byte the same can be
|
||
* called `identical`. It only reads: nothing is removed or sent anywhere. **It reads whole files**, which on a
|
||
* network drive takes a while, so it is started on purpose. A file that has a fingerprint is skipped, and the
|
||
* fingerprint of a file is forgotten when a scan finds the file changed; send `refresh=true` to read every file
|
||
* again. A file that changed since the scan is skipped. It gives up, and says why in `last_error`, when files
|
||
* cannot be read five times in a row (a disk that is not mounted). `DELETE /library/duplicates/check` stops it.
|
||
*/
|
||
post: operations["startDuplicatesCheck"];
|
||
/**
|
||
* Stop the check of the duplicates
|
||
* @description Admin only. Asks a running check to end after the file it is on; the fingerprints already kept stay. It
|
||
* answers the same when no check is running.
|
||
*/
|
||
delete: operations["stopDuplicatesCheck"];
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/library/duplicates/clean": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Delete the extra copies of one song
|
||
* @description Admin only. **Deletes files from the music folder.** It is the one thing Sonda does that writes there, so it
|
||
* is off until the operator turns on `library.allow_delete` (answer `deletion_disabled` otherwise), the folder
|
||
* has to be writable (`library_read_only`), and it is never done by itself: one request removes the copies
|
||
* `remove_track_ids` of one song and keeps `keep_track_id`.
|
||
*
|
||
* The server decides again, whatever the client saw, and removes nothing unless every check passes: no scan is
|
||
* running (`scan_running`); the tracks exist (`track_not_found`); they are copies of one song by the rule of
|
||
* `GET /library/duplicates` (`invalid_input` otherwise, and also when the copy to keep is among those to
|
||
* remove, a copy is named twice or there are none or more than 100); and the copy to keep and every copy to
|
||
* remove are still the file the last scan saw, a regular file with the same size and date (`duplicate_changed`
|
||
* for a file that changed, is gone, became a link or is outside the library: scan again). So the last copy of
|
||
* a song is never removed. Every file is checked before the first is removed.
|
||
*
|
||
* Each copy is removed from the disk through the library folder (a path cannot leave it, not even through a
|
||
* link) and its track leaves the index; **the listens of the removed track become listens of the track that
|
||
* stays**, so the taste is not lost. Folders are never removed, not even empty ones. If it fails part way (for
|
||
* example the folder turns out to be read-only for the second file), what was removed stays removed.
|
||
*/
|
||
post: operations["cleanDuplicates"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/library/scan": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Scan status
|
||
* @description Whether a scan is running and how the last one ended.
|
||
*/
|
||
get: operations["getScanStatus"];
|
||
put?: never;
|
||
/**
|
||
* Scan every library
|
||
* @description Admin only. Starts a scan in the background. Only MP3 and FLAC files are read; other audio
|
||
* formats are counted as `unsupported`. Housekeeping folders of NAS boxes (`@Recycle`,
|
||
* `#recycle`, `@eaDir`, `.@__thumb`, `$RECYCLE.BIN`) are skipped.
|
||
*
|
||
* A scan reads the tags of files that are new or changed. Send `full=true` to read every file
|
||
* again: that is how MusicBrainz ids and genres reach music that was indexed before they were
|
||
* read. Files keep their identity, so listening history is kept.
|
||
*/
|
||
post: operations["scanAll"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/artists": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List artists
|
||
* @description Artists credited on a playable track, or that are the album artist of an album with one.
|
||
* Sorted by name.
|
||
*/
|
||
get: operations["listArtists"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/artists/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/** One artist */
|
||
get: operations["getArtist"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/artists/{id}/similar": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Artists similar to one
|
||
* @description Artists an external provider (Last.fm) finds similar to this one, best first. Each says
|
||
* whether it is in the library, and `id` works with `GET /artists/{id}`; one that is not in the
|
||
* library has no files.
|
||
*
|
||
* The provider is only asked when an admin switched it on and the stored answer is missing or
|
||
* old (7 days; a "no such artist" answer is kept 1 day). What is sent is the artist's name or
|
||
* MusicBrainz id and nothing about any user. Several requests for the same artist at once
|
||
* make one call.
|
||
*
|
||
* A provider that is off or failing is not an error: the answer is `200` and `provider_status`
|
||
* says why. Then `items` holds whatever was stored before, if anything, and `stale` is true
|
||
* when it is older than it should be.
|
||
*
|
||
* `score` is the provider's own number between 0 and 1. It is relative to the list it came
|
||
* in (the best one is usually 1), so it only compares artists inside one answer. `rank` is the
|
||
* position. Show `attribution` where you show the data.
|
||
*/
|
||
get: operations["getSimilarArtists"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/artists/{id}/tags": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Tags of an artist, from each provider
|
||
* @description What each provider says kind of music this artist plays: Last.fm's top tags and
|
||
* MusicBrainz's tags and genres, and last the genres of the artist's own music files
|
||
* (`provider` is `files`: the genre tags the scan read, each weighted by how many of the
|
||
* playable tracks the artist is credited on have it; it asks nobody, is always `ok` and has a null `retrieved_at`). There is
|
||
* always one entry for each, Last.fm first. The
|
||
* weights are the providers' own numbers, kept as they came and never mixed: Last.fm's is
|
||
* relative to the artist (1 to 100, the top tag is usually 100; a tag with no votes is dropped),
|
||
* MusicBrainz's is a count of votes. `genre` is true for a MusicBrainz tag that it also lists among its curated genres, and for
|
||
* every tag of the `files` entry, which are genres by definition.
|
||
*
|
||
* A provider is only asked when an admin switched it on and its stored answer is missing or
|
||
* old (7 days; a "no such artist" answer is kept 1 day), with the same rules as
|
||
* `GET /artists/{id}/similar`. What is sent is the artist's name or MusicBrainz id to
|
||
* Last.fm (its id when known), and only the MusicBrainz id to MusicBrainz: Sonda never looks
|
||
* an id up by name. An artist's id comes from the tags in the music files, or from Last.fm
|
||
* for an artist it named that is not in the library; for any other artist the MusicBrainz
|
||
* entry says `no_id`. Show each `attribution` where you show the tags.
|
||
*/
|
||
get: operations["getArtistTags"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/discover": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Artists you may like
|
||
* @description Suggests artists, in your library or not, each with a `score` from 0 to 1 and the parts
|
||
* it is made of, so every number can be explained.
|
||
*
|
||
* **Where it starts.** From the artists you name with `seed` (one to five, repeat the
|
||
* parameter), or, when you named none and turned on `discover_from_listening` in
|
||
* `PATCH /me/settings`, from the up to 20 artists you play most. With neither the request
|
||
* is refused (`seed_required`) and nothing is sent to anyone. For each seed, the similar
|
||
* artists are the stored ones, or are asked from Last.fm when they are missing or old and
|
||
* an admin switched Last.fm on (see `GET /artists/{id}/similar`). **What is sent**:
|
||
* the name or MusicBrainz id of each seed, and, for the best candidates that have no tags
|
||
* yet, the name of the candidate (tags are asked from Last.fm only, never from MusicBrainz).
|
||
* The seeds from your listening are therefore sent only when you allowed it. A seed is never
|
||
* suggested to itself, and nobody else's listening is read.
|
||
*
|
||
* **The score** is `S = wA·A + wG·G + wP·P + wD·D` with the weights of the server's
|
||
* `[scoring]` config (default 0.40, 0.25, 0.25, 0.10; only their proportions matter).
|
||
* `a` is the affinity: 1 − Π(1 − weight·match) over the seeds that point at the artist, where
|
||
* `match` is Last.fm's similarity (relative to each seed's own list) and `weight` is 1 for a
|
||
* seed you named or your `preference` for one taken from your listening (see
|
||
* `GET /me/taste`). `g` is how close the artist's tags are to the tags of the artists you like (cosine
|
||
* of the tag vectors); it is `null` when there is nothing to compare, and then the score is
|
||
* worked out without it, the other weights rescaled, so a missing part never counts as a bad
|
||
* one. `p` is what your listening says about the artist, from `preference`
|
||
* mapped to 0 to 1, and 0.5 for an artist you never played. `d` is a bonus for what you have
|
||
* not played: `1 / (1 + listens)`.
|
||
*
|
||
* Only the best candidates by affinity (at least 20) are scored, then the best `limit` by
|
||
* score are returned; ties go to the higher affinity, then to the lower id. `because` names
|
||
* up to three seeds that count most for the suggestion. The first request after a seed's data
|
||
* gets old can take several seconds, because the provider is asked politely, a few at a time;
|
||
* later ones are served from the database.
|
||
*
|
||
* `provider_status` is `disabled` when something had to be asked from Last.fm (a seed's
|
||
* similar artists are missing or old) and Last.fm is off or has no key; anything stored earlier
|
||
* is still used, so the list can be empty. With every seed's data stored and fresh the status is `ok`
|
||
* whether Last.fm is on or not. It is `error` when Last.fm failed for some seed (the
|
||
* rest is still returned) and `ok` otherwise. Show `attribution` where you show the data.
|
||
*
|
||
* **How many at once.** One Discover at a time for each listener (a second one answers 429
|
||
* `discover_busy`), and at most three at the same time on the server: a request that finds them
|
||
* busy waits for its turn (at most 30 seconds, then it answers 429 as well), and leaves without
|
||
* doing any work if the client gives up. A request that waits for its turn counts as running.
|
||
*/
|
||
get: operations["discover"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/discover/dismissed": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Artists you are not interested in
|
||
* @description The artists you told Discover you are not interested in (`POST /discover/{id}/dismiss`),
|
||
* newest first. Only yours; nobody else's choices are visible or affect your Discover.
|
||
*/
|
||
get: operations["listDismissed"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/discover/{id}/dismiss": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Not interested in this artist
|
||
* @description Hides the artist from your Discover: it is never suggested again, and an artist taken
|
||
* from your listening that you dismissed no longer seeds your suggestions. An artist is
|
||
* dismissed or on your wishlist, never both: dismissing one that is on the wishlist takes
|
||
* it off. Doing it twice is the same as once. Nothing is sent to anyone.
|
||
*
|
||
* The artist can be one of yours or one a provider named. An artist that a provider named
|
||
* and nobody else does is kept for as long as it is dismissed, so the choice survives a
|
||
* new list from the provider; such an artist is listed for you, but other users cannot see
|
||
* that it exists. When an admin takes a provider's data back (`DELETE
|
||
* /providers/{name}/data`), what only that provider's lists named goes, your choice with it.
|
||
*/
|
||
post: operations["dismissArtist"];
|
||
/**
|
||
* Interested again
|
||
* @description Lets Discover suggest the artist again. A wish on the wishlist is not touched.
|
||
*/
|
||
delete: operations["undismissArtist"];
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/mixes": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Your mixes
|
||
* @description Playlists that Sonda makes for you, from what you listen to and from the genres of your
|
||
* music. First the ones made for you (`favourites`, `rediscover`: they need some listening
|
||
* history, so they are missing without it; `unheard`, the songs you never played), then
|
||
* one `genre` mix for each genre of the library that has at least 30 songs by at least 4
|
||
* artists, the genres you play most first (and the biggest after them). Spellings of a genre
|
||
* that differ only by case or punctuation are one genre, and `other` and `unknown` are not
|
||
* genres. `title` is in English; a client may say it in its own words from `kind` and
|
||
* `genre`. Nothing is stored and nothing is sent to a provider: a mix is worked out from your
|
||
* own history and the genre tags of your files, for you alone.
|
||
*/
|
||
get: operations["listMixes"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/mixes/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description `favourites`, `rediscover`, `unheard` or `genre:<name>` (percent-encoded). */
|
||
id: components["parameters"]["MixId"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* A mix and its songs
|
||
* @description Up to 50 songs, at most 3 by one artist and never two by the same artist in a row. They
|
||
* are picked by weighted chance: the artists you play weigh more, songs you never played
|
||
* a bit more, songs played in the last days less, and songs you skipped in the last two weeks
|
||
* and artists you avoid do not come at all. The same mix comes back all day: it changes
|
||
* the next day, or when you ask for another `variant`. The id of a genre mix has the genre
|
||
* in it (`genre:hard rock`), so it must be percent-encoded in the path. A mix you do not
|
||
* have (a genre that is too small, `favourites` with no history) is `mix_not_found`.
|
||
*/
|
||
get: operations["getMix"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/mixes/{id}/playlist": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description `favourites`, `rediscover`, `unheard` or `genre:<name>` (percent-encoded). */
|
||
id: components["parameters"]["MixId"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Keep a mix as a playlist
|
||
* @description Makes a playlist of your own with the songs that `variant` of the mix has now, in the
|
||
* same order. The playlist is a copy: it does not change afterwards, and is yours to edit.
|
||
* The body is optional.
|
||
*/
|
||
post: operations["saveMix"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/genres": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The genres of the library
|
||
* @description The genres of the playable songs, to choose from in the rules of a smart playlist: each with the number
|
||
* of songs, the biggest first, and by name among equals. The spellings that the files have are one genre
|
||
* (`jazz+funk` and `jazz-funk` are `jazz funk`), written the way the rules compare them; tags such as
|
||
* `other` or `unknown` are left out.
|
||
*/
|
||
get: operations["listGenres"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/smart-playlists": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Your smart playlists
|
||
* @description The smart playlists you made, the one changed last first. Only yours. A smart playlist is a set
|
||
* of rules: its songs come from `GET /smart-playlists/{id}/tracks`.
|
||
*/
|
||
get: operations["listSmartPlaylists"];
|
||
put?: never;
|
||
/**
|
||
* Make a smart playlist
|
||
* @description Keeps a set of rules, an order and a limit under a name. Only that is stored: the songs are worked
|
||
* out again every time. A user can have 200. Names can repeat. Use `POST /smart-playlists/preview`
|
||
* to try the rules first.
|
||
*/
|
||
post: operations["createSmartPlaylist"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/smart-playlists/preview": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Try rules without keeping them
|
||
* @description Works the songs out for rules that are not kept, the way `GET /smart-playlists/{id}/tracks` would,
|
||
* so they can be tried while they are written. Nothing is stored.
|
||
*/
|
||
post: operations["previewSmartPlaylist"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/smart-playlists/suggested": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The smart playlists Sonda makes for you
|
||
* @description A fixed set that is there without anybody making it, the same rules for everyone and worked out on your
|
||
* own library and history: `recently-added`, `on-rotation` (the songs you played most in the last 30 days, at
|
||
* least twice), `top-year` (the same over 365 days), `most-played` (over all time), `never-played`, `forgotten`
|
||
* (played once, but not in the last 90 days), `high-quality` (bitrate of 900 kbps or more) and `long-tracks`
|
||
* (6 minutes or more).
|
||
* Nothing is stored for them. A client says their names in its own language from the `key`. To change one,
|
||
* make a smart playlist of your own from its rules with `POST /smart-playlists`.
|
||
*/
|
||
get: operations["listSuggestedSmartPlaylists"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/smart-playlists/suggested/{key}/tracks": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description A key from `GET /smart-playlists/suggested`. */
|
||
key: components["parameters"]["SuggestedKey"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The songs of a suggested smart playlist, now
|
||
* @description Works the rules out for you, as `GET /smart-playlists/{id}/tracks` does for yours. With the random order
|
||
* the songs stay the same all day, and another `variant` gives other ones.
|
||
*/
|
||
get: operations["getSuggestedSmartPlaylistTracks"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/smart-playlists/suggested/{key}/covers": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description A key from `GET /smart-playlists/suggested`. */
|
||
key: components["parameters"]["SuggestedKey"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The covers of a suggested smart playlist
|
||
* @description Up to 4 albums that have a cover and stand for it, in the order of the songs the rules give now (the ones of
|
||
* `variant`), each once: their covers (`GET /albums/{id}/cover`) make its picture. It is worked out apart from the
|
||
* songs so that a list of smart playlists can show the rest without waiting for the rules of every one of them; the
|
||
* answer may be kept by the client for a few minutes. Empty when none of the songs has an album with a cover.
|
||
*/
|
||
get: operations["getSuggestedSmartPlaylistCovers"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/smart-playlists/suggested/{key}/playlist": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description A key from `GET /smart-playlists/suggested`. */
|
||
key: components["parameters"]["SuggestedKey"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Keep a suggested smart playlist as a playlist
|
||
* @description Makes a playlist of your own with the songs that `variant` gives now, in the same order. It is a copy,
|
||
* and is yours to edit. The body is optional; without a name the playlist is called by the `key`.
|
||
*/
|
||
post: operations["saveSuggestedSmartPlaylist"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/smart-playlists/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* A smart playlist
|
||
* @description Its name, rules, order and limit, without the songs. One of somebody else answers
|
||
* `smart_playlist_not_found`.
|
||
*/
|
||
get: operations["getSmartPlaylist"];
|
||
put?: never;
|
||
post?: never;
|
||
/**
|
||
* Delete a smart playlist
|
||
* @description Deletes the rules. Playlists that were made from it with `POST /smart-playlists/{id}/playlist` stay.
|
||
*/
|
||
delete: operations["deleteSmartPlaylist"];
|
||
options?: never;
|
||
head?: never;
|
||
/**
|
||
* Change a smart playlist
|
||
* @description Changes what is given. The rules, when given, replace the old ones whole. An empty description clears
|
||
* it; a name cannot be empty.
|
||
*/
|
||
patch: operations["updateSmartPlaylist"];
|
||
trace?: never;
|
||
};
|
||
"/smart-playlists/{id}/tracks": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The songs of a smart playlist, now
|
||
* @description Works the rules out on the playable songs of the library, with your own listening history and taste
|
||
* for the rules that use them, puts them in the order and cuts the end at the limit. A song whose files
|
||
* are gone is never offered. Nothing is stored, and nothing is asked of a provider. With the random
|
||
* order the songs stay the same all day, and another `variant` gives other ones.
|
||
*/
|
||
get: operations["getSmartPlaylistTracks"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/smart-playlists/{id}/covers": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The covers of a smart playlist
|
||
* @description Up to 4 albums that have a cover and stand for it, in the order of the songs the rules give now (the ones of
|
||
* `variant`), each once: their covers (`GET /albums/{id}/cover`) make its picture. It is worked out apart from the
|
||
* songs so that a list of smart playlists can show the rest without waiting for the rules of every one of them; the
|
||
* answer may be kept by the client for a few minutes. Empty when none of the songs has an album with a cover.
|
||
*/
|
||
get: operations["getSmartPlaylistCovers"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/smart-playlists/{id}/playlist": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Keep a smart playlist as a playlist
|
||
* @description Makes a playlist of your own with the songs that `variant` gives now, in the same order. The playlist
|
||
* is a copy: it does not change afterwards, and is yours to edit. The body is optional.
|
||
*/
|
||
post: operations["saveSmartPlaylist"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/playlists": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Your playlists
|
||
* @description The playlists you made, the one changed last first. Only yours: nobody else's are ever
|
||
* listed.
|
||
*/
|
||
get: operations["listPlaylists"];
|
||
put?: never;
|
||
/**
|
||
* Make a playlist
|
||
* @description Makes an empty playlist. A user can have 1000. Names can repeat.
|
||
*/
|
||
post: operations["createPlaylist"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/playlists/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* A playlist
|
||
* @description Its name, description, how many tracks it has and how long they are. The tracks come from
|
||
* `GET /playlists/{id}/tracks`. A playlist of somebody else answers `playlist_not_found`.
|
||
*/
|
||
get: operations["getPlaylist"];
|
||
put?: never;
|
||
post?: never;
|
||
/**
|
||
* Delete a playlist
|
||
* @description Deletes the playlist and its list of tracks. The tracks themselves stay in the library.
|
||
*/
|
||
delete: operations["deletePlaylist"];
|
||
options?: never;
|
||
head?: never;
|
||
/**
|
||
* Rename a playlist or change its description
|
||
* @description Changes what is given. An empty description clears it; a name cannot be empty.
|
||
*/
|
||
patch: operations["updatePlaylist"];
|
||
trace?: never;
|
||
};
|
||
"/naming": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Whether names are made by themselves
|
||
* @description `auto` is true when the `anthropic` provider is on with its key: a playlist that is kept from a mix or a smart
|
||
* playlist with `auto_name`, and a smart playlist made with no name, are then named by Claude. A page asks this so
|
||
* that it does not ask for a name that Claude will make.
|
||
*/
|
||
get: operations["getNamingStatus"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/playlists/{id}/suggest-name": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Suggest a name for a playlist
|
||
* @description Makes a suggestion and changes nothing: the client decides what to do with it. When an admin turned the
|
||
* `anthropic` provider on with an API key, Claude is asked for the name, with only a few facts: up to 5 genres,
|
||
* up to 8 artist names, how many songs there are, for a smart playlist a few words about its rules, and the
|
||
* language. Never the user, a listen, a track title or a file path. What Claude answers is kept, so the same facts
|
||
* are not asked twice. With the provider off, or when it fails or declines, a name is made on this server from the
|
||
* genres and the artists and nothing leaves it: `source` says which it was. The body is optional.
|
||
* The facts come from the first 200 songs of the playlist that can be played.
|
||
*/
|
||
post: operations["suggestPlaylistName"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/mixes/{id}/suggest-name": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description `favourites`, `rediscover`, `unheard` or `genre:<name>` (percent-encoded). */
|
||
id: components["parameters"]["MixId"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Suggest a name for a mix
|
||
* @description Makes a suggestion and changes nothing: the client decides what to do with it. When an admin turned the
|
||
* `anthropic` provider on with an API key, Claude is asked for the name, with only a few facts: up to 5 genres,
|
||
* up to 8 artist names, how many songs there are, for a smart playlist a few words about its rules, and the
|
||
* language. Never the user, a listen, a track title or a file path. What Claude answers is kept, so the same facts
|
||
* are not asked twice. With the provider off, or when it fails or declines, a name is made on this server from the
|
||
* genres and the artists and nothing leaves it: `source` says which it was. The body is optional.
|
||
* The facts come from the songs that `variant` of the mix has.
|
||
*/
|
||
post: operations["suggestMixName"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/smart-playlists/{id}/suggest-name": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Suggest a name for a smart playlist
|
||
* @description Makes a suggestion and changes nothing: the client decides what to do with it. When an admin turned the
|
||
* `anthropic` provider on with an API key, Claude is asked for the name, with only a few facts: up to 5 genres,
|
||
* up to 8 artist names, how many songs there are, for a smart playlist a few words about its rules, and the
|
||
* language. Never the user, a listen, a track title or a file path. What Claude answers is kept, so the same facts
|
||
* are not asked twice. With the provider off, or when it fails or declines, a name is made on this server from the
|
||
* genres and the artists and nothing leaves it: `source` says which it was. The body is optional.
|
||
* The facts come from the rules and from the songs that `variant` of it gives now.
|
||
*/
|
||
post: operations["suggestSmartPlaylistName"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/playlists/{id}/tracks": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The tracks of a playlist
|
||
* @description The items in order, each with its own `id` (a track can be in a playlist more than once),
|
||
* its `position` (counted from 0, without gaps) and the track. A track whose files were
|
||
* deleted or moved away stays in the playlist with `available` false: it is not lost, and
|
||
* it plays again when the files are back and a scan has found them.
|
||
*/
|
||
get: operations["listPlaylistTracks"];
|
||
put?: never;
|
||
/**
|
||
* Add tracks to a playlist
|
||
* @description Puts 1 to 500 tracks, in the order given, at `position` (the tracks from there on move
|
||
* down) or at the end when it is absent. A track can be added again. If one id is not a
|
||
* track nothing is added. A playlist holds up to 10000 tracks.
|
||
*/
|
||
post: operations["addPlaylistTracks"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/playlists/{id}/tracks/{item}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
/** @description The `id` of the item, not of the track. */
|
||
item: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
post?: never;
|
||
/**
|
||
* Take a track out of a playlist
|
||
* @description Removes that one item; the ones after it move up by one.
|
||
*/
|
||
delete: operations["removePlaylistItem"];
|
||
options?: never;
|
||
head?: never;
|
||
/**
|
||
* Move a track inside a playlist
|
||
* @description Puts the item at `position`, from 0 to the number of items less one; the ones in between
|
||
* shift by one.
|
||
*/
|
||
patch: operations["movePlaylistItem"];
|
||
trace?: never;
|
||
};
|
||
"/wishlist": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Your wishlist
|
||
* @description The artists you want, newest first. It is a list for you: nothing is downloaded or
|
||
* sent anywhere. `in_library` says whether there is music of the artist to play now, so a
|
||
* client can hide the ones you already got. Only yours.
|
||
*/
|
||
get: operations["listWishlist"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/wishlist/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
/**
|
||
* Put an artist on your wishlist
|
||
* @description Adds the artist. An artist is on the wishlist or dismissed, never both: adding one you
|
||
* dismissed lifts the dismissal. Doing it twice keeps the first date. The artist can be one
|
||
* of yours or one a provider named; the latter is kept while it is on a wishlist (see
|
||
* `POST /discover/{id}/dismiss` for what a purge does). Discover marks it `wishlisted`.
|
||
*/
|
||
put: operations["addToWishlist"];
|
||
post?: never;
|
||
/**
|
||
* Take an artist off your wishlist
|
||
* @description A dismissal of the artist is not touched.
|
||
*/
|
||
delete: operations["removeFromWishlist"];
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/me/taste": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* What Sonda has learned about your taste
|
||
* @description Your taste, worked out from your own listening history every time you ask. It uses local
|
||
* data only: nothing is sent to any provider, and nobody else's history is read.
|
||
*
|
||
* Each event has a value: a `complete` listen +1, any other listen that counts +0.5 (see
|
||
* `POST /listens`), a `skip` before that -1, and a play too short to mean anything 0. An
|
||
* event weighs half as much for every 90 days (`taste.half_life_days`) that has passed, and
|
||
* one dated after the moment of the request weighs as if it happened then. Only the last
|
||
* ten half-lives are read (900 days by default); older events weigh less than a thousandth
|
||
* and are left out, also from `listens`. For each artist the values add up, and `preference`
|
||
* is `tanh(sum / 3)`: from -1 to 1, approaching both (a large sum rounds to exactly 1), so
|
||
* one skip does not sink an artist and listening makes one loved at most. A track with
|
||
* several artists credits each of them.
|
||
*
|
||
* `artists` are the ones you like (a `preference` above 0), the most played first. They are
|
||
* ordered by the sum itself, so artists whose `preference` rounds to 1 keep their order;
|
||
* ties go to the lower id. `tags` are the kinds of music you like, at most 50: the tags of
|
||
* those artists (the genres of your files that still exist, and what Last.fm and MusicBrainz
|
||
* said earlier, if they were ever asked) added up, each artist weighing as much as its
|
||
* `preference`, and scaled so the best tag is 1, best first. Tags are read from what is already stored; this
|
||
* request never asks a provider. The tag profile is built from your 200 most liked artists.
|
||
*/
|
||
get: operations["getMyTaste"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/me/suggestions": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Artists suggested by how you listen
|
||
* @description Suggestions learned from your own listening, with no provider and nothing sent anywhere. Sonda splits your
|
||
* history into sittings (plays less than 30 minutes apart) and links the artists that are often played in the
|
||
* same sitting; the model is built from your listening events and from the plays of artists you have no music
|
||
* of that an import kept (see `POST /me/import/spotify`), and is built again when plays are added. It needs
|
||
* `discover_from_listening` in `PATCH /me/settings` (`listening_not_allowed` without it).
|
||
*
|
||
* `library` are artists you have, linked to what you play most, that you did not play in the last 60 days,
|
||
* best first. `missing` are artists you have played at least three times and have no music of, the ones you play
|
||
* most that also go with what you play now first. Each says which of the artists you play it goes with
|
||
* (`because`) and has a `score` from 0 to 1 within its list. `artist_id` is null for an artist that does not
|
||
* exist on this server yet. Artists you dismissed are left out.
|
||
*/
|
||
get: operations["getMySuggestions"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/me/suggestions/wishlist": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Put a suggested artist you do not have on your wishlist
|
||
* @description Puts an artist you have played on your wishlist by its name, for the artists of `missing` that have no
|
||
* `artist_id`: the artist is made on this server without any music, like the ones a provider names, and has
|
||
* no MusicBrainz id. The name must be one the model knows from your listening (`artist_not_played`). Doing it
|
||
* twice keeps the first date. It needs `discover_from_listening` like the suggestions.
|
||
*/
|
||
post: operations["wishArtistFromSuggestions"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/me/settings": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Your own settings
|
||
* @description Settings that belong to you, not to the server. Everyone starts with the private
|
||
* defaults: anything that would send something about your taste to a provider is off.
|
||
*/
|
||
get: operations["getMySettings"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
/**
|
||
* Change your own settings
|
||
* @description Changes the settings named in the body and leaves the others alone. An empty object
|
||
* changes nothing. `null` is the same as leaving a field out. The body must be one JSON
|
||
* object, with nothing after it, and the names must be spelt exactly: a setting that does
|
||
* not exist is refused rather than ignored.
|
||
*/
|
||
patch: operations["updateMySettings"];
|
||
trace?: never;
|
||
};
|
||
"/me/mastodon": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The Mastodon account you connected
|
||
* @description Whether you connected a Mastodon account to share what you listen to, and which one. Nothing is connected
|
||
* until you do it. The access token is never sent back.
|
||
*/
|
||
get: operations["getMyMastodon"];
|
||
/**
|
||
* Connect a Mastodon account
|
||
* @description Connects your Mastodon account, or replaces the one you had. Send the address of your instance (a domain name
|
||
* on https, like `mastodon.social`; an address that points at a private network is never reached) and an access
|
||
* token. Make the token in your instance, under Preferences, Development, New application, and give it only
|
||
* the `write:statuses` permission. The server asks the instance who the token belongs to; if the instance
|
||
* refuses it nothing is kept.
|
||
*
|
||
* From then on, each time a track of this server counts as a listen, the server posts it to your account as an
|
||
* unlisted status: title, artists, album and `#NowPlaying`, with no link. Music of a friend is never posted. At
|
||
* most one post a minute. The token stays on the server and is forgotten by `DELETE /me/mastodon`. The body
|
||
* must be one JSON object with these two names and nothing else.
|
||
*/
|
||
put: operations["connectMyMastodon"];
|
||
post?: never;
|
||
/**
|
||
* Disconnect your Mastodon account
|
||
* @description Forgets the account and its token. Nothing more is posted. Disconnecting when nothing is connected is not an error.
|
||
*/
|
||
delete: operations["disconnectMyMastodon"];
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/me/import/spotify": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Your past imports of Spotify data
|
||
* @description What each import of yours did, newest first: how many plays were recorded, how many were already there,
|
||
* how many are not in your library, the playlists it made and the artists you are missing. The files
|
||
* themselves are never kept, only these numbers. Only yours. An import is listed once it is done; one that
|
||
* found nothing is not.
|
||
*/
|
||
get: operations["listMySpotifyImports"];
|
||
put?: never;
|
||
/**
|
||
* Import your Spotify history and playlists
|
||
* @description Brings your listening history and your playlists from a Spotify data export into your own account, so that
|
||
* Mixes, Discover and the smart playlists know what you listened to before. Ask Spotify for your data (Account,
|
||
* Privacy, "Extended streaming history" and "Account data"), then send what it gives: the zip itself, or the
|
||
* JSON files in it (`Streaming_History_Audio_*.json`, the older `StreamingHistory_music_*.json`, and
|
||
* `Playlist*.json`), as a multipart form with one `files` field for each file. A request may be up to 512 MB.
|
||
*
|
||
* Everything happens on this server and nothing is sent to anyone. The files are read from the request and not
|
||
* kept, and of each play only the song, the artist, the album, the time and how it ended are read: the IP
|
||
* addresses, the country and the platform in the file are never looked at. Of a play that is not in your
|
||
* library and counts as listened, the name of the artist and the time are kept (and nothing else), so that
|
||
* Sonda can learn which artists you play together.
|
||
*
|
||
* A play is matched to a song of your library by artist and title (case, accents and punctuation do not matter,
|
||
* a "Remastered" note on either side does not either, and any of the credited artists will do; a play of a
|
||
* compilation is matched by its album when Spotify names "Various Artists"). A match is recorded as a listen at
|
||
* the time of the play: `complete` when the play ran to its end (or nine tenths of the song were played),
|
||
* `skip` when Spotify says it was skipped or it was shorter than a listen, `play` otherwise. Importing does not
|
||
* post anything to Mastodon. Importing the same files again records nothing twice, and the same play in the
|
||
* extended history and in the older one is counted once.
|
||
*
|
||
* A playlist of the export becomes a playlist of yours with the songs that were found, in order. One whose
|
||
* name you already have is left alone (`exists`), and one with none of its songs in your library is not made
|
||
* (`empty`). The report lists what was not found, by artist, most played first, so you can see what is missing
|
||
* from your library. One import of yours runs at a time.
|
||
*/
|
||
post: operations["importMySpotify"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/lidarr/requests": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The artists you sent to Lidarr
|
||
* @description Admin only. The artists you sent to your Lidarr with `POST /artists/{id}/lidarr`, newest first, each saying
|
||
* whether its music has arrived: `waiting` while there is none in the library, `arrived` once there is (the
|
||
* day it was first noticed is `arrived_at`; it is noticed when this list is read, by the artist you sent or by
|
||
* an artist of the same name that a scan made). Sending an artist again keeps one request with the first date.
|
||
* Only what you sent is listed, never what is in Lidarr. `counts` are of all your requests, whatever `status`.
|
||
*/
|
||
get: operations["listLidarrRequests"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/artists/{id}/lidarr": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Whether Lidarr has an artist
|
||
* @description Asks your own Lidarr, by the artist's MusicBrainz id and never by name, whether it has the artist and
|
||
* whether it monitors it. Like the descriptions, whatever stops the answer is a status and not an error:
|
||
* `disabled` when the `lidarr` provider is off (nobody is asked), `no_id` when the artist has no MusicBrainz id,
|
||
* `not_configured` when Lidarr has no address or key, `error` when it could not be asked now. Only the id and
|
||
* the API key go out, to the address an admin set.
|
||
*/
|
||
get: operations["getArtistInLidarr"];
|
||
put?: never;
|
||
/**
|
||
* Send an artist to Lidarr
|
||
* @description Admin only. Adds the artist to your own Lidarr, which then looks for and downloads the music by itself:
|
||
* Sonda downloads nothing, and does this only when an admin asks, for one artist, never by itself. It works
|
||
* for any artist that has a MusicBrainz id, also one that Sonda only learned of from a list of similar
|
||
* artists, which is the point: asking for music you do not have. It never looks an id up by name.
|
||
*
|
||
* It uses what an admin set in `PUT /providers/lidarr`: the quality profile, the metadata profile, the root
|
||
* folder, which of the albums to monitor and whether Lidarr starts searching at once. It needs the provider
|
||
* switched on and those chosen. An artist that Lidarr already has is not an error (`already_added`, nothing
|
||
* changes), so the call can be repeated. If Lidarr does not answer in time, the artist may have been added
|
||
* all the same: read it with `GET /artists/{id}/lidarr`. Only the MusicBrainz id and the API key go out,
|
||
* to the address an admin set.
|
||
*/
|
||
post: operations["sendArtistToLidarr"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/artists/{id}/description": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* What Wikipedia says about an artist
|
||
* @description A short text about the artist from Wikipedia, with the page it comes from. The way to it
|
||
* is a chain of identifiers, never a search by name: the artist's MusicBrainz id, then the
|
||
* Wikidata item that MusicBrainz links to it, then the Wikipedia page that Wikidata names in
|
||
* the first of the server's languages (`[wikipedia] languages`, the code of the Wikipedia:
|
||
* `it`, `en`, `no` for Norwegian; a language with no Wikipedia finds nothing) that has one. A page is used
|
||
* only if it is an article about that same item (not a page of disambiguation). An artist
|
||
* with no MusicBrainz id answers `no_id`: Sonda does not look an id up by name.
|
||
*
|
||
* It needs the `wikipedia` provider and also the `musicbrainz` one, because the link to
|
||
* Wikidata comes from MusicBrainz; an admin switches them on, and nothing is sent while
|
||
* either is off (`disabled`, also when an answer is stored). What is sent: the MusicBrainz id
|
||
* to MusicBrainz (with the contact set for MusicBrainz), the Wikidata item to Wikidata and the
|
||
* title of the page to Wikipedia (with the contact set for Wikipedia), and your server's IP
|
||
* address with them. The answer is stored: 30 days, or a
|
||
* day when there was nothing to find, and an old one is returned as `stale` if Wikipedia
|
||
* fails. When there is nothing to show, `description` is `null` and `provider_status` is
|
||
* `ok`.
|
||
*
|
||
* The text is CC BY-SA 4.0. Where you show it, name the page (`title`), link to it (`url`) and
|
||
* give the licence (`license`, `license_url`), and say if you changed it.
|
||
*/
|
||
get: operations["getArtistDescription"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/artists/{id}/image": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* A free picture of an artist
|
||
* @description A JPEG made from a picture of the artist on Wikimedia Commons, only when its licence is
|
||
* free: public domain, CC0, CC BY or CC BY-SA. Non-commercial, no-derivatives, fair use and
|
||
* unknown licences are refused, because Sonda keeps a copy. **Where you show it, show its
|
||
* credit** (`GET /artists/{id}/image/credit`): the author, the licence and the page of the file.
|
||
*
|
||
* The way to it is a chain of identifiers, never a search by name: the artist's MusicBrainz
|
||
* id, the Wikidata item MusicBrainz links to it, the picture Wikidata names for it, and Commons
|
||
* for its licence and a copy. It needs the `commons` provider and the `musicbrainz` one, which
|
||
* an admin switches on. It is built the first time it is asked for (that request can take a few
|
||
* seconds), scaled to fit, saved in the data folder, and served from there afterwards: for 30
|
||
* days, or a week when there is no free picture; an older copy is served when Commons cannot
|
||
* be reached. What is sent: the MusicBrainz id to MusicBrainz, the Wikidata item to Wikidata,
|
||
* the name of the file to Commons, and the address of a copy to Wikimedia, with your server's
|
||
* IP address and a `User-Agent` with a contact.
|
||
*
|
||
* An `<img>` element cannot send headers, so, like the stream and the covers, this accepts
|
||
* the access token as the `access_token` query parameter. A header, when present, always wins.
|
||
*/
|
||
get: operations["getArtistImage"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
/**
|
||
* Headers of a picture
|
||
* @description Same as `GET`, without the body.
|
||
*/
|
||
head: operations["headArtistImage"];
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/artists/{id}/image/credit": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The credit of a picture of an artist
|
||
* @description Whose the picture is and under which licence, to be shown next to it (the licences ask for
|
||
* it). The author is plain text and may be empty; `license_url` may be empty when the licence
|
||
* has no address; `page_url` is the page of the file on Commons, where everything is.
|
||
* It answers like `GET /artists/{id}/image` (same errors), because the credit exists only with a
|
||
* picture: the first request for an artist can take as long as the picture does (several seconds).
|
||
*/
|
||
get: operations["getArtistImageCredit"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/albums": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List albums
|
||
* @description Albums with a playable track, sorted by title, or with `sort=recent` the ones added last first (by the date of
|
||
* the newest file of the album that is not missing, which is the best the index knows, then the album that came
|
||
* last). `artist_id` matches the albums an artist
|
||
* owns plus those where it is credited on a playable track, the same set as its `album_count`.
|
||
*/
|
||
get: operations["listAlbums"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/albums/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/** One album */
|
||
get: operations["getAlbum"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/albums/{id}/cover": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The cover of an album
|
||
* @description A JPEG made from the picture in the album's own files: the picture embedded in one of
|
||
* its first files, or else a `cover`, `folder`, `front`, `album` or `albumart` image
|
||
* (`.jpg`, `.jpeg` or `.png`, any case) in the album's folder, in that order of names. It
|
||
* is built the first time it is asked for (that request can take a moment), scaled to fit
|
||
* and saved in the server's data folder, and served from there afterwards. It never
|
||
* contacts anybody (unless the `coverartarchive` provider is on, see below). Pictures that are too big (over 20 MB or 16 million pixels) or are not
|
||
* pictures are ignored, and only files inside the library are read.
|
||
*
|
||
* For an album split in folders named like `CD1` or `Disc 2`, the picture in the folder
|
||
* above them is used too. When the files have no picture at all, and an admin switched on
|
||
* the `coverartarchive` provider, the cover is asked from the Cover Art Archive by the
|
||
* MusicBrainz release group id that the tags of the album's files carry (a full rescan reads
|
||
* that tag again for music indexed before); only that id leaves the server. An album whose
|
||
* files have no id is looked up in MusicBrainz by its artist and title when the
|
||
* `musicbrainz` provider is on too: the id is taken only when MusicBrainz is sure (an exact
|
||
* match of both names; a title that ends with a note like `(disc 2)` or `(Deluxe Edition)` is
|
||
* tried again without it), is used for that request and is not stored.
|
||
* The files of the user always come first. That request can take several seconds and may
|
||
* answer `provider_unavailable`. At most a couple of covers are built at the same time, so a
|
||
* client that asks for many at once may wait.
|
||
*
|
||
* An album with no picture answers `cover_not_found`, and the server does not look again
|
||
* for a day; a new or changed file of the album, or a full rescan, makes it look again.
|
||
* A cover that was found is checked again after a week, so a picture replaced in the
|
||
* folder is noticed.
|
||
* The picture is `private` for an hour in caches and has an `ETag`: send it back as
|
||
* `If-None-Match`.
|
||
*
|
||
* An `<img>` element cannot send headers, so, like the stream, this also accepts the access
|
||
* token as the `access_token` query parameter. A header, when present, always wins.
|
||
*/
|
||
get: operations["getAlbumCover"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
/**
|
||
* Headers of a cover
|
||
* @description Same as `GET`, without the body.
|
||
*/
|
||
head: operations["headAlbumCover"];
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/tracks": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List tracks
|
||
* @description Tracks with at least one file that is not flagged missing; a track with several files
|
||
* appears once. Grouped by album, then disc and track number.
|
||
*/
|
||
get: operations["listTracks"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/tracks/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/** One track */
|
||
get: operations["getTrack"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/tracks/{id}/peaks": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The shape of a track, for the seek bar
|
||
* @description How loud the track is along its length, as 120 levels from 0 to 255: the loudest part is 255 whatever the volume of
|
||
* the track. The server finds it by decoding the file (MP3 and FLAC, no extra program needed), which takes a few
|
||
* seconds, so the first request for a track starts the work in the background and answers `202` with `Retry-After`;
|
||
* ask again then. It is done once for each file and worked out again if the size or the date of the file change. One
|
||
* track is worked out at a time. A file that cannot be decoded (another format, or damaged) is `waveform_unavailable`,
|
||
* and that is kept too, so it is not tried at every request.
|
||
*/
|
||
get: operations["getTrackPeaks"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/tracks/{id}/stream": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Stream a track
|
||
* @description Serves the original audio file. Supports `Range` requests, so players can seek, and
|
||
* conditional requests. Streaming never records a listen; report one with `POST /listens`.
|
||
*
|
||
* An `<audio>` element cannot send headers, so this is the only operation that also accepts
|
||
* the access token as the `access_token` query parameter. A header, when present, always wins.
|
||
*/
|
||
get: operations["streamTrack"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
/**
|
||
* Headers of a stream
|
||
* @description Same as `GET`, without the body.
|
||
*/
|
||
head: operations["headTrackStream"];
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/providers": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List the external providers
|
||
* @description Admin only. Every provider Sonda knows (Last.fm, MusicBrainz, Wikipedia, Commons, the Cover Art Archive and Lidarr), with whether it is on and
|
||
* what it would send. Providers are off by default: nothing leaves the server until an admin
|
||
* enables one. The API key is never returned; `has_api_key` says whether one is stored.
|
||
*/
|
||
get: operations["listProviders"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/providers/anthropic/usage": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* What the Claude provider costs
|
||
* @description Admin only. Every question that Sonda asked of Claude is counted: what it made, what was taken from the names
|
||
* that were kept (which cost nothing), what failed, and the tokens that were billed, also for a failure that was
|
||
* billed. From them it works out an **estimate** of the cost in dollars, with the price of the model: the invoice
|
||
* of Anthropic is the truth. `unpriced` says that some calls were to a model whose price is not known and are not
|
||
* in the cost. A day is a day in UTC and only the days that had calls are listed, the newest first. Nothing of what
|
||
* was sent (no artist, no genre, no name) is kept, and records older than a year are removed.
|
||
*/
|
||
get: operations["getClaudeUsage"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/providers/lidarr/options": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* What Lidarr offers to choose from
|
||
* @description Admin only. Reads Lidarr's quality profiles, metadata profiles and root folders, so an admin can pick
|
||
* the ones to send artists with (`PUT /providers/lidarr`, field `lidarr`). It works whether Lidarr is
|
||
* switched on or not, since it is needed to finish setting it up, and it sends nothing but the API key,
|
||
* to the address set for Lidarr, which is your own server.
|
||
*/
|
||
get: operations["getLidarrOptions"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/providers/{name}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
name: "lastfm" | "musicbrainz" | "wikipedia" | "commons" | "coverartarchive" | "lidarr" | "anthropic";
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
/**
|
||
* Set up a provider
|
||
* @description Admin only. Send any of `enabled`, `api_key`, `contact`, `url` and `lidarr`; fields you leave out are kept.
|
||
*
|
||
* The key is write-only: it is never returned and never logged. Sending an empty `api_key`
|
||
* clears it, and turns a provider that needs a key (Last.fm) off; a provider that needs none
|
||
* (MusicBrainz) is not affected. A provider that needs a key cannot be enabled without one. `contact` goes into the User-Agent sent to the provider (MusicBrainz
|
||
* asks for a URL or an e-mail address); empty means the project address.
|
||
*/
|
||
put: operations["updateProvider"];
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/providers/{name}/test": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
name: "lastfm" | "musicbrainz" | "wikipedia" | "commons" | "coverartarchive" | "lidarr" | "anthropic";
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Check a provider's API key
|
||
* @description Admin only. Asks the provider one cheap question with the stored key, to find out whether
|
||
* it works. It works whether the provider is on or off, so you can check before switching it on.
|
||
* It is the only request Sonda makes at an admin's command rather than for a listener, and it
|
||
* sends nothing but the key. A provider that cannot be reached or refuses the key is not an
|
||
* error here: the answer is `200` with `ok` false and the reason in `status`.
|
||
*
|
||
* MusicBrainz has no key: its test only asks whether the service answers. A provider that
|
||
* has no test is a `400`.
|
||
*/
|
||
post: operations["testProvider"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/providers/{name}/data": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
name: "lastfm" | "musicbrainz" | "wikipedia" | "commons" | "coverartarchive" | "lidarr" | "anthropic";
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
post?: never;
|
||
/**
|
||
* Remove what a provider gave
|
||
* @description Admin only. Removes everything the provider told Sonda: its lists of similar artists, its
|
||
* tags and the records of when it was asked, and then the artists that only that data named
|
||
* and that nobody has files for. Last.fm's terms ask for exactly this when an agreement ends.
|
||
*
|
||
* Your own artists, music, listens and settings are not touched, and the provider is not
|
||
* switched off: if it is still on, it is asked again when someone asks. The answer counts what
|
||
* was removed; doing it again removes nothing.
|
||
*/
|
||
delete: operations["purgeProviderData"];
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/listens/months": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* How much you listened in each month
|
||
* @description The number of listens that count (see `POST /listens`) in each calendar month, newest month first. Months
|
||
* are counted in the time zone of `tz` (UTC when absent), so they start where yours do. A month with none is
|
||
* not in the list. Use it to browse `GET /listens` by month with `from` and `until`. Nobody else's history
|
||
* is visible.
|
||
*/
|
||
get: operations["listListenMonths"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/listens": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Your listening history
|
||
* @description The events you reported, newest first, each with `counted`: whether it counts as a listen
|
||
* under the current rule (see `POST /listens`). Nobody else's history is visible.
|
||
*/
|
||
get: operations["listListens"];
|
||
put?: never;
|
||
/**
|
||
* Record a listen
|
||
* @description Clients report what the listener did: **one event per play**, when the play ends or is
|
||
* abandoned, with the time actually played (`complete` if it finished, `skip` if the listener
|
||
* moved on, `play` if it simply stopped).
|
||
*
|
||
* Use **one `idempotency_key` per play**. A retry with the same key from the same user is
|
||
* recorded once and answered with `duplicate`. An event cannot be upgraded afterwards: a later
|
||
* event with a key that was already used is ignored, even if its type or duration differ, and
|
||
* sending it with a new key would count the same play twice.
|
||
*
|
||
* **What counts as a listen.** An event counts when its type is `complete`, or when
|
||
* `duration_played_ms` is at least `listening.min_listen_seconds` (20 seconds by default).
|
||
* A `play` or `skip` shorter than that is stored but does not count. The rule is applied when
|
||
* the history is read, so changing the setting re-reads the past. The answer says whether this
|
||
* event counts; for a `duplicate` it describes the event you sent.
|
||
*
|
||
* **Plausibility.** When the length of the track is known, `duration_played_ms` may not exceed
|
||
* twice that length plus 10 seconds (a listener can seek back and loop). Streaming a file never
|
||
* records anything on its own.
|
||
*
|
||
* **Sharing.** A new event that counts is also posted to the Mastodon account of the listener, but only
|
||
* when they connected one with `PUT /me/mastodon`. That happens in the background and never changes the answer.
|
||
*/
|
||
post: operations["recordListen"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/federation": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Federation, its key and its friends
|
||
* @description Admin only. Federation is off until an admin turns it on. `sends` says in plain words what a friend's server is
|
||
* sent. `key_id` names the key of this server (the first 16 hex characters of the SHA-256 of its public key); it is
|
||
* empty until federation was first turned on. The private key is never returned. `name` is the one saved, or the
|
||
* host name.
|
||
*/
|
||
get: operations["getFederation"];
|
||
/**
|
||
* Turn federation on or off, name this server, give its address
|
||
* @description Admin only. Fields you leave out are kept. The key pair is made the first time `enabled` becomes true and is kept
|
||
* after that, so turning it off and on again does not change the key. `address` is where friends reach this server:
|
||
* `https://`, or `http://` only on a network of your own (a private, loopback or link-local address, or a name that
|
||
* is local: no dot, or ending `.local`, `.lan`, `.home.arpa`); without user, query or fragment. A closing slash is
|
||
* dropped; an empty address clears it. An empty `name` goes back to the host name (at most 60 characters).
|
||
*/
|
||
put: operations["updateFederation"];
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/federation/invites": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Make an invite for another server
|
||
* @description Admin only. The invite is one piece of text to give to the other admin, who pastes it into
|
||
* `POST /federation/friends`. It works once and expires in 24 hours; only a hash of its code is kept here. It needs
|
||
* federation on (`federation_off`) and an address (`address_required`).
|
||
*/
|
||
post: operations["createFederationInvite"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/federation/friends": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Use an invite made by another server
|
||
* @description Admin only. Asks the server the invite came from to accept this one, checks that the key it answers with is the one
|
||
* the invite names, and keeps it as a friend in state `outgoing`: it waits for the other admin to approve. This is
|
||
* the only request federation sends at an admin's command, and it sends this server's name, address and public key
|
||
* and the code of the invite. It needs federation on and an address, like making an invite.
|
||
*/
|
||
post: operations["useFederationInvite"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/federation/friends/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
post?: never;
|
||
/**
|
||
* Decline, withdraw or end a friendship
|
||
* @description Admin only. Removes the friend of any state. The other server is not told: its requests are no longer answered.
|
||
* The same server can be invited again afterwards.
|
||
*/
|
||
delete: operations["removeFederationFriend"];
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/federation/friends/{id}/approve": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Approve a server that used an invite of this one
|
||
* @description Admin only. The second confirmation: a friend in state `incoming` becomes `active`. A friend in any other state
|
||
* is a `409` (`not_waiting`).
|
||
*/
|
||
post: operations["approveFederationFriend"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/peer/pair": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Pair with this server (called by another Sonda server)
|
||
* @description Not for people: another Sonda server calls this when its admin pastes an invite made here. There is no login: the
|
||
* code of the invite is the proof, and it works once. The other server is kept as a friend in state `incoming`
|
||
* until an admin here approves it. While federation is off, or has no address, the route answers `404 not_found`,
|
||
* as a missing route does. At most 10 attempts a minute, from anyone.
|
||
*/
|
||
post: operations["peerPair"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/federation/friends/{id}/check": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Ask a friend whether it approved
|
||
* @description Admin only. Sends the friend one signed request (`GET /peer/info`). An answer means it approved, and a friend that
|
||
* was `outgoing` becomes `active`. The friend is returned. A friend in state `incoming` is a `409` (`not_waiting`):
|
||
* it waits for this server's admin, not the other way round.
|
||
*/
|
||
post: operations["checkFederationFriend"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/federation/requests": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The last requests friends made
|
||
* @description Admin only. The last 50 requests that friends made to this server, newest first, kept for 7 days: when, which
|
||
* friend, which route (the pattern, never the query, so what was searched for is not kept), the status and how many
|
||
* bytes were sent.
|
||
*/
|
||
get: operations["listFederationRequests"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/peer/info": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Who this server is (called by a friend)
|
||
* @description Not for people: a friend's server calls this, signed (see the `friendSignature` scheme), and also to find out whether
|
||
* this server's admin approved it. Says the name of this server and how many libraries are shared.
|
||
*/
|
||
get: operations["peerInfo"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/peer/artists": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The artists of the shared libraries (called by a friend)
|
||
* @description Like `GET /artists`, over the libraries that are shared and nothing else: an artist is listed only when it has a
|
||
* playable track in one of them, and the counts are of those tracks. Paths, library ids and everything that providers
|
||
* said are never part of it. Signed like every `/peer` route.
|
||
*/
|
||
get: operations["peerListArtists"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/peer/artists/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/** One artist of the shared libraries (called by a friend) */
|
||
get: operations["peerGetArtist"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/peer/albums": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The albums of the shared libraries (called by a friend)
|
||
* @description Like `GET /albums`, over the libraries that are shared. Signed like every `/peer` route.
|
||
*/
|
||
get: operations["peerListAlbums"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/peer/albums/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/** One album of the shared libraries (called by a friend) */
|
||
get: operations["peerGetAlbum"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/peer/albums/{id}/cover": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The cover of an album of the shared libraries (called by a friend)
|
||
* @description Only a cover that this server already built from the audio files of the album: a friend never makes this server
|
||
* build one, read an audio file or ask a provider. A cover that came from the Cover Art Archive is not given. Any other
|
||
* album answers `cover_not_found`. The bytes go out within the friend's allowance.
|
||
*/
|
||
get: operations["peerGetAlbumCover"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/peer/tracks": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The tracks of the shared libraries (called by a friend)
|
||
* @description Like `GET /tracks`, over the libraries that are shared. Signed like every `/peer` route.
|
||
*/
|
||
get: operations["peerListTracks"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/peer/tracks/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/** One track of the shared libraries (called by a friend) */
|
||
get: operations["peerGetTrack"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/peer/tracks/{id}/peaks": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The shape of a track of the shared libraries (called by a friend)
|
||
* @description How loud the track is along its length, as `GET /tracks/{id}/peaks` gives it, for a track that lives in a shared
|
||
* library, so that a friend's seek bar can draw it. The first request starts the work in the background and answers
|
||
* `202` with `Retry-After`; ask again then. A track that is only in libraries that are not shared is `track_not_found`;
|
||
* a file that cannot be decoded is `waveform_unavailable`.
|
||
*/
|
||
get: operations["peerGetTrackPeaks"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/peer/tracks/{id}/stream": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Stream a track of the shared libraries (called by a friend)
|
||
* @description The file of the track that lives in a shared library, with `Range` support, as a listener would get it. A track that is
|
||
* only in libraries that are not shared is `track_not_found`. A friend has a few streams open at a time and a number
|
||
* of bytes a second to share among them, both set by the admin (`max_streams`, `max_kib_per_sec`): one stream too many
|
||
* is a `429` (`too_many_streams`) with `Retry-After`.
|
||
*/
|
||
get: operations["peerStreamTrack"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/friends": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The friends whose music can be browsed
|
||
* @description The friends that both admins agreed to, by name. A listener never sees an address or a key: those are for the
|
||
* admin (`GET /federation`). Empty while federation is off.
|
||
*/
|
||
get: operations["listFriends"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/friends/{friend}/artists": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The artists a friend shares
|
||
* @description This server asks the friend, with a request signed by its own key, and passes the page on after checking its
|
||
* shape; nothing is kept. Only what the friend shares is there. `q`, `limit` and `offset` are the same as in
|
||
* `GET /artists`. A friend that cannot be reached is `502` (`friend_unreachable`); one that no longer takes this
|
||
* server for a friend is `409` (`friend_gone`).
|
||
*/
|
||
get: operations["listFriendArtists"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/friends/{friend}/artists/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/** One artist of a friend */
|
||
get: operations["getFriendArtist"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/friends/{friend}/albums": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The albums a friend shares
|
||
* @description Like `GET /friends/{friend}/artists`, for albums; `artist_id` is the friend's own id of an artist.
|
||
*/
|
||
get: operations["listFriendAlbums"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/friends/{friend}/albums/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/** One album of a friend */
|
||
get: operations["getFriendAlbum"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/friends/{friend}/tracks": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The tracks a friend shares
|
||
* @description Like `GET /friends/{friend}/artists`, for tracks; `artist_id` and `album_id` are the friend's own ids. The ids in
|
||
* every answer are the friend's, never this server's: a listener keeps the friend and the id together.
|
||
*/
|
||
get: operations["listFriendTracks"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/friends/{friend}/tracks/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/** One track of a friend */
|
||
get: operations["getFriendTrack"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/friends/{friend}/tracks/{id}/peaks": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The shape of a track of a friend, for the seek bar
|
||
* @description How loud a track that a friend shares is along its length, as `GET /tracks/{id}/peaks` gives it for a local track.
|
||
* This server asks the friend, signed, and passes the answer on once it has checked that it is a list of 1 to 1000
|
||
* levels from 0 to 255; anything else is `502` (`friend_unreachable`). The friend works the shape out the first time and
|
||
* answers `202` with `Retry-After`: ask again then. A file the friend cannot decode is `waveform_unavailable`. The track
|
||
* id is the friend's own.
|
||
*/
|
||
get: operations["getFriendTrackPeaks"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/friends/{friend}/tracks/{id}/stream": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Stream a track of a friend
|
||
* @description The audio of a track that a friend shares, passed on by this server: it asks the friend with a request signed by its
|
||
* own key and sends the bytes on, so the listener's browser talks to this server only, and the friend sees this server
|
||
* and nothing of the listener. `Range` and the conditional headers are passed to the friend, so a player can seek.
|
||
* Only audio is passed on, with `Content-Type`, `Content-Length`, `Content-Range`, `Accept-Ranges` and `Last-Modified`
|
||
* and nothing else of what the friend sends. Streaming never records a listen here, and a friend's track never counts
|
||
* for taste. The track id is the friend's own.
|
||
*
|
||
* Like the stream of a local track, this accepts the access token as the `access_token` query parameter. A header, when
|
||
* present, always wins. A friend that already has as many streams open as its admin allows is a `429`
|
||
* (`friend_busy`).
|
||
*/
|
||
get: operations["streamFriendTrack"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/friends/{friend}/albums/{id}/cover": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The cover of an album of a friend
|
||
* @description The cover of an album that a friend shares, passed on like the stream. Only a JPEG is passed on. The friend gives a
|
||
* cover only once it was built on its server from the audio files of the album, so an album may have none yet
|
||
* (`cover_not_found`): the listener then sees the usual placeholder. Accepts the access token as the `access_token`
|
||
* query parameter, like the cover of a local album.
|
||
*/
|
||
get: operations["getFriendAlbumCover"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
}
|
||
export type webhooks = Record<string, never>;
|
||
export interface components {
|
||
schemas: {
|
||
Error: {
|
||
error: {
|
||
/**
|
||
* @description A stable identifier, for example `invalid_input`, `unauthorized`, `admin_required`,
|
||
* `user_not_found`, `last_admin`, `library_exists`, `scan_running`, `track_not_found`.
|
||
*/
|
||
code: string;
|
||
message: string;
|
||
};
|
||
};
|
||
Credentials: {
|
||
/**
|
||
* @description An address like `name@example.org`, with no display name. It is trimmed and lowercased,
|
||
* and it is unique. Sonda sends no mail and does not check that the address exists.
|
||
*/
|
||
email: string;
|
||
/**
|
||
* Format: password
|
||
* @description 8 to 256 bytes (UTF-8).
|
||
*/
|
||
password: string;
|
||
};
|
||
LoginRequest: {
|
||
/**
|
||
* @description The address of the account, in any case. An account made before addresses were asked
|
||
* for logs in with the plain name it has.
|
||
*/
|
||
email: string;
|
||
/** Format: password */
|
||
password: string;
|
||
};
|
||
CreateUser: components["schemas"]["Credentials"] & {
|
||
/** @default false */
|
||
is_admin: boolean;
|
||
};
|
||
User: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
email: string;
|
||
is_admin: boolean;
|
||
};
|
||
Session: {
|
||
access_token: string;
|
||
/** Format: date-time */
|
||
access_expires_at: string;
|
||
/** @description Works once. */
|
||
refresh_token: string;
|
||
/** Format: date-time */
|
||
refresh_expires_at: string;
|
||
user: components["schemas"]["User"];
|
||
};
|
||
RefreshRequest: {
|
||
refresh_token: string;
|
||
};
|
||
PasswordChange: {
|
||
/** Format: password */
|
||
current_password: string;
|
||
/**
|
||
* Format: password
|
||
* @description 8 to 256 bytes (UTF-8).
|
||
*/
|
||
new_password: string;
|
||
};
|
||
Library: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
name: string;
|
||
/** @description Absolute directory on the server. */
|
||
path: string;
|
||
/** @description Whether friends (federation) may read this library. Off until an admin turns it on. */
|
||
shared: boolean;
|
||
/** Format: date-time */
|
||
created_at: string;
|
||
};
|
||
NewLibrary: {
|
||
name: string;
|
||
/** @description Absolute, existing directory. */
|
||
path: string;
|
||
};
|
||
LibraryUpdate: {
|
||
name?: string;
|
||
path?: string;
|
||
/** @description Whether friends may read this library. Changing it never needs a scan and never waits for one. */
|
||
shared?: boolean;
|
||
} | unknown | unknown | unknown;
|
||
ScanSummary: {
|
||
/** @description Libraries covered by the scan. */
|
||
libraries: number;
|
||
/** @description Audio files seen on disk (MP3 and FLAC). */
|
||
found: number;
|
||
added: number;
|
||
updated: number;
|
||
unchanged: number;
|
||
/** @description Files that moved; they keep their track. */
|
||
renamed: number;
|
||
/** @description Files that were missing and are back. */
|
||
restored: number;
|
||
/** @description Files newly flagged as missing. They are never deleted. */
|
||
missing: number;
|
||
/** @description Files that could not be read. */
|
||
failed: number;
|
||
/** @description Symlinks and special files. */
|
||
skipped: number;
|
||
/** @description Audio files in formats Sonda cannot read yet, such as m4a, ogg or wav. */
|
||
unsupported: number;
|
||
};
|
||
ScanStatus: {
|
||
running: boolean;
|
||
/** Format: date-time */
|
||
started_at?: string;
|
||
/** Format: date-time */
|
||
last_finished_at?: string;
|
||
last?: components["schemas"]["ScanSummary"];
|
||
last_error?: string;
|
||
};
|
||
ArtistRef: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
name: string;
|
||
};
|
||
AlbumRef: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
title: string;
|
||
};
|
||
Artist: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
name: string;
|
||
album_count: number;
|
||
/** @description Playable tracks the artist is credited on. */
|
||
track_count: number;
|
||
};
|
||
Album: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
title: string;
|
||
/** @description The album artist; null when the album has none. */
|
||
artist: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
name: string;
|
||
} | null;
|
||
track_count: number;
|
||
/** Format: int64 */
|
||
duration_ms: number;
|
||
};
|
||
Track: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
title: string;
|
||
/** Format: int64 */
|
||
duration_ms: number;
|
||
/** @description 0 when unknown. */
|
||
track_no: number;
|
||
/** @description 0 when unknown. */
|
||
disc_no: number;
|
||
/** @description The album; null for a track that belongs to none. */
|
||
album: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
title: string;
|
||
} | null;
|
||
artists: components["schemas"]["ArtistRef"][];
|
||
/** @description Format of the first playable file, for example `mp3` or `flac`. */
|
||
format: string;
|
||
/** @description What the first playable file says about its own loudness, from its ReplayGain tags; null when it says nothing. A player can use it to play every song at a similar volume. Files indexed before this existed have none until a full rescan (`POST /library/scan?full=true`) reads their tags again. */
|
||
replay_gain?: {
|
||
/** @description Decibels to add to play this song at the reference loudness. */
|
||
track_gain_db: number | null;
|
||
/** @description The same for the whole album, which keeps the differences between its songs. */
|
||
album_gain_db: number | null;
|
||
/** @description The loudest sample of the song, 1 being full scale. */
|
||
track_peak: number | null;
|
||
/** @description The loudest sample of the album, 1 being full scale. */
|
||
album_peak: number | null;
|
||
} | null;
|
||
};
|
||
ArtistPage: {
|
||
items: components["schemas"]["Artist"][];
|
||
/** @description Size of the whole result, not of this page. */
|
||
total: number;
|
||
limit: number;
|
||
offset: number;
|
||
};
|
||
AlbumPage: {
|
||
items: components["schemas"]["Album"][];
|
||
total: number;
|
||
limit: number;
|
||
offset: number;
|
||
};
|
||
TrackPage: {
|
||
items: components["schemas"]["Track"][];
|
||
total: number;
|
||
limit: number;
|
||
offset: number;
|
||
};
|
||
Listen: {
|
||
/** Format: int64 */
|
||
track_id: number;
|
||
/** @enum {string} */
|
||
event_type: "play" | "complete" | "skip";
|
||
/**
|
||
* Format: date-time
|
||
* @description Defaults to now.
|
||
*/
|
||
occurred_at?: string;
|
||
/**
|
||
* Format: int64
|
||
* @description Milliseconds actually played. Up to twice the track length plus 10 seconds when that length is known.
|
||
*/
|
||
duration_played_ms?: number;
|
||
/** @description One per play, 1 to 128 bytes (UTF-8). A key that was already used is ignored. */
|
||
idempotency_key: string;
|
||
};
|
||
Provider: {
|
||
/** @enum {string} */
|
||
name: "lastfm" | "musicbrainz" | "wikipedia" | "commons" | "coverartarchive" | "lidarr" | "anthropic";
|
||
/** @description Whether Sonda may contact this provider. */
|
||
enabled: boolean;
|
||
needs_api_key: boolean;
|
||
/** @description Whether the provider is a server of your own that needs an address (only Lidarr). */
|
||
needs_url: boolean;
|
||
/** @description Whether a key is stored. The key itself is never returned. */
|
||
has_api_key: boolean;
|
||
/** @description Contact in the User-Agent; empty means the project address. */
|
||
contact: string;
|
||
/** @description Where your own server is, without a closing slash. Empty for the providers that have none. */
|
||
url: string;
|
||
lidarr?: components["schemas"]["LidarrOptions"];
|
||
/** @description Plain statement of what is sent to the provider, and what never is. */
|
||
sends: string;
|
||
/** @description Terms of use and attribution that apply to the provider's data. */
|
||
notes: string;
|
||
/**
|
||
* Format: date-time
|
||
* @description When the settings last changed; null if they never did.
|
||
*/
|
||
updated_at: string | null;
|
||
};
|
||
/**
|
||
* @description Only for `lidarr`: what is sent to Lidarr when an artist is added, chosen once by an admin from
|
||
* `GET /providers/lidarr/options`. Until they are saved, `monitor` is `all`, `search_missing` is
|
||
* true and the rest is empty or 0, which is not enough to add an artist.
|
||
*/
|
||
LidarrOptions: {
|
||
/** @description Lidarr's quality profile; 0 when none is chosen. */
|
||
quality_profile_id: number;
|
||
/** @description Lidarr's metadata profile; 0 when none is chosen. */
|
||
metadata_profile_id: number;
|
||
/** @description One of Lidarr's root folders; empty when none is chosen. */
|
||
root_folder_path: string;
|
||
/**
|
||
* @description Which of the artist's albums Lidarr monitors when it is added. `none` also stops new albums from being monitored.
|
||
* @enum {string}
|
||
*/
|
||
monitor: "all" | "future" | "missing" | "existing" | "latest" | "first" | "none";
|
||
/** @description Whether Lidarr starts looking for the albums as soon as the artist is added. */
|
||
search_missing: boolean;
|
||
};
|
||
LidarrOffers: {
|
||
quality_profiles: components["schemas"]["LidarrProfile"][];
|
||
metadata_profiles: components["schemas"]["LidarrProfile"][];
|
||
root_folders: {
|
||
path: string;
|
||
/** @description Whether Lidarr can use the folder now. */
|
||
accessible: boolean;
|
||
}[];
|
||
};
|
||
ArtistInLidarr: {
|
||
/**
|
||
* @description `ok` when Lidarr was asked (and `in_lidarr` is its answer); the others say why it was not.
|
||
* @enum {string}
|
||
*/
|
||
provider_status: "ok" | "disabled" | "no_id" | "not_configured" | "error";
|
||
in_lidarr: boolean;
|
||
/** @description Whether Lidarr monitors the artist; false when it does not have it. */
|
||
monitored: boolean;
|
||
};
|
||
LidarrProfile: {
|
||
id: number;
|
||
name: string;
|
||
};
|
||
ProviderUpdate: {
|
||
enabled?: boolean;
|
||
/**
|
||
* Format: password
|
||
* @description A Last.fm or Lidarr key is 32 hexadecimal characters. Empty clears it.
|
||
*/
|
||
api_key?: string;
|
||
/**
|
||
* @description Only for Lidarr: where your own server is, `http://` or `https://`, with a port and a path if it
|
||
* has them, and without user and password, query or fragment. A closing slash is dropped. Empty
|
||
* clears it, and turns Lidarr off. Lidarr cannot be enabled without an address and a key.
|
||
*/
|
||
url?: string;
|
||
/** @description Only for Lidarr. Replaces all its options at once: what is left out is the default (`monitor` all, `search_missing` true, the rest empty or 0). */
|
||
lidarr?: {
|
||
quality_profile_id?: number;
|
||
metadata_profile_id?: number;
|
||
root_folder_path?: string;
|
||
/** @enum {string} */
|
||
monitor?: "all" | "future" | "missing" | "existing" | "latest" | "first" | "none";
|
||
search_missing?: boolean;
|
||
};
|
||
/** @description A URL or e-mail address, without parentheses. Empty restores the default. */
|
||
contact?: string;
|
||
} | unknown | unknown | unknown | unknown | unknown;
|
||
ArtistDescription: {
|
||
/** @enum {string} */
|
||
provider: "wikipedia";
|
||
/**
|
||
* @description `ok` when the stored answer is as fresh as it needs to be (which can be "nothing found");
|
||
* `disabled` when the provider is off; `error` when Wikipedia could not be asked; `no_id`
|
||
* when the artist has no MusicBrainz id.
|
||
* @enum {string}
|
||
*/
|
||
provider_status: "ok" | "disabled" | "error" | "no_id";
|
||
/** @description True when the description is older than it should be because Wikipedia could not be asked. */
|
||
stale: boolean;
|
||
/**
|
||
* Format: date-time
|
||
* @description When it was read; null when nothing is known.
|
||
*/
|
||
retrieved_at: string | null;
|
||
/** @description What to show where the text is shown. */
|
||
attribution: string;
|
||
description: components["schemas"]["Description"] | null;
|
||
};
|
||
Description: {
|
||
/** @description The first paragraph of the article, plain text, at most 4000 characters. */
|
||
text: string;
|
||
/** @description One line, like "gruppo musicale inglese". May be empty. */
|
||
short: string;
|
||
/** @description The language of the page, like `it`. */
|
||
language: string;
|
||
/** @description The title of the page. */
|
||
title: string;
|
||
/**
|
||
* Format: uri
|
||
* @description The page, on Wikipedia.
|
||
*/
|
||
url: string;
|
||
/** @description The licence of the text. */
|
||
license: string;
|
||
/** Format: uri */
|
||
license_url: string;
|
||
};
|
||
PictureCredit: {
|
||
/** @description Where the picture comes from: `Wikimedia Commons`. */
|
||
source: string;
|
||
/** @description Plain text. May be empty. */
|
||
author: string;
|
||
/** @description Like `CC BY-SA 4.0`. */
|
||
license: string;
|
||
/** @description The licence, on creativecommons.org. May be empty. */
|
||
license_url: string;
|
||
/**
|
||
* Format: uri
|
||
* @description The page of the file on Commons.
|
||
*/
|
||
page_url: string;
|
||
};
|
||
ProviderPurge: {
|
||
/** @description Similar-artist links removed. */
|
||
similar_artists: number;
|
||
/** @description Artist descriptions removed (only the data of Wikipedia has any). */
|
||
descriptions: number;
|
||
/** @description Pictures removed: the photos of artists for Commons, the covers that came from the archive for the Cover Art Archive. */
|
||
images: number;
|
||
/** @description Tags removed. */
|
||
tags: number;
|
||
/** @description Artists removed because only the removed data named them and nobody has files for them. */
|
||
artists: number;
|
||
};
|
||
ProviderTest: {
|
||
ok: boolean;
|
||
/**
|
||
* @description `no_api_key`: none is stored, so nobody was asked. `no_address`: Lidarr has no address yet, so nobody was asked. `key_refused`: the provider does not accept
|
||
* it. `rate_limited`: try again later. `unreachable`: the provider did not answer. `error`: anything else.
|
||
* @enum {string}
|
||
*/
|
||
status: "ok" | "no_api_key" | "no_address" | "key_refused" | "rate_limited" | "unreachable" | "error";
|
||
};
|
||
ArtistTags: {
|
||
sources: {
|
||
/** @enum {string} */
|
||
provider: "lastfm" | "musicbrainz" | "files";
|
||
/**
|
||
* @description `ok`: the data is as fresh as it needs to be. `disabled`: the provider is off or has no
|
||
* key, so it was not asked. `error`: it was asked and failed. `no_id`: it needs the
|
||
* MusicBrainz id of the artist, which is not known, so it was not asked.
|
||
* @enum {string}
|
||
*/
|
||
provider_status: "ok" | "disabled" | "error" | "no_id";
|
||
/** @description True when `tags` are older than they should be because the provider could not be asked. */
|
||
stale: boolean;
|
||
/**
|
||
* Format: date-time
|
||
* @description When the provider was last read for this artist; null if never.
|
||
*/
|
||
retrieved_at: string | null;
|
||
/** @description Credit to show where the tags are shown. */
|
||
attribution: string;
|
||
/** @description The heaviest tags first, at most 50. */
|
||
tags: {
|
||
/** @description Lower case. */
|
||
name: string;
|
||
/** @description The provider's own number; see the operation. */
|
||
weight: number;
|
||
genre: boolean;
|
||
}[];
|
||
}[];
|
||
};
|
||
SimilarArtists: {
|
||
/** @enum {string} */
|
||
provider: "lastfm";
|
||
/**
|
||
* @description `ok`: the data is as fresh as it needs to be. `disabled`: the provider is off or has no key,
|
||
* so it was not asked. `error`: it was asked and failed.
|
||
* @enum {string}
|
||
*/
|
||
provider_status: "ok" | "disabled" | "error";
|
||
/** @description True when `items` are older than they should be because the provider could not be asked. */
|
||
stale: boolean;
|
||
/**
|
||
* Format: date-time
|
||
* @description When the provider was last read for this artist; null if never.
|
||
*/
|
||
retrieved_at: string | null;
|
||
/** @description Credit to show where the data is shown. */
|
||
attribution: string;
|
||
items: {
|
||
artist: components["schemas"]["ArtistRef"];
|
||
/** @description Whether the artist has something playable in the library. */
|
||
in_library: boolean;
|
||
/** @description The provider's own number, relative to this list. */
|
||
score: number;
|
||
/** @description Position in the provider's list, 1 first. */
|
||
rank: number;
|
||
}[];
|
||
};
|
||
ListenResult: {
|
||
/** @enum {string} */
|
||
status: "recorded" | "duplicate";
|
||
/** @description Whether the event counts as a listen. */
|
||
counted: boolean;
|
||
};
|
||
ListenItem: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
track: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
title: string;
|
||
/** @description The artists credited on the track, the main ones first. */
|
||
artists: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
name: string;
|
||
}[];
|
||
};
|
||
/** @enum {string} */
|
||
event_type: "play" | "complete" | "skip";
|
||
/** Format: date-time */
|
||
occurred_at: string;
|
||
/** Format: int64 */
|
||
duration_played_ms: number;
|
||
/** @description Whether the event counts as a listen under the current rule. */
|
||
counted: boolean;
|
||
};
|
||
LidarrRequestPage: {
|
||
items: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
artist: {
|
||
/**
|
||
* Format: int64
|
||
* @description The artist on this server, null when it is gone.
|
||
*/
|
||
id: number | null;
|
||
name: string;
|
||
};
|
||
mbid: string | null;
|
||
/**
|
||
* Format: date-time
|
||
* @description The first time it was sent.
|
||
*/
|
||
requested_at: string;
|
||
/** @enum {string} */
|
||
status: "waiting" | "arrived";
|
||
/** Format: date-time */
|
||
arrived_at: string | null;
|
||
}[];
|
||
/** @description Size of the whole result (of the `status`), not of this page. */
|
||
total: number;
|
||
limit: number;
|
||
offset: number;
|
||
counts: {
|
||
waiting: number;
|
||
arrived: number;
|
||
};
|
||
};
|
||
ListeningSuggestion: {
|
||
name: string;
|
||
/** @description The artist on this server, null when there is none yet. */
|
||
artist_id: number | null;
|
||
/** @description From 0 to 1 within its list. */
|
||
score: number;
|
||
/** @description How many times you played it. */
|
||
plays: number;
|
||
/** Format: date-time */
|
||
last_played_at: string;
|
||
wishlisted: boolean;
|
||
/** @description The artists you play that it goes with, the strongest first, at most three. */
|
||
because: {
|
||
name: string;
|
||
score: number;
|
||
}[];
|
||
};
|
||
ListeningSuggestions: {
|
||
library: components["schemas"]["ListeningSuggestion"][];
|
||
missing: components["schemas"]["ListeningSuggestion"][];
|
||
/** @description When the model was built and from how much. */
|
||
built: {
|
||
/** Format: date-time */
|
||
at: string;
|
||
plays: number;
|
||
sessions: number;
|
||
artists: number;
|
||
links: number;
|
||
};
|
||
};
|
||
Taste: {
|
||
artists: components["schemas"]["TasteArtist"][];
|
||
tags: components["schemas"]["TasteTag"][];
|
||
};
|
||
Discover: {
|
||
/** @enum {string} */
|
||
provider_status: "ok" | "disabled" | "error";
|
||
/** @description What to show where the data is shown. */
|
||
attribution: string;
|
||
/** @description True when the seeds were taken from your listening, false when you named them. */
|
||
from_listening: boolean;
|
||
seeds: components["schemas"]["DiscoverSeed"][];
|
||
items: components["schemas"]["Suggestion"][];
|
||
};
|
||
Mix: {
|
||
/** @description `favourites`, `rediscover`, `unheard` or `genre:<name>`. */
|
||
id: string;
|
||
/** @enum {string} */
|
||
kind: "genre" | "favourites" | "rediscover" | "unheard";
|
||
/** @description In English. */
|
||
title: string;
|
||
/** @description The genre, for a genre mix; null for the others. */
|
||
genre: string | null;
|
||
/** @description A few of the artists it has, up to 3. */
|
||
artists: string[];
|
||
/**
|
||
* @description Up to 4 albums that have a cover and stand for the mix, by different artists, the ones with most songs
|
||
* among those the mix draws from: their covers (`GET /albums/{id}/cover`) make the picture of the mix.
|
||
* Empty when none has a cover.
|
||
*/
|
||
album_ids: number[];
|
||
};
|
||
MixList: {
|
||
items: components["schemas"]["Mix"][];
|
||
};
|
||
MixWithTracks: {
|
||
id: string;
|
||
/** @enum {string} */
|
||
kind: "genre" | "favourites" | "rediscover" | "unheard";
|
||
title: string;
|
||
genre: string | null;
|
||
artists: string[];
|
||
/** @description As in the list of mixes. */
|
||
album_ids: number[];
|
||
variant: number;
|
||
/** @description In the order to play them. Fewer than 50 when the library has fewer to give. */
|
||
tracks: components["schemas"]["Track"][];
|
||
};
|
||
SaveMix: {
|
||
/** @description The name of the playlist; blank or absent means the title of the mix. */
|
||
name?: string;
|
||
/** @description The variant the client showed; absent means the mix of the day. */
|
||
variant?: number;
|
||
/**
|
||
* @description When true and the Claude provider is on, the playlist is named by Claude from its songs (with a line of description), and `name` is only the name to give it when Claude is off, fails or declines.
|
||
* @default false
|
||
*/
|
||
auto_name: boolean;
|
||
/** @description The language of a name that Claude makes: `en` or `it`. Absent or another: English. */
|
||
lang?: string;
|
||
};
|
||
GenreList: {
|
||
items: {
|
||
name: string;
|
||
/** @description Playable songs that have the genre. */
|
||
tracks: number;
|
||
}[];
|
||
};
|
||
ClaudeUsageTotals: {
|
||
/** @description Names that Claude made. */
|
||
names_made: number;
|
||
/** @description Names taken from the ones kept, which cost nothing. */
|
||
names_kept: number;
|
||
/** @description Questions that gave no name. */
|
||
failures: number;
|
||
/** Format: int64 */
|
||
input_tokens: number;
|
||
/** Format: int64 */
|
||
output_tokens: number;
|
||
/** Format: int64 */
|
||
cache_read_tokens: number;
|
||
/** Format: int64 */
|
||
cache_write_tokens: number;
|
||
/** @description An estimate in dollars, worked out from the tokens and the price of the model. */
|
||
cost_usd: number;
|
||
};
|
||
ClaudeUsageDay: {
|
||
/**
|
||
* Format: date
|
||
* @description The day, in UTC.
|
||
*/
|
||
date: string;
|
||
names_made: number;
|
||
names_kept: number;
|
||
failures: number;
|
||
/** Format: int64 */
|
||
input_tokens: number;
|
||
/** Format: int64 */
|
||
output_tokens: number;
|
||
/** Format: int64 */
|
||
cache_read_tokens: number;
|
||
/** Format: int64 */
|
||
cache_write_tokens: number;
|
||
/** @description An estimate in dollars. */
|
||
cost_usd: number;
|
||
};
|
||
ClaudeUsage: {
|
||
days: number;
|
||
/** @description The model that is asked now. */
|
||
model: string;
|
||
/** @description Always true: the cost is worked out from the tokens, it is not the invoice. */
|
||
estimate: boolean;
|
||
/** @description Some calls were to a model whose price is not known and are not in the cost. */
|
||
unpriced: boolean;
|
||
totals: components["schemas"]["ClaudeUsageTotals"];
|
||
daily: components["schemas"]["ClaudeUsageDay"][];
|
||
};
|
||
SuggestName: {
|
||
/** @description The language of the name: `en` or `it`. Absent or another: English. */
|
||
lang?: string;
|
||
/**
|
||
* @description For a mix or a smart playlist: the variant that is on screen.
|
||
* @default 0
|
||
*/
|
||
variant: number;
|
||
};
|
||
NameSuggestion: {
|
||
name: string;
|
||
/** @description One short sentence. */
|
||
description: string;
|
||
/**
|
||
* @description `claude` when the Claude provider made it, `local` when it was made on this server.
|
||
* @enum {string}
|
||
*/
|
||
source: "claude" | "local";
|
||
};
|
||
/**
|
||
* @description Every rule that is set must hold; one that is absent, empty, false or 0 does not count. Of a list rule a
|
||
* song needs to match one item.
|
||
*/
|
||
SmartRules: {
|
||
/** @description Kept lower case, with `+`, `-`, `_` and `/` taken for spaces: `jazz+funk` and `jazz-funk` are one genre. */
|
||
genres?: string[];
|
||
/** @description Leaves out songs of these genres. */
|
||
not_genres?: string[];
|
||
/** @description Songs whose main artist is one of these. */
|
||
artist_ids?: number[];
|
||
not_artist_ids?: number[];
|
||
album_ids?: number[];
|
||
not_album_ids?: number[];
|
||
/** @description File formats in lower case (`flac`, `mpeg`). A song counts when a file of it that is not missing has one of them. */
|
||
formats?: string[];
|
||
/** @description Needs a file of the song with this bitrate or more (the same file as `formats`). */
|
||
min_bitrate_kbps?: number;
|
||
/** @description About the date of the file, which is the best the index knows. */
|
||
added_within_days?: number;
|
||
/** @description Songs you never listened to. */
|
||
never_played?: boolean;
|
||
played_within_days?: number;
|
||
/** @description Songs not played for this many days (the ones never played too). */
|
||
not_played_within_days?: number;
|
||
min_plays?: number;
|
||
/** @description Counts only the plays of the last N days where plays are counted: `min_plays` and the `most_played` and `least_played` orders. The other listening rules are not changed. */
|
||
plays_within_days?: number;
|
||
skipped_within_days?: number;
|
||
/** @description Leaves out songs skipped in the last days. */
|
||
not_skipped_within_days?: number;
|
||
/** @description Only songs by artists you like. */
|
||
liked_artists_only?: boolean;
|
||
/** @description Leaves out songs by artists you avoid. */
|
||
without_avoided_artists?: boolean;
|
||
min_duration_sec?: number;
|
||
max_duration_sec?: number;
|
||
/** @description The song came out in this year or later (0 or a year from 1000). The year comes from the tags of the file, the original date first. A song whose file has no year never matches a year rule, and the files indexed before this rule existed have none until a full rescan (`POST /library/scan?full=true`) reads their tags again. */
|
||
min_year?: number;
|
||
/** @description The song came out in this year or earlier. With `min_year` set it cannot be lower than it. See `min_year`. */
|
||
max_year?: number;
|
||
};
|
||
SuggestedSmartPlaylist: {
|
||
/** @enum {string} */
|
||
key: "recently-added" | "on-rotation" | "top-year" | "most-played" | "never-played" | "forgotten" | "high-quality" | "long-tracks";
|
||
rules: components["schemas"]["SmartRules"];
|
||
sort: components["schemas"]["SmartSort"];
|
||
limit: number;
|
||
};
|
||
SuggestedSmartPlaylistList: {
|
||
items: components["schemas"]["SuggestedSmartPlaylist"][];
|
||
};
|
||
/**
|
||
* @description A tie always goes to the lower song id.
|
||
* @enum {string}
|
||
*/
|
||
SmartSort: "random" | "most_played" | "least_played" | "recently_added" | "title";
|
||
SmartPlaylist: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
name: string;
|
||
description: string;
|
||
rules: components["schemas"]["SmartRules"];
|
||
sort: components["schemas"]["SmartSort"];
|
||
/** @description The most songs it gives. */
|
||
limit: number;
|
||
/** Format: date-time */
|
||
created_at: string;
|
||
/** Format: date-time */
|
||
updated_at: string;
|
||
};
|
||
SmartPlaylistPage: {
|
||
items: components["schemas"]["SmartPlaylist"][];
|
||
total: number;
|
||
limit: number;
|
||
offset: number;
|
||
};
|
||
CreateSmartPlaylist: {
|
||
/** @description Trimmed. It can be blank or absent only when the Claude provider is on (see `GET /naming`): Claude then names the playlist from the songs its rules give, and a failure is `invalid_input`. */
|
||
name?: string;
|
||
/** @description The language of a name that Claude makes: `en` or `it`. Absent or another: English. */
|
||
lang?: string;
|
||
description?: string;
|
||
rules?: components["schemas"]["SmartRules"];
|
||
sort?: components["schemas"]["SmartSort"];
|
||
/** @default 50 */
|
||
limit: number;
|
||
};
|
||
/** @description What is given changes; the rules replace the old ones whole. */
|
||
UpdateSmartPlaylist: {
|
||
name?: string;
|
||
description?: string;
|
||
rules?: components["schemas"]["SmartRules"];
|
||
sort?: components["schemas"]["SmartSort"];
|
||
limit?: number;
|
||
};
|
||
PreviewSmartPlaylist: {
|
||
rules?: components["schemas"]["SmartRules"];
|
||
sort?: components["schemas"]["SmartSort"];
|
||
/** @default 50 */
|
||
limit: number;
|
||
/** @default 0 */
|
||
variant: number;
|
||
};
|
||
SmartCovers: {
|
||
album_ids: number[];
|
||
};
|
||
SmartTracks: {
|
||
variant: number;
|
||
/** @description In the order of the playlist. Empty when no song meets the rules. */
|
||
tracks: components["schemas"]["Track"][];
|
||
};
|
||
SaveSmartPlaylist: {
|
||
/** @description The name of the playlist; blank or absent means the name of the smart playlist. */
|
||
name?: string;
|
||
/** @description The variant the client showed; absent means the songs of the day. */
|
||
variant?: number;
|
||
/**
|
||
* @description When true and the Claude provider is on, the playlist is named by Claude from its songs (with a line of description), and `name` is only the name to give it when Claude is off, fails or declines.
|
||
* @default false
|
||
*/
|
||
auto_name: boolean;
|
||
/** @description The language of a name that Claude makes: `en` or `it`. Absent or another: English. */
|
||
lang?: string;
|
||
};
|
||
Playlist: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
name: string;
|
||
description: string;
|
||
/** @description Items in the playlist, available or not. */
|
||
track_count: number;
|
||
/**
|
||
* Format: int64
|
||
* @description Their total length.
|
||
*/
|
||
duration_ms: number;
|
||
/** Format: date-time */
|
||
created_at: string;
|
||
/**
|
||
* Format: date-time
|
||
* @description When it was last changed, tracks included.
|
||
*/
|
||
updated_at: string;
|
||
/**
|
||
* @description Up to 4 albums that have a cover and stand for the playlist, in the order they first appear in it, each once:
|
||
* their covers (`GET /albums/{id}/cover`) make the picture of the playlist. Empty when none of its songs has
|
||
* an album with a cover.
|
||
*/
|
||
album_ids: number[];
|
||
};
|
||
PlaylistPage: {
|
||
items: components["schemas"]["Playlist"][];
|
||
/** @description Size of the whole list, not of this page. */
|
||
total: number;
|
||
limit: number;
|
||
offset: number;
|
||
};
|
||
PlaylistItem: {
|
||
/**
|
||
* Format: int64
|
||
* @description Identifies this place of the playlist; the track may be there twice.
|
||
*/
|
||
id: number;
|
||
position: number;
|
||
/** @description False when the track has no file to play now. */
|
||
available: boolean;
|
||
/** Format: date-time */
|
||
added_at: string;
|
||
track: components["schemas"]["Track"];
|
||
};
|
||
PlaylistItemPage: {
|
||
items: components["schemas"]["PlaylistItem"][];
|
||
/** @description Items in the whole playlist. */
|
||
total: number;
|
||
limit: number;
|
||
offset: number;
|
||
};
|
||
CreatePlaylist: {
|
||
/** @description Trimmed. */
|
||
name: string;
|
||
description?: string;
|
||
};
|
||
/** @description At least one of the two. */
|
||
UpdatePlaylist: {
|
||
name?: string;
|
||
/** @description An empty one clears it. */
|
||
description?: string;
|
||
};
|
||
AddPlaylistTracks: {
|
||
track_ids: number[];
|
||
/** @description Where the first one goes, up to the number of items; absent means the end. */
|
||
position?: number;
|
||
};
|
||
MovePlaylistItem: {
|
||
position: number;
|
||
};
|
||
MarkedPage: {
|
||
items: components["schemas"]["MarkedArtist"][];
|
||
/** @description Size of the whole list, not of this page. */
|
||
total: number;
|
||
limit: number;
|
||
offset: number;
|
||
};
|
||
MarkedArtist: {
|
||
artist: components["schemas"]["ArtistRef"];
|
||
/** @description Whether there is music of the artist to play. */
|
||
in_library: boolean;
|
||
/** Format: date-time */
|
||
marked_at: string;
|
||
};
|
||
DiscoverSeed: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
name: string;
|
||
/** @description 1 for a seed you named, your preference for one taken from your listening. */
|
||
weight: number;
|
||
};
|
||
Suggestion: {
|
||
artist: components["schemas"]["ArtistRef"];
|
||
in_library: boolean;
|
||
/** @description True when the artist is on your wishlist. */
|
||
wishlisted: boolean;
|
||
score: number;
|
||
components: components["schemas"]["ScoreParts"];
|
||
/** @description Up to three seeds that count most for this suggestion, strongest first. */
|
||
because: components["schemas"]["SuggestionReason"][];
|
||
};
|
||
ScoreParts: {
|
||
/** @description Affinity. */
|
||
a: number;
|
||
/** @description Genre. Null when the artist has no tags or you have no taste to compare with; the score is then worked out without it. */
|
||
g: number | null;
|
||
/** @description Preference. 0.5 for an artist you never played. */
|
||
p: number;
|
||
/** @description Discovery bonus. */
|
||
d: number;
|
||
};
|
||
SuggestionReason: {
|
||
artist: components["schemas"]["ArtistRef"];
|
||
/** @description Last.fm's similarity of the suggestion to this seed, relative to the seed's own list. */
|
||
match: number;
|
||
};
|
||
CoversJobStatus: {
|
||
running: boolean;
|
||
/**
|
||
* Format: date-time
|
||
* @description When the last job started.
|
||
*/
|
||
started_at?: string;
|
||
/** Format: date-time */
|
||
last_finished_at?: string;
|
||
/** @description Only while the job runs. */
|
||
progress?: {
|
||
done: number;
|
||
/** @description Albums the job set out to do. */
|
||
total: number;
|
||
};
|
||
/** @description How the last finished job ended. */
|
||
last?: {
|
||
/** @description Albums looked at. */
|
||
checked: number;
|
||
/** @description Covers found in the user's own files. */
|
||
from_files: number;
|
||
/** @description Covers from the Cover Art Archive. */
|
||
from_archive: number;
|
||
/** @description Albums with no cover anywhere. */
|
||
none: number;
|
||
/** @description Albums that vanished while the job ran. */
|
||
skipped: number;
|
||
/** @description Albums whose cover could not be built just then. */
|
||
failed: number;
|
||
/** @description It was stopped, or the application was. */
|
||
stopped: boolean;
|
||
};
|
||
/** @description Why the last job ended before the end, for example that the provider kept failing. */
|
||
last_error?: string;
|
||
};
|
||
ArtistJobStatus: {
|
||
running: boolean;
|
||
/**
|
||
* Format: date-time
|
||
* @description When the last job started.
|
||
*/
|
||
started_at?: string;
|
||
/** Format: date-time */
|
||
last_finished_at?: string;
|
||
/** @description Only while the job runs. */
|
||
progress?: {
|
||
done: number;
|
||
/** @description Artists the job set out to do. */
|
||
total: number;
|
||
};
|
||
/** @description How the last finished job ended. */
|
||
last?: {
|
||
/** @description Artists looked at. */
|
||
checked: number;
|
||
/** @description Artists for which a picture, or a description, was found. */
|
||
found: number;
|
||
/** @description Artists for which the provider has nothing. */
|
||
none: number;
|
||
/** @description Artists that vanished, or lost their id, while the job ran. */
|
||
skipped: number;
|
||
/** @description Artists that could not be looked up just then. */
|
||
failed: number;
|
||
/** @description It was stopped, or the application was. */
|
||
stopped: boolean;
|
||
};
|
||
/** @description Why the last job ended before the end, for example that a provider is off or kept failing. */
|
||
last_error?: string;
|
||
};
|
||
DuplicatesPage: {
|
||
/** @description Whether `POST /library/duplicates/clean` can work (`library.allow_delete`). */
|
||
deletion_allowed: boolean;
|
||
/** @description Groups in all, not in this page. */
|
||
total: number;
|
||
limit: number;
|
||
offset: number;
|
||
groups: components["schemas"]["DuplicateGroup"][];
|
||
};
|
||
DuplicateGroup: {
|
||
title: string;
|
||
/** @description The main artists the copies share. */
|
||
artists: components["schemas"]["ArtistRef"][];
|
||
/** @description The copies, by track id; at least two. */
|
||
files: components["schemas"]["DuplicateFile"][];
|
||
/** @description Every file of the group has been read by the check. */
|
||
hashed: boolean;
|
||
/** @description Hashed, and byte for byte the same. */
|
||
identical: boolean;
|
||
/**
|
||
* Format: int64
|
||
* @description The copy Sonda would keep: without loss first, then the higher bitrate, then the bigger file, then the oldest.
|
||
*/
|
||
suggested_keep_track_id: number;
|
||
/**
|
||
* Format: int64
|
||
* @description The size of every copy but the one to keep.
|
||
*/
|
||
freed_bytes: number;
|
||
};
|
||
DuplicateFile: {
|
||
/** Format: int64 */
|
||
track_id: number;
|
||
album: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
title: string;
|
||
} | null;
|
||
/** @description `mp3`, `flac`... */
|
||
format: string;
|
||
/** @description 0 when unknown. */
|
||
bitrate: number;
|
||
/** Format: int64 */
|
||
size_bytes: number;
|
||
/** Format: int64 */
|
||
duration_ms: number;
|
||
/** @description This file has been read by the check. */
|
||
hashed: boolean;
|
||
};
|
||
CleanDuplicates: {
|
||
/**
|
||
* Format: int64
|
||
* @description The copy that stays.
|
||
*/
|
||
keep_track_id: number;
|
||
/** @description The copies to delete, of the same song as the one that stays, none twice. */
|
||
remove_track_ids: number[];
|
||
};
|
||
DuplicatesCleaned: {
|
||
/** @description Files deleted. */
|
||
removed: number;
|
||
/** Format: int64 */
|
||
freed_bytes: number;
|
||
};
|
||
DuplicatesCheckStatus: {
|
||
running: boolean;
|
||
/**
|
||
* Format: date-time
|
||
* @description When the last check started.
|
||
*/
|
||
started_at?: string;
|
||
/** Format: date-time */
|
||
last_finished_at?: string;
|
||
/** @description Only while the check runs. */
|
||
progress?: {
|
||
done: number;
|
||
/** @description Files the check set out to read. */
|
||
total: number;
|
||
};
|
||
/** @description How the last finished check ended. */
|
||
last?: {
|
||
/** @description Files looked at. */
|
||
checked: number;
|
||
/** @description Files read and fingerprinted. */
|
||
hashed: number;
|
||
/** @description Files that changed since the scan, or are gone. */
|
||
skipped: number;
|
||
/** @description Files that could not be read just then. */
|
||
failed: number;
|
||
/** @description It was stopped, or the application was. */
|
||
stopped: boolean;
|
||
};
|
||
/** @description Why the last check ended before the end, for example that the disk is not mounted. */
|
||
last_error?: string;
|
||
};
|
||
UserSettings: {
|
||
/**
|
||
* @description When true, Discover may start from the artists you listen to most. That sends their
|
||
* names to Last.fm, which is asked for artists similar to each one (only when an admin
|
||
* switched Last.fm on). When false, Discover starts only from artists you name yourself.
|
||
* False until you turn it on. What Last.fm answers is stored like any other lookup and is
|
||
* shared: another user can see from `retrieved_at` in `GET /artists/{id}/similar` that
|
||
* somebody looked an artist up, but not who.
|
||
*/
|
||
discover_from_listening: boolean;
|
||
};
|
||
SpotifyImportPage: {
|
||
items: components["schemas"]["SpotifyImportReport"][];
|
||
/** @description Size of the whole result, not of this page. */
|
||
total: number;
|
||
limit: number;
|
||
offset: number;
|
||
};
|
||
SpotifyImportReport: {
|
||
/** @description The import. 0 when its report could not be kept. */
|
||
id: number;
|
||
/**
|
||
* Format: date-time
|
||
* @description When the import was done.
|
||
*/
|
||
created_at: string;
|
||
history: {
|
||
/** @description Plays of songs that were read. */
|
||
entries: number;
|
||
/** @description Of those, the plays of a song of your library. */
|
||
matched: number;
|
||
/** @description Recorded now. */
|
||
imported: number;
|
||
/** @description Matched and already recorded by an earlier import, or the same play in two files. */
|
||
already_there: number;
|
||
/** @description Plays of songs that are not in your library. */
|
||
not_found: number;
|
||
/** @description Podcast episodes, and plays with no time that can be read. */
|
||
ignored: number;
|
||
/** @description Of the plays not in your library, the ones that count as listened, whose artist and time are kept to learn what you listen to together (never the title, the album or anything else). */
|
||
kept_outside: number;
|
||
};
|
||
playlists: {
|
||
name: string;
|
||
/** @description Everything that was in the playlist, songs and not. */
|
||
tracks: number;
|
||
/** @description The songs of your library. */
|
||
matched: number;
|
||
/**
|
||
* @description `created`; `exists` (you already have one with that name, left alone); `empty` (none of its songs is in your library); `limit` (you have as many playlists as are allowed).
|
||
* @enum {string}
|
||
*/
|
||
status: "created" | "exists" | "empty" | "limit";
|
||
}[];
|
||
missing: {
|
||
/** @description How many artists have songs that were not found. */
|
||
total: number;
|
||
/** @description The artists with the most songs that were not found, at most 50, most first. */
|
||
artists: {
|
||
name: string;
|
||
/** @description Plays and playlist songs of this artist that were not found. */
|
||
count: number;
|
||
}[];
|
||
};
|
||
};
|
||
MastodonAccount: {
|
||
connected: boolean;
|
||
/** @description The instance, like `https://mastodon.social`. Only when connected. */
|
||
instance?: string;
|
||
/** @description Your handle, like `@name@mastodon.social`. Only when connected. */
|
||
handle?: string;
|
||
/**
|
||
* @description Only when posts are paused. `token_refused`: the instance refused the token on a post (it was revoked or
|
||
* expired), so nothing is posted until you connect again with a new token (`PUT /me/mastodon`).
|
||
* @enum {string}
|
||
*/
|
||
problem?: "token_refused";
|
||
};
|
||
ConnectMastodon: {
|
||
/** @description The address of your instance: `mastodon.social` or `https://mastodon.social`. */
|
||
instance: string;
|
||
/** @description An access token with the `write:statuses` permission. Never sent back. */
|
||
token: string;
|
||
};
|
||
UpdateUserSettings: {
|
||
discover_from_listening?: boolean | null;
|
||
};
|
||
TasteArtist: {
|
||
/** Format: int64 */
|
||
id: number;
|
||
name: string;
|
||
/** @description How much you like the artist. Only artists above 0 are listed. */
|
||
preference: number;
|
||
/** @description Events that count as a listen, with no decay, within the period that is read (ten half-lives). */
|
||
listens: number;
|
||
/**
|
||
* Format: date-time
|
||
* @description The most recent listen that counted.
|
||
*/
|
||
last_listened_at: string;
|
||
};
|
||
TasteTag: {
|
||
/** @description Lower case. */
|
||
tag: string;
|
||
/** @description How much the tag matters to you; the best one is 1. */
|
||
weight: number;
|
||
};
|
||
ListenPage: {
|
||
items: components["schemas"]["ListenItem"][];
|
||
/** @description Size of the whole result, not of this page. */
|
||
total: number;
|
||
limit: number;
|
||
offset: number;
|
||
};
|
||
Federation: {
|
||
/** @description Whether this server may pair with others. Off by default. */
|
||
enabled: boolean;
|
||
/** @description How friends see this server. */
|
||
name: string;
|
||
/** @description Where friends reach this server; empty until set. */
|
||
address: string;
|
||
/** @description Names this server's key; empty until federation was first turned on. Compare it with the one the other admin sees. */
|
||
key_id: string;
|
||
/** @description What a friend's server is sent, and what it never learns. */
|
||
sends: string;
|
||
/** @description Streams one friend may have open at a time. */
|
||
max_streams: number;
|
||
/** @description KiB a second one friend may take over all its streams; 0 means no limit. Otherwise at least 64. */
|
||
max_kib_per_sec: number;
|
||
friends: components["schemas"]["FederationFriend"][];
|
||
};
|
||
FederationUpdate: {
|
||
enabled?: boolean;
|
||
max_streams?: number;
|
||
max_kib_per_sec?: number;
|
||
/** @description At most 60 characters, no control characters. Empty goes back to the host name. */
|
||
name?: string;
|
||
address?: string;
|
||
} | unknown | unknown | unknown | unknown | unknown;
|
||
FederationRequest: {
|
||
/** Format: date-time */
|
||
at: string;
|
||
friend_id: number;
|
||
/** @description The name of the friend. */
|
||
friend: string;
|
||
/** @description The route pattern, like `/api/v1/peer/tracks/:id/stream`. Never the query. */
|
||
route: string;
|
||
status: number;
|
||
/**
|
||
* Format: int64
|
||
* @description Bytes of the answer.
|
||
*/
|
||
bytes: number;
|
||
};
|
||
Peaks: {
|
||
/** @description How many levels there are (120). */
|
||
count: number;
|
||
/** @description From the start of the track to its end. */
|
||
peaks: number[];
|
||
};
|
||
FriendRef: {
|
||
/**
|
||
* Format: int64
|
||
* @description Names the friend in the routes under `/friends`.
|
||
*/
|
||
id: number;
|
||
name: string;
|
||
};
|
||
PeerInfo: {
|
||
name: string;
|
||
/** @description How many libraries are shared with friends. */
|
||
shared_libraries: number;
|
||
};
|
||
FederationInvite: {
|
||
/** @description One piece of text to give to the other admin. Starts with `sonda1.`. */
|
||
invite: string;
|
||
/** Format: date-time */
|
||
expires_at: string;
|
||
};
|
||
FederationUseInvite: {
|
||
invite: string;
|
||
};
|
||
FederationFriend: {
|
||
id: number;
|
||
name: string;
|
||
address: string;
|
||
/** @description Names the friend's key. */
|
||
key_id: string;
|
||
/**
|
||
* @description `incoming`: it used an invite of this server and waits for approval here. `outgoing`: this server used its invite
|
||
* and waits for it. `active`: both agreed.
|
||
* @enum {string}
|
||
*/
|
||
state: "incoming" | "outgoing" | "active";
|
||
/** Format: date-time */
|
||
created_at: string;
|
||
/** Format: date-time */
|
||
approved_at: string | null;
|
||
};
|
||
PeerPairRequest: {
|
||
code: string;
|
||
name: string;
|
||
address: string;
|
||
/** @description The Ed25519 public key, 32 bytes, base64url without padding. */
|
||
public_key: string;
|
||
};
|
||
PeerPairReply: {
|
||
name: string;
|
||
address: string;
|
||
/** @description The Ed25519 public key, 32 bytes, base64url without padding. */
|
||
public_key: string;
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The request is not signed by a friend: no signature, a bad one, an old date, a nonce used before or an unknown key, all the same answer (`unauthorized`). */
|
||
FriendUnauthorized: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The signature is good but the admin of this server has not approved the friend yet (`not_approved`). */
|
||
FriendNotApproved: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The friend no longer takes this server for a friend (`friend_gone`). */
|
||
FriendGone: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The friend is busy (`friend_busy`). Try again after `Retry-After` seconds. */
|
||
FriendBusy: {
|
||
headers: {
|
||
/** @description Seconds to wait. */
|
||
"Retry-After"?: number;
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The friend could not be reached, or sent something that is not a catalogue page (`friend_unreachable`). */
|
||
FriendUnreachable: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Federation is off on this server, so the route is as good as missing (`not_found`). */
|
||
FederationOff: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The request is malformed or a value is out of range (`invalid_input`). */
|
||
InvalidInput: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The access token is missing, invalid or expired, or the account it belongs to no longer exists (`unauthorized`). */
|
||
Unauthorized: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The account is not an admin (`admin_required`). */
|
||
AdminRequired: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description No such mix, or you do not have it (`mix_not_found`). */
|
||
MixNotFound: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description No such suggested smart playlist (`suggested_not_found`). */
|
||
SuggestedNotFound: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description No such smart playlist, or it is somebody else's (`smart_playlist_not_found`). */
|
||
SmartPlaylistNotFound: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description No such playlist, or it is somebody else's (`playlist_not_found`). */
|
||
PlaylistNotFound: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description A limit was reached, 1000 playlists for a user or 10000 tracks in a playlist (`limit_reached`). */
|
||
PlaylistLimit: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description No such library (`library_not_found`). */
|
||
LibraryNotFound: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The scan was started in the background. */
|
||
ScanStarted: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
/** @enum {string} */
|
||
status: "started";
|
||
};
|
||
};
|
||
};
|
||
};
|
||
parameters: {
|
||
Id: number;
|
||
/**
|
||
* @description Case- and accent-insensitive substring of the name or title: `bjork`, `BJORK` and `BJÖRK` all
|
||
* find `Björk`, and `strasse` finds `Straße`. At most 200 characters.
|
||
*/
|
||
Q: string;
|
||
/** @description `true` reads every file again, not only the new or changed ones. Only `true` and `false` are accepted. */
|
||
Full: boolean;
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
Limit: number;
|
||
Offset: number;
|
||
/** @description A key from `GET /smart-playlists/suggested`. */
|
||
SuggestedKey: "recently-added" | "on-rotation" | "top-year" | "most-played" | "never-played" | "forgotten" | "high-quality" | "long-tracks";
|
||
/** @description `favourites`, `rediscover`, `unheard` or `genre:<name>` (percent-encoded). */
|
||
MixId: string;
|
||
/** @description Only items with a playable file in this library. */
|
||
LibraryId: number;
|
||
ArtistId: number;
|
||
AlbumId: number;
|
||
};
|
||
requestBodies: never;
|
||
headers: {
|
||
/** @description Identifies the stored picture, in quotes. */
|
||
ETag: string;
|
||
/** @description `private, max-age=3600`. */
|
||
CacheControl: string;
|
||
/** @description Always `bytes`. */
|
||
AcceptRanges: string;
|
||
ContentLength: number;
|
||
LastModified: string;
|
||
};
|
||
pathItems: never;
|
||
}
|
||
export type $defs = Record<string, never>;
|
||
export interface operations {
|
||
getHealth: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The server is up. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
/** @enum {string} */
|
||
status: "ok";
|
||
};
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getVersion: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The version of this server. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
/** @example 0.1.0 */
|
||
version: string;
|
||
/**
|
||
* @description The first characters of the commit. Left out when the build did not record it.
|
||
* @example 69c85a7
|
||
*/
|
||
revision?: string;
|
||
/** @description True when the files had changes that were not committed. Left out when false. */
|
||
modified?: boolean;
|
||
};
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
getOpenAPI: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The OpenAPI description of the API. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/yaml": string;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
register: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["Credentials"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The admin account. */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["User"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
/** @description A user already exists (`registration_closed`). */
|
||
403: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The email is already registered (`email_taken`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
login: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["LoginRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description A new session. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Session"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
/** @description Wrong email or password (`invalid_credentials`). */
|
||
401: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
refresh: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["RefreshRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description A new session. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Session"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
/** @description The refresh token is unknown, expired or already used (`invalid_refresh_token`). */
|
||
401: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
logout: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["RefreshRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Done. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
};
|
||
};
|
||
getMe: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Your account. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["User"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
changePassword: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["PasswordChange"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Password changed. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description The current password is wrong (`invalid_credentials`). */
|
||
403: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
listUsers: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Every account, oldest first. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
users: components["schemas"]["User"][];
|
||
};
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
createUser: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["CreateUser"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The new account. */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["User"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description The email is already registered (`email_taken`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
deleteUser: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Deleted. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description No such user (`user_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description This is the last admin (`last_admin`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
updateUser: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": {
|
||
is_admin: boolean;
|
||
};
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The updated account. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["User"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description No such user (`user_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description This is the last admin (`last_admin`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
resetUserPassword: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": {
|
||
/**
|
||
* Format: password
|
||
* @description 8 to 256 bytes (UTF-8).
|
||
*/
|
||
password: string;
|
||
};
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Password reset. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description No such user (`user_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
listLibraries: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Every library, oldest first. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
libraries: components["schemas"]["Library"][];
|
||
};
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
createLibrary: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["NewLibrary"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The new library. */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Library"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description Another library has this name or path (`library_exists`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
deleteLibrary: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Removed. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
404: components["responses"]["LibraryNotFound"];
|
||
/** @description A scan is running (`scan_running`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
updateLibrary: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["LibraryUpdate"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The updated library. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Library"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
404: components["responses"]["LibraryNotFound"];
|
||
/** @description The name or path is used by another library (`library_exists`), or a scan is running (`scan_running`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
scanLibrary: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description `true` reads every file again, not only the new or changed ones. Only `true` and `false` are accepted. */
|
||
full?: components["parameters"]["Full"];
|
||
};
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
202: components["responses"]["ScanStarted"];
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
404: components["responses"]["LibraryNotFound"];
|
||
/** @description A scan is already running (`scan_running`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getCoversJob: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The job. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["CoversJobStatus"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
startCoversJob: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description `true` searches every album again, also those that have a good cover. `false` when absent. */
|
||
refresh?: boolean;
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The job was started in the background. */
|
||
202: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
/** @enum {string} */
|
||
status: "started";
|
||
};
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description The job is already running (`covers_job_running`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The albums could not be counted (`internal`). */
|
||
500: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
stopCoversJob: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Done, also when no job was running. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
getArtistImagesJob: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The job. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ArtistJobStatus"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
startArtistImagesJob: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description `true` searches every artist again, also those with a good answer. `false` when absent. */
|
||
refresh?: boolean;
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The job was started in the background. */
|
||
202: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
/** @enum {string} */
|
||
status: "started";
|
||
};
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description The job is already running (`artist_images_job_running`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The artists could not be counted (`internal`). */
|
||
500: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
stopArtistImagesJob: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Done, also when no job was running. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
getDescriptionsJob: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The job. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ArtistJobStatus"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
startDescriptionsJob: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description `true` reads every artist again, also those with a good answer. `false` when absent. */
|
||
refresh?: boolean;
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The job was started in the background. */
|
||
202: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
/** @enum {string} */
|
||
status: "started";
|
||
};
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description The job is already running (`descriptions_job_running`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The artists could not be counted (`internal`). */
|
||
500: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
stopDescriptionsJob: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Done, also when no job was running. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
listDuplicates: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of groups, in a fixed order (by title). */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["DuplicatesPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
getDuplicatesCheck: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The job. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["DuplicatesCheckStatus"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
startDuplicatesCheck: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description `true` reads every file again, also those that have a fingerprint. `false` when absent. */
|
||
refresh?: boolean;
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The check was started in the background. */
|
||
202: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
/** @enum {string} */
|
||
status: "started";
|
||
};
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description The check is already running (`duplicates_check_running`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The groups could not be worked out (`internal`). */
|
||
500: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
stopDuplicatesCheck: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Done, also when no check was running. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
cleanDuplicates: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["CleanDuplicates"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The extra copies were removed. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["DuplicatesCleaned"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description A track that was named does not exist (`track_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/**
|
||
* @description Deleting is not turned on (`deletion_disabled`), a scan is running (`scan_running`), a file is not what the last
|
||
* scan saw (`duplicate_changed`), or the music folder cannot be written to (`library_read_only`).
|
||
*/
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getScanStatus: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The current state. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ScanStatus"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
scanAll: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description `true` reads every file again, not only the new or changed ones. Only `true` and `false` are accepted. */
|
||
full?: components["parameters"]["Full"];
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
202: components["responses"]["ScanStarted"];
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description A scan is already running (`scan_running`), or there is no library yet (`no_libraries`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
listArtists: {
|
||
parameters: {
|
||
query?: {
|
||
/**
|
||
* @description Case- and accent-insensitive substring of the name or title: `bjork`, `BJORK` and `BJÖRK` all
|
||
* find `Björk`, and `strasse` finds `Straße`. At most 200 characters.
|
||
*/
|
||
q?: components["parameters"]["Q"];
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
/** @description Only items with a playable file in this library. */
|
||
library_id?: components["parameters"]["LibraryId"];
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of artists. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ArtistPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
getArtist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The artist. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Artist"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/**
|
||
* @description No such artist (`artist_not_found`). An artist with nothing to play is not found either,
|
||
* unless a provider named it as similar to another artist: those can be shown, with
|
||
* `track_count` and `album_count` of 0, but they are never part of the lists.
|
||
*/
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getSimilarArtists: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description How many to return. 20 when absent or 0; values above 50 are lowered to 50, the most that is kept. */
|
||
limit?: number;
|
||
};
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The similar artists. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SimilarArtists"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such artist (`artist_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getArtistTags: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description One entry per provider. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ArtistTags"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such artist (`artist_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
discover: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description An artist id to start from. Repeat up to 5 times. Without it, your listening is used if you allowed that. */
|
||
seed?: number[];
|
||
/** @description How many suggestions to return. 20 when absent or 0; values above 30 are lowered to 30. */
|
||
limit?: number;
|
||
/** @description `true` keeps only artists you have, `false` only artists you do not. Absent keeps both. */
|
||
in_library?: boolean;
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The suggestions, best first. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Discover"];
|
||
};
|
||
};
|
||
/** @description A seed that is not an artist, too many seeds, a bad `limit` or `in_library` (`invalid_input`), or no seed and no permission to use your listening (`seed_required`). */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description You already have a Discover running or waiting for its turn, or the server was too busy to give it one in 30 seconds (`discover_busy`). Ask again after `Retry-After` seconds. */
|
||
429: {
|
||
headers: {
|
||
/** @description Seconds to wait before asking again. */
|
||
"Retry-After"?: number;
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
listDismissed: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of artists. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["MarkedPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
dismissArtist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Done, also when it was already dismissed. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such artist (`artist_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
undismissArtist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Done, also when it was not dismissed. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such artist (`artist_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
listMixes: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The mixes. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["MixList"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
getMix: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Another mix of the same kind, from 0 (the mix of the day) up. */
|
||
variant?: number;
|
||
};
|
||
header?: never;
|
||
path: {
|
||
/** @description `favourites`, `rediscover`, `unheard` or `genre:<name>` (percent-encoded). */
|
||
id: components["parameters"]["MixId"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The mix. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["MixWithTracks"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["MixNotFound"];
|
||
};
|
||
};
|
||
saveMix: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description `favourites`, `rediscover`, `unheard` or `genre:<name>` (percent-encoded). */
|
||
id: components["parameters"]["MixId"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: {
|
||
content: {
|
||
"application/json": components["schemas"]["SaveMix"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The playlist. */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Playlist"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["MixNotFound"];
|
||
409: components["responses"]["PlaylistLimit"];
|
||
/** @description The mix has no songs to save (`mix_empty`). */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
listGenres: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The genres. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["GenreList"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
listSmartPlaylists: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of smart playlists. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SmartPlaylistPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
createSmartPlaylist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["CreateSmartPlaylist"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The smart playlist. */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SmartPlaylist"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description A user can have 200 smart playlists (`limit_reached`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
previewSmartPlaylist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["PreviewSmartPlaylist"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The songs. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SmartTracks"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
listSuggestedSmartPlaylists: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The suggested smart playlists. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SuggestedSmartPlaylistList"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
getSuggestedSmartPlaylistTracks: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Other songs for the random order, from 0 (the songs of the day) up. */
|
||
variant?: number;
|
||
};
|
||
header?: never;
|
||
path: {
|
||
/** @description A key from `GET /smart-playlists/suggested`. */
|
||
key: components["parameters"]["SuggestedKey"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The songs. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SmartTracks"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["SuggestedNotFound"];
|
||
};
|
||
};
|
||
getSuggestedSmartPlaylistCovers: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description The variant that is on screen, from 0 (the songs of the day) up. */
|
||
variant?: number;
|
||
};
|
||
header?: never;
|
||
path: {
|
||
/** @description A key from `GET /smart-playlists/suggested`. */
|
||
key: components["parameters"]["SuggestedKey"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The albums. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SmartCovers"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["SuggestedNotFound"];
|
||
};
|
||
};
|
||
saveSuggestedSmartPlaylist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description A key from `GET /smart-playlists/suggested`. */
|
||
key: components["parameters"]["SuggestedKey"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: {
|
||
content: {
|
||
"application/json": components["schemas"]["SaveSmartPlaylist"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The playlist. */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Playlist"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["SuggestedNotFound"];
|
||
409: components["responses"]["PlaylistLimit"];
|
||
/** @description The rules give no songs to save (`smart_playlist_empty`). */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getSmartPlaylist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The smart playlist. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SmartPlaylist"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["SmartPlaylistNotFound"];
|
||
};
|
||
};
|
||
deleteSmartPlaylist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Deleted. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["SmartPlaylistNotFound"];
|
||
};
|
||
};
|
||
updateSmartPlaylist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["UpdateSmartPlaylist"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The smart playlist as it is now. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SmartPlaylist"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["SmartPlaylistNotFound"];
|
||
};
|
||
};
|
||
getSmartPlaylistTracks: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Other songs for the random order, from 0 (the songs of the day) up. */
|
||
variant?: number;
|
||
};
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The songs. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SmartTracks"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["SmartPlaylistNotFound"];
|
||
};
|
||
};
|
||
getSmartPlaylistCovers: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description The variant that is on screen, from 0 (the songs of the day) up. */
|
||
variant?: number;
|
||
};
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The albums. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SmartCovers"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["SmartPlaylistNotFound"];
|
||
};
|
||
};
|
||
saveSmartPlaylist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: {
|
||
content: {
|
||
"application/json": components["schemas"]["SaveSmartPlaylist"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The playlist. */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Playlist"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["SmartPlaylistNotFound"];
|
||
409: components["responses"]["PlaylistLimit"];
|
||
/** @description The rules give no songs to save (`smart_playlist_empty`). */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
listPlaylists: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of playlists. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["PlaylistPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
createPlaylist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["CreatePlaylist"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The playlist. */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Playlist"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
409: components["responses"]["PlaylistLimit"];
|
||
};
|
||
};
|
||
getPlaylist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The playlist. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Playlist"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["PlaylistNotFound"];
|
||
};
|
||
};
|
||
deletePlaylist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Deleted. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["PlaylistNotFound"];
|
||
};
|
||
};
|
||
updatePlaylist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["UpdatePlaylist"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The playlist as it is now. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Playlist"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["PlaylistNotFound"];
|
||
};
|
||
};
|
||
getNamingStatus: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The status. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
auto: boolean;
|
||
};
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
suggestPlaylistName: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: {
|
||
content: {
|
||
"application/json": components["schemas"]["SuggestName"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description A name and a line of description. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["NameSuggestion"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["PlaylistNotFound"];
|
||
};
|
||
};
|
||
suggestMixName: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description `favourites`, `rediscover`, `unheard` or `genre:<name>` (percent-encoded). */
|
||
id: components["parameters"]["MixId"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: {
|
||
content: {
|
||
"application/json": components["schemas"]["SuggestName"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description A name and a line of description. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["NameSuggestion"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["MixNotFound"];
|
||
};
|
||
};
|
||
suggestSmartPlaylistName: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: {
|
||
content: {
|
||
"application/json": components["schemas"]["SuggestName"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description A name and a line of description. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["NameSuggestion"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["SmartPlaylistNotFound"];
|
||
};
|
||
};
|
||
listPlaylistTracks: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
};
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of items. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["PlaylistItemPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["PlaylistNotFound"];
|
||
};
|
||
};
|
||
addPlaylistTracks: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["AddPlaylistTracks"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The playlist as it is now. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Playlist"];
|
||
};
|
||
};
|
||
/** @description The request is malformed, or `position` is beyond the end (`invalid_position`). */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
404: components["responses"]["PlaylistNotFound"];
|
||
409: components["responses"]["PlaylistLimit"];
|
||
/** @description One of the tracks does not exist (`track_not_found`). */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
removePlaylistItem: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
/** @description The `id` of the item, not of the track. */
|
||
item: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Removed. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such playlist (`playlist_not_found`) or no such item in it (`item_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
movePlaylistItem: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
/** @description The `id` of the item, not of the track. */
|
||
item: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["MovePlaylistItem"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Moved. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description The request is malformed, or `position` is beyond the end (`invalid_position`). */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such playlist (`playlist_not_found`) or no such item in it (`item_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
listWishlist: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of artists. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["MarkedPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
addToWishlist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Done, also when it was already there. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such artist (`artist_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
removeFromWishlist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Done, also when it was not there. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such artist (`artist_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getMyTaste: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description How many artists to return. 20 when absent or 0; values above 50 are lowered to 50. It does not limit `tags`. */
|
||
limit?: number;
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Your taste. Both lists are empty until you have listened to something. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Taste"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
getMySuggestions: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description How many artists in each list. 20 when absent or 0; values above 50 are lowered to 50. */
|
||
limit?: number;
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The suggestions. Both lists are empty until you have listened to something. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ListeningSuggestions"];
|
||
};
|
||
};
|
||
/** @description A negative limit (`invalid_input`), or Discover is not allowed to start from your listening (`listening_not_allowed`). */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
wishArtistFromSuggestions: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": {
|
||
name: string;
|
||
};
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The artist is on your wishlist. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
artist_id: number;
|
||
};
|
||
};
|
||
};
|
||
/** @description The body is not valid (`invalid_input`), or Discover is not allowed to start from your listening (`listening_not_allowed`). */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description You have not played an artist with this name (`artist_not_played`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getMySettings: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Your settings. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["UserSettings"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
updateMySettings: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["UpdateUserSettings"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Your settings as they are now. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["UserSettings"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
getMyMastodon: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Your account, or `connected` false when there is none. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["MastodonAccount"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
connectMyMastodon: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["ConnectMastodon"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The account that is now connected. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["MastodonAccount"];
|
||
};
|
||
};
|
||
/** @description The body is malformed (`invalid_input`), the instance is not a domain name on https (`invalid_instance`) or the token is empty or too long (`invalid_token`). */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description The instance refused the token (`mastodon_refused`). */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The instance could not be reached, or did not answer like Mastodon (`mastodon_unreachable`). */
|
||
502: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
disconnectMyMastodon: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Disconnected. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
listMySpotifyImports: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of imports. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SpotifyImportPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
importMySpotify: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"multipart/form-data": {
|
||
/** @description The zip of the export, or its JSON files. */
|
||
files: string[];
|
||
};
|
||
};
|
||
};
|
||
responses: {
|
||
/**
|
||
* @description What the import did. It is also kept (`GET /me/import/spotify`); if keeping it failed the report is still
|
||
* sent, with `id` 0.
|
||
*/
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SpotifyImportReport"];
|
||
};
|
||
};
|
||
/** @description No files were sent (`invalid_input`), none of them holds a history or playlists of Spotify (`no_spotify_data`) or one is damaged or cut short (`unreadable_file`). */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description An import of yours is still running (`import_running`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The files are larger than 512 MB, or hold more than can be imported once inflated (`too_large`). */
|
||
413: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
listLidarrRequests: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
/** @description Only the requests that are `waiting` or `arrived`. */
|
||
status?: "waiting" | "arrived";
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of requests. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["LidarrRequestPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
getArtistInLidarr: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Whether Lidarr has the artist. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ArtistInLidarr"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such artist (`artist_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
sendArtistToLidarr: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The artist is in Lidarr. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
/**
|
||
* @description `added` now, or `already_added` when Lidarr had it.
|
||
* @enum {string}
|
||
*/
|
||
status: "added" | "already_added";
|
||
};
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description No such artist (`artist_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The provider is switched off (`lidarr_disabled`), or has no address or key, or the profiles and the folder were not chosen (`lidarr_not_configured`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The artist has no MusicBrainz id (`no_musicbrainz_id`), Lidarr does not know the id (`lidarr_unknown_artist`), or it refused the artist (`lidarr_rejected`, with its reason). */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Lidarr refused the key (`lidarr_key_refused`), or could not be asked or did not answer in time (`lidarr_unavailable`; the artist may have been added). */
|
||
502: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getArtistDescription: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The description, or `null` with the status that says why. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ArtistDescription"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such artist (`artist_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getArtistImage: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description `small` (300 pixels at most on the longest side) or `large` (1000). Large when absent. */
|
||
size?: "small" | "large";
|
||
};
|
||
header?: {
|
||
"If-None-Match"?: string;
|
||
Range?: string;
|
||
};
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The picture. */
|
||
200: {
|
||
headers: {
|
||
ETag: components["headers"]["ETag"];
|
||
"Cache-Control": components["headers"]["CacheControl"];
|
||
"Content-Length": components["headers"]["ContentLength"];
|
||
"Last-Modified": components["headers"]["LastModified"];
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"image/jpeg": string;
|
||
};
|
||
};
|
||
/** @description The requested byte range of the picture. */
|
||
206: {
|
||
headers: {
|
||
"Content-Range"?: string;
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"image/jpeg": string;
|
||
};
|
||
};
|
||
/** @description Not modified since the `ETag` sent. */
|
||
304: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/**
|
||
* @description No such artist (`artist_not_found`), no free picture of it (`image_not_found`), the
|
||
* provider is off (`provider_disabled`), or the artist has no MusicBrainz id
|
||
* (`no_musicbrainz_id`).
|
||
*/
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The picture provider could not be reached (`provider_unavailable`). Try again later. */
|
||
502: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
headArtistImage: {
|
||
parameters: {
|
||
query?: {
|
||
size?: "small" | "large";
|
||
};
|
||
header?: {
|
||
"If-None-Match"?: string;
|
||
};
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Headers of the picture. */
|
||
200: {
|
||
headers: {
|
||
ETag: components["headers"]["ETag"];
|
||
"Cache-Control": components["headers"]["CacheControl"];
|
||
"Content-Length": components["headers"]["ContentLength"];
|
||
"Last-Modified": components["headers"]["LastModified"];
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description Not modified since the `ETag` sent. */
|
||
304: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such artist, no free picture, the provider is off or the artist has no MusicBrainz id. */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description The picture provider could not be reached. */
|
||
502: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
};
|
||
};
|
||
getArtistImageCredit: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The credit. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["PictureCredit"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such artist (`artist_not_found`), no free picture (`image_not_found`), the provider is off (`provider_disabled`) or the artist has no MusicBrainz id (`no_musicbrainz_id`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The picture provider could not be reached (`provider_unavailable`). */
|
||
502: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
listAlbums: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description `title` (the default) or `recent`. Anything else is `invalid_input`. */
|
||
sort?: "title" | "recent";
|
||
/**
|
||
* @description Case- and accent-insensitive substring of the name or title: `bjork`, `BJORK` and `BJÖRK` all
|
||
* find `Björk`, and `strasse` finds `Straße`. At most 200 characters.
|
||
*/
|
||
q?: components["parameters"]["Q"];
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
/** @description Only items with a playable file in this library. */
|
||
library_id?: components["parameters"]["LibraryId"];
|
||
artist_id?: components["parameters"]["ArtistId"];
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of albums. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["AlbumPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
getAlbum: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The album. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Album"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such album, or nothing of it can be played (`album_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getAlbumCover: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description `small` (300 pixels at most on the longest side) or `large` (1000). Large when absent. Never enlarged: a small picture stays as it is. */
|
||
size?: "small" | "large";
|
||
};
|
||
header?: {
|
||
"If-None-Match"?: string;
|
||
Range?: string;
|
||
};
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The cover. */
|
||
200: {
|
||
headers: {
|
||
ETag: components["headers"]["ETag"];
|
||
"Cache-Control": components["headers"]["CacheControl"];
|
||
"Content-Length": components["headers"]["ContentLength"];
|
||
"Last-Modified": components["headers"]["LastModified"];
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"image/jpeg": string;
|
||
};
|
||
};
|
||
/** @description The requested byte range of the cover. */
|
||
206: {
|
||
headers: {
|
||
"Content-Range"?: string;
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"image/jpeg": string;
|
||
};
|
||
};
|
||
/** @description Not modified since the `ETag` sent. */
|
||
304: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such album (`album_not_found`), or it has no cover (`cover_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The cover provider could not be reached (`provider_unavailable`). Try again later. */
|
||
502: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/**
|
||
* @description None of the album's files or folders could be read, for example because the disk is not
|
||
* mounted (`files_unreadable`). That says nothing about whether there is a picture, so it is
|
||
* not remembered as "no cover" and nothing already built is touched. Try again later.
|
||
*/
|
||
503: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
headAlbumCover: {
|
||
parameters: {
|
||
query?: {
|
||
size?: "small" | "large";
|
||
};
|
||
header?: {
|
||
"If-None-Match"?: string;
|
||
};
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Headers of the cover. */
|
||
200: {
|
||
headers: {
|
||
ETag: components["headers"]["ETag"];
|
||
"Cache-Control": components["headers"]["CacheControl"];
|
||
"Content-Length": components["headers"]["ContentLength"];
|
||
"Last-Modified": components["headers"]["LastModified"];
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description Not modified since the `ETag` sent. */
|
||
304: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such album, or it has no cover. */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description The cover provider could not be reached. */
|
||
502: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description None of the album's files could be read. */
|
||
503: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
};
|
||
};
|
||
listTracks: {
|
||
parameters: {
|
||
query?: {
|
||
/**
|
||
* @description Case- and accent-insensitive substring of the name or title: `bjork`, `BJORK` and `BJÖRK` all
|
||
* find `Björk`, and `strasse` finds `Straße`. At most 200 characters.
|
||
*/
|
||
q?: components["parameters"]["Q"];
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
/** @description Only items with a playable file in this library. */
|
||
library_id?: components["parameters"]["LibraryId"];
|
||
artist_id?: components["parameters"]["ArtistId"];
|
||
album_id?: components["parameters"]["AlbumId"];
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of tracks. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["TrackPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
getTrack: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The track. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Track"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such track, or it has no playable file (`track_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getTrackPeaks: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The shape. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Peaks"];
|
||
};
|
||
};
|
||
/** @description The shape is being worked out. Ask again after `Retry-After` seconds. */
|
||
202: {
|
||
headers: {
|
||
/** @description Seconds to wait. */
|
||
"Retry-After"?: number;
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
/** @enum {string} */
|
||
status: "working";
|
||
};
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such track (`track_not_found`), its file is not available (`file_missing`), or its shape cannot be worked out (`waveform_unavailable`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
streamTrack: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: {
|
||
/** @description A byte range, for example `bytes=0-99`. */
|
||
Range?: string;
|
||
"If-Modified-Since"?: string;
|
||
"If-Unmodified-Since"?: string;
|
||
};
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The whole file. */
|
||
200: {
|
||
headers: {
|
||
"Accept-Ranges": components["headers"]["AcceptRanges"];
|
||
"Content-Length": components["headers"]["ContentLength"];
|
||
"Last-Modified": components["headers"]["LastModified"];
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"audio/mpeg": string;
|
||
"audio/flac": string;
|
||
};
|
||
};
|
||
/**
|
||
* @description The requested byte range. Several ranges in one request are answered as
|
||
* `multipart/byteranges`.
|
||
*/
|
||
206: {
|
||
headers: {
|
||
/** @description The range sent and the size of the file, for example `bytes 0-99/40635`. Absent for a multipart answer. */
|
||
"Content-Range"?: string;
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"audio/mpeg": string;
|
||
"audio/flac": string;
|
||
"multipart/byteranges": string;
|
||
};
|
||
};
|
||
/** @description Not modified since `If-Modified-Since`. */
|
||
304: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such track (`track_not_found`), or its file is not available (`file_missing`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description `If-Unmodified-Since` names a date before the last change of the file. */
|
||
412: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description The range cannot be satisfied. */
|
||
416: {
|
||
headers: {
|
||
/** @description `bytes *\/<size of the file>`. */
|
||
"Content-Range"?: string;
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
};
|
||
};
|
||
headTrackStream: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: {
|
||
Range?: string;
|
||
"If-Modified-Since"?: string;
|
||
"If-Unmodified-Since"?: string;
|
||
};
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Headers of the whole file. */
|
||
200: {
|
||
headers: {
|
||
"Accept-Ranges": components["headers"]["AcceptRanges"];
|
||
"Content-Length": components["headers"]["ContentLength"];
|
||
"Last-Modified": components["headers"]["LastModified"];
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description Headers of the requested range. */
|
||
206: {
|
||
headers: {
|
||
"Content-Range"?: string;
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description Not modified since `If-Modified-Since`. */
|
||
304: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such track or file. */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description `If-Unmodified-Since` names a date before the last change of the file. */
|
||
412: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description The range cannot be satisfied. */
|
||
416: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
};
|
||
};
|
||
listProviders: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The providers, in a fixed order. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
providers: components["schemas"]["Provider"][];
|
||
};
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
getClaudeUsage: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description How many days back, from 1 to 365. 30 when absent or 0. */
|
||
days?: number;
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The totals and the days. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ClaudeUsage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
getLidarrOptions: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description What Lidarr offers. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["LidarrOffers"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description Lidarr has no address or no API key yet (`lidarr_not_configured`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Lidarr refused the key (`lidarr_key_refused`), or could not be asked or answered something unexpected (`lidarr_unavailable`). */
|
||
502: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
updateProvider: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
name: "lastfm" | "musicbrainz" | "wikipedia" | "commons" | "coverartarchive" | "lidarr" | "anthropic";
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["ProviderUpdate"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The provider as it is now. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Provider"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description No such provider (`provider_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
testProvider: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
name: "lastfm" | "musicbrainz" | "wikipedia" | "commons" | "coverartarchive" | "lidarr" | "anthropic";
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The outcome of the check. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ProviderTest"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description No such provider (`provider_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
purgeProviderData: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
name: "lastfm" | "musicbrainz" | "wikipedia" | "commons" | "coverartarchive" | "lidarr" | "anthropic";
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description What was removed. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ProviderPurge"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description No such provider (`provider_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
listListenMonths: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description An IANA time zone name, like `Europe/Rome`. Anything else is `invalid_input`. */
|
||
tz?: string;
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The months. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
months: {
|
||
year: number;
|
||
month: number;
|
||
plays: number;
|
||
}[];
|
||
};
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
listListens: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
/** @description Send `true` to list only the events that count as a listen. */
|
||
counted?: true;
|
||
/** @description Only the events from this moment (included), like `2025-03-01T00:00:00Z`. */
|
||
from?: string;
|
||
/** @description Only the events before this moment (excluded). It must be after `from` when both are sent (`invalid_input`). */
|
||
until?: string;
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of events. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ListenPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
recordListen: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["Listen"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Already recorded (same `idempotency_key`). */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ListenResult"];
|
||
};
|
||
};
|
||
/** @description Recorded. */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ListenResult"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such track (`track_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getFederation: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The settings and the friends, oldest first. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Federation"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
updateFederation: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["FederationUpdate"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The settings as they are now. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Federation"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
createFederationInvite: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The invite. */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["FederationInvite"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description Federation is off (`federation_off`) or this server has no address yet (`address_required`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
useFederationInvite: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["FederationUseInvite"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description The new friend, waiting for approval. */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["FederationFriend"];
|
||
};
|
||
};
|
||
/** @description Malformed body (`invalid_input`) or not an invite of a Sonda server (`invalid_invite`). */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description Federation is off (`federation_off`), no address (`address_required`) or the server is already a friend (`already_friends`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The other server turned the invite down: used, expired, or federation off there (`invite_refused`). */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The other server asked to slow down (`too_many_requests`). */
|
||
429: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The other server could not be reached or did not answer as a Sonda server (`friend_unreachable`), or its key is not the one in the invite (`key_mismatch`). */
|
||
502: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
removeFederationFriend: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Removed. */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description No such friend (`friend_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
approveFederationFriend: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The friend, now active. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["FederationFriend"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description No such friend (`friend_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The friend is not waiting for approval (`not_waiting`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
peerPair: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["PeerPairRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description This server's name, address and public key. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["PeerPairReply"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
/** @description The code is unknown, used or expired (`invalid_invite`). */
|
||
403: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Federation is off here (`not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description This key is already a friend (`already_friends`). */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Too many attempts (`too_many_requests`). */
|
||
429: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
checkFederationFriend: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The friend, active when it answered. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["FederationFriend"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
/** @description No such friend (`friend_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/**
|
||
* @description Federation is off (`federation_off`), the friend is not waiting for the other admin (`not_waiting`), the other
|
||
* admin has not approved yet (`not_approved`), or the other server does not take this one for a friend any more
|
||
* (`friend_gone`).
|
||
*/
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The other server could not be reached or did not answer as a Sonda server (`friend_unreachable`). */
|
||
502: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
listFederationRequests: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The requests. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
requests: components["schemas"]["FederationRequest"][];
|
||
};
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
403: components["responses"]["AdminRequired"];
|
||
};
|
||
};
|
||
peerInfo: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The name and the number of shared libraries. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["PeerInfo"];
|
||
};
|
||
};
|
||
401: components["responses"]["FriendUnauthorized"];
|
||
403: components["responses"]["FriendNotApproved"];
|
||
404: components["responses"]["FederationOff"];
|
||
};
|
||
};
|
||
peerListArtists: {
|
||
parameters: {
|
||
query?: {
|
||
/**
|
||
* @description Case- and accent-insensitive substring of the name or title: `bjork`, `BJORK` and `BJÖRK` all
|
||
* find `Björk`, and `strasse` finds `Straße`. At most 200 characters.
|
||
*/
|
||
q?: components["parameters"]["Q"];
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of artists. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ArtistPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["FriendUnauthorized"];
|
||
403: components["responses"]["FriendNotApproved"];
|
||
404: components["responses"]["FederationOff"];
|
||
};
|
||
};
|
||
peerGetArtist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The artist. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Artist"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["FriendUnauthorized"];
|
||
403: components["responses"]["FriendNotApproved"];
|
||
/** @description No such artist among the shared libraries (`artist_not_found`), or federation is off (`not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
peerListAlbums: {
|
||
parameters: {
|
||
query?: {
|
||
/**
|
||
* @description Case- and accent-insensitive substring of the name or title: `bjork`, `BJORK` and `BJÖRK` all
|
||
* find `Björk`, and `strasse` finds `Straße`. At most 200 characters.
|
||
*/
|
||
q?: components["parameters"]["Q"];
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
artist_id?: components["parameters"]["ArtistId"];
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of albums. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["AlbumPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["FriendUnauthorized"];
|
||
403: components["responses"]["FriendNotApproved"];
|
||
404: components["responses"]["FederationOff"];
|
||
};
|
||
};
|
||
peerGetAlbum: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The album. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Album"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["FriendUnauthorized"];
|
||
403: components["responses"]["FriendNotApproved"];
|
||
/** @description No such album among the shared libraries (`album_not_found`), or federation is off (`not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
peerGetAlbumCover: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description `small` or `large`. Large when absent. */
|
||
size?: "small" | "large";
|
||
};
|
||
header?: {
|
||
"If-None-Match"?: string;
|
||
};
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The cover. */
|
||
200: {
|
||
headers: {
|
||
ETag: components["headers"]["ETag"];
|
||
"Cache-Control": components["headers"]["CacheControl"];
|
||
"Content-Length": components["headers"]["ContentLength"];
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"image/jpeg": string;
|
||
};
|
||
};
|
||
/** @description Not modified since `If-None-Match`. */
|
||
304: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["FriendUnauthorized"];
|
||
403: components["responses"]["FriendNotApproved"];
|
||
/** @description No such album among the shared libraries (`album_not_found`), no cover built (`cover_not_found`), or federation is off (`not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
peerListTracks: {
|
||
parameters: {
|
||
query?: {
|
||
/**
|
||
* @description Case- and accent-insensitive substring of the name or title: `bjork`, `BJORK` and `BJÖRK` all
|
||
* find `Björk`, and `strasse` finds `Straße`. At most 200 characters.
|
||
*/
|
||
q?: components["parameters"]["Q"];
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
artist_id?: components["parameters"]["ArtistId"];
|
||
album_id?: components["parameters"]["AlbumId"];
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of tracks. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["TrackPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["FriendUnauthorized"];
|
||
403: components["responses"]["FriendNotApproved"];
|
||
404: components["responses"]["FederationOff"];
|
||
};
|
||
};
|
||
peerGetTrack: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The track. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Track"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["FriendUnauthorized"];
|
||
403: components["responses"]["FriendNotApproved"];
|
||
/** @description No such track among the shared libraries (`track_not_found`), or federation is off (`not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
peerGetTrackPeaks: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The shape. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Peaks"];
|
||
};
|
||
};
|
||
/** @description The shape is being worked out. Ask again after `Retry-After` seconds. */
|
||
202: {
|
||
headers: {
|
||
/** @description Seconds to wait. */
|
||
"Retry-After"?: number;
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
/** @enum {string} */
|
||
status: "working";
|
||
};
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["FriendUnauthorized"];
|
||
403: components["responses"]["FriendNotApproved"];
|
||
/** @description No such track among the shared libraries (`track_not_found`), its file is not available (`file_missing`), its shape cannot be worked out (`waveform_unavailable`), or federation is off (`not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
peerStreamTrack: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: {
|
||
/** @description A byte range, for example `bytes=0-99`. */
|
||
Range?: string;
|
||
"If-Modified-Since"?: string;
|
||
};
|
||
path: {
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The whole file. */
|
||
200: {
|
||
headers: {
|
||
"Accept-Ranges": components["headers"]["AcceptRanges"];
|
||
"Content-Length": components["headers"]["ContentLength"];
|
||
"Last-Modified": components["headers"]["LastModified"];
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"audio/mpeg": string;
|
||
"audio/flac": string;
|
||
};
|
||
};
|
||
/** @description The requested byte range. */
|
||
206: {
|
||
headers: {
|
||
/** @description The range sent and the size of the file, for example `bytes 0-99/40635`. */
|
||
"Content-Range"?: string;
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"audio/mpeg": string;
|
||
"audio/flac": string;
|
||
"multipart/byteranges": string;
|
||
};
|
||
};
|
||
/** @description Not modified since `If-Modified-Since`. */
|
||
304: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["FriendUnauthorized"];
|
||
403: components["responses"]["FriendNotApproved"];
|
||
/** @description No such track among the shared libraries (`track_not_found`), its file is not available (`file_missing`), or federation is off (`not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description The range cannot be satisfied. */
|
||
416: {
|
||
headers: {
|
||
/** @description `bytes *\/<size of the file>`. */
|
||
"Content-Range"?: string;
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description The friend already has as many streams open as allowed (`too_many_streams`). */
|
||
429: {
|
||
headers: {
|
||
/** @description Seconds to wait. */
|
||
"Retry-After"?: number;
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
listFriends: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The friends, oldest first. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
friends: components["schemas"]["FriendRef"][];
|
||
};
|
||
};
|
||
};
|
||
401: components["responses"]["Unauthorized"];
|
||
};
|
||
};
|
||
listFriendArtists: {
|
||
parameters: {
|
||
query?: {
|
||
/**
|
||
* @description Case- and accent-insensitive substring of the name or title: `bjork`, `BJORK` and `BJÖRK` all
|
||
* find `Björk`, and `strasse` finds `Straße`. At most 200 characters.
|
||
*/
|
||
q?: components["parameters"]["Q"];
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
};
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of artists. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ArtistPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such friend, or it is not active (`friend_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
409: components["responses"]["FriendGone"];
|
||
429: components["responses"]["FriendBusy"];
|
||
502: components["responses"]["FriendUnreachable"];
|
||
};
|
||
};
|
||
getFriendArtist: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The artist. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Artist"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such friend, or it is not active (`friend_not_found`) or the friend has no such artist (`artist_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
409: components["responses"]["FriendGone"];
|
||
429: components["responses"]["FriendBusy"];
|
||
502: components["responses"]["FriendUnreachable"];
|
||
};
|
||
};
|
||
listFriendAlbums: {
|
||
parameters: {
|
||
query?: {
|
||
/**
|
||
* @description Case- and accent-insensitive substring of the name or title: `bjork`, `BJORK` and `BJÖRK` all
|
||
* find `Björk`, and `strasse` finds `Straße`. At most 200 characters.
|
||
*/
|
||
q?: components["parameters"]["Q"];
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
artist_id?: components["parameters"]["ArtistId"];
|
||
};
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of albums. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["AlbumPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such friend, or it is not active (`friend_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
409: components["responses"]["FriendGone"];
|
||
429: components["responses"]["FriendBusy"];
|
||
502: components["responses"]["FriendUnreachable"];
|
||
};
|
||
};
|
||
getFriendAlbum: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The album. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Album"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such friend, or it is not active (`friend_not_found`) or the friend has no such album (`album_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
409: components["responses"]["FriendGone"];
|
||
429: components["responses"]["FriendBusy"];
|
||
502: components["responses"]["FriendUnreachable"];
|
||
};
|
||
};
|
||
listFriendTracks: {
|
||
parameters: {
|
||
query?: {
|
||
/**
|
||
* @description Case- and accent-insensitive substring of the name or title: `bjork`, `BJORK` and `BJÖRK` all
|
||
* find `Björk`, and `strasse` finds `Straße`. At most 200 characters.
|
||
*/
|
||
q?: components["parameters"]["Q"];
|
||
/** @description Page size. 50 when absent or 0; values above 200 are lowered to 200. */
|
||
limit?: components["parameters"]["Limit"];
|
||
offset?: components["parameters"]["Offset"];
|
||
artist_id?: components["parameters"]["ArtistId"];
|
||
album_id?: components["parameters"]["AlbumId"];
|
||
};
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description A page of tracks. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["TrackPage"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such friend, or it is not active (`friend_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
409: components["responses"]["FriendGone"];
|
||
429: components["responses"]["FriendBusy"];
|
||
502: components["responses"]["FriendUnreachable"];
|
||
};
|
||
};
|
||
getFriendTrack: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The track. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Track"];
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such friend, or it is not active (`friend_not_found`) or the friend has no such track (`track_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
409: components["responses"]["FriendGone"];
|
||
429: components["responses"]["FriendBusy"];
|
||
502: components["responses"]["FriendUnreachable"];
|
||
};
|
||
};
|
||
getFriendTrackPeaks: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The shape. */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Peaks"];
|
||
};
|
||
};
|
||
/** @description The friend is working the shape out. Ask again after `Retry-After` seconds. */
|
||
202: {
|
||
headers: {
|
||
/** @description Seconds to wait. */
|
||
"Retry-After"?: number;
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
/** @enum {string} */
|
||
status: "working";
|
||
};
|
||
};
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such friend, or it is not active (`friend_not_found`), the friend has no such track among what it shares (`track_not_found`), or its shape cannot be worked out (`waveform_unavailable`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
409: components["responses"]["FriendGone"];
|
||
429: components["responses"]["FriendBusy"];
|
||
502: components["responses"]["FriendUnreachable"];
|
||
};
|
||
};
|
||
streamFriendTrack: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: {
|
||
/** @description A byte range, for example `bytes=0-99`. */
|
||
Range?: string;
|
||
"If-Modified-Since"?: string;
|
||
};
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The whole file. */
|
||
200: {
|
||
headers: {
|
||
"Accept-Ranges": components["headers"]["AcceptRanges"];
|
||
"Content-Length": components["headers"]["ContentLength"];
|
||
"Last-Modified": components["headers"]["LastModified"];
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"audio/mpeg": string;
|
||
"audio/flac": string;
|
||
};
|
||
};
|
||
/** @description The requested byte range. */
|
||
206: {
|
||
headers: {
|
||
/** @description The range sent and the size of the file, for example `bytes 0-99/40635`. */
|
||
"Content-Range"?: string;
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"audio/mpeg": string;
|
||
"audio/flac": string;
|
||
};
|
||
};
|
||
/** @description Not modified since `If-Modified-Since`. */
|
||
304: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such friend, or it is not active (`friend_not_found`), or the friend has no such track among what it shares (`track_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
409: components["responses"]["FriendGone"];
|
||
/** @description The range cannot be satisfied. */
|
||
416: {
|
||
headers: {
|
||
/** @description `bytes *\/<size of the file>`. */
|
||
"Content-Range"?: string;
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
429: components["responses"]["FriendBusy"];
|
||
502: components["responses"]["FriendUnreachable"];
|
||
};
|
||
};
|
||
getFriendAlbumCover: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description `small` or `large`. Large when absent. */
|
||
size?: "small" | "large";
|
||
};
|
||
header?: {
|
||
"If-None-Match"?: string;
|
||
};
|
||
path: {
|
||
/** @description The id from `GET /friends`. */
|
||
friend: number;
|
||
id: components["parameters"]["Id"];
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description The cover. */
|
||
200: {
|
||
headers: {
|
||
ETag: components["headers"]["ETag"];
|
||
"Cache-Control": components["headers"]["CacheControl"];
|
||
"Content-Length": components["headers"]["ContentLength"];
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"image/jpeg": string;
|
||
};
|
||
};
|
||
/** @description Not modified since `If-None-Match`. */
|
||
304: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
400: components["responses"]["InvalidInput"];
|
||
401: components["responses"]["Unauthorized"];
|
||
/** @description No such friend, or it is not active (`friend_not_found`), or no such album or no cover built there yet (`cover_not_found`). */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
409: components["responses"]["FriendGone"];
|
||
429: components["responses"]["FriendBusy"];
|
||
502: components["responses"]["FriendUnreachable"];
|
||
};
|
||
};
|
||
}
|