{
  "swagger": "2.0",
  "info": {
    "title": "evey/v1/library.proto",
    "version": "version not set"
  },
  "tags": [
    {
      "name": "LibraryService"
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/api/v1/libraries": {
      "get": {
        "operationId": "LibraryService_ListLibraries",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListLibrariesResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "LibraryService"
        ]
      },
      "post": {
        "operationId": "LibraryService_CreateLibrary",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1Library"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1CreateLibraryRequest"
            }
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    },
    "/api/v1/libraries/{id}": {
      "get": {
        "operationId": "LibraryService_GetLibrary",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1Library"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      },
      "delete": {
        "operationId": "LibraryService_DeleteLibrary",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1DeleteLibraryResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      },
      "patch": {
        "operationId": "LibraryService_UpdateLibrary",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1Library"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/LibraryServiceUpdateLibraryBody"
            }
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    },
    "/api/v1/libraries/{id}/scan": {
      "post": {
        "operationId": "LibraryService_ScanLibrary",
        "responses": {
          "200": {
            "description": "A successful response.(streaming responses)",
            "schema": {
              "type": "object",
              "properties": {
                "result": {
                  "$ref": "#/definitions/v1ScanProgress"
                },
                "error": {
                  "$ref": "#/definitions/rpcStatus"
                }
              },
              "title": "Stream result of v1ScanProgress"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "forceRefresh",
            "in": "query",
            "required": false,
            "type": "boolean"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    },
    "/api/v1/libraries/{id}/schedule": {
      "get": {
        "operationId": "LibraryService_GetLibrarySchedule",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1GetLibraryScheduleResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      },
      "delete": {
        "operationId": "LibraryService_DeleteLibrarySchedule",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1DeleteLibraryScheduleResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      },
      "put": {
        "operationId": "LibraryService_SetLibrarySchedule",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1LibrarySchedule"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/LibraryServiceSetLibraryScheduleBody"
            }
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    },
    "/api/v1/libraries/{libraryId}/filter-facets": {
      "get": {
        "summary": "GetLibraryFilterFacets returns the distinct stream values present across\nan entire library (video codecs, resolution tiers, audio and subtitle\nlanguages): the full set, like ListGenres, where the filter panels used to\nread them off a sample of loaded items and never offered a value the\nsample missed. Same library access and parental rules as ListMediaItems.",
        "operationId": "LibraryService_GetLibraryFilterFacets",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1GetLibraryFilterFacetsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "libraryId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "type",
            "description": "Narrows the facets to one item type, the same filter ListMediaItems takes:\na panel offers the values of the items it lists.\n\n - MEDIA_ITEM_TYPE_BOOK: Deprecated: see LIBRARY_TYPE_BOOKS.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "MEDIA_ITEM_TYPE_UNSPECIFIED",
              "MEDIA_ITEM_TYPE_MOVIE",
              "MEDIA_ITEM_TYPE_SERIES",
              "MEDIA_ITEM_TYPE_SEASON",
              "MEDIA_ITEM_TYPE_EPISODE",
              "MEDIA_ITEM_TYPE_ALBUM",
              "MEDIA_ITEM_TYPE_ARTIST",
              "MEDIA_ITEM_TYPE_TRACK",
              "MEDIA_ITEM_TYPE_PHOTO",
              "MEDIA_ITEM_TYPE_BOOK"
            ],
            "default": "MEDIA_ITEM_TYPE_UNSPECIFIED"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    },
    "/api/v1/libraries/{libraryId}/genres": {
      "get": {
        "summary": "ListGenres returns the distinct, sorted genres present across an entire\nlibrary's media (the full set, not a sample). Powers the library filter's\ngenre chips, which otherwise only saw genres from the first loaded page.",
        "operationId": "LibraryService_ListGenres",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListGenresResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "libraryId",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    },
    "/api/v1/media": {
      "get": {
        "operationId": "LibraryService_ListMediaItems",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListMediaItemsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "libraryId",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "type",
            "description": " - MEDIA_ITEM_TYPE_BOOK: Deprecated: see LIBRARY_TYPE_BOOKS.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "MEDIA_ITEM_TYPE_UNSPECIFIED",
              "MEDIA_ITEM_TYPE_MOVIE",
              "MEDIA_ITEM_TYPE_SERIES",
              "MEDIA_ITEM_TYPE_SEASON",
              "MEDIA_ITEM_TYPE_EPISODE",
              "MEDIA_ITEM_TYPE_ALBUM",
              "MEDIA_ITEM_TYPE_ARTIST",
              "MEDIA_ITEM_TYPE_TRACK",
              "MEDIA_ITEM_TYPE_PHOTO",
              "MEDIA_ITEM_TYPE_BOOK"
            ],
            "default": "MEDIA_ITEM_TYPE_UNSPECIFIED"
          },
          {
            "name": "genre",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "parentId",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortField",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "MEDIA_SORT_FIELD_UNSPECIFIED",
              "MEDIA_SORT_FIELD_TITLE",
              "MEDIA_SORT_FIELD_YEAR",
              "MEDIA_SORT_FIELD_RATING",
              "MEDIA_SORT_FIELD_DATE_ADDED",
              "MEDIA_SORT_FIELD_PREMIERE_DATE"
            ],
            "default": "MEDIA_SORT_FIELD_UNSPECIFIED"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "SORT_ORDER_UNSPECIFIED",
              "SORT_ORDER_ASC",
              "SORT_ORDER_DESC"
            ],
            "default": "SORT_ORDER_UNSPECIFIED"
          },
          {
            "name": "pagination.page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pagination.pageSize",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pagination.cursor",
            "description": "Opaque keyset cursor returned by a previous PaginationResponse. When\nset, server uses keyset pagination instead of offset and ignores\n`page` - guarantees no skips/duplicates under concurrent writes.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "personId",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    },
    "/api/v1/media/filter": {
      "get": {
        "operationId": "LibraryService_FilterMediaItems",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1FilterMediaItemsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "libraryId",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "type",
            "description": " - MEDIA_ITEM_TYPE_BOOK: Deprecated: see LIBRARY_TYPE_BOOKS.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "MEDIA_ITEM_TYPE_UNSPECIFIED",
              "MEDIA_ITEM_TYPE_MOVIE",
              "MEDIA_ITEM_TYPE_SERIES",
              "MEDIA_ITEM_TYPE_SEASON",
              "MEDIA_ITEM_TYPE_EPISODE",
              "MEDIA_ITEM_TYPE_ALBUM",
              "MEDIA_ITEM_TYPE_ARTIST",
              "MEDIA_ITEM_TYPE_TRACK",
              "MEDIA_ITEM_TYPE_PHOTO",
              "MEDIA_ITEM_TYPE_BOOK"
            ],
            "default": "MEDIA_ITEM_TYPE_UNSPECIFIED"
          },
          {
            "name": "genre",
            "description": "genre: single-genre filter (kept for the free-text genre input). For\nmulti-select use `genres` below - when both are set, `genres` wins.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "yearFrom",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "yearTo",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "minRating",
            "in": "query",
            "required": false,
            "type": "number",
            "format": "double"
          },
          {
            "name": "sortField",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "MEDIA_SORT_FIELD_UNSPECIFIED",
              "MEDIA_SORT_FIELD_TITLE",
              "MEDIA_SORT_FIELD_YEAR",
              "MEDIA_SORT_FIELD_RATING",
              "MEDIA_SORT_FIELD_DATE_ADDED",
              "MEDIA_SORT_FIELD_PREMIERE_DATE"
            ],
            "default": "MEDIA_SORT_FIELD_UNSPECIFIED"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "SORT_ORDER_UNSPECIFIED",
              "SORT_ORDER_ASC",
              "SORT_ORDER_DESC"
            ],
            "default": "SORT_ORDER_UNSPECIFIED"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "genres",
            "description": "genres: OR-match on any of these genres (the filter chips). Discriminant\nserver-side over the whole library, unlike the previous client-side\nnarrowing on already-loaded items.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    },
    "/api/v1/media/search": {
      "get": {
        "operationId": "LibraryService_SearchMedia",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1SearchMediaResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "type",
            "description": " - MEDIA_ITEM_TYPE_BOOK: Deprecated: see LIBRARY_TYPE_BOOKS.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "MEDIA_ITEM_TYPE_UNSPECIFIED",
              "MEDIA_ITEM_TYPE_MOVIE",
              "MEDIA_ITEM_TYPE_SERIES",
              "MEDIA_ITEM_TYPE_SEASON",
              "MEDIA_ITEM_TYPE_EPISODE",
              "MEDIA_ITEM_TYPE_ALBUM",
              "MEDIA_ITEM_TYPE_ARTIST",
              "MEDIA_ITEM_TYPE_TRACK",
              "MEDIA_ITEM_TYPE_PHOTO",
              "MEDIA_ITEM_TYPE_BOOK"
            ],
            "default": "MEDIA_ITEM_TYPE_UNSPECIFIED"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "genre",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "yearMin",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "yearMax",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "sortField",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "MEDIA_SORT_FIELD_UNSPECIFIED",
              "MEDIA_SORT_FIELD_TITLE",
              "MEDIA_SORT_FIELD_YEAR",
              "MEDIA_SORT_FIELD_RATING",
              "MEDIA_SORT_FIELD_DATE_ADDED",
              "MEDIA_SORT_FIELD_PREMIERE_DATE"
            ],
            "default": "MEDIA_SORT_FIELD_UNSPECIFIED"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "SORT_ORDER_UNSPECIFIED",
              "SORT_ORDER_ASC",
              "SORT_ORDER_DESC"
            ],
            "default": "SORT_ORDER_UNSPECIFIED"
          },
          {
            "name": "libraryId",
            "description": "Scope the search to a single library. Empty = global. Wired by the\nlibrary page so its search box stops behaving like a client-side\nfilter on already-loaded items - the backend now actually limits\nresults to the library. Meilisearch + SQL fallback both filter on\nlibrary_id natively.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    },
    "/api/v1/media/{id}": {
      "get": {
        "operationId": "LibraryService_GetMediaItem",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1MediaItem"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    },
    "/api/v1/media/{id}/series-aggregate": {
      "get": {
        "operationId": "LibraryService_GetSeriesAggregate",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1SeriesAggregate"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    },
    "/api/v1/people/{id}": {
      "get": {
        "operationId": "LibraryService_GetPerson",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1GetPersonResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    },
    "/api/v1/public/media": {
      "get": {
        "operationId": "LibraryService_ListPublicMediaItems",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListPublicMediaItemsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "libraryId",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "type",
            "description": " - MEDIA_ITEM_TYPE_BOOK: Deprecated: see LIBRARY_TYPE_BOOKS.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "MEDIA_ITEM_TYPE_UNSPECIFIED",
              "MEDIA_ITEM_TYPE_MOVIE",
              "MEDIA_ITEM_TYPE_SERIES",
              "MEDIA_ITEM_TYPE_SEASON",
              "MEDIA_ITEM_TYPE_EPISODE",
              "MEDIA_ITEM_TYPE_ALBUM",
              "MEDIA_ITEM_TYPE_ARTIST",
              "MEDIA_ITEM_TYPE_TRACK",
              "MEDIA_ITEM_TYPE_PHOTO",
              "MEDIA_ITEM_TYPE_BOOK"
            ],
            "default": "MEDIA_ITEM_TYPE_UNSPECIFIED"
          },
          {
            "name": "pagination.page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pagination.pageSize",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pagination.cursor",
            "description": "Opaque keyset cursor returned by a previous PaginationResponse. When\nset, server uses keyset pagination instead of offset and ignores\n`page` - guarantees no skips/duplicates under concurrent writes.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    },
    "/api/v1/public/media/{id}": {
      "get": {
        "summary": "Public, non-sensitive projection of media items (id/title/type/year/poster/\noverview only - never file paths or provider ids). This is the read surface\na plugin may be granted via the `public` permission; regular users may call\nit too. Distinct from GetMediaItem/ListMediaItems, which return sensitive\nserver-side detail and are never exposed to plugin tokens.",
        "operationId": "LibraryService_GetPublicMediaItem",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1PublicMediaItem"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "LibraryService"
        ]
      }
    }
  },
  "definitions": {
    "LibraryServiceSetLibraryScheduleBody": {
      "type": "object",
      "properties": {
        "cron": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        }
      }
    },
    "LibraryServiceUpdateLibraryBody": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "paths": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "rpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "v1Artwork": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/v1ArtworkType"
        },
        "url": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "width": {
          "type": "integer",
          "format": "int32"
        },
        "height": {
          "type": "integer",
          "format": "int32"
        },
        "isSelected": {
          "type": "boolean"
        },
        "blurhash": {
          "type": "string",
          "description": "Compact (~30-char) blurhash placeholder. Empty when the source predates\nthe feature or encoding failed. Clients decode it to show a coloured\npreview while the full image is still loading (Wolt blurhash spec)."
        }
      }
    },
    "v1ArtworkType": {
      "type": "string",
      "enum": [
        "ARTWORK_TYPE_UNSPECIFIED",
        "ARTWORK_TYPE_PRIMARY",
        "ARTWORK_TYPE_BACKDROP",
        "ARTWORK_TYPE_BANNER",
        "ARTWORK_TYPE_THUMB",
        "ARTWORK_TYPE_LOGO",
        "ARTWORK_TYPE_DISC"
      ],
      "default": "ARTWORK_TYPE_UNSPECIFIED"
    },
    "v1CreateLibraryRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/v1LibraryType"
        },
        "paths": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "scanOnStartup": {
          "type": "boolean"
        },
        "realtimeMonitoring": {
          "type": "boolean"
        }
      }
    },
    "v1DeleteLibraryResponse": {
      "type": "object"
    },
    "v1DeleteLibraryScheduleResponse": {
      "type": "object"
    },
    "v1FilterMediaItemsResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1MediaItem"
          }
        },
        "total": {
          "type": "integer",
          "format": "int32"
        },
        "nextOffset": {
          "type": "integer",
          "format": "int32",
          "description": "Offset of the next page: the request's offset plus the rows the database\nreturned, BEFORE the parental pass removed any. A client that adds up the\nitems it received instead re-reads rows and, on a page the pass shortened,\nbelieves it reached the end."
        },
        "hasMore": {
          "type": "boolean",
          "description": "Whether rows remain past next_offset."
        }
      }
    },
    "v1GetLibraryFilterFacetsResponse": {
      "type": "object",
      "properties": {
        "videoCodecs": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Raw codec names as probed (\"h264\", \"hevc\"), distinct and sorted."
        },
        "audioLanguages": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Raw language tags as probed (\"fre\", \"eng\"), distinct and sorted; empty and\n\"und\" are left out."
        },
        "subtitleLanguages": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "resolutionTiers": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int32"
          },
          "description": "Distinct resolution tiers of the video streams (2160, 1440, 1080, 720,\nand 0 below 720p), width-aware like every client's badge, descending."
        }
      }
    },
    "v1GetLibraryScheduleResponse": {
      "type": "object",
      "properties": {
        "schedule": {
          "$ref": "#/definitions/v1LibrarySchedule"
        }
      }
    },
    "v1GetPersonResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "thumbUrl": {
          "type": "string"
        },
        "providerIds": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "biography": {
          "type": "string"
        },
        "birthday": {
          "type": "string"
        },
        "deathday": {
          "type": "string"
        },
        "placeOfBirth": {
          "type": "string"
        },
        "knownFor": {
          "type": "string"
        }
      }
    },
    "v1Library": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/v1LibraryType"
        },
        "paths": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "scanOnStartup": {
          "type": "boolean"
        },
        "realtimeMonitoring": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastScannedAt": {
          "type": "string",
          "format": "date-time"
        },
        "itemCount": {
          "type": "integer",
          "format": "int32",
          "description": "Number of media items in the library, as ListMediaItems' total_items\ncounts them for this library_id with no other filter (every item type,\nthe caller's parental rating pre-filter applied). Set by ListLibraries\nonly, absent when the count could not be read. Music and photo libraries\nhold no media items: their content lives in their own services."
        }
      }
    },
    "v1LibrarySchedule": {
      "type": "object",
      "properties": {
        "libraryId": {
          "type": "string"
        },
        "cron": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "lastRunAt": {
          "type": "string",
          "format": "date-time"
        },
        "nextRunAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "v1LibraryType": {
      "type": "string",
      "enum": [
        "LIBRARY_TYPE_UNSPECIFIED",
        "LIBRARY_TYPE_MOVIES",
        "LIBRARY_TYPE_SHOWS",
        "LIBRARY_TYPE_MUSIC",
        "LIBRARY_TYPE_PHOTOS",
        "LIBRARY_TYPE_BOOKS"
      ],
      "default": "LIBRARY_TYPE_UNSPECIFIED",
      "description": " - LIBRARY_TYPE_BOOKS: Deprecated: the server never accepted a books library (domain rejects the\ntype) and no client offers a reader. Kept for wire compatibility only;\nremove after two server releases per ADR-0004."
    },
    "v1ListGenresResponse": {
      "type": "object",
      "properties": {
        "genres": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "v1ListLibrariesResponse": {
      "type": "object",
      "properties": {
        "libraries": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Library"
          }
        }
      }
    },
    "v1ListMediaItemsResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1MediaItem"
          }
        },
        "pagination": {
          "$ref": "#/definitions/v1PaginationResponse"
        }
      }
    },
    "v1ListPublicMediaItemsResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1PublicMediaItem"
          }
        },
        "total": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "v1MediaItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "libraryId": {
          "type": "string"
        },
        "parentId": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/v1MediaItemType"
        },
        "title": {
          "type": "string"
        },
        "sortTitle": {
          "type": "string"
        },
        "originalTitle": {
          "type": "string"
        },
        "overview": {
          "type": "string"
        },
        "tagline": {
          "type": "string"
        },
        "filePath": {
          "type": "string"
        },
        "fileSize": {
          "type": "string",
          "format": "int64"
        },
        "containerFormat": {
          "type": "string"
        },
        "durationMs": {
          "type": "string",
          "format": "int64"
        },
        "bitrate": {
          "type": "string",
          "format": "int64"
        },
        "indexNumber": {
          "type": "integer",
          "format": "int32"
        },
        "communityRating": {
          "type": "number",
          "format": "double"
        },
        "officialRating": {
          "type": "string"
        },
        "premiereDate": {
          "type": "string",
          "format": "date-time"
        },
        "year": {
          "type": "integer",
          "format": "int32"
        },
        "providerIds": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "genres": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "studios": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "streams": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1MediaStream"
          }
        },
        "people": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1MediaPerson"
          }
        },
        "artwork": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Artwork"
          }
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "ratings": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Rating"
          }
        },
        "trailers": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Trailer"
          }
        },
        "certificationsByCountry": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Per-country content ratings (e.g. {\"US\":\"PG-13\",\"FR\":\"-12\"}).\nofficial_rating mirrors the \"US\" entry when available."
        },
        "seriesTitle": {
          "type": "string",
          "description": "Ancestor display titles, stamped by the read endpoints on episodes (both)\nand seasons (series_title only): rows and search results can label an\nepisode with its series without one round-trip per card."
        },
        "seasonTitle": {
          "type": "string"
        },
        "seasonIndexNumber": {
          "type": "integer",
          "format": "int32",
          "description": "Season number of an episode's season (0 elsewhere), so a client can build\nthe S01E03 code without fetching the season."
        }
      }
    },
    "v1MediaItemType": {
      "type": "string",
      "enum": [
        "MEDIA_ITEM_TYPE_UNSPECIFIED",
        "MEDIA_ITEM_TYPE_MOVIE",
        "MEDIA_ITEM_TYPE_SERIES",
        "MEDIA_ITEM_TYPE_SEASON",
        "MEDIA_ITEM_TYPE_EPISODE",
        "MEDIA_ITEM_TYPE_ALBUM",
        "MEDIA_ITEM_TYPE_ARTIST",
        "MEDIA_ITEM_TYPE_TRACK",
        "MEDIA_ITEM_TYPE_PHOTO",
        "MEDIA_ITEM_TYPE_BOOK"
      ],
      "default": "MEDIA_ITEM_TYPE_UNSPECIFIED",
      "description": " - MEDIA_ITEM_TYPE_BOOK: Deprecated: see LIBRARY_TYPE_BOOKS."
    },
    "v1MediaPerson": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/v1PersonType"
        },
        "thumbUrl": {
          "type": "string"
        },
        "sortOrder": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "v1MediaSortField": {
      "type": "string",
      "enum": [
        "MEDIA_SORT_FIELD_UNSPECIFIED",
        "MEDIA_SORT_FIELD_TITLE",
        "MEDIA_SORT_FIELD_YEAR",
        "MEDIA_SORT_FIELD_RATING",
        "MEDIA_SORT_FIELD_DATE_ADDED",
        "MEDIA_SORT_FIELD_PREMIERE_DATE"
      ],
      "default": "MEDIA_SORT_FIELD_UNSPECIFIED"
    },
    "v1MediaStream": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "int32"
        },
        "type": {
          "$ref": "#/definitions/v1MediaStreamType"
        },
        "codec": {
          "type": "string"
        },
        "codecLongName": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "isDefault": {
          "type": "boolean"
        },
        "isForced": {
          "type": "boolean"
        },
        "isExternal": {
          "type": "boolean"
        },
        "externalPath": {
          "type": "string"
        },
        "width": {
          "type": "integer",
          "format": "int32"
        },
        "height": {
          "type": "integer",
          "format": "int32"
        },
        "frameRate": {
          "type": "number",
          "format": "double"
        },
        "pixelFormat": {
          "type": "string"
        },
        "colorSpace": {
          "type": "string"
        },
        "colorTransfer": {
          "type": "string"
        },
        "colorPrimaries": {
          "type": "string"
        },
        "channels": {
          "type": "integer",
          "format": "int32"
        },
        "sampleRate": {
          "type": "integer",
          "format": "int32"
        },
        "bitDepth": {
          "type": "integer",
          "format": "int32"
        },
        "bitrate": {
          "type": "string",
          "format": "int64"
        },
        "profile": {
          "type": "string"
        },
        "level": {
          "type": "string"
        }
      }
    },
    "v1MediaStreamType": {
      "type": "string",
      "enum": [
        "MEDIA_STREAM_TYPE_UNSPECIFIED",
        "MEDIA_STREAM_TYPE_VIDEO",
        "MEDIA_STREAM_TYPE_AUDIO",
        "MEDIA_STREAM_TYPE_SUBTITLE",
        "MEDIA_STREAM_TYPE_ATTACHMENT"
      ],
      "default": "MEDIA_STREAM_TYPE_UNSPECIFIED"
    },
    "v1PaginationRequest": {
      "type": "object",
      "properties": {
        "page": {
          "type": "integer",
          "format": "int32"
        },
        "pageSize": {
          "type": "integer",
          "format": "int32"
        },
        "cursor": {
          "type": "string",
          "description": "Opaque keyset cursor returned by a previous PaginationResponse. When\nset, server uses keyset pagination instead of offset and ignores\n`page` - guarantees no skips/duplicates under concurrent writes."
        }
      }
    },
    "v1PaginationResponse": {
      "type": "object",
      "properties": {
        "page": {
          "type": "integer",
          "format": "int32"
        },
        "pageSize": {
          "type": "integer",
          "format": "int32"
        },
        "totalItems": {
          "type": "integer",
          "format": "int32"
        },
        "totalPages": {
          "type": "integer",
          "format": "int32"
        },
        "nextCursor": {
          "type": "string",
          "description": "Opaque cursor for the next page. Empty when no more pages or when\nthe server fell back to offset pagination."
        }
      }
    },
    "v1PersonType": {
      "type": "string",
      "enum": [
        "PERSON_TYPE_UNSPECIFIED",
        "PERSON_TYPE_ACTOR",
        "PERSON_TYPE_DIRECTOR",
        "PERSON_TYPE_WRITER",
        "PERSON_TYPE_PRODUCER",
        "PERSON_TYPE_COMPOSER",
        "PERSON_TYPE_GUEST_STAR"
      ],
      "default": "PERSON_TYPE_UNSPECIFIED"
    },
    "v1PublicMediaItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/v1MediaItemType"
        },
        "title": {
          "type": "string"
        },
        "year": {
          "type": "integer",
          "format": "int32"
        },
        "overview": {
          "type": "string"
        },
        "posterUrl": {
          "type": "string"
        }
      },
      "description": "PublicMediaItem is the non-sensitive projection exposed via the `public`\npermission. It deliberately omits file_path, file_size, provider_ids,\nstreams and any server-side detail."
    },
    "v1Rating": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "title": "imdb, rt, metacritic, tmdb"
        },
        "value": {
          "type": "number",
          "format": "double"
        },
        "maxValue": {
          "type": "number",
          "format": "double",
          "title": "10 for imdb/tmdb, 100 for rt/metacritic"
        }
      }
    },
    "v1ScanPhase": {
      "type": "string",
      "enum": [
        "SCAN_PHASE_UNSPECIFIED",
        "SCAN_PHASE_DISCOVERING",
        "SCAN_PHASE_SCANNING",
        "SCAN_PHASE_METADATA",
        "SCAN_PHASE_ARTWORK",
        "SCAN_PHASE_COMPLETE"
      ],
      "default": "SCAN_PHASE_UNSPECIFIED"
    },
    "v1ScanProgress": {
      "type": "object",
      "properties": {
        "libraryId": {
          "type": "string"
        },
        "phase": {
          "$ref": "#/definitions/v1ScanPhase"
        },
        "totalItems": {
          "type": "integer",
          "format": "int32"
        },
        "processedItems": {
          "type": "integer",
          "format": "int32"
        },
        "currentPath": {
          "type": "string"
        },
        "percent": {
          "type": "number",
          "format": "double"
        },
        "error": {
          "type": "string"
        },
        "failedPaths": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Library roots the scan could not read (unmounted share, permissions).\nNon-empty means the scan is PARTIAL: what was reachable is up to date,\nthese folders were skipped and nothing in them was removed."
        }
      }
    },
    "v1SearchMediaResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1MediaItem"
          }
        },
        "totalHits": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "v1SeriesAggregate": {
      "type": "object",
      "properties": {
        "seriesId": {
          "type": "string"
        },
        "totalDurationMs": {
          "type": "string",
          "format": "int64"
        },
        "episodeCount": {
          "type": "integer",
          "format": "int32"
        },
        "seasonCount": {
          "type": "integer",
          "format": "int32"
        }
      },
      "description": "Aggregate runtime for a series: sum of every episode's duration across all\nseasons that are actually present in the library. Computed live (not\ndenormalized) via a recursive CTE."
    },
    "v1SortOrder": {
      "type": "string",
      "enum": [
        "SORT_ORDER_UNSPECIFIED",
        "SORT_ORDER_ASC",
        "SORT_ORDER_DESC"
      ],
      "default": "SORT_ORDER_UNSPECIFIED"
    },
    "v1Trailer": {
      "type": "object",
      "properties": {
        "site": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "official": {
          "type": "boolean"
        },
        "type": {
          "type": "string"
        },
        "useSubtitles": {
          "type": "boolean"
        },
        "subtitleLanguage": {
          "type": "string"
        }
      }
    }
  }
}
