@silverfish-app/sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -0
- package/dist/chunk-IUKKL5SW.js +997 -0
- package/dist/chunk-IUKKL5SW.js.map +1 -0
- package/dist/client/index.cjs +1006 -0
- package/dist/client/index.cjs.map +1 -0
- package/dist/client/index.d.cts +60 -0
- package/dist/client/index.d.ts +60 -0
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -0
- package/dist/index.cjs +1130 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1432 -0
- package/dist/index.d.ts +1432 -0
- package/dist/index.js +329 -0
- package/dist/index.js.map +1 -0
- package/dist/types.gen-Bfm1raMe.d.cts +347 -0
- package/dist/types.gen-Bfm1raMe.d.ts +347 -0
- package/openapi.json +2197 -0
- package/package.json +41 -0
package/openapi.json
ADDED
|
@@ -0,0 +1,2197 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": {
|
|
3
|
+
"schemas": {
|
|
4
|
+
"AuthorOut": {
|
|
5
|
+
"properties": {
|
|
6
|
+
"name": {
|
|
7
|
+
"title": "Name",
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"sort": {
|
|
11
|
+
"title": "Sort",
|
|
12
|
+
"type": "string"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required": [
|
|
16
|
+
"name",
|
|
17
|
+
"sort"
|
|
18
|
+
],
|
|
19
|
+
"title": "AuthorOut",
|
|
20
|
+
"type": "object"
|
|
21
|
+
},
|
|
22
|
+
"BinaryHealthOut": {
|
|
23
|
+
"description": "Availability of the Calibre binaries (optional system dependency).",
|
|
24
|
+
"properties": {
|
|
25
|
+
"convert_available": {
|
|
26
|
+
"title": "Convert Available",
|
|
27
|
+
"type": "boolean"
|
|
28
|
+
},
|
|
29
|
+
"metadata_available": {
|
|
30
|
+
"title": "Metadata Available",
|
|
31
|
+
"type": "boolean"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required": [
|
|
35
|
+
"convert_available",
|
|
36
|
+
"metadata_available"
|
|
37
|
+
],
|
|
38
|
+
"title": "BinaryHealthOut",
|
|
39
|
+
"type": "object"
|
|
40
|
+
},
|
|
41
|
+
"Body_upload_book": {
|
|
42
|
+
"properties": {
|
|
43
|
+
"file": {
|
|
44
|
+
"contentMediaType": "application/octet-stream",
|
|
45
|
+
"title": "File",
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": [
|
|
50
|
+
"file"
|
|
51
|
+
],
|
|
52
|
+
"title": "Body_upload_book",
|
|
53
|
+
"type": "object"
|
|
54
|
+
},
|
|
55
|
+
"BookOut": {
|
|
56
|
+
"description": "A book as returned by the API.\n\n``id`` is the public form of the book's internal id \u2014 always a string so the\ncontract keeps one shape, but rendered per library mode (short base62 for\nstandalone Snowflake ids, plain decimal for Calibre's small ids).",
|
|
57
|
+
"properties": {
|
|
58
|
+
"author_sort": {
|
|
59
|
+
"title": "Author Sort",
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"authors": {
|
|
63
|
+
"items": {
|
|
64
|
+
"$ref": "#/components/schemas/AuthorOut"
|
|
65
|
+
},
|
|
66
|
+
"title": "Authors",
|
|
67
|
+
"type": "array"
|
|
68
|
+
},
|
|
69
|
+
"cover_url": {
|
|
70
|
+
"anyOf": [
|
|
71
|
+
{
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "null"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"title": "Cover Url"
|
|
79
|
+
},
|
|
80
|
+
"formats": {
|
|
81
|
+
"items": {
|
|
82
|
+
"$ref": "#/components/schemas/FormatOut"
|
|
83
|
+
},
|
|
84
|
+
"title": "Formats",
|
|
85
|
+
"type": "array"
|
|
86
|
+
},
|
|
87
|
+
"has_cover": {
|
|
88
|
+
"title": "Has Cover",
|
|
89
|
+
"type": "boolean"
|
|
90
|
+
},
|
|
91
|
+
"id": {
|
|
92
|
+
"title": "Id",
|
|
93
|
+
"type": "string"
|
|
94
|
+
},
|
|
95
|
+
"identifiers": {
|
|
96
|
+
"items": {
|
|
97
|
+
"$ref": "#/components/schemas/IdentifierOut"
|
|
98
|
+
},
|
|
99
|
+
"title": "Identifiers",
|
|
100
|
+
"type": "array"
|
|
101
|
+
},
|
|
102
|
+
"languages": {
|
|
103
|
+
"items": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"title": "Languages",
|
|
107
|
+
"type": "array"
|
|
108
|
+
},
|
|
109
|
+
"publisher": {
|
|
110
|
+
"anyOf": [
|
|
111
|
+
{
|
|
112
|
+
"type": "string"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "null"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"title": "Publisher"
|
|
119
|
+
},
|
|
120
|
+
"rating": {
|
|
121
|
+
"anyOf": [
|
|
122
|
+
{
|
|
123
|
+
"type": "integer"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"type": "null"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"title": "Rating"
|
|
130
|
+
},
|
|
131
|
+
"series": {
|
|
132
|
+
"anyOf": [
|
|
133
|
+
{
|
|
134
|
+
"$ref": "#/components/schemas/SeriesOut"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"type": "null"
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"sort": {
|
|
142
|
+
"title": "Sort",
|
|
143
|
+
"type": "string"
|
|
144
|
+
},
|
|
145
|
+
"tags": {
|
|
146
|
+
"items": {
|
|
147
|
+
"$ref": "#/components/schemas/TagOut"
|
|
148
|
+
},
|
|
149
|
+
"title": "Tags",
|
|
150
|
+
"type": "array"
|
|
151
|
+
},
|
|
152
|
+
"title": {
|
|
153
|
+
"title": "Title",
|
|
154
|
+
"type": "string"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"required": [
|
|
158
|
+
"id",
|
|
159
|
+
"title",
|
|
160
|
+
"sort",
|
|
161
|
+
"author_sort",
|
|
162
|
+
"authors",
|
|
163
|
+
"tags",
|
|
164
|
+
"series",
|
|
165
|
+
"rating",
|
|
166
|
+
"languages",
|
|
167
|
+
"publisher",
|
|
168
|
+
"identifiers",
|
|
169
|
+
"formats",
|
|
170
|
+
"has_cover",
|
|
171
|
+
"cover_url"
|
|
172
|
+
],
|
|
173
|
+
"title": "BookOut",
|
|
174
|
+
"type": "object"
|
|
175
|
+
},
|
|
176
|
+
"BookPage": {
|
|
177
|
+
"description": "A paginated page of books.",
|
|
178
|
+
"properties": {
|
|
179
|
+
"has_next": {
|
|
180
|
+
"title": "Has Next",
|
|
181
|
+
"type": "boolean"
|
|
182
|
+
},
|
|
183
|
+
"has_prev": {
|
|
184
|
+
"title": "Has Prev",
|
|
185
|
+
"type": "boolean"
|
|
186
|
+
},
|
|
187
|
+
"items": {
|
|
188
|
+
"items": {
|
|
189
|
+
"$ref": "#/components/schemas/BookOut"
|
|
190
|
+
},
|
|
191
|
+
"title": "Items",
|
|
192
|
+
"type": "array"
|
|
193
|
+
},
|
|
194
|
+
"page": {
|
|
195
|
+
"title": "Page",
|
|
196
|
+
"type": "integer"
|
|
197
|
+
},
|
|
198
|
+
"page_size": {
|
|
199
|
+
"title": "Page Size",
|
|
200
|
+
"type": "integer"
|
|
201
|
+
},
|
|
202
|
+
"total": {
|
|
203
|
+
"title": "Total",
|
|
204
|
+
"type": "integer"
|
|
205
|
+
},
|
|
206
|
+
"total_pages": {
|
|
207
|
+
"title": "Total Pages",
|
|
208
|
+
"type": "integer"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"required": [
|
|
212
|
+
"items",
|
|
213
|
+
"total",
|
|
214
|
+
"page",
|
|
215
|
+
"page_size",
|
|
216
|
+
"total_pages",
|
|
217
|
+
"has_next",
|
|
218
|
+
"has_prev"
|
|
219
|
+
],
|
|
220
|
+
"title": "BookPage",
|
|
221
|
+
"type": "object"
|
|
222
|
+
},
|
|
223
|
+
"BookUpdate": {
|
|
224
|
+
"description": "A partial book metadata update. Only provided fields are changed.\n\nOmitting a field leaves it untouched; sending ``null`` clears it (e.g.\n``rating: null`` removes the rating). Sort keys and the on-disk path are\nrecomputed by the server when title/authors change.",
|
|
225
|
+
"properties": {
|
|
226
|
+
"authors": {
|
|
227
|
+
"anyOf": [
|
|
228
|
+
{
|
|
229
|
+
"items": {
|
|
230
|
+
"type": "string"
|
|
231
|
+
},
|
|
232
|
+
"type": "array"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"type": "null"
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
"description": "Full author list (replaces the existing one).",
|
|
239
|
+
"title": "Authors"
|
|
240
|
+
},
|
|
241
|
+
"comment": {
|
|
242
|
+
"anyOf": [
|
|
243
|
+
{
|
|
244
|
+
"type": "string"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"type": "null"
|
|
248
|
+
}
|
|
249
|
+
],
|
|
250
|
+
"description": "Description/notes (HTML allowed), or null to clear.",
|
|
251
|
+
"title": "Comment"
|
|
252
|
+
},
|
|
253
|
+
"languages": {
|
|
254
|
+
"anyOf": [
|
|
255
|
+
{
|
|
256
|
+
"items": {
|
|
257
|
+
"type": "string"
|
|
258
|
+
},
|
|
259
|
+
"type": "array"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"type": "null"
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
"description": "Language codes (replaces the existing list).",
|
|
266
|
+
"title": "Languages"
|
|
267
|
+
},
|
|
268
|
+
"publisher": {
|
|
269
|
+
"anyOf": [
|
|
270
|
+
{
|
|
271
|
+
"type": "string"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"type": "null"
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
"description": "Publisher name, or null to clear.",
|
|
278
|
+
"title": "Publisher"
|
|
279
|
+
},
|
|
280
|
+
"rating": {
|
|
281
|
+
"anyOf": [
|
|
282
|
+
{
|
|
283
|
+
"maximum": 10.0,
|
|
284
|
+
"minimum": 0.0,
|
|
285
|
+
"type": "integer"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"type": "null"
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
"description": "Rating 0-10 (Calibre scale), or null to clear.",
|
|
292
|
+
"title": "Rating"
|
|
293
|
+
},
|
|
294
|
+
"series": {
|
|
295
|
+
"anyOf": [
|
|
296
|
+
{
|
|
297
|
+
"type": "string"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"type": "null"
|
|
301
|
+
}
|
|
302
|
+
],
|
|
303
|
+
"description": "Series name, or null to clear.",
|
|
304
|
+
"title": "Series"
|
|
305
|
+
},
|
|
306
|
+
"series_index": {
|
|
307
|
+
"anyOf": [
|
|
308
|
+
{
|
|
309
|
+
"type": "number"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"type": "null"
|
|
313
|
+
}
|
|
314
|
+
],
|
|
315
|
+
"description": "Position within the series.",
|
|
316
|
+
"title": "Series Index"
|
|
317
|
+
},
|
|
318
|
+
"tags": {
|
|
319
|
+
"anyOf": [
|
|
320
|
+
{
|
|
321
|
+
"items": {
|
|
322
|
+
"type": "string"
|
|
323
|
+
},
|
|
324
|
+
"type": "array"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"type": "null"
|
|
328
|
+
}
|
|
329
|
+
],
|
|
330
|
+
"description": "Full tag list (replaces the existing one).",
|
|
331
|
+
"title": "Tags"
|
|
332
|
+
},
|
|
333
|
+
"title": {
|
|
334
|
+
"anyOf": [
|
|
335
|
+
{
|
|
336
|
+
"type": "string"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"type": "null"
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
"description": "New title.",
|
|
343
|
+
"title": "Title"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"title": "BookUpdate",
|
|
347
|
+
"type": "object"
|
|
348
|
+
},
|
|
349
|
+
"ConvertRequest": {
|
|
350
|
+
"description": "Request to convert a book from one format to another.",
|
|
351
|
+
"properties": {
|
|
352
|
+
"source_format": {
|
|
353
|
+
"anyOf": [
|
|
354
|
+
{
|
|
355
|
+
"type": "string"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"type": "null"
|
|
359
|
+
}
|
|
360
|
+
],
|
|
361
|
+
"description": "Format to convert from. When omitted, the API picks the best available source by a default priority order.",
|
|
362
|
+
"title": "Source Format"
|
|
363
|
+
},
|
|
364
|
+
"target_format": {
|
|
365
|
+
"description": "Format to produce, e.g. 'EPUB', 'MOBI', 'AZW3', 'PDF'.",
|
|
366
|
+
"title": "Target Format",
|
|
367
|
+
"type": "string"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"required": [
|
|
371
|
+
"target_format"
|
|
372
|
+
],
|
|
373
|
+
"title": "ConvertRequest",
|
|
374
|
+
"type": "object"
|
|
375
|
+
},
|
|
376
|
+
"EmailConfigOut": {
|
|
377
|
+
"description": "Non-secret view of the email configuration (never includes the password).\n\nWhether sending is *available* is reported by ``/health`` (``send_available``);\nthis is the detail view for a settings screen.",
|
|
378
|
+
"properties": {
|
|
379
|
+
"configured": {
|
|
380
|
+
"title": "Configured",
|
|
381
|
+
"type": "boolean"
|
|
382
|
+
},
|
|
383
|
+
"from_address": {
|
|
384
|
+
"title": "From Address",
|
|
385
|
+
"type": "string"
|
|
386
|
+
},
|
|
387
|
+
"host": {
|
|
388
|
+
"title": "Host",
|
|
389
|
+
"type": "string"
|
|
390
|
+
},
|
|
391
|
+
"port": {
|
|
392
|
+
"title": "Port",
|
|
393
|
+
"type": "integer"
|
|
394
|
+
},
|
|
395
|
+
"security": {
|
|
396
|
+
"title": "Security",
|
|
397
|
+
"type": "string"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"required": [
|
|
401
|
+
"configured",
|
|
402
|
+
"host",
|
|
403
|
+
"port",
|
|
404
|
+
"from_address",
|
|
405
|
+
"security"
|
|
406
|
+
],
|
|
407
|
+
"title": "EmailConfigOut",
|
|
408
|
+
"type": "object"
|
|
409
|
+
},
|
|
410
|
+
"EmailTestRequest": {
|
|
411
|
+
"description": "Request to send a connectivity test email.",
|
|
412
|
+
"properties": {
|
|
413
|
+
"to_email": {
|
|
414
|
+
"description": "Address to send the SMTP connectivity test email to.",
|
|
415
|
+
"format": "email",
|
|
416
|
+
"title": "To Email",
|
|
417
|
+
"type": "string"
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"required": [
|
|
421
|
+
"to_email"
|
|
422
|
+
],
|
|
423
|
+
"title": "EmailTestRequest",
|
|
424
|
+
"type": "object"
|
|
425
|
+
},
|
|
426
|
+
"ErrorBody": {
|
|
427
|
+
"description": "The body of a standardized error.",
|
|
428
|
+
"properties": {
|
|
429
|
+
"details": {
|
|
430
|
+
"anyOf": [
|
|
431
|
+
{
|
|
432
|
+
"items": {
|
|
433
|
+
"$ref": "#/components/schemas/ErrorDetail"
|
|
434
|
+
},
|
|
435
|
+
"type": "array"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"type": "null"
|
|
439
|
+
}
|
|
440
|
+
],
|
|
441
|
+
"title": "Details"
|
|
442
|
+
},
|
|
443
|
+
"message": {
|
|
444
|
+
"title": "Message",
|
|
445
|
+
"type": "string"
|
|
446
|
+
},
|
|
447
|
+
"status": {
|
|
448
|
+
"title": "Status",
|
|
449
|
+
"type": "integer"
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
"required": [
|
|
453
|
+
"status",
|
|
454
|
+
"message"
|
|
455
|
+
],
|
|
456
|
+
"title": "ErrorBody",
|
|
457
|
+
"type": "object"
|
|
458
|
+
},
|
|
459
|
+
"ErrorDetail": {
|
|
460
|
+
"description": "A single field-level validation problem.",
|
|
461
|
+
"properties": {
|
|
462
|
+
"location": {
|
|
463
|
+
"title": "Location",
|
|
464
|
+
"type": "string"
|
|
465
|
+
},
|
|
466
|
+
"message": {
|
|
467
|
+
"title": "Message",
|
|
468
|
+
"type": "string"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"required": [
|
|
472
|
+
"location",
|
|
473
|
+
"message"
|
|
474
|
+
],
|
|
475
|
+
"title": "ErrorDetail",
|
|
476
|
+
"type": "object"
|
|
477
|
+
},
|
|
478
|
+
"ErrorResponse": {
|
|
479
|
+
"description": "Every error the API returns shares this shape: ``{\"error\": {...}}``.",
|
|
480
|
+
"properties": {
|
|
481
|
+
"error": {
|
|
482
|
+
"$ref": "#/components/schemas/ErrorBody"
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
"required": [
|
|
486
|
+
"error"
|
|
487
|
+
],
|
|
488
|
+
"title": "ErrorResponse",
|
|
489
|
+
"type": "object"
|
|
490
|
+
},
|
|
491
|
+
"ExportRequest": {
|
|
492
|
+
"description": "Request to export the library to a Calibre-format zip.\n\nThe export runs asynchronously; a time-limited download link is emailed to\n``to_email`` when it is ready (the zip is never attached \u2014 a library can be\nfar larger than any mail server accepts).\n\n``book_ids`` selects which books to export (public id strings). Omit it to\nexport the whole library.",
|
|
493
|
+
"properties": {
|
|
494
|
+
"book_ids": {
|
|
495
|
+
"anyOf": [
|
|
496
|
+
{
|
|
497
|
+
"items": {
|
|
498
|
+
"type": "string"
|
|
499
|
+
},
|
|
500
|
+
"type": "array"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"type": "null"
|
|
504
|
+
}
|
|
505
|
+
],
|
|
506
|
+
"description": "Public ids of the books to export; omit to export the whole library.",
|
|
507
|
+
"title": "Book Ids"
|
|
508
|
+
},
|
|
509
|
+
"to_email": {
|
|
510
|
+
"description": "Address that receives the download link when ready.",
|
|
511
|
+
"format": "email",
|
|
512
|
+
"title": "To Email",
|
|
513
|
+
"type": "string"
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"required": [
|
|
517
|
+
"to_email"
|
|
518
|
+
],
|
|
519
|
+
"title": "ExportRequest",
|
|
520
|
+
"type": "object"
|
|
521
|
+
},
|
|
522
|
+
"FormatOut": {
|
|
523
|
+
"properties": {
|
|
524
|
+
"download_url": {
|
|
525
|
+
"title": "Download Url",
|
|
526
|
+
"type": "string"
|
|
527
|
+
},
|
|
528
|
+
"extension": {
|
|
529
|
+
"title": "Extension",
|
|
530
|
+
"type": "string"
|
|
531
|
+
},
|
|
532
|
+
"size_bytes": {
|
|
533
|
+
"title": "Size Bytes",
|
|
534
|
+
"type": "integer"
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
"required": [
|
|
538
|
+
"extension",
|
|
539
|
+
"size_bytes",
|
|
540
|
+
"download_url"
|
|
541
|
+
],
|
|
542
|
+
"title": "FormatOut",
|
|
543
|
+
"type": "object"
|
|
544
|
+
},
|
|
545
|
+
"HTTPValidationError": {
|
|
546
|
+
"properties": {
|
|
547
|
+
"detail": {
|
|
548
|
+
"items": {
|
|
549
|
+
"$ref": "#/components/schemas/ValidationError"
|
|
550
|
+
},
|
|
551
|
+
"title": "Detail",
|
|
552
|
+
"type": "array"
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
"title": "HTTPValidationError",
|
|
556
|
+
"type": "object"
|
|
557
|
+
},
|
|
558
|
+
"HealthResponse": {
|
|
559
|
+
"description": "Liveness payload. Typed so it appears in the OpenAPI contract.",
|
|
560
|
+
"properties": {
|
|
561
|
+
"binaries": {
|
|
562
|
+
"$ref": "#/components/schemas/BinaryHealthOut"
|
|
563
|
+
},
|
|
564
|
+
"send_available": {
|
|
565
|
+
"title": "Send Available",
|
|
566
|
+
"type": "boolean"
|
|
567
|
+
},
|
|
568
|
+
"status": {
|
|
569
|
+
"title": "Status",
|
|
570
|
+
"type": "string"
|
|
571
|
+
},
|
|
572
|
+
"version": {
|
|
573
|
+
"title": "Version",
|
|
574
|
+
"type": "string"
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
"required": [
|
|
578
|
+
"status",
|
|
579
|
+
"version",
|
|
580
|
+
"binaries",
|
|
581
|
+
"send_available"
|
|
582
|
+
],
|
|
583
|
+
"title": "HealthResponse",
|
|
584
|
+
"type": "object"
|
|
585
|
+
},
|
|
586
|
+
"IdentifierOut": {
|
|
587
|
+
"properties": {
|
|
588
|
+
"scheme": {
|
|
589
|
+
"title": "Scheme",
|
|
590
|
+
"type": "string"
|
|
591
|
+
},
|
|
592
|
+
"value": {
|
|
593
|
+
"title": "Value",
|
|
594
|
+
"type": "string"
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
"required": [
|
|
598
|
+
"scheme",
|
|
599
|
+
"value"
|
|
600
|
+
],
|
|
601
|
+
"title": "IdentifierOut",
|
|
602
|
+
"type": "object"
|
|
603
|
+
},
|
|
604
|
+
"JobOut": {
|
|
605
|
+
"description": "A background job's observable state.",
|
|
606
|
+
"properties": {
|
|
607
|
+
"error": {
|
|
608
|
+
"anyOf": [
|
|
609
|
+
{
|
|
610
|
+
"type": "string"
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"type": "null"
|
|
614
|
+
}
|
|
615
|
+
],
|
|
616
|
+
"description": "Failure reason when status is 'error', else null.",
|
|
617
|
+
"title": "Error"
|
|
618
|
+
},
|
|
619
|
+
"id": {
|
|
620
|
+
"description": "Opaque job id; poll it at /jobs/{job_id}.",
|
|
621
|
+
"title": "Id",
|
|
622
|
+
"type": "string"
|
|
623
|
+
},
|
|
624
|
+
"message": {
|
|
625
|
+
"default": "",
|
|
626
|
+
"description": "Human-readable description of the current step.",
|
|
627
|
+
"title": "Message",
|
|
628
|
+
"type": "string"
|
|
629
|
+
},
|
|
630
|
+
"progress": {
|
|
631
|
+
"description": "Completion fraction from 0.0 to 1.0.",
|
|
632
|
+
"maximum": 1.0,
|
|
633
|
+
"minimum": 0.0,
|
|
634
|
+
"title": "Progress",
|
|
635
|
+
"type": "number"
|
|
636
|
+
},
|
|
637
|
+
"status": {
|
|
638
|
+
"$ref": "#/components/schemas/JobStatusOut",
|
|
639
|
+
"description": "Current lifecycle state."
|
|
640
|
+
},
|
|
641
|
+
"type": {
|
|
642
|
+
"$ref": "#/components/schemas/JobType",
|
|
643
|
+
"description": "What kind of work this job performs."
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
"required": [
|
|
647
|
+
"id",
|
|
648
|
+
"type",
|
|
649
|
+
"status",
|
|
650
|
+
"progress"
|
|
651
|
+
],
|
|
652
|
+
"title": "JobOut",
|
|
653
|
+
"type": "object"
|
|
654
|
+
},
|
|
655
|
+
"JobStatusOut": {
|
|
656
|
+
"description": "A job's lifecycle state (mirrors the core's JobStatus).",
|
|
657
|
+
"enum": [
|
|
658
|
+
"queued",
|
|
659
|
+
"running",
|
|
660
|
+
"done",
|
|
661
|
+
"error"
|
|
662
|
+
],
|
|
663
|
+
"title": "JobStatusOut",
|
|
664
|
+
"type": "string"
|
|
665
|
+
},
|
|
666
|
+
"JobType": {
|
|
667
|
+
"description": "The kind of background work a job performs.",
|
|
668
|
+
"enum": [
|
|
669
|
+
"convert",
|
|
670
|
+
"send",
|
|
671
|
+
"export"
|
|
672
|
+
],
|
|
673
|
+
"title": "JobType",
|
|
674
|
+
"type": "string"
|
|
675
|
+
},
|
|
676
|
+
"RefreshRequest": {
|
|
677
|
+
"description": "Request to refresh a book's metadata from one of its format files.",
|
|
678
|
+
"properties": {
|
|
679
|
+
"source_format": {
|
|
680
|
+
"description": "Which existing format to re-read metadata (and cover) from, e.g. 'EPUB'.",
|
|
681
|
+
"title": "Source Format",
|
|
682
|
+
"type": "string"
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
"required": [
|
|
686
|
+
"source_format"
|
|
687
|
+
],
|
|
688
|
+
"title": "RefreshRequest",
|
|
689
|
+
"type": "object"
|
|
690
|
+
},
|
|
691
|
+
"SendRequest": {
|
|
692
|
+
"description": "Request to send a book to an e-reader email address.",
|
|
693
|
+
"properties": {
|
|
694
|
+
"format": {
|
|
695
|
+
"anyOf": [
|
|
696
|
+
{
|
|
697
|
+
"type": "string"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
"type": "null"
|
|
701
|
+
}
|
|
702
|
+
],
|
|
703
|
+
"description": "Format to send. When omitted, the best available is chosen. Must be a format the book actually has, otherwise the request is rejected.",
|
|
704
|
+
"title": "Format"
|
|
705
|
+
},
|
|
706
|
+
"to_email": {
|
|
707
|
+
"description": "Destination e-reader address (e.g. your Kindle email).",
|
|
708
|
+
"format": "email",
|
|
709
|
+
"title": "To Email",
|
|
710
|
+
"type": "string"
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
"required": [
|
|
714
|
+
"to_email"
|
|
715
|
+
],
|
|
716
|
+
"title": "SendRequest",
|
|
717
|
+
"type": "object"
|
|
718
|
+
},
|
|
719
|
+
"SeriesOut": {
|
|
720
|
+
"properties": {
|
|
721
|
+
"index": {
|
|
722
|
+
"title": "Index",
|
|
723
|
+
"type": "number"
|
|
724
|
+
},
|
|
725
|
+
"name": {
|
|
726
|
+
"title": "Name",
|
|
727
|
+
"type": "string"
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
"required": [
|
|
731
|
+
"name",
|
|
732
|
+
"index"
|
|
733
|
+
],
|
|
734
|
+
"title": "SeriesOut",
|
|
735
|
+
"type": "object"
|
|
736
|
+
},
|
|
737
|
+
"SortDirection": {
|
|
738
|
+
"enum": [
|
|
739
|
+
"asc",
|
|
740
|
+
"desc"
|
|
741
|
+
],
|
|
742
|
+
"title": "SortDirection",
|
|
743
|
+
"type": "string"
|
|
744
|
+
},
|
|
745
|
+
"SortField": {
|
|
746
|
+
"description": "Fields a book listing can be sorted by.",
|
|
747
|
+
"enum": [
|
|
748
|
+
"title",
|
|
749
|
+
"author",
|
|
750
|
+
"pubdate",
|
|
751
|
+
"timestamp",
|
|
752
|
+
"last_modified",
|
|
753
|
+
"series",
|
|
754
|
+
"rating"
|
|
755
|
+
],
|
|
756
|
+
"title": "SortField",
|
|
757
|
+
"type": "string"
|
|
758
|
+
},
|
|
759
|
+
"TagOut": {
|
|
760
|
+
"properties": {
|
|
761
|
+
"name": {
|
|
762
|
+
"title": "Name",
|
|
763
|
+
"type": "string"
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
"required": [
|
|
767
|
+
"name"
|
|
768
|
+
],
|
|
769
|
+
"title": "TagOut",
|
|
770
|
+
"type": "object"
|
|
771
|
+
},
|
|
772
|
+
"ValidationError": {
|
|
773
|
+
"properties": {
|
|
774
|
+
"ctx": {
|
|
775
|
+
"title": "Context",
|
|
776
|
+
"type": "object"
|
|
777
|
+
},
|
|
778
|
+
"input": {
|
|
779
|
+
"title": "Input"
|
|
780
|
+
},
|
|
781
|
+
"loc": {
|
|
782
|
+
"items": {
|
|
783
|
+
"anyOf": [
|
|
784
|
+
{
|
|
785
|
+
"type": "string"
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
"type": "integer"
|
|
789
|
+
}
|
|
790
|
+
]
|
|
791
|
+
},
|
|
792
|
+
"title": "Location",
|
|
793
|
+
"type": "array"
|
|
794
|
+
},
|
|
795
|
+
"msg": {
|
|
796
|
+
"title": "Message",
|
|
797
|
+
"type": "string"
|
|
798
|
+
},
|
|
799
|
+
"type": {
|
|
800
|
+
"title": "Error Type",
|
|
801
|
+
"type": "string"
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
"required": [
|
|
805
|
+
"loc",
|
|
806
|
+
"msg",
|
|
807
|
+
"type"
|
|
808
|
+
],
|
|
809
|
+
"title": "ValidationError",
|
|
810
|
+
"type": "object"
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
},
|
|
814
|
+
"info": {
|
|
815
|
+
"summary": "Open-source core for an ebook library, exposed over HTTP.",
|
|
816
|
+
"title": "Silverfish API",
|
|
817
|
+
"version": "0.13.0"
|
|
818
|
+
},
|
|
819
|
+
"openapi": "3.1.0",
|
|
820
|
+
"paths": {
|
|
821
|
+
"/books": {
|
|
822
|
+
"get": {
|
|
823
|
+
"description": "List books, paginated and sorted.\n\nReturns a page of books controlled by `page` and `page_size`, ordered by\n`sort` field in the given `direction`. Out-of-range pagination values are\nrejected with `422`.",
|
|
824
|
+
"operationId": "list_books",
|
|
825
|
+
"parameters": [
|
|
826
|
+
{
|
|
827
|
+
"in": "query",
|
|
828
|
+
"name": "page",
|
|
829
|
+
"required": false,
|
|
830
|
+
"schema": {
|
|
831
|
+
"default": 1,
|
|
832
|
+
"minimum": 1,
|
|
833
|
+
"title": "Page",
|
|
834
|
+
"type": "integer"
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"in": "query",
|
|
839
|
+
"name": "page_size",
|
|
840
|
+
"required": false,
|
|
841
|
+
"schema": {
|
|
842
|
+
"default": 50,
|
|
843
|
+
"maximum": 200,
|
|
844
|
+
"minimum": 1,
|
|
845
|
+
"title": "Page Size",
|
|
846
|
+
"type": "integer"
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"in": "query",
|
|
851
|
+
"name": "sort",
|
|
852
|
+
"required": false,
|
|
853
|
+
"schema": {
|
|
854
|
+
"$ref": "#/components/schemas/SortField",
|
|
855
|
+
"default": "title"
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"in": "query",
|
|
860
|
+
"name": "direction",
|
|
861
|
+
"required": false,
|
|
862
|
+
"schema": {
|
|
863
|
+
"$ref": "#/components/schemas/SortDirection",
|
|
864
|
+
"default": "asc"
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
],
|
|
868
|
+
"responses": {
|
|
869
|
+
"200": {
|
|
870
|
+
"content": {
|
|
871
|
+
"application/json": {
|
|
872
|
+
"schema": {
|
|
873
|
+
"$ref": "#/components/schemas/BookPage"
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
"description": "Successful Response"
|
|
878
|
+
},
|
|
879
|
+
"422": {
|
|
880
|
+
"content": {
|
|
881
|
+
"application/json": {
|
|
882
|
+
"schema": {
|
|
883
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
"description": "Validation error"
|
|
888
|
+
},
|
|
889
|
+
"500": {
|
|
890
|
+
"content": {
|
|
891
|
+
"application/json": {
|
|
892
|
+
"schema": {
|
|
893
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
"description": "Internal server error"
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
"summary": "List Books",
|
|
901
|
+
"tags": [
|
|
902
|
+
"books"
|
|
903
|
+
]
|
|
904
|
+
},
|
|
905
|
+
"post": {
|
|
906
|
+
"description": "Upload a book file and create a new book.\n\nAccepts a multipart `file` whose extension must be one of the allowed\nupload formats; metadata is extracted from the file on import. Returns the\ncreated book with `201`, `400` if the file is rejected (unsupported\nextension or unreadable content), or `413` if it exceeds the upload size\nlimit.",
|
|
907
|
+
"operationId": "upload_book",
|
|
908
|
+
"requestBody": {
|
|
909
|
+
"content": {
|
|
910
|
+
"multipart/form-data": {
|
|
911
|
+
"schema": {
|
|
912
|
+
"$ref": "#/components/schemas/Body_upload_book"
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
},
|
|
916
|
+
"required": true
|
|
917
|
+
},
|
|
918
|
+
"responses": {
|
|
919
|
+
"201": {
|
|
920
|
+
"content": {
|
|
921
|
+
"application/json": {
|
|
922
|
+
"schema": {
|
|
923
|
+
"$ref": "#/components/schemas/BookOut"
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
},
|
|
927
|
+
"description": "Successful Response"
|
|
928
|
+
},
|
|
929
|
+
"400": {
|
|
930
|
+
"content": {
|
|
931
|
+
"application/json": {
|
|
932
|
+
"schema": {
|
|
933
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
"description": "Bad request"
|
|
938
|
+
},
|
|
939
|
+
"413": {
|
|
940
|
+
"content": {
|
|
941
|
+
"application/json": {
|
|
942
|
+
"schema": {
|
|
943
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
"description": "Payload too large"
|
|
948
|
+
},
|
|
949
|
+
"422": {
|
|
950
|
+
"content": {
|
|
951
|
+
"application/json": {
|
|
952
|
+
"schema": {
|
|
953
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
"description": "Validation error"
|
|
958
|
+
},
|
|
959
|
+
"500": {
|
|
960
|
+
"content": {
|
|
961
|
+
"application/json": {
|
|
962
|
+
"schema": {
|
|
963
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
"description": "Internal server error"
|
|
968
|
+
}
|
|
969
|
+
},
|
|
970
|
+
"summary": "Upload Book",
|
|
971
|
+
"tags": [
|
|
972
|
+
"books"
|
|
973
|
+
]
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
"/books/{book_id}": {
|
|
977
|
+
"delete": {
|
|
978
|
+
"description": "Delete a book and all of its files.\n\nRemoves the book identified by `book_id` along with its stored formats and\ncover, returning `204` with no body on success. Responds with `404` when the\nbook does not exist.",
|
|
979
|
+
"operationId": "delete_book",
|
|
980
|
+
"parameters": [
|
|
981
|
+
{
|
|
982
|
+
"in": "path",
|
|
983
|
+
"name": "book_id",
|
|
984
|
+
"required": true,
|
|
985
|
+
"schema": {
|
|
986
|
+
"title": "Book Id",
|
|
987
|
+
"type": "string"
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
],
|
|
991
|
+
"responses": {
|
|
992
|
+
"204": {
|
|
993
|
+
"description": "Successful Response"
|
|
994
|
+
},
|
|
995
|
+
"404": {
|
|
996
|
+
"content": {
|
|
997
|
+
"application/json": {
|
|
998
|
+
"schema": {
|
|
999
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
},
|
|
1003
|
+
"description": "Resource not found"
|
|
1004
|
+
},
|
|
1005
|
+
"422": {
|
|
1006
|
+
"content": {
|
|
1007
|
+
"application/json": {
|
|
1008
|
+
"schema": {
|
|
1009
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
},
|
|
1013
|
+
"description": "Validation Error"
|
|
1014
|
+
},
|
|
1015
|
+
"500": {
|
|
1016
|
+
"content": {
|
|
1017
|
+
"application/json": {
|
|
1018
|
+
"schema": {
|
|
1019
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
},
|
|
1023
|
+
"description": "Internal server error"
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
"summary": "Delete Book",
|
|
1027
|
+
"tags": [
|
|
1028
|
+
"books"
|
|
1029
|
+
]
|
|
1030
|
+
},
|
|
1031
|
+
"get": {
|
|
1032
|
+
"description": "Get a single book by its public id.\n\nLooks up the book identified by `book_id` (the book's public id) and returns\nits full metadata. Responds with `404` when no such book exists.",
|
|
1033
|
+
"operationId": "get_book",
|
|
1034
|
+
"parameters": [
|
|
1035
|
+
{
|
|
1036
|
+
"in": "path",
|
|
1037
|
+
"name": "book_id",
|
|
1038
|
+
"required": true,
|
|
1039
|
+
"schema": {
|
|
1040
|
+
"title": "Book Id",
|
|
1041
|
+
"type": "string"
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
],
|
|
1045
|
+
"responses": {
|
|
1046
|
+
"200": {
|
|
1047
|
+
"content": {
|
|
1048
|
+
"application/json": {
|
|
1049
|
+
"schema": {
|
|
1050
|
+
"$ref": "#/components/schemas/BookOut"
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1054
|
+
"description": "Successful Response"
|
|
1055
|
+
},
|
|
1056
|
+
"404": {
|
|
1057
|
+
"content": {
|
|
1058
|
+
"application/json": {
|
|
1059
|
+
"schema": {
|
|
1060
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
"description": "Resource not found"
|
|
1065
|
+
},
|
|
1066
|
+
"422": {
|
|
1067
|
+
"content": {
|
|
1068
|
+
"application/json": {
|
|
1069
|
+
"schema": {
|
|
1070
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
},
|
|
1074
|
+
"description": "Validation error"
|
|
1075
|
+
},
|
|
1076
|
+
"500": {
|
|
1077
|
+
"content": {
|
|
1078
|
+
"application/json": {
|
|
1079
|
+
"schema": {
|
|
1080
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
},
|
|
1084
|
+
"description": "Internal server error"
|
|
1085
|
+
}
|
|
1086
|
+
},
|
|
1087
|
+
"summary": "Get Book",
|
|
1088
|
+
"tags": [
|
|
1089
|
+
"books"
|
|
1090
|
+
]
|
|
1091
|
+
},
|
|
1092
|
+
"patch": {
|
|
1093
|
+
"description": "Partially update a book's metadata.\n\nApplies only the fields explicitly set in the request body, leaving omitted\nfields untouched, and returns the updated book. Responds with `400` when the\npatch is empty or violates a domain rule (e.g. an out-of-range `rating`),\nand `404` when the book does not exist.",
|
|
1094
|
+
"operationId": "update_book",
|
|
1095
|
+
"parameters": [
|
|
1096
|
+
{
|
|
1097
|
+
"in": "path",
|
|
1098
|
+
"name": "book_id",
|
|
1099
|
+
"required": true,
|
|
1100
|
+
"schema": {
|
|
1101
|
+
"title": "Book Id",
|
|
1102
|
+
"type": "string"
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
],
|
|
1106
|
+
"requestBody": {
|
|
1107
|
+
"content": {
|
|
1108
|
+
"application/json": {
|
|
1109
|
+
"schema": {
|
|
1110
|
+
"$ref": "#/components/schemas/BookUpdate"
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
},
|
|
1114
|
+
"required": true
|
|
1115
|
+
},
|
|
1116
|
+
"responses": {
|
|
1117
|
+
"200": {
|
|
1118
|
+
"content": {
|
|
1119
|
+
"application/json": {
|
|
1120
|
+
"schema": {
|
|
1121
|
+
"$ref": "#/components/schemas/BookOut"
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
"description": "Successful Response"
|
|
1126
|
+
},
|
|
1127
|
+
"400": {
|
|
1128
|
+
"content": {
|
|
1129
|
+
"application/json": {
|
|
1130
|
+
"schema": {
|
|
1131
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
"description": "Bad request"
|
|
1136
|
+
},
|
|
1137
|
+
"404": {
|
|
1138
|
+
"content": {
|
|
1139
|
+
"application/json": {
|
|
1140
|
+
"schema": {
|
|
1141
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
"description": "Resource not found"
|
|
1146
|
+
},
|
|
1147
|
+
"422": {
|
|
1148
|
+
"content": {
|
|
1149
|
+
"application/json": {
|
|
1150
|
+
"schema": {
|
|
1151
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
},
|
|
1155
|
+
"description": "Validation error"
|
|
1156
|
+
},
|
|
1157
|
+
"500": {
|
|
1158
|
+
"content": {
|
|
1159
|
+
"application/json": {
|
|
1160
|
+
"schema": {
|
|
1161
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
},
|
|
1165
|
+
"description": "Internal server error"
|
|
1166
|
+
}
|
|
1167
|
+
},
|
|
1168
|
+
"summary": "Update Book",
|
|
1169
|
+
"tags": [
|
|
1170
|
+
"books"
|
|
1171
|
+
]
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
"/books/{book_id}/convert": {
|
|
1175
|
+
"post": {
|
|
1176
|
+
"description": "Convert a book to another format.\n\nEnqueues a background conversion to `target_format`, optionally from an\nexplicit `source_format` (otherwise the best available source is chosen), and\nreturns `202` with a job to poll at `/jobs/{id}`. Responds with `404` if the\nbook is missing, `503` if `ebook-convert` is unavailable, `409` if the target\nformat already exists or an identical conversion is already in progress, and\n`400` if no suitable source format is available.",
|
|
1177
|
+
"operationId": "convert_book",
|
|
1178
|
+
"parameters": [
|
|
1179
|
+
{
|
|
1180
|
+
"in": "path",
|
|
1181
|
+
"name": "book_id",
|
|
1182
|
+
"required": true,
|
|
1183
|
+
"schema": {
|
|
1184
|
+
"title": "Book Id",
|
|
1185
|
+
"type": "string"
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
],
|
|
1189
|
+
"requestBody": {
|
|
1190
|
+
"content": {
|
|
1191
|
+
"application/json": {
|
|
1192
|
+
"schema": {
|
|
1193
|
+
"$ref": "#/components/schemas/ConvertRequest"
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
"required": true
|
|
1198
|
+
},
|
|
1199
|
+
"responses": {
|
|
1200
|
+
"202": {
|
|
1201
|
+
"content": {
|
|
1202
|
+
"application/json": {
|
|
1203
|
+
"schema": {
|
|
1204
|
+
"$ref": "#/components/schemas/JobOut"
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
"description": "Successful Response"
|
|
1209
|
+
},
|
|
1210
|
+
"400": {
|
|
1211
|
+
"content": {
|
|
1212
|
+
"application/json": {
|
|
1213
|
+
"schema": {
|
|
1214
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
},
|
|
1218
|
+
"description": "Bad request"
|
|
1219
|
+
},
|
|
1220
|
+
"404": {
|
|
1221
|
+
"content": {
|
|
1222
|
+
"application/json": {
|
|
1223
|
+
"schema": {
|
|
1224
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
},
|
|
1228
|
+
"description": "Resource not found"
|
|
1229
|
+
},
|
|
1230
|
+
"409": {
|
|
1231
|
+
"content": {
|
|
1232
|
+
"application/json": {
|
|
1233
|
+
"schema": {
|
|
1234
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
},
|
|
1238
|
+
"description": "Conflict"
|
|
1239
|
+
},
|
|
1240
|
+
"422": {
|
|
1241
|
+
"content": {
|
|
1242
|
+
"application/json": {
|
|
1243
|
+
"schema": {
|
|
1244
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
},
|
|
1248
|
+
"description": "Validation error"
|
|
1249
|
+
},
|
|
1250
|
+
"500": {
|
|
1251
|
+
"content": {
|
|
1252
|
+
"application/json": {
|
|
1253
|
+
"schema": {
|
|
1254
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
},
|
|
1258
|
+
"description": "Internal server error"
|
|
1259
|
+
},
|
|
1260
|
+
"503": {
|
|
1261
|
+
"content": {
|
|
1262
|
+
"application/json": {
|
|
1263
|
+
"schema": {
|
|
1264
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
},
|
|
1268
|
+
"description": "Service unavailable"
|
|
1269
|
+
}
|
|
1270
|
+
},
|
|
1271
|
+
"summary": "Convert Book",
|
|
1272
|
+
"tags": [
|
|
1273
|
+
"books"
|
|
1274
|
+
]
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1277
|
+
"/books/{book_id}/cover": {
|
|
1278
|
+
"get": {
|
|
1279
|
+
"description": "Download a book's cover image.\n\nReturns the cover bytes as `image/jpeg` for the book identified by\n`book_id`. Responds with `404` when the book has no recorded cover or the\ncover file is missing from storage.",
|
|
1280
|
+
"operationId": "get_book_cover",
|
|
1281
|
+
"parameters": [
|
|
1282
|
+
{
|
|
1283
|
+
"in": "path",
|
|
1284
|
+
"name": "book_id",
|
|
1285
|
+
"required": true,
|
|
1286
|
+
"schema": {
|
|
1287
|
+
"title": "Book Id",
|
|
1288
|
+
"type": "string"
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
],
|
|
1292
|
+
"responses": {
|
|
1293
|
+
"200": {
|
|
1294
|
+
"description": "Successful Response"
|
|
1295
|
+
},
|
|
1296
|
+
"404": {
|
|
1297
|
+
"content": {
|
|
1298
|
+
"application/json": {
|
|
1299
|
+
"schema": {
|
|
1300
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1304
|
+
"description": "Resource not found"
|
|
1305
|
+
},
|
|
1306
|
+
"422": {
|
|
1307
|
+
"content": {
|
|
1308
|
+
"application/json": {
|
|
1309
|
+
"schema": {
|
|
1310
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
},
|
|
1314
|
+
"description": "Validation Error"
|
|
1315
|
+
},
|
|
1316
|
+
"500": {
|
|
1317
|
+
"content": {
|
|
1318
|
+
"application/json": {
|
|
1319
|
+
"schema": {
|
|
1320
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
"description": "Internal server error"
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
"summary": "Get Book Cover",
|
|
1328
|
+
"tags": [
|
|
1329
|
+
"books"
|
|
1330
|
+
]
|
|
1331
|
+
}
|
|
1332
|
+
},
|
|
1333
|
+
"/books/{book_id}/formats/{book_format}": {
|
|
1334
|
+
"delete": {
|
|
1335
|
+
"description": "Delete one format of a book.\n\nRemoves the file for the given `book_format` of the book identified by\n`book_id`, returning `204` with no body on success. Responds with `404` when\nthe book does not exist or it has no such format.",
|
|
1336
|
+
"operationId": "delete_book_format",
|
|
1337
|
+
"parameters": [
|
|
1338
|
+
{
|
|
1339
|
+
"in": "path",
|
|
1340
|
+
"name": "book_format",
|
|
1341
|
+
"required": true,
|
|
1342
|
+
"schema": {
|
|
1343
|
+
"title": "Book Format",
|
|
1344
|
+
"type": "string"
|
|
1345
|
+
}
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
"in": "path",
|
|
1349
|
+
"name": "book_id",
|
|
1350
|
+
"required": true,
|
|
1351
|
+
"schema": {
|
|
1352
|
+
"title": "Book Id",
|
|
1353
|
+
"type": "string"
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
],
|
|
1357
|
+
"responses": {
|
|
1358
|
+
"204": {
|
|
1359
|
+
"description": "Successful Response"
|
|
1360
|
+
},
|
|
1361
|
+
"404": {
|
|
1362
|
+
"content": {
|
|
1363
|
+
"application/json": {
|
|
1364
|
+
"schema": {
|
|
1365
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
},
|
|
1369
|
+
"description": "Resource not found"
|
|
1370
|
+
},
|
|
1371
|
+
"422": {
|
|
1372
|
+
"content": {
|
|
1373
|
+
"application/json": {
|
|
1374
|
+
"schema": {
|
|
1375
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
},
|
|
1379
|
+
"description": "Validation Error"
|
|
1380
|
+
},
|
|
1381
|
+
"500": {
|
|
1382
|
+
"content": {
|
|
1383
|
+
"application/json": {
|
|
1384
|
+
"schema": {
|
|
1385
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
},
|
|
1389
|
+
"description": "Internal server error"
|
|
1390
|
+
}
|
|
1391
|
+
},
|
|
1392
|
+
"summary": "Delete Book Format",
|
|
1393
|
+
"tags": [
|
|
1394
|
+
"books"
|
|
1395
|
+
]
|
|
1396
|
+
},
|
|
1397
|
+
"get": {
|
|
1398
|
+
"description": "Download one format of a book.\n\nReturns the file for the given `book_format` of the book identified by\n`book_id` as an `application/octet-stream` attachment, with the stored\nfilename in the `Content-Disposition` header. Responds with `404` when the\nbook lacks that format or the file is missing from storage.",
|
|
1399
|
+
"operationId": "download_book_format",
|
|
1400
|
+
"parameters": [
|
|
1401
|
+
{
|
|
1402
|
+
"in": "path",
|
|
1403
|
+
"name": "book_format",
|
|
1404
|
+
"required": true,
|
|
1405
|
+
"schema": {
|
|
1406
|
+
"title": "Book Format",
|
|
1407
|
+
"type": "string"
|
|
1408
|
+
}
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
"in": "path",
|
|
1412
|
+
"name": "book_id",
|
|
1413
|
+
"required": true,
|
|
1414
|
+
"schema": {
|
|
1415
|
+
"title": "Book Id",
|
|
1416
|
+
"type": "string"
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
],
|
|
1420
|
+
"responses": {
|
|
1421
|
+
"200": {
|
|
1422
|
+
"description": "Successful Response"
|
|
1423
|
+
},
|
|
1424
|
+
"404": {
|
|
1425
|
+
"content": {
|
|
1426
|
+
"application/json": {
|
|
1427
|
+
"schema": {
|
|
1428
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
},
|
|
1432
|
+
"description": "Resource not found"
|
|
1433
|
+
},
|
|
1434
|
+
"422": {
|
|
1435
|
+
"content": {
|
|
1436
|
+
"application/json": {
|
|
1437
|
+
"schema": {
|
|
1438
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
},
|
|
1442
|
+
"description": "Validation Error"
|
|
1443
|
+
},
|
|
1444
|
+
"500": {
|
|
1445
|
+
"content": {
|
|
1446
|
+
"application/json": {
|
|
1447
|
+
"schema": {
|
|
1448
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
},
|
|
1452
|
+
"description": "Internal server error"
|
|
1453
|
+
}
|
|
1454
|
+
},
|
|
1455
|
+
"summary": "Download Book Format",
|
|
1456
|
+
"tags": [
|
|
1457
|
+
"books"
|
|
1458
|
+
]
|
|
1459
|
+
}
|
|
1460
|
+
},
|
|
1461
|
+
"/books/{book_id}/refresh-metadata": {
|
|
1462
|
+
"post": {
|
|
1463
|
+
"description": "Re-extract metadata from a book file and return the updated book.\n\nReads metadata afresh from the book's `source_format` file and merges it in:\nfields the extraction produced replace the current ones, fields it could not\nread are kept. Responds with `404` when the book or requested format is not\nfound, and `400` for any other refresh failure.",
|
|
1464
|
+
"operationId": "refresh_metadata",
|
|
1465
|
+
"parameters": [
|
|
1466
|
+
{
|
|
1467
|
+
"in": "path",
|
|
1468
|
+
"name": "book_id",
|
|
1469
|
+
"required": true,
|
|
1470
|
+
"schema": {
|
|
1471
|
+
"title": "Book Id",
|
|
1472
|
+
"type": "string"
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
],
|
|
1476
|
+
"requestBody": {
|
|
1477
|
+
"content": {
|
|
1478
|
+
"application/json": {
|
|
1479
|
+
"schema": {
|
|
1480
|
+
"$ref": "#/components/schemas/RefreshRequest"
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
},
|
|
1484
|
+
"required": true
|
|
1485
|
+
},
|
|
1486
|
+
"responses": {
|
|
1487
|
+
"200": {
|
|
1488
|
+
"content": {
|
|
1489
|
+
"application/json": {
|
|
1490
|
+
"schema": {
|
|
1491
|
+
"$ref": "#/components/schemas/BookOut"
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
},
|
|
1495
|
+
"description": "Successful Response"
|
|
1496
|
+
},
|
|
1497
|
+
"400": {
|
|
1498
|
+
"content": {
|
|
1499
|
+
"application/json": {
|
|
1500
|
+
"schema": {
|
|
1501
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
},
|
|
1505
|
+
"description": "Bad request"
|
|
1506
|
+
},
|
|
1507
|
+
"404": {
|
|
1508
|
+
"content": {
|
|
1509
|
+
"application/json": {
|
|
1510
|
+
"schema": {
|
|
1511
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
},
|
|
1515
|
+
"description": "Resource not found"
|
|
1516
|
+
},
|
|
1517
|
+
"422": {
|
|
1518
|
+
"content": {
|
|
1519
|
+
"application/json": {
|
|
1520
|
+
"schema": {
|
|
1521
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1525
|
+
"description": "Validation error"
|
|
1526
|
+
},
|
|
1527
|
+
"500": {
|
|
1528
|
+
"content": {
|
|
1529
|
+
"application/json": {
|
|
1530
|
+
"schema": {
|
|
1531
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
},
|
|
1535
|
+
"description": "Internal server error"
|
|
1536
|
+
}
|
|
1537
|
+
},
|
|
1538
|
+
"summary": "Refresh Metadata",
|
|
1539
|
+
"tags": [
|
|
1540
|
+
"books"
|
|
1541
|
+
]
|
|
1542
|
+
}
|
|
1543
|
+
},
|
|
1544
|
+
"/books/{book_id}/send": {
|
|
1545
|
+
"post": {
|
|
1546
|
+
"description": "Email a book to a recipient.\n\nEnqueues a background job to send the book to `to_email` in the requested\n`format` (or the best available sendable format if unspecified), and returns\n`202` with a job to poll at `/jobs/{id}`. Responds with `404` if the book is\nmissing, `503` if SMTP is not configured, and `400` if the book has no\nmatching or sendable format.",
|
|
1547
|
+
"operationId": "send_book",
|
|
1548
|
+
"parameters": [
|
|
1549
|
+
{
|
|
1550
|
+
"in": "path",
|
|
1551
|
+
"name": "book_id",
|
|
1552
|
+
"required": true,
|
|
1553
|
+
"schema": {
|
|
1554
|
+
"title": "Book Id",
|
|
1555
|
+
"type": "string"
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
],
|
|
1559
|
+
"requestBody": {
|
|
1560
|
+
"content": {
|
|
1561
|
+
"application/json": {
|
|
1562
|
+
"schema": {
|
|
1563
|
+
"$ref": "#/components/schemas/SendRequest"
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
},
|
|
1567
|
+
"required": true
|
|
1568
|
+
},
|
|
1569
|
+
"responses": {
|
|
1570
|
+
"202": {
|
|
1571
|
+
"content": {
|
|
1572
|
+
"application/json": {
|
|
1573
|
+
"schema": {
|
|
1574
|
+
"$ref": "#/components/schemas/JobOut"
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
},
|
|
1578
|
+
"description": "Successful Response"
|
|
1579
|
+
},
|
|
1580
|
+
"400": {
|
|
1581
|
+
"content": {
|
|
1582
|
+
"application/json": {
|
|
1583
|
+
"schema": {
|
|
1584
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
},
|
|
1588
|
+
"description": "Bad request"
|
|
1589
|
+
},
|
|
1590
|
+
"404": {
|
|
1591
|
+
"content": {
|
|
1592
|
+
"application/json": {
|
|
1593
|
+
"schema": {
|
|
1594
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
},
|
|
1598
|
+
"description": "Resource not found"
|
|
1599
|
+
},
|
|
1600
|
+
"422": {
|
|
1601
|
+
"content": {
|
|
1602
|
+
"application/json": {
|
|
1603
|
+
"schema": {
|
|
1604
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
},
|
|
1608
|
+
"description": "Validation error"
|
|
1609
|
+
},
|
|
1610
|
+
"500": {
|
|
1611
|
+
"content": {
|
|
1612
|
+
"application/json": {
|
|
1613
|
+
"schema": {
|
|
1614
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
},
|
|
1618
|
+
"description": "Internal server error"
|
|
1619
|
+
},
|
|
1620
|
+
"503": {
|
|
1621
|
+
"content": {
|
|
1622
|
+
"application/json": {
|
|
1623
|
+
"schema": {
|
|
1624
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
},
|
|
1628
|
+
"description": "Service unavailable"
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
"summary": "Send Book",
|
|
1632
|
+
"tags": [
|
|
1633
|
+
"books"
|
|
1634
|
+
]
|
|
1635
|
+
}
|
|
1636
|
+
},
|
|
1637
|
+
"/config/email": {
|
|
1638
|
+
"get": {
|
|
1639
|
+
"description": "Return the non-secret SMTP settings for display.\n\nReports whether SMTP is `configured` along with `host`, `port`,\n`from_address` (falling back to the username when no explicit from is set)\nand `security`. The password is never read or returned.",
|
|
1640
|
+
"operationId": "get_email_config",
|
|
1641
|
+
"responses": {
|
|
1642
|
+
"200": {
|
|
1643
|
+
"content": {
|
|
1644
|
+
"application/json": {
|
|
1645
|
+
"schema": {
|
|
1646
|
+
"$ref": "#/components/schemas/EmailConfigOut"
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
},
|
|
1650
|
+
"description": "Successful Response"
|
|
1651
|
+
},
|
|
1652
|
+
"500": {
|
|
1653
|
+
"content": {
|
|
1654
|
+
"application/json": {
|
|
1655
|
+
"schema": {
|
|
1656
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
},
|
|
1660
|
+
"description": "Internal server error"
|
|
1661
|
+
}
|
|
1662
|
+
},
|
|
1663
|
+
"summary": "Get Email Config",
|
|
1664
|
+
"tags": [
|
|
1665
|
+
"config"
|
|
1666
|
+
]
|
|
1667
|
+
}
|
|
1668
|
+
},
|
|
1669
|
+
"/config/email/test": {
|
|
1670
|
+
"post": {
|
|
1671
|
+
"description": "Send a test email to verify SMTP connectivity.\n\nSends a test message to `to_email` and returns 204 on success. Responds 503\nif SMTP is not configured, or 502 if the connection, authentication or send\nfails.",
|
|
1672
|
+
"operationId": "test_email_config",
|
|
1673
|
+
"requestBody": {
|
|
1674
|
+
"content": {
|
|
1675
|
+
"application/json": {
|
|
1676
|
+
"schema": {
|
|
1677
|
+
"$ref": "#/components/schemas/EmailTestRequest"
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
},
|
|
1681
|
+
"required": true
|
|
1682
|
+
},
|
|
1683
|
+
"responses": {
|
|
1684
|
+
"204": {
|
|
1685
|
+
"description": "Successful Response"
|
|
1686
|
+
},
|
|
1687
|
+
"422": {
|
|
1688
|
+
"content": {
|
|
1689
|
+
"application/json": {
|
|
1690
|
+
"schema": {
|
|
1691
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
},
|
|
1695
|
+
"description": "Validation Error"
|
|
1696
|
+
},
|
|
1697
|
+
"500": {
|
|
1698
|
+
"content": {
|
|
1699
|
+
"application/json": {
|
|
1700
|
+
"schema": {
|
|
1701
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
},
|
|
1705
|
+
"description": "Internal server error"
|
|
1706
|
+
},
|
|
1707
|
+
"503": {
|
|
1708
|
+
"content": {
|
|
1709
|
+
"application/json": {
|
|
1710
|
+
"schema": {
|
|
1711
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
},
|
|
1715
|
+
"description": "Service unavailable"
|
|
1716
|
+
}
|
|
1717
|
+
},
|
|
1718
|
+
"summary": "Test Email Config",
|
|
1719
|
+
"tags": [
|
|
1720
|
+
"config"
|
|
1721
|
+
]
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
"/export/calibre": {
|
|
1725
|
+
"post": {
|
|
1726
|
+
"description": "Start an async Calibre export; the download link is emailed when ready.\n\nEnqueues a background job that snapshots the requested books (or the whole\nlibrary when `book_ids` is omitted) to a zip and emails a time-limited link\nto `to_email`, returning 202 with the new job. Responds 503 when export is\nunavailable (the calibredb binary is missing, SMTP is not configured, or no\npublic base URL is set for an absolute link), and 400 for a malformed book id.",
|
|
1727
|
+
"operationId": "start_export",
|
|
1728
|
+
"requestBody": {
|
|
1729
|
+
"content": {
|
|
1730
|
+
"application/json": {
|
|
1731
|
+
"schema": {
|
|
1732
|
+
"$ref": "#/components/schemas/ExportRequest"
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
},
|
|
1736
|
+
"required": true
|
|
1737
|
+
},
|
|
1738
|
+
"responses": {
|
|
1739
|
+
"202": {
|
|
1740
|
+
"content": {
|
|
1741
|
+
"application/json": {
|
|
1742
|
+
"schema": {
|
|
1743
|
+
"$ref": "#/components/schemas/JobOut"
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
},
|
|
1747
|
+
"description": "Successful Response"
|
|
1748
|
+
},
|
|
1749
|
+
"400": {
|
|
1750
|
+
"content": {
|
|
1751
|
+
"application/json": {
|
|
1752
|
+
"schema": {
|
|
1753
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
},
|
|
1757
|
+
"description": "Bad request"
|
|
1758
|
+
},
|
|
1759
|
+
"422": {
|
|
1760
|
+
"content": {
|
|
1761
|
+
"application/json": {
|
|
1762
|
+
"schema": {
|
|
1763
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
},
|
|
1767
|
+
"description": "Validation error"
|
|
1768
|
+
},
|
|
1769
|
+
"500": {
|
|
1770
|
+
"content": {
|
|
1771
|
+
"application/json": {
|
|
1772
|
+
"schema": {
|
|
1773
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
},
|
|
1777
|
+
"description": "Internal server error"
|
|
1778
|
+
},
|
|
1779
|
+
"503": {
|
|
1780
|
+
"content": {
|
|
1781
|
+
"application/json": {
|
|
1782
|
+
"schema": {
|
|
1783
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
},
|
|
1787
|
+
"description": "Service unavailable"
|
|
1788
|
+
}
|
|
1789
|
+
},
|
|
1790
|
+
"summary": "Start Export",
|
|
1791
|
+
"tags": [
|
|
1792
|
+
"export"
|
|
1793
|
+
]
|
|
1794
|
+
}
|
|
1795
|
+
},
|
|
1796
|
+
"/export/download/{token}": {
|
|
1797
|
+
"get": {
|
|
1798
|
+
"description": "Stream a finished export zip for a valid, unexpired token.\n\nServed via ``FileResponse``, which streams the file and honours HTTP Range\nrequests, so a large download is memory-light and resumable.",
|
|
1799
|
+
"operationId": "download_export",
|
|
1800
|
+
"parameters": [
|
|
1801
|
+
{
|
|
1802
|
+
"in": "path",
|
|
1803
|
+
"name": "token",
|
|
1804
|
+
"required": true,
|
|
1805
|
+
"schema": {
|
|
1806
|
+
"title": "Token",
|
|
1807
|
+
"type": "string"
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
],
|
|
1811
|
+
"responses": {
|
|
1812
|
+
"200": {
|
|
1813
|
+
"description": "Successful Response"
|
|
1814
|
+
},
|
|
1815
|
+
"404": {
|
|
1816
|
+
"content": {
|
|
1817
|
+
"application/json": {
|
|
1818
|
+
"schema": {
|
|
1819
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
},
|
|
1823
|
+
"description": "Resource not found"
|
|
1824
|
+
},
|
|
1825
|
+
"422": {
|
|
1826
|
+
"content": {
|
|
1827
|
+
"application/json": {
|
|
1828
|
+
"schema": {
|
|
1829
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
},
|
|
1833
|
+
"description": "Validation Error"
|
|
1834
|
+
},
|
|
1835
|
+
"500": {
|
|
1836
|
+
"content": {
|
|
1837
|
+
"application/json": {
|
|
1838
|
+
"schema": {
|
|
1839
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
},
|
|
1843
|
+
"description": "Internal server error"
|
|
1844
|
+
}
|
|
1845
|
+
},
|
|
1846
|
+
"summary": "Download Export",
|
|
1847
|
+
"tags": [
|
|
1848
|
+
"export"
|
|
1849
|
+
]
|
|
1850
|
+
}
|
|
1851
|
+
},
|
|
1852
|
+
"/health": {
|
|
1853
|
+
"get": {
|
|
1854
|
+
"description": "Report liveness and the availability of optional dependencies.\n\nAlways returns `status` ``\"ok\"`` and the API `version`, plus the\nCalibre binary availability (`convert_available`, `metadata_available`)\nand whether send-to-ereader is usable (`send_available`, true when SMTP\nis configured).",
|
|
1855
|
+
"operationId": "health",
|
|
1856
|
+
"responses": {
|
|
1857
|
+
"200": {
|
|
1858
|
+
"content": {
|
|
1859
|
+
"application/json": {
|
|
1860
|
+
"schema": {
|
|
1861
|
+
"$ref": "#/components/schemas/HealthResponse"
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
},
|
|
1865
|
+
"description": "Successful Response"
|
|
1866
|
+
},
|
|
1867
|
+
"500": {
|
|
1868
|
+
"content": {
|
|
1869
|
+
"application/json": {
|
|
1870
|
+
"schema": {
|
|
1871
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
},
|
|
1875
|
+
"description": "Internal server error"
|
|
1876
|
+
}
|
|
1877
|
+
},
|
|
1878
|
+
"summary": "Health",
|
|
1879
|
+
"tags": [
|
|
1880
|
+
"system"
|
|
1881
|
+
]
|
|
1882
|
+
}
|
|
1883
|
+
},
|
|
1884
|
+
"/jobs/{job_id}": {
|
|
1885
|
+
"get": {
|
|
1886
|
+
"description": "Return the current status and progress of a single job.\n\nLooks up the job by `job_id` and returns its latest state for one-shot\npolling. Responds 404 if no job with that id exists; use `/jobs/{job_id}/stream`\ninstead to follow progress live.",
|
|
1887
|
+
"operationId": "get_job",
|
|
1888
|
+
"parameters": [
|
|
1889
|
+
{
|
|
1890
|
+
"in": "path",
|
|
1891
|
+
"name": "job_id",
|
|
1892
|
+
"required": true,
|
|
1893
|
+
"schema": {
|
|
1894
|
+
"title": "Job Id",
|
|
1895
|
+
"type": "string"
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
],
|
|
1899
|
+
"responses": {
|
|
1900
|
+
"200": {
|
|
1901
|
+
"content": {
|
|
1902
|
+
"application/json": {
|
|
1903
|
+
"schema": {
|
|
1904
|
+
"$ref": "#/components/schemas/JobOut"
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
},
|
|
1908
|
+
"description": "Successful Response"
|
|
1909
|
+
},
|
|
1910
|
+
"404": {
|
|
1911
|
+
"content": {
|
|
1912
|
+
"application/json": {
|
|
1913
|
+
"schema": {
|
|
1914
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
},
|
|
1918
|
+
"description": "Resource not found"
|
|
1919
|
+
},
|
|
1920
|
+
"422": {
|
|
1921
|
+
"content": {
|
|
1922
|
+
"application/json": {
|
|
1923
|
+
"schema": {
|
|
1924
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
},
|
|
1928
|
+
"description": "Validation Error"
|
|
1929
|
+
},
|
|
1930
|
+
"500": {
|
|
1931
|
+
"content": {
|
|
1932
|
+
"application/json": {
|
|
1933
|
+
"schema": {
|
|
1934
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
},
|
|
1938
|
+
"description": "Internal server error"
|
|
1939
|
+
}
|
|
1940
|
+
},
|
|
1941
|
+
"summary": "Get Job",
|
|
1942
|
+
"tags": [
|
|
1943
|
+
"jobs"
|
|
1944
|
+
]
|
|
1945
|
+
}
|
|
1946
|
+
},
|
|
1947
|
+
"/jobs/{job_id}/stream": {
|
|
1948
|
+
"get": {
|
|
1949
|
+
"description": "Stream a job's status/progress as Server-Sent Events until it finishes.\n\nOne open connection replaces repeated polling. Updates are event-driven: the\nstream blocks (in a threadpool, so the event loop stays free) until the job\nactually changes, then emits \u2014 so it reflects each new binary output, not a\nfixed tick.",
|
|
1950
|
+
"operationId": "stream_job",
|
|
1951
|
+
"parameters": [
|
|
1952
|
+
{
|
|
1953
|
+
"in": "path",
|
|
1954
|
+
"name": "job_id",
|
|
1955
|
+
"required": true,
|
|
1956
|
+
"schema": {
|
|
1957
|
+
"title": "Job Id",
|
|
1958
|
+
"type": "string"
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
],
|
|
1962
|
+
"responses": {
|
|
1963
|
+
"200": {
|
|
1964
|
+
"description": "Successful Response"
|
|
1965
|
+
},
|
|
1966
|
+
"404": {
|
|
1967
|
+
"content": {
|
|
1968
|
+
"application/json": {
|
|
1969
|
+
"schema": {
|
|
1970
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
},
|
|
1974
|
+
"description": "Resource not found"
|
|
1975
|
+
},
|
|
1976
|
+
"422": {
|
|
1977
|
+
"content": {
|
|
1978
|
+
"application/json": {
|
|
1979
|
+
"schema": {
|
|
1980
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1981
|
+
}
|
|
1982
|
+
}
|
|
1983
|
+
},
|
|
1984
|
+
"description": "Validation Error"
|
|
1985
|
+
},
|
|
1986
|
+
"500": {
|
|
1987
|
+
"content": {
|
|
1988
|
+
"application/json": {
|
|
1989
|
+
"schema": {
|
|
1990
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
},
|
|
1994
|
+
"description": "Internal server error"
|
|
1995
|
+
}
|
|
1996
|
+
},
|
|
1997
|
+
"summary": "Stream Job",
|
|
1998
|
+
"tags": [
|
|
1999
|
+
"jobs"
|
|
2000
|
+
]
|
|
2001
|
+
}
|
|
2002
|
+
},
|
|
2003
|
+
"/search": {
|
|
2004
|
+
"get": {
|
|
2005
|
+
"description": "Search books by a text query and filters.\n\nReturns a paginated page of books whose title, author, series or tags match\nthe query `q` (case-insensitive substring match), narrowed by the optional\n`include_tags`, `exclude_tags`, `languages`, `formats`, and\n`rating_min`/`rating_max` filters. Out-of-range pagination or rating values\nare rejected with `422`.",
|
|
2006
|
+
"operationId": "search_books",
|
|
2007
|
+
"parameters": [
|
|
2008
|
+
{
|
|
2009
|
+
"in": "query",
|
|
2010
|
+
"name": "q",
|
|
2011
|
+
"required": false,
|
|
2012
|
+
"schema": {
|
|
2013
|
+
"default": "",
|
|
2014
|
+
"title": "Q",
|
|
2015
|
+
"type": "string"
|
|
2016
|
+
}
|
|
2017
|
+
},
|
|
2018
|
+
{
|
|
2019
|
+
"in": "query",
|
|
2020
|
+
"name": "page",
|
|
2021
|
+
"required": false,
|
|
2022
|
+
"schema": {
|
|
2023
|
+
"default": 1,
|
|
2024
|
+
"minimum": 1,
|
|
2025
|
+
"title": "Page",
|
|
2026
|
+
"type": "integer"
|
|
2027
|
+
}
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
"in": "query",
|
|
2031
|
+
"name": "page_size",
|
|
2032
|
+
"required": false,
|
|
2033
|
+
"schema": {
|
|
2034
|
+
"default": 50,
|
|
2035
|
+
"maximum": 200,
|
|
2036
|
+
"minimum": 1,
|
|
2037
|
+
"title": "Page Size",
|
|
2038
|
+
"type": "integer"
|
|
2039
|
+
}
|
|
2040
|
+
},
|
|
2041
|
+
{
|
|
2042
|
+
"in": "query",
|
|
2043
|
+
"name": "include_tags",
|
|
2044
|
+
"required": false,
|
|
2045
|
+
"schema": {
|
|
2046
|
+
"anyOf": [
|
|
2047
|
+
{
|
|
2048
|
+
"items": {
|
|
2049
|
+
"type": "string"
|
|
2050
|
+
},
|
|
2051
|
+
"maxItems": 100,
|
|
2052
|
+
"type": "array"
|
|
2053
|
+
},
|
|
2054
|
+
{
|
|
2055
|
+
"type": "null"
|
|
2056
|
+
}
|
|
2057
|
+
],
|
|
2058
|
+
"title": "Include Tags"
|
|
2059
|
+
}
|
|
2060
|
+
},
|
|
2061
|
+
{
|
|
2062
|
+
"in": "query",
|
|
2063
|
+
"name": "exclude_tags",
|
|
2064
|
+
"required": false,
|
|
2065
|
+
"schema": {
|
|
2066
|
+
"anyOf": [
|
|
2067
|
+
{
|
|
2068
|
+
"items": {
|
|
2069
|
+
"type": "string"
|
|
2070
|
+
},
|
|
2071
|
+
"maxItems": 100,
|
|
2072
|
+
"type": "array"
|
|
2073
|
+
},
|
|
2074
|
+
{
|
|
2075
|
+
"type": "null"
|
|
2076
|
+
}
|
|
2077
|
+
],
|
|
2078
|
+
"title": "Exclude Tags"
|
|
2079
|
+
}
|
|
2080
|
+
},
|
|
2081
|
+
{
|
|
2082
|
+
"in": "query",
|
|
2083
|
+
"name": "languages",
|
|
2084
|
+
"required": false,
|
|
2085
|
+
"schema": {
|
|
2086
|
+
"anyOf": [
|
|
2087
|
+
{
|
|
2088
|
+
"items": {
|
|
2089
|
+
"type": "string"
|
|
2090
|
+
},
|
|
2091
|
+
"maxItems": 100,
|
|
2092
|
+
"type": "array"
|
|
2093
|
+
},
|
|
2094
|
+
{
|
|
2095
|
+
"type": "null"
|
|
2096
|
+
}
|
|
2097
|
+
],
|
|
2098
|
+
"title": "Languages"
|
|
2099
|
+
}
|
|
2100
|
+
},
|
|
2101
|
+
{
|
|
2102
|
+
"in": "query",
|
|
2103
|
+
"name": "formats",
|
|
2104
|
+
"required": false,
|
|
2105
|
+
"schema": {
|
|
2106
|
+
"anyOf": [
|
|
2107
|
+
{
|
|
2108
|
+
"items": {
|
|
2109
|
+
"type": "string"
|
|
2110
|
+
},
|
|
2111
|
+
"maxItems": 100,
|
|
2112
|
+
"type": "array"
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
"type": "null"
|
|
2116
|
+
}
|
|
2117
|
+
],
|
|
2118
|
+
"title": "Formats"
|
|
2119
|
+
}
|
|
2120
|
+
},
|
|
2121
|
+
{
|
|
2122
|
+
"in": "query",
|
|
2123
|
+
"name": "rating_min",
|
|
2124
|
+
"required": false,
|
|
2125
|
+
"schema": {
|
|
2126
|
+
"anyOf": [
|
|
2127
|
+
{
|
|
2128
|
+
"maximum": 10,
|
|
2129
|
+
"minimum": 0,
|
|
2130
|
+
"type": "integer"
|
|
2131
|
+
},
|
|
2132
|
+
{
|
|
2133
|
+
"type": "null"
|
|
2134
|
+
}
|
|
2135
|
+
],
|
|
2136
|
+
"title": "Rating Min"
|
|
2137
|
+
}
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
"in": "query",
|
|
2141
|
+
"name": "rating_max",
|
|
2142
|
+
"required": false,
|
|
2143
|
+
"schema": {
|
|
2144
|
+
"anyOf": [
|
|
2145
|
+
{
|
|
2146
|
+
"maximum": 10,
|
|
2147
|
+
"minimum": 0,
|
|
2148
|
+
"type": "integer"
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
"type": "null"
|
|
2152
|
+
}
|
|
2153
|
+
],
|
|
2154
|
+
"title": "Rating Max"
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
],
|
|
2158
|
+
"responses": {
|
|
2159
|
+
"200": {
|
|
2160
|
+
"content": {
|
|
2161
|
+
"application/json": {
|
|
2162
|
+
"schema": {
|
|
2163
|
+
"$ref": "#/components/schemas/BookPage"
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
},
|
|
2167
|
+
"description": "Successful Response"
|
|
2168
|
+
},
|
|
2169
|
+
"422": {
|
|
2170
|
+
"content": {
|
|
2171
|
+
"application/json": {
|
|
2172
|
+
"schema": {
|
|
2173
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
},
|
|
2177
|
+
"description": "Validation error"
|
|
2178
|
+
},
|
|
2179
|
+
"500": {
|
|
2180
|
+
"content": {
|
|
2181
|
+
"application/json": {
|
|
2182
|
+
"schema": {
|
|
2183
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
},
|
|
2187
|
+
"description": "Internal server error"
|
|
2188
|
+
}
|
|
2189
|
+
},
|
|
2190
|
+
"summary": "Search Books",
|
|
2191
|
+
"tags": [
|
|
2192
|
+
"books"
|
|
2193
|
+
]
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
}
|