CBL Import (#1834)
* Wrote my own step tracker and added a prev button. Works up to first conflict flow. * Everything but final import is hooked up in the UI. Polish still needed, but getting there. * Making more progress in the CBL import flow. * Ready for the last step * Cleaned up some logic to prepare for the last step and reset * Users like order to be starting at 1 * Fixed a few bugs around cbl import * CBL import is ready for some basic testing * Added a reading list hook on side nav * Fixed up unit tests * Added icons and color to the import flow * Tweaked some phrasing * Hooked up a loading variable but disabled the component as it didn't look good. * Styling it up * changed an icon to better fit --------- Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
parent
57de661d71
commit
d88a4d5d0c
26 changed files with 1125 additions and 466 deletions
263
openapi.json
263
openapi.json
|
@ -7,7 +7,7 @@
|
|||
"name": "GPL-3.0",
|
||||
"url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE"
|
||||
},
|
||||
"version": "0.7.1.2"
|
||||
"version": "0.7.1.4"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
|
@ -1024,6 +1024,185 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/Cbl/validate": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"Cbl"
|
||||
],
|
||||
"summary": "The first step in a cbl import. This validates the cbl file that if an import occured, would it be successful.\r\nIf this returns errors, the cbl will always be rejected by Kavita.",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ContentType": {
|
||||
"type": "string"
|
||||
},
|
||||
"ContentDisposition": {
|
||||
"type": "string"
|
||||
},
|
||||
"Headers": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Length": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"Name": {
|
||||
"type": "string"
|
||||
},
|
||||
"FileName": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"encoding": {
|
||||
"ContentType": {
|
||||
"style": "form"
|
||||
},
|
||||
"ContentDisposition": {
|
||||
"style": "form"
|
||||
},
|
||||
"Headers": {
|
||||
"style": "form"
|
||||
},
|
||||
"Length": {
|
||||
"style": "form"
|
||||
},
|
||||
"Name": {
|
||||
"style": "form"
|
||||
},
|
||||
"FileName": {
|
||||
"style": "form"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"content": {
|
||||
"text/plain": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CblImportSummaryDto"
|
||||
}
|
||||
},
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CblImportSummaryDto"
|
||||
}
|
||||
},
|
||||
"text/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CblImportSummaryDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/Cbl/import": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"Cbl"
|
||||
],
|
||||
"summary": "Performs the actual import (assuming dryRun = false)",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ContentType": {
|
||||
"type": "string"
|
||||
},
|
||||
"ContentDisposition": {
|
||||
"type": "string"
|
||||
},
|
||||
"Headers": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Length": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"Name": {
|
||||
"type": "string"
|
||||
},
|
||||
"FileName": {
|
||||
"type": "string"
|
||||
},
|
||||
"dryRun": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"encoding": {
|
||||
"ContentType": {
|
||||
"style": "form"
|
||||
},
|
||||
"ContentDisposition": {
|
||||
"style": "form"
|
||||
},
|
||||
"Headers": {
|
||||
"style": "form"
|
||||
},
|
||||
"Length": {
|
||||
"style": "form"
|
||||
},
|
||||
"Name": {
|
||||
"style": "form"
|
||||
},
|
||||
"FileName": {
|
||||
"style": "form"
|
||||
},
|
||||
"dryRun": {
|
||||
"style": "form"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"content": {
|
||||
"text/plain": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CblImportSummaryDto"
|
||||
}
|
||||
},
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CblImportSummaryDto"
|
||||
}
|
||||
},
|
||||
"text/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CblImportSummaryDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/Collection": {
|
||||
"get": {
|
||||
"tags": [
|
||||
|
@ -9910,6 +10089,84 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"CblBookResult": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"order": {
|
||||
"type": "integer",
|
||||
"description": "Order in the CBL",
|
||||
"format": "int32"
|
||||
},
|
||||
"series": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"volume": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"number": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"reason": {
|
||||
"$ref": "#/components/schemas/CblImportReason"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"CblImportReason": {
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8
|
||||
],
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"CblImportResult": {
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
],
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"CblImportSummaryDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cblName": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"results": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/CblBookResult"
|
||||
},
|
||||
"nullable": true
|
||||
},
|
||||
"success": {
|
||||
"$ref": "#/components/schemas/CblImportResult"
|
||||
},
|
||||
"successfulInserts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/CblBookResult"
|
||||
},
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"description": "Represents the summary from the Import of a given CBL"
|
||||
},
|
||||
"Chapter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -14973,6 +15230,10 @@
|
|||
"name": "Account",
|
||||
"description": "All Account matters"
|
||||
},
|
||||
{
|
||||
"name": "Cbl",
|
||||
"description": "Responsible for the CBL import flow"
|
||||
},
|
||||
{
|
||||
"name": "Collection",
|
||||
"description": "APIs for Collections"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue