diff --git a/openapi.json b/openapi.json index 0f209f7a8..d5831d74b 100644 --- a/openapi.json +++ b/openapi.json @@ -2,12 +2,12 @@ "openapi": "3.0.4", "info": { "title": "Kavita", - "description": "Kavita provides a set of APIs that are authenticated by JWT. JWT token can be copied from local storage. Assume all fields of a payload are required. Built against v0.8.6.11", + "description": "Kavita provides a set of APIs that are authenticated by JWT. JWT token can be copied from local storage. Assume all fields of a payload are required. Built against v0.8.6.12", "license": { "name": "GPL-3.0", "url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE" }, - "version": "0.8.6.11" + "version": "0.8.6.12" }, "servers": [ { @@ -429,7 +429,7 @@ "tags": [ "Account" ], - "summary": "Requests the Invite Url for the UserId. Will return error if user is already validated.", + "summary": "Requests the Invite Url for the AppUserId. Will return error if user is already validated.", "parameters": [ { "name": "userId", @@ -8678,6 +8678,593 @@ } } }, + "/api/reading-profile/all": { + "get": { + "tags": [ + "ReadingProfile" + ], + "summary": "Gets all non-implicit reading profiles for a user", + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + } + } + } + } + } + }, + "/api/reading-profile/{seriesId}": { + "get": { + "tags": [ + "ReadingProfile" + ], + "summary": "Returns the ReadingProfile that should be applied to the given series, walks up the tree.\nSeries -> Library -> Default", + "parameters": [ + { + "name": "seriesId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "skipImplicit", + "in": "query", + "description": "", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + } + } + } + } + }, + "/api/reading-profile/library": { + "get": { + "tags": [ + "ReadingProfile" + ], + "summary": "Returns the (potential) Reading Profile bound to the library", + "parameters": [ + { + "name": "libraryId", + "in": "query", + "description": "", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + } + } + } + } + }, + "/api/reading-profile/create": { + "post": { + "tags": [ + "ReadingProfile" + ], + "summary": "Creates a new reading profile for the current user", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + } + } + } + } + }, + "/api/reading-profile/promote": { + "post": { + "tags": [ + "ReadingProfile" + ], + "summary": "Promotes the implicit profile to a user profile. Removes the series from other profiles", + "parameters": [ + { + "name": "profileId", + "in": "query", + "description": "", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + } + } + } + } + }, + "/api/reading-profile/series": { + "post": { + "tags": [ + "ReadingProfile" + ], + "summary": "Update the implicit reading profile for a series, creates one if none exists", + "description": "Any modification to the reader settings during reading will create an implicit profile. Use \"update-parent\" to save to the bound series profile.", + "parameters": [ + { + "name": "seriesId", + "in": "query", + "description": "", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + } + } + } + } + }, + "/api/reading-profile/update-parent": { + "post": { + "tags": [ + "ReadingProfile" + ], + "summary": "Updates the non-implicit reading profile for the given series, and removes implicit profiles", + "parameters": [ + { + "name": "seriesId", + "in": "query", + "description": "", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + } + } + } + } + }, + "/api/reading-profile": { + "post": { + "tags": [ + "ReadingProfile" + ], + "summary": "Updates the given reading profile, must belong to the current user", + "description": "This does not update connected series and libraries.", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserReadingProfileDto" + } + } + } + } + } + }, + "delete": { + "tags": [ + "ReadingProfile" + ], + "summary": "Deletes the given profile, requires the profile to belong to the logged-in user", + "parameters": [ + { + "name": "profileId", + "in": "query", + "description": "", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/reading-profile/series/{seriesId}": { + "post": { + "tags": [ + "ReadingProfile" + ], + "summary": "Sets the reading profile for a given series, removes the old one", + "parameters": [ + { + "name": "seriesId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profileId", + "in": "query", + "description": "", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + }, + "delete": { + "tags": [ + "ReadingProfile" + ], + "summary": "Clears the reading profile for the given series for the currently logged-in user", + "parameters": [ + { + "name": "seriesId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/reading-profile/library/{libraryId}": { + "post": { + "tags": [ + "ReadingProfile" + ], + "summary": "Sets the reading profile for a given library, removes the old one", + "parameters": [ + { + "name": "libraryId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profileId", + "in": "query", + "description": "", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + }, + "delete": { + "tags": [ + "ReadingProfile" + ], + "summary": "Clears the reading profile for the given library for the currently logged-in user", + "parameters": [ + { + "name": "libraryId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/reading-profile/bulk": { + "post": { + "tags": [ + "ReadingProfile" + ], + "summary": "Assigns the reading profile to all passes series, and deletes their implicit profiles", + "parameters": [ + { + "name": "profileId", + "in": "query", + "description": "", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/api/Recommended/quick-reads": { "get": { "tags": [ @@ -15425,6 +16012,13 @@ "userPreferences": { "$ref": "#/components/schemas/AppUserPreferences" }, + "readingProfiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AppUserReadingProfile" + }, + "nullable": true + }, "bookmarks": { "type": "array", "items": { @@ -16342,6 +16936,228 @@ }, "additionalProperties": false }, + "AppUserReadingProfile": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "normalizedName": { + "type": "string", + "nullable": true + }, + "appUserId": { + "type": "integer", + "format": "int32" + }, + "appUser": { + "$ref": "#/components/schemas/AppUser" + }, + "kind": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "libraryIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + }, + "seriesIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + }, + "readingDirection": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "description": "Manga Reader Option: What direction should the next/prev page buttons go", + "format": "int32" + }, + "scalingOption": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "description": "Manga Reader Option: How should the image be scaled to screen", + "format": "int32" + }, + "pageSplitOption": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "description": "Manga Reader Option: Which side of a split image should we show first", + "format": "int32" + }, + "readerMode": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "description": "Manga Reader Option: How the manga reader should perform paging or reading of the file\n\nWebtoon uses scrolling to page, MANGA_LR uses paging by clicking left/right side of reader, MANGA_UD uses paging\nby clicking top/bottom sides of reader.\n", + "format": "int32" + }, + "autoCloseMenu": { + "type": "boolean", + "description": "Manga Reader Option: Allow the menu to close after 6 seconds without interaction" + }, + "showScreenHints": { + "type": "boolean", + "description": "Manga Reader Option: Show screen hints to the user on some actions, ie) pagination direction change" + }, + "emulateBook": { + "type": "boolean", + "description": "Manga Reader Option: Emulate a book by applying a shadow effect on the pages" + }, + "layoutMode": { + "enum": [ + 1, + 2, + 3 + ], + "type": "integer", + "description": "Manga Reader Option: How many pages to display in the reader at once", + "format": "int32" + }, + "backgroundColor": { + "type": "string", + "description": "Manga Reader Option: Background color of the reader", + "nullable": true + }, + "swipeToPaginate": { + "type": "boolean", + "description": "Manga Reader Option: Should swiping trigger pagination" + }, + "allowAutomaticWebtoonReaderDetection": { + "type": "boolean", + "description": "Manga Reader Option: Allow Automatic Webtoon detection" + }, + "widthOverride": { + "type": "integer", + "description": "Manga Reader Option: Optional fixed width override", + "format": "int32", + "nullable": true + }, + "bookReaderMargin": { + "type": "integer", + "description": "Book Reader Option: Override extra Margin", + "format": "int32" + }, + "bookReaderLineSpacing": { + "type": "integer", + "description": "Book Reader Option: Override line-height", + "format": "int32" + }, + "bookReaderFontSize": { + "type": "integer", + "description": "Book Reader Option: Override font size", + "format": "int32" + }, + "bookReaderFontFamily": { + "type": "string", + "description": "Book Reader Option: Maps to the default Kavita font-family (inherit) or an override", + "nullable": true + }, + "bookReaderTapToPaginate": { + "type": "boolean", + "description": "Book Reader Option: Allows tapping on side of screens to paginate" + }, + "bookReaderReadingDirection": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "description": "Book Reader Option: What direction should the next/prev page buttons go", + "format": "int32" + }, + "bookReaderWritingStyle": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "description": "Book Reader Option: Defines the writing styles vertical/horizontal", + "format": "int32" + }, + "bookThemeName": { + "type": "string", + "description": "Book Reader Option: The color theme to decorate the book contents", + "nullable": true + }, + "bookReaderLayoutMode": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "description": "Book Reader Option: The way a page from a book is rendered. Default is as book dictates, 1 column is fit to height,\n2 column is fit to height, 2 columns", + "format": "int32" + }, + "bookReaderImmersiveMode": { + "type": "boolean", + "description": "Book Reader Option: A flag that hides the menu-ing system behind a click on the screen. This should be used with tap to paginate, but the app doesn't enforce this." + }, + "pdfTheme": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "description": "PDF Reader: Theme of the Reader", + "format": "int32" + }, + "pdfScrollMode": { + "enum": [ + 0, + 1, + 3 + ], + "type": "integer", + "description": "PDF Reader: Scroll mode of the reader", + "format": "int32" + }, + "pdfSpreadMode": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "description": "PDF Reader: Spread Mode of the reader", + "format": "int32" + } + }, + "additionalProperties": false + }, "AppUserRole": { "type": "object", "properties": { @@ -25860,161 +26676,19 @@ }, "UserPreferencesDto": { "required": [ - "allowAutomaticWebtoonReaderDetection", - "autoCloseMenu", - "backgroundColor", "blurUnreadSummaries", - "bookReaderFontFamily", - "bookReaderFontSize", - "bookReaderImmersiveMode", - "bookReaderLayoutMode", - "bookReaderLineSpacing", - "bookReaderMargin", - "bookReaderReadingDirection", - "bookReaderTapToPaginate", - "bookReaderThemeName", - "bookReaderWritingStyle", "collapseSeriesRelationships", - "emulateBook", - "globalPageLayoutMode", - "layoutMode", "locale", "noTransitions", - "pageSplitOption", - "pdfScrollMode", - "pdfSpreadMode", - "pdfTheme", "promptForDownloadSize", - "readerMode", - "readingDirection", - "scalingOption", "shareReviews", - "showScreenHints", - "swipeToPaginate", "theme" ], "type": "object", "properties": { - "readingDirection": { - "enum": [ - 0, - 1 - ], - "type": "integer", - "format": "int32" - }, - "scalingOption": { - "enum": [ - 0, - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32" - }, - "pageSplitOption": { - "enum": [ - 0, - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32" - }, - "readerMode": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "layoutMode": { - "enum": [ - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32" - }, - "emulateBook": { - "type": "boolean" - }, - "backgroundColor": { - "minLength": 1, - "type": "string" - }, - "swipeToPaginate": { - "type": "boolean" - }, - "autoCloseMenu": { - "type": "boolean" - }, - "showScreenHints": { - "type": "boolean" - }, - "allowAutomaticWebtoonReaderDetection": { - "type": "boolean" - }, - "bookReaderMargin": { - "type": "integer", - "format": "int32" - }, - "bookReaderLineSpacing": { - "type": "integer", - "format": "int32" - }, - "bookReaderFontSize": { - "type": "integer", - "format": "int32" - }, - "bookReaderFontFamily": { - "minLength": 1, - "type": "string" - }, - "bookReaderTapToPaginate": { - "type": "boolean" - }, - "bookReaderReadingDirection": { - "enum": [ - 0, - 1 - ], - "type": "integer", - "format": "int32" - }, - "bookReaderWritingStyle": { - "enum": [ - 0, - 1 - ], - "type": "integer", - "description": "Represents the writing styles for the book-reader", - "format": "int32" - }, "theme": { "$ref": "#/components/schemas/SiteThemeDto" }, - "bookReaderThemeName": { - "minLength": 1, - "type": "string" - }, - "bookReaderLayoutMode": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "bookReaderImmersiveMode": { - "type": "boolean" - }, "globalPageLayoutMode": { "enum": [ 0, @@ -26042,33 +26716,6 @@ "minLength": 1, "type": "string" }, - "pdfTheme": { - "enum": [ - 0, - 1 - ], - "type": "integer", - "format": "int32" - }, - "pdfScrollMode": { - "enum": [ - 0, - 1, - 3 - ], - "type": "integer", - "description": "Enum values match PdfViewer's enums", - "format": "int32" - }, - "pdfSpreadMode": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, "aniListScrobblingEnabled": { "type": "boolean" }, @@ -26118,6 +26765,208 @@ }, "additionalProperties": false }, + "UserReadingProfileDto": { + "required": [ + "allowAutomaticWebtoonReaderDetection", + "autoCloseMenu", + "backgroundColor", + "bookReaderFontFamily", + "bookReaderFontSize", + "bookReaderImmersiveMode", + "bookReaderLayoutMode", + "bookReaderLineSpacing", + "bookReaderMargin", + "bookReaderReadingDirection", + "bookReaderTapToPaginate", + "bookReaderThemeName", + "bookReaderWritingStyle", + "emulateBook", + "layoutMode", + "pageSplitOption", + "pdfScrollMode", + "pdfSpreadMode", + "pdfTheme", + "readerMode", + "readingDirection", + "scalingOption", + "showScreenHints", + "swipeToPaginate" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "userId": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "kind": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "readingDirection": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "format": "int32" + }, + "scalingOption": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32" + }, + "pageSplitOption": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32" + }, + "readerMode": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "autoCloseMenu": { + "type": "boolean" + }, + "showScreenHints": { + "type": "boolean" + }, + "emulateBook": { + "type": "boolean" + }, + "layoutMode": { + "enum": [ + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32" + }, + "backgroundColor": { + "minLength": 1, + "type": "string" + }, + "swipeToPaginate": { + "type": "boolean" + }, + "allowAutomaticWebtoonReaderDetection": { + "type": "boolean" + }, + "widthOverride": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "bookReaderMargin": { + "type": "integer", + "format": "int32" + }, + "bookReaderLineSpacing": { + "type": "integer", + "format": "int32" + }, + "bookReaderFontSize": { + "type": "integer", + "format": "int32" + }, + "bookReaderFontFamily": { + "minLength": 1, + "type": "string" + }, + "bookReaderTapToPaginate": { + "type": "boolean" + }, + "bookReaderReadingDirection": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "format": "int32" + }, + "bookReaderWritingStyle": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "description": "Represents the writing styles for the book-reader", + "format": "int32" + }, + "bookReaderThemeName": { + "minLength": 1, + "type": "string" + }, + "bookReaderLayoutMode": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "bookReaderImmersiveMode": { + "type": "boolean" + }, + "pdfTheme": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "format": "int32" + }, + "pdfScrollMode": { + "enum": [ + 0, + 1, + 3 + ], + "type": "integer", + "description": "Enum values match PdfViewer's enums", + "format": "int32" + }, + "pdfSpreadMode": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, "UserReviewDto": { "type": "object", "properties": {