@jukasdrj/bookstrack-api-client 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 +374 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/schema.d.ts +1111 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +5 -0
- package/package.json +40 -0
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,1111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/health": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Health check endpoint
|
|
15
|
+
* @description Simple health check that returns worker status.
|
|
16
|
+
*
|
|
17
|
+
* Returns basic worker information for monitoring purposes:
|
|
18
|
+
* - **status**: Health status indicator (always "ok" when responding)
|
|
19
|
+
* - **worker**: Worker service name
|
|
20
|
+
* - **version**: API version
|
|
21
|
+
* - **router**: Router framework type
|
|
22
|
+
*
|
|
23
|
+
* **Example:** `GET /health`
|
|
24
|
+
*
|
|
25
|
+
* This endpoint is publicly accessible and requires no authentication.
|
|
26
|
+
* Use it for:
|
|
27
|
+
* - Monitoring and uptime checks
|
|
28
|
+
* - Load balancer health gates
|
|
29
|
+
* - CI/CD pipeline verification
|
|
30
|
+
*/
|
|
31
|
+
get: {
|
|
32
|
+
parameters: {
|
|
33
|
+
query?: never;
|
|
34
|
+
header?: never;
|
|
35
|
+
path?: never;
|
|
36
|
+
cookie?: never;
|
|
37
|
+
};
|
|
38
|
+
requestBody?: never;
|
|
39
|
+
responses: {
|
|
40
|
+
/** @description Health check successful */
|
|
41
|
+
200: {
|
|
42
|
+
headers: {
|
|
43
|
+
[name: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
content: {
|
|
46
|
+
/**
|
|
47
|
+
* @example {
|
|
48
|
+
* "data": {
|
|
49
|
+
* "status": "ok",
|
|
50
|
+
* "worker": "api-worker",
|
|
51
|
+
* "version": "2.1.0",
|
|
52
|
+
* "router": "hono"
|
|
53
|
+
* },
|
|
54
|
+
* "metadata": {
|
|
55
|
+
* "timestamp": "2025-11-28T12:00:00.000Z"
|
|
56
|
+
* }
|
|
57
|
+
* }
|
|
58
|
+
*/
|
|
59
|
+
"application/json": {
|
|
60
|
+
data: {
|
|
61
|
+
/**
|
|
62
|
+
* @description Health status indicator
|
|
63
|
+
* @enum {string}
|
|
64
|
+
*/
|
|
65
|
+
status: "ok";
|
|
66
|
+
/** @description Worker service name */
|
|
67
|
+
worker: string;
|
|
68
|
+
/** @description API version */
|
|
69
|
+
version: string;
|
|
70
|
+
/**
|
|
71
|
+
* @description Router framework
|
|
72
|
+
* @enum {string}
|
|
73
|
+
*/
|
|
74
|
+
router: "hono";
|
|
75
|
+
};
|
|
76
|
+
metadata?: {
|
|
77
|
+
/**
|
|
78
|
+
* Format: date-time
|
|
79
|
+
* @description ISO 8601 timestamp
|
|
80
|
+
*/
|
|
81
|
+
timestamp: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
put?: never;
|
|
89
|
+
post?: never;
|
|
90
|
+
delete?: never;
|
|
91
|
+
options?: never;
|
|
92
|
+
head?: never;
|
|
93
|
+
patch?: never;
|
|
94
|
+
trace?: never;
|
|
95
|
+
};
|
|
96
|
+
"/v1/search/isbn": {
|
|
97
|
+
parameters: {
|
|
98
|
+
query?: never;
|
|
99
|
+
header?: never;
|
|
100
|
+
path?: never;
|
|
101
|
+
cookie?: never;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Search for a book by ISBN
|
|
105
|
+
* @description Search for a book by ISBN-10 or ISBN-13 (digits only, no hyphens).
|
|
106
|
+
*
|
|
107
|
+
* Returns comprehensive book data including:
|
|
108
|
+
* - Works: Abstract creative works (title, description, subjects)
|
|
109
|
+
* - Editions: Physical/digital editions (publisher, publication date, format)
|
|
110
|
+
* - Authors: Author biographical data (name, gender, cultural region)
|
|
111
|
+
*
|
|
112
|
+
* **Example:** `GET /v1/search/isbn?isbn=9780439708180`
|
|
113
|
+
*
|
|
114
|
+
* **Multi-Provider Orchestration:**
|
|
115
|
+
* 1. BookRepository (KV/D1 cache) - fastest
|
|
116
|
+
* 2. Google Books API - primary source
|
|
117
|
+
* 3. OpenLibrary API - fallback #1
|
|
118
|
+
* 4. ISBNdb API - fallback #2
|
|
119
|
+
*
|
|
120
|
+
* **Cache TTL:** 24 hours (KV), permanent (D1)
|
|
121
|
+
*
|
|
122
|
+
* **Rate Limits:**
|
|
123
|
+
* - 100 requests/minute per IP
|
|
124
|
+
* - 1000 requests/hour per IP
|
|
125
|
+
*
|
|
126
|
+
* **Circuit Breaker Protection:**
|
|
127
|
+
* All external providers are protected by circuit breakers.
|
|
128
|
+
* If a provider's circuit is OPEN, the request fails fast with `CIRCUIT_OPEN` error.
|
|
129
|
+
*/
|
|
130
|
+
get: {
|
|
131
|
+
parameters: {
|
|
132
|
+
query: {
|
|
133
|
+
/** @description ISBN-10 or ISBN-13 (digits only, no hyphens) */
|
|
134
|
+
isbn: string;
|
|
135
|
+
};
|
|
136
|
+
header?: never;
|
|
137
|
+
path?: never;
|
|
138
|
+
cookie?: never;
|
|
139
|
+
};
|
|
140
|
+
requestBody?: never;
|
|
141
|
+
responses: {
|
|
142
|
+
/** @description Book found successfully */
|
|
143
|
+
200: {
|
|
144
|
+
headers: {
|
|
145
|
+
[name: string]: unknown;
|
|
146
|
+
};
|
|
147
|
+
content: {
|
|
148
|
+
/**
|
|
149
|
+
* @example {
|
|
150
|
+
* "data": {
|
|
151
|
+
* "works": [
|
|
152
|
+
* {
|
|
153
|
+
* "title": "Harry Potter and the Philosopher's Stone",
|
|
154
|
+
* "subjectTags": [
|
|
155
|
+
* "magic",
|
|
156
|
+
* "wizards",
|
|
157
|
+
* "fantasy"
|
|
158
|
+
* ],
|
|
159
|
+
* "firstPublicationYear": 1997,
|
|
160
|
+
* "description": "Harry Potter has never even heard of Hogwarts...",
|
|
161
|
+
* "coverImageURL": "https://covers.openlibrary.org/b/id/12345-L.jpg",
|
|
162
|
+
* "primaryProvider": "google_books",
|
|
163
|
+
* "goodreadsWorkIDs": [
|
|
164
|
+
* "OL82563W"
|
|
165
|
+
* ],
|
|
166
|
+
* "amazonASINs": [
|
|
167
|
+
* "B0192CTMYG"
|
|
168
|
+
* ],
|
|
169
|
+
* "librarythingIDs": [],
|
|
170
|
+
* "googleBooksVolumeIDs": [
|
|
171
|
+
* "wrOQLV6xB-wC"
|
|
172
|
+
* ],
|
|
173
|
+
* "isbndbQuality": 95,
|
|
174
|
+
* "reviewStatus": "verified",
|
|
175
|
+
* "synthetic": false
|
|
176
|
+
* }
|
|
177
|
+
* ],
|
|
178
|
+
* "editions": [
|
|
179
|
+
* {
|
|
180
|
+
* "isbns": [
|
|
181
|
+
* "9780439708180",
|
|
182
|
+
* "0439708184"
|
|
183
|
+
* ],
|
|
184
|
+
* "title": "Harry Potter and the Philosopher's Stone",
|
|
185
|
+
* "publisher": "Scholastic Inc.",
|
|
186
|
+
* "publicationDate": "1999-09-01",
|
|
187
|
+
* "pageCount": 309,
|
|
188
|
+
* "format": "paperback",
|
|
189
|
+
* "coverImageURL": "https://covers.openlibrary.org/b/isbn/9780439708180-L.jpg",
|
|
190
|
+
* "primaryProvider": "google_books",
|
|
191
|
+
* "amazonASINs": [
|
|
192
|
+
* "0439708184"
|
|
193
|
+
* ],
|
|
194
|
+
* "googleBooksVolumeIDs": [
|
|
195
|
+
* "wrOQLV6xB-wC"
|
|
196
|
+
* ],
|
|
197
|
+
* "librarythingIDs": [],
|
|
198
|
+
* "isbndbQuality": 95
|
|
199
|
+
* }
|
|
200
|
+
* ],
|
|
201
|
+
* "authors": [
|
|
202
|
+
* {
|
|
203
|
+
* "name": "J.K. Rowling",
|
|
204
|
+
* "gender": "female",
|
|
205
|
+
* "culturalRegion": "europe",
|
|
206
|
+
* "nationality": "British",
|
|
207
|
+
* "birthYear": 1965,
|
|
208
|
+
* "openLibraryID": "OL23919A",
|
|
209
|
+
* "bookCount": 42
|
|
210
|
+
* }
|
|
211
|
+
* ],
|
|
212
|
+
* "resultCount": 1
|
|
213
|
+
* },
|
|
214
|
+
* "metadata": {
|
|
215
|
+
* "timestamp": "2025-11-28T12:00:00.000Z",
|
|
216
|
+
* "processingTime": 145,
|
|
217
|
+
* "provider": "google_books",
|
|
218
|
+
* "cached": true
|
|
219
|
+
* }
|
|
220
|
+
* }
|
|
221
|
+
*/
|
|
222
|
+
"application/json": {
|
|
223
|
+
data: {
|
|
224
|
+
works: {
|
|
225
|
+
title: string;
|
|
226
|
+
subjectTags: string[];
|
|
227
|
+
originalLanguage?: string;
|
|
228
|
+
firstPublicationYear?: number;
|
|
229
|
+
description?: string;
|
|
230
|
+
/** Format: uri */
|
|
231
|
+
coverImageURL?: string;
|
|
232
|
+
synthetic?: boolean;
|
|
233
|
+
/** @enum {string} */
|
|
234
|
+
primaryProvider?: "google_books" | "open_library" | "isbndb" | "kv_cache";
|
|
235
|
+
contributors?: ("google_books" | "open_library" | "isbndb" | "kv_cache")[];
|
|
236
|
+
openLibraryID?: string;
|
|
237
|
+
openLibraryWorkID?: string;
|
|
238
|
+
isbndbID?: string;
|
|
239
|
+
googleBooksVolumeID?: string;
|
|
240
|
+
goodreadsID?: string;
|
|
241
|
+
goodreadsWorkIDs: string[];
|
|
242
|
+
amazonASINs: string[];
|
|
243
|
+
librarythingIDs: string[];
|
|
244
|
+
googleBooksVolumeIDs: string[];
|
|
245
|
+
/** Format: date-time */
|
|
246
|
+
lastISBNDBSync?: string;
|
|
247
|
+
isbndbQuality: number;
|
|
248
|
+
/** @enum {string} */
|
|
249
|
+
reviewStatus: "unverified" | "verified" | "rejected" | "flagged";
|
|
250
|
+
originalImagePath?: string;
|
|
251
|
+
boundingBox?: {
|
|
252
|
+
x: number;
|
|
253
|
+
y: number;
|
|
254
|
+
width: number;
|
|
255
|
+
height: number;
|
|
256
|
+
};
|
|
257
|
+
}[];
|
|
258
|
+
editions: {
|
|
259
|
+
isbn?: string;
|
|
260
|
+
isbns: string[];
|
|
261
|
+
title?: string;
|
|
262
|
+
publisher?: string;
|
|
263
|
+
publicationDate?: string;
|
|
264
|
+
pageCount?: number;
|
|
265
|
+
/** @enum {string} */
|
|
266
|
+
format: "hardcover" | "paperback" | "ebook" | "audiobook" | "mass_market" | "board_book" | "unknown";
|
|
267
|
+
/** Format: uri */
|
|
268
|
+
coverImageURL?: string;
|
|
269
|
+
editionTitle?: string;
|
|
270
|
+
editionDescription?: string;
|
|
271
|
+
language?: string;
|
|
272
|
+
/** @enum {string} */
|
|
273
|
+
primaryProvider?: "google_books" | "open_library" | "isbndb" | "kv_cache";
|
|
274
|
+
contributors?: ("google_books" | "open_library" | "isbndb" | "kv_cache")[];
|
|
275
|
+
openLibraryID?: string;
|
|
276
|
+
openLibraryEditionID?: string;
|
|
277
|
+
isbndbID?: string;
|
|
278
|
+
googleBooksVolumeID?: string;
|
|
279
|
+
goodreadsID?: string;
|
|
280
|
+
amazonASINs: string[];
|
|
281
|
+
googleBooksVolumeIDs: string[];
|
|
282
|
+
librarythingIDs: string[];
|
|
283
|
+
/** Format: date-time */
|
|
284
|
+
lastISBNDBSync?: string;
|
|
285
|
+
isbndbQuality: number;
|
|
286
|
+
}[];
|
|
287
|
+
authors: {
|
|
288
|
+
name: string;
|
|
289
|
+
/** @enum {string} */
|
|
290
|
+
gender: "male" | "female" | "non_binary" | "unknown";
|
|
291
|
+
/** @enum {string} */
|
|
292
|
+
culturalRegion?: "north_america" | "latin_america" | "europe" | "asia" | "africa" | "middle_east" | "oceania" | "unknown";
|
|
293
|
+
nationality?: string;
|
|
294
|
+
birthYear?: number;
|
|
295
|
+
deathYear?: number;
|
|
296
|
+
openLibraryID?: string;
|
|
297
|
+
isbndbID?: string;
|
|
298
|
+
googleBooksID?: string;
|
|
299
|
+
goodreadsID?: string;
|
|
300
|
+
bookCount?: number;
|
|
301
|
+
}[];
|
|
302
|
+
resultCount: number;
|
|
303
|
+
};
|
|
304
|
+
metadata?: {
|
|
305
|
+
/** Format: date-time */
|
|
306
|
+
timestamp: string;
|
|
307
|
+
processingTime?: number;
|
|
308
|
+
/** @enum {string} */
|
|
309
|
+
provider?: "google_books" | "open_library" | "isbndb" | "kv_cache" | "d1_database" | "none";
|
|
310
|
+
cached?: boolean;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
/** @description Invalid ISBN format */
|
|
316
|
+
400: {
|
|
317
|
+
headers: {
|
|
318
|
+
[name: string]: unknown;
|
|
319
|
+
};
|
|
320
|
+
content: {
|
|
321
|
+
/**
|
|
322
|
+
* @example {
|
|
323
|
+
* "data": null,
|
|
324
|
+
* "metadata": {
|
|
325
|
+
* "timestamp": "2025-11-28T12:00:00.000Z"
|
|
326
|
+
* },
|
|
327
|
+
* "error": {
|
|
328
|
+
* "code": "INVALID_ISBN",
|
|
329
|
+
* "message": "Invalid ISBN format. Must be valid ISBN-10 or ISBN-13",
|
|
330
|
+
* "details": {
|
|
331
|
+
* "isbn": "invalid-isbn"
|
|
332
|
+
* }
|
|
333
|
+
* }
|
|
334
|
+
* }
|
|
335
|
+
*/
|
|
336
|
+
"application/json": {
|
|
337
|
+
data: unknown;
|
|
338
|
+
metadata?: {
|
|
339
|
+
/** Format: date-time */
|
|
340
|
+
timestamp: string;
|
|
341
|
+
cached?: boolean;
|
|
342
|
+
/** @enum {string} */
|
|
343
|
+
source?: "google_books" | "open_library" | "isbndb" | "kv_cache" | "d1_database" | "vectorize";
|
|
344
|
+
};
|
|
345
|
+
error: {
|
|
346
|
+
/** @enum {string} */
|
|
347
|
+
code: "NOT_FOUND" | "INVALID_REQUEST" | "INVALID_ISBN" | "INVALID_QUERY" | "MISSING_PARAMETER" | "UNAUTHORIZED" | "FORBIDDEN" | "INTERNAL_ERROR" | "API_ERROR" | "NETWORK_ERROR" | "RATE_LIMIT_EXCEEDED" | "CIRCUIT_OPEN" | "PROVIDER_ERROR" | "TIMEOUT";
|
|
348
|
+
message: string;
|
|
349
|
+
details?: {
|
|
350
|
+
[key: string]: unknown;
|
|
351
|
+
};
|
|
352
|
+
retryable?: boolean;
|
|
353
|
+
retryAfterMs?: number;
|
|
354
|
+
provider?: string;
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
/** @description Book not found */
|
|
360
|
+
404: {
|
|
361
|
+
headers: {
|
|
362
|
+
[name: string]: unknown;
|
|
363
|
+
};
|
|
364
|
+
content: {
|
|
365
|
+
/**
|
|
366
|
+
* @example {
|
|
367
|
+
* "data": {
|
|
368
|
+
* "works": [],
|
|
369
|
+
* "editions": [],
|
|
370
|
+
* "authors": [],
|
|
371
|
+
* "resultCount": 0
|
|
372
|
+
* },
|
|
373
|
+
* "metadata": {
|
|
374
|
+
* "timestamp": "2025-11-28T12:00:00.000Z",
|
|
375
|
+
* "processingTime": 523,
|
|
376
|
+
* "provider": "none",
|
|
377
|
+
* "cached": false
|
|
378
|
+
* }
|
|
379
|
+
* }
|
|
380
|
+
*/
|
|
381
|
+
"application/json": {
|
|
382
|
+
data: {
|
|
383
|
+
works: {
|
|
384
|
+
title: string;
|
|
385
|
+
subjectTags: string[];
|
|
386
|
+
originalLanguage?: string;
|
|
387
|
+
firstPublicationYear?: number;
|
|
388
|
+
description?: string;
|
|
389
|
+
/** Format: uri */
|
|
390
|
+
coverImageURL?: string;
|
|
391
|
+
synthetic?: boolean;
|
|
392
|
+
/** @enum {string} */
|
|
393
|
+
primaryProvider?: "google_books" | "open_library" | "isbndb" | "kv_cache";
|
|
394
|
+
contributors?: ("google_books" | "open_library" | "isbndb" | "kv_cache")[];
|
|
395
|
+
openLibraryID?: string;
|
|
396
|
+
openLibraryWorkID?: string;
|
|
397
|
+
isbndbID?: string;
|
|
398
|
+
googleBooksVolumeID?: string;
|
|
399
|
+
goodreadsID?: string;
|
|
400
|
+
goodreadsWorkIDs: string[];
|
|
401
|
+
amazonASINs: string[];
|
|
402
|
+
librarythingIDs: string[];
|
|
403
|
+
googleBooksVolumeIDs: string[];
|
|
404
|
+
/** Format: date-time */
|
|
405
|
+
lastISBNDBSync?: string;
|
|
406
|
+
isbndbQuality: number;
|
|
407
|
+
/** @enum {string} */
|
|
408
|
+
reviewStatus: "unverified" | "verified" | "rejected" | "flagged";
|
|
409
|
+
originalImagePath?: string;
|
|
410
|
+
boundingBox?: {
|
|
411
|
+
x: number;
|
|
412
|
+
y: number;
|
|
413
|
+
width: number;
|
|
414
|
+
height: number;
|
|
415
|
+
};
|
|
416
|
+
}[];
|
|
417
|
+
editions: {
|
|
418
|
+
isbn?: string;
|
|
419
|
+
isbns: string[];
|
|
420
|
+
title?: string;
|
|
421
|
+
publisher?: string;
|
|
422
|
+
publicationDate?: string;
|
|
423
|
+
pageCount?: number;
|
|
424
|
+
/** @enum {string} */
|
|
425
|
+
format: "hardcover" | "paperback" | "ebook" | "audiobook" | "mass_market" | "board_book" | "unknown";
|
|
426
|
+
/** Format: uri */
|
|
427
|
+
coverImageURL?: string;
|
|
428
|
+
editionTitle?: string;
|
|
429
|
+
editionDescription?: string;
|
|
430
|
+
language?: string;
|
|
431
|
+
/** @enum {string} */
|
|
432
|
+
primaryProvider?: "google_books" | "open_library" | "isbndb" | "kv_cache";
|
|
433
|
+
contributors?: ("google_books" | "open_library" | "isbndb" | "kv_cache")[];
|
|
434
|
+
openLibraryID?: string;
|
|
435
|
+
openLibraryEditionID?: string;
|
|
436
|
+
isbndbID?: string;
|
|
437
|
+
googleBooksVolumeID?: string;
|
|
438
|
+
goodreadsID?: string;
|
|
439
|
+
amazonASINs: string[];
|
|
440
|
+
googleBooksVolumeIDs: string[];
|
|
441
|
+
librarythingIDs: string[];
|
|
442
|
+
/** Format: date-time */
|
|
443
|
+
lastISBNDBSync?: string;
|
|
444
|
+
isbndbQuality: number;
|
|
445
|
+
}[];
|
|
446
|
+
authors: {
|
|
447
|
+
name: string;
|
|
448
|
+
/** @enum {string} */
|
|
449
|
+
gender: "male" | "female" | "non_binary" | "unknown";
|
|
450
|
+
/** @enum {string} */
|
|
451
|
+
culturalRegion?: "north_america" | "latin_america" | "europe" | "asia" | "africa" | "middle_east" | "oceania" | "unknown";
|
|
452
|
+
nationality?: string;
|
|
453
|
+
birthYear?: number;
|
|
454
|
+
deathYear?: number;
|
|
455
|
+
openLibraryID?: string;
|
|
456
|
+
isbndbID?: string;
|
|
457
|
+
googleBooksID?: string;
|
|
458
|
+
goodreadsID?: string;
|
|
459
|
+
bookCount?: number;
|
|
460
|
+
}[];
|
|
461
|
+
resultCount: number;
|
|
462
|
+
};
|
|
463
|
+
metadata?: {
|
|
464
|
+
/** Format: date-time */
|
|
465
|
+
timestamp: string;
|
|
466
|
+
processingTime?: number;
|
|
467
|
+
/** @enum {string} */
|
|
468
|
+
provider?: "google_books" | "open_library" | "isbndb" | "kv_cache" | "d1_database" | "none";
|
|
469
|
+
cached?: boolean;
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
/** @description Rate limit exceeded */
|
|
475
|
+
429: {
|
|
476
|
+
headers: {
|
|
477
|
+
[name: string]: unknown;
|
|
478
|
+
};
|
|
479
|
+
content: {
|
|
480
|
+
/**
|
|
481
|
+
* @example {
|
|
482
|
+
* "data": null,
|
|
483
|
+
* "metadata": {
|
|
484
|
+
* "timestamp": "2025-11-28T12:00:00.000Z"
|
|
485
|
+
* },
|
|
486
|
+
* "error": {
|
|
487
|
+
* "code": "RATE_LIMIT_EXCEEDED",
|
|
488
|
+
* "message": "Rate limit exceeded. Maximum 100 requests per minute.",
|
|
489
|
+
* "retryable": true,
|
|
490
|
+
* "retryAfterMs": 60000
|
|
491
|
+
* }
|
|
492
|
+
* }
|
|
493
|
+
*/
|
|
494
|
+
"application/json": {
|
|
495
|
+
data: unknown;
|
|
496
|
+
metadata?: {
|
|
497
|
+
/** Format: date-time */
|
|
498
|
+
timestamp: string;
|
|
499
|
+
cached?: boolean;
|
|
500
|
+
/** @enum {string} */
|
|
501
|
+
source?: "google_books" | "open_library" | "isbndb" | "kv_cache" | "d1_database" | "vectorize";
|
|
502
|
+
};
|
|
503
|
+
error: {
|
|
504
|
+
/** @enum {string} */
|
|
505
|
+
code: "NOT_FOUND" | "INVALID_REQUEST" | "INVALID_ISBN" | "INVALID_QUERY" | "MISSING_PARAMETER" | "UNAUTHORIZED" | "FORBIDDEN" | "INTERNAL_ERROR" | "API_ERROR" | "NETWORK_ERROR" | "RATE_LIMIT_EXCEEDED" | "CIRCUIT_OPEN" | "PROVIDER_ERROR" | "TIMEOUT";
|
|
506
|
+
message: string;
|
|
507
|
+
details?: {
|
|
508
|
+
[key: string]: unknown;
|
|
509
|
+
};
|
|
510
|
+
retryable?: boolean;
|
|
511
|
+
retryAfterMs?: number;
|
|
512
|
+
provider?: string;
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
/** @description Internal server error */
|
|
518
|
+
500: {
|
|
519
|
+
headers: {
|
|
520
|
+
[name: string]: unknown;
|
|
521
|
+
};
|
|
522
|
+
content: {
|
|
523
|
+
/**
|
|
524
|
+
* @example {
|
|
525
|
+
* "data": null,
|
|
526
|
+
* "metadata": {
|
|
527
|
+
* "timestamp": "2025-11-28T12:00:00.000Z"
|
|
528
|
+
* },
|
|
529
|
+
* "error": {
|
|
530
|
+
* "code": "INTERNAL_ERROR",
|
|
531
|
+
* "message": "An unexpected error occurred while processing the request"
|
|
532
|
+
* }
|
|
533
|
+
* }
|
|
534
|
+
*/
|
|
535
|
+
"application/json": {
|
|
536
|
+
data: unknown;
|
|
537
|
+
metadata?: {
|
|
538
|
+
/** Format: date-time */
|
|
539
|
+
timestamp: string;
|
|
540
|
+
cached?: boolean;
|
|
541
|
+
/** @enum {string} */
|
|
542
|
+
source?: "google_books" | "open_library" | "isbndb" | "kv_cache" | "d1_database" | "vectorize";
|
|
543
|
+
};
|
|
544
|
+
error: {
|
|
545
|
+
/** @enum {string} */
|
|
546
|
+
code: "NOT_FOUND" | "INVALID_REQUEST" | "INVALID_ISBN" | "INVALID_QUERY" | "MISSING_PARAMETER" | "UNAUTHORIZED" | "FORBIDDEN" | "INTERNAL_ERROR" | "API_ERROR" | "NETWORK_ERROR" | "RATE_LIMIT_EXCEEDED" | "CIRCUIT_OPEN" | "PROVIDER_ERROR" | "TIMEOUT";
|
|
547
|
+
message: string;
|
|
548
|
+
details?: {
|
|
549
|
+
[key: string]: unknown;
|
|
550
|
+
};
|
|
551
|
+
retryable?: boolean;
|
|
552
|
+
retryAfterMs?: number;
|
|
553
|
+
provider?: string;
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
/** @description Circuit breaker open - provider unavailable */
|
|
559
|
+
503: {
|
|
560
|
+
headers: {
|
|
561
|
+
[name: string]: unknown;
|
|
562
|
+
};
|
|
563
|
+
content: {
|
|
564
|
+
/**
|
|
565
|
+
* @example {
|
|
566
|
+
* "data": null,
|
|
567
|
+
* "metadata": {
|
|
568
|
+
* "timestamp": "2025-11-28T12:00:00.000Z"
|
|
569
|
+
* },
|
|
570
|
+
* "error": {
|
|
571
|
+
* "code": "CIRCUIT_OPEN",
|
|
572
|
+
* "message": "Provider google-books circuit breaker is open. Service temporarily unavailable.",
|
|
573
|
+
* "provider": "google-books",
|
|
574
|
+
* "retryable": true,
|
|
575
|
+
* "retryAfterMs": 45000
|
|
576
|
+
* }
|
|
577
|
+
* }
|
|
578
|
+
*/
|
|
579
|
+
"application/json": {
|
|
580
|
+
data: unknown;
|
|
581
|
+
metadata?: {
|
|
582
|
+
/** Format: date-time */
|
|
583
|
+
timestamp: string;
|
|
584
|
+
cached?: boolean;
|
|
585
|
+
/** @enum {string} */
|
|
586
|
+
source?: "google_books" | "open_library" | "isbndb" | "kv_cache" | "d1_database" | "vectorize";
|
|
587
|
+
};
|
|
588
|
+
error: {
|
|
589
|
+
/** @enum {string} */
|
|
590
|
+
code: "NOT_FOUND" | "INVALID_REQUEST" | "INVALID_ISBN" | "INVALID_QUERY" | "MISSING_PARAMETER" | "UNAUTHORIZED" | "FORBIDDEN" | "INTERNAL_ERROR" | "API_ERROR" | "NETWORK_ERROR" | "RATE_LIMIT_EXCEEDED" | "CIRCUIT_OPEN" | "PROVIDER_ERROR" | "TIMEOUT";
|
|
591
|
+
message: string;
|
|
592
|
+
details?: {
|
|
593
|
+
[key: string]: unknown;
|
|
594
|
+
};
|
|
595
|
+
retryable?: boolean;
|
|
596
|
+
retryAfterMs?: number;
|
|
597
|
+
provider?: string;
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
put?: never;
|
|
605
|
+
post?: never;
|
|
606
|
+
delete?: never;
|
|
607
|
+
options?: never;
|
|
608
|
+
head?: never;
|
|
609
|
+
patch?: never;
|
|
610
|
+
trace?: never;
|
|
611
|
+
};
|
|
612
|
+
"/v1/search/title": {
|
|
613
|
+
parameters: {
|
|
614
|
+
query?: never;
|
|
615
|
+
header?: never;
|
|
616
|
+
path?: never;
|
|
617
|
+
cookie?: never;
|
|
618
|
+
};
|
|
619
|
+
/**
|
|
620
|
+
* Search for books by title
|
|
621
|
+
* @description Search for books by title using multi-provider orchestration.
|
|
622
|
+
*
|
|
623
|
+
* Returns up to 20 results by default, each including:
|
|
624
|
+
* - Works: Abstract creative works (title, description, subjects)
|
|
625
|
+
* - Editions: Physical/digital editions (publisher, publication date, format)
|
|
626
|
+
* - Authors: Author biographical data (name, gender, cultural region)
|
|
627
|
+
*
|
|
628
|
+
* **Example:** `GET /v1/search/title?q=harry%20potter&limit=10`
|
|
629
|
+
*
|
|
630
|
+
* **Multi-Provider Orchestration:**
|
|
631
|
+
* 1. OpenLibrary API - primary source for title searches
|
|
632
|
+
* 2. Author enrichment from Wikidata (cultural diversity data)
|
|
633
|
+
* 3. No caching (freshness important for search results)
|
|
634
|
+
*
|
|
635
|
+
* **Query Parameters:**
|
|
636
|
+
* - `q` (required): Search query string (1-200 characters)
|
|
637
|
+
* - `limit` (optional): Maximum number of results (1-100, default: 20)
|
|
638
|
+
*
|
|
639
|
+
* **Rate Limits:**
|
|
640
|
+
* - 100 requests/minute per IP
|
|
641
|
+
* - 1000 requests/hour per IP
|
|
642
|
+
*
|
|
643
|
+
* **Author Enrichment:**
|
|
644
|
+
* All author results are enriched with cultural and biographical data from Wikidata.
|
|
645
|
+
*/
|
|
646
|
+
get: {
|
|
647
|
+
parameters: {
|
|
648
|
+
query: {
|
|
649
|
+
/** @description Book title search query */
|
|
650
|
+
q: string;
|
|
651
|
+
/** @description Maximum number of results (1-100, default: 20) */
|
|
652
|
+
limit?: string;
|
|
653
|
+
};
|
|
654
|
+
header?: never;
|
|
655
|
+
path?: never;
|
|
656
|
+
cookie?: never;
|
|
657
|
+
};
|
|
658
|
+
requestBody?: never;
|
|
659
|
+
responses: {
|
|
660
|
+
/** @description Books found successfully (may be empty if no matches) */
|
|
661
|
+
200: {
|
|
662
|
+
headers: {
|
|
663
|
+
[name: string]: unknown;
|
|
664
|
+
};
|
|
665
|
+
content: {
|
|
666
|
+
/**
|
|
667
|
+
* @example {
|
|
668
|
+
* "data": {
|
|
669
|
+
* "works": [
|
|
670
|
+
* {
|
|
671
|
+
* "title": "Harry Potter and the Philosopher's Stone",
|
|
672
|
+
* "subjectTags": [
|
|
673
|
+
* "magic",
|
|
674
|
+
* "wizards",
|
|
675
|
+
* "fantasy",
|
|
676
|
+
* "adventure"
|
|
677
|
+
* ],
|
|
678
|
+
* "firstPublicationYear": 1997,
|
|
679
|
+
* "description": "Harry Potter has never even heard of Hogwarts...",
|
|
680
|
+
* "coverImageURL": "https://covers.openlibrary.org/b/id/12345-L.jpg",
|
|
681
|
+
* "primaryProvider": "open_library",
|
|
682
|
+
* "goodreadsWorkIDs": [
|
|
683
|
+
* "OL82563W"
|
|
684
|
+
* ],
|
|
685
|
+
* "amazonASINs": [
|
|
686
|
+
* "B0192CTMYG"
|
|
687
|
+
* ],
|
|
688
|
+
* "librarythingIDs": [],
|
|
689
|
+
* "googleBooksVolumeIDs": [],
|
|
690
|
+
* "isbndbQuality": 85,
|
|
691
|
+
* "reviewStatus": "verified",
|
|
692
|
+
* "synthetic": false
|
|
693
|
+
* },
|
|
694
|
+
* {
|
|
695
|
+
* "title": "Harry Potter and the Chamber of Secrets",
|
|
696
|
+
* "subjectTags": [
|
|
697
|
+
* "magic",
|
|
698
|
+
* "wizards",
|
|
699
|
+
* "fantasy"
|
|
700
|
+
* ],
|
|
701
|
+
* "firstPublicationYear": 1998,
|
|
702
|
+
* "description": "The summer after his first year at Hogwarts...",
|
|
703
|
+
* "coverImageURL": "https://covers.openlibrary.org/b/id/12346-L.jpg",
|
|
704
|
+
* "primaryProvider": "open_library",
|
|
705
|
+
* "goodreadsWorkIDs": [
|
|
706
|
+
* "OL82563W"
|
|
707
|
+
* ],
|
|
708
|
+
* "amazonASINs": [
|
|
709
|
+
* "B0192CTNYH"
|
|
710
|
+
* ],
|
|
711
|
+
* "librarythingIDs": [],
|
|
712
|
+
* "googleBooksVolumeIDs": [],
|
|
713
|
+
* "isbndbQuality": 85,
|
|
714
|
+
* "reviewStatus": "verified",
|
|
715
|
+
* "synthetic": false
|
|
716
|
+
* }
|
|
717
|
+
* ],
|
|
718
|
+
* "editions": [
|
|
719
|
+
* {
|
|
720
|
+
* "isbns": [
|
|
721
|
+
* "9780439708180",
|
|
722
|
+
* "0439708184"
|
|
723
|
+
* ],
|
|
724
|
+
* "title": "Harry Potter and the Philosopher's Stone",
|
|
725
|
+
* "publisher": "Scholastic Inc.",
|
|
726
|
+
* "publicationDate": "1999-09-01",
|
|
727
|
+
* "pageCount": 309,
|
|
728
|
+
* "format": "paperback",
|
|
729
|
+
* "coverImageURL": "https://covers.openlibrary.org/b/isbn/9780439708180-L.jpg",
|
|
730
|
+
* "primaryProvider": "open_library",
|
|
731
|
+
* "amazonASINs": [
|
|
732
|
+
* "0439708184"
|
|
733
|
+
* ],
|
|
734
|
+
* "googleBooksVolumeIDs": [],
|
|
735
|
+
* "librarythingIDs": [],
|
|
736
|
+
* "isbndbQuality": 85
|
|
737
|
+
* }
|
|
738
|
+
* ],
|
|
739
|
+
* "authors": [
|
|
740
|
+
* {
|
|
741
|
+
* "name": "J.K. Rowling",
|
|
742
|
+
* "gender": "female",
|
|
743
|
+
* "culturalRegion": "europe",
|
|
744
|
+
* "nationality": "British",
|
|
745
|
+
* "birthYear": 1965,
|
|
746
|
+
* "openLibraryID": "OL23919A",
|
|
747
|
+
* "bookCount": 42
|
|
748
|
+
* }
|
|
749
|
+
* ],
|
|
750
|
+
* "resultCount": 2
|
|
751
|
+
* },
|
|
752
|
+
* "metadata": {
|
|
753
|
+
* "timestamp": "2025-11-28T12:00:00.000Z",
|
|
754
|
+
* "processingTime": 1205,
|
|
755
|
+
* "provider": "open_library",
|
|
756
|
+
* "cached": false
|
|
757
|
+
* }
|
|
758
|
+
* }
|
|
759
|
+
*/
|
|
760
|
+
"application/json": {
|
|
761
|
+
data: {
|
|
762
|
+
works: {
|
|
763
|
+
title: string;
|
|
764
|
+
subjectTags: string[];
|
|
765
|
+
originalLanguage?: string;
|
|
766
|
+
firstPublicationYear?: number;
|
|
767
|
+
description?: string;
|
|
768
|
+
/** Format: uri */
|
|
769
|
+
coverImageURL?: string;
|
|
770
|
+
synthetic?: boolean;
|
|
771
|
+
/** @enum {string} */
|
|
772
|
+
primaryProvider?: "google_books" | "open_library" | "isbndb" | "kv_cache";
|
|
773
|
+
contributors?: ("google_books" | "open_library" | "isbndb" | "kv_cache")[];
|
|
774
|
+
openLibraryID?: string;
|
|
775
|
+
openLibraryWorkID?: string;
|
|
776
|
+
isbndbID?: string;
|
|
777
|
+
googleBooksVolumeID?: string;
|
|
778
|
+
goodreadsID?: string;
|
|
779
|
+
goodreadsWorkIDs: string[];
|
|
780
|
+
amazonASINs: string[];
|
|
781
|
+
librarythingIDs: string[];
|
|
782
|
+
googleBooksVolumeIDs: string[];
|
|
783
|
+
/** Format: date-time */
|
|
784
|
+
lastISBNDBSync?: string;
|
|
785
|
+
isbndbQuality: number;
|
|
786
|
+
/** @enum {string} */
|
|
787
|
+
reviewStatus: "unverified" | "verified" | "rejected" | "flagged";
|
|
788
|
+
originalImagePath?: string;
|
|
789
|
+
boundingBox?: {
|
|
790
|
+
x: number;
|
|
791
|
+
y: number;
|
|
792
|
+
width: number;
|
|
793
|
+
height: number;
|
|
794
|
+
};
|
|
795
|
+
}[];
|
|
796
|
+
editions: {
|
|
797
|
+
isbn?: string;
|
|
798
|
+
isbns: string[];
|
|
799
|
+
title?: string;
|
|
800
|
+
publisher?: string;
|
|
801
|
+
publicationDate?: string;
|
|
802
|
+
pageCount?: number;
|
|
803
|
+
/** @enum {string} */
|
|
804
|
+
format: "hardcover" | "paperback" | "ebook" | "audiobook" | "mass_market" | "board_book" | "unknown";
|
|
805
|
+
/** Format: uri */
|
|
806
|
+
coverImageURL?: string;
|
|
807
|
+
editionTitle?: string;
|
|
808
|
+
editionDescription?: string;
|
|
809
|
+
language?: string;
|
|
810
|
+
/** @enum {string} */
|
|
811
|
+
primaryProvider?: "google_books" | "open_library" | "isbndb" | "kv_cache";
|
|
812
|
+
contributors?: ("google_books" | "open_library" | "isbndb" | "kv_cache")[];
|
|
813
|
+
openLibraryID?: string;
|
|
814
|
+
openLibraryEditionID?: string;
|
|
815
|
+
isbndbID?: string;
|
|
816
|
+
googleBooksVolumeID?: string;
|
|
817
|
+
goodreadsID?: string;
|
|
818
|
+
amazonASINs: string[];
|
|
819
|
+
googleBooksVolumeIDs: string[];
|
|
820
|
+
librarythingIDs: string[];
|
|
821
|
+
/** Format: date-time */
|
|
822
|
+
lastISBNDBSync?: string;
|
|
823
|
+
isbndbQuality: number;
|
|
824
|
+
}[];
|
|
825
|
+
authors: {
|
|
826
|
+
name: string;
|
|
827
|
+
/** @enum {string} */
|
|
828
|
+
gender: "male" | "female" | "non_binary" | "unknown";
|
|
829
|
+
/** @enum {string} */
|
|
830
|
+
culturalRegion?: "north_america" | "latin_america" | "europe" | "asia" | "africa" | "middle_east" | "oceania" | "unknown";
|
|
831
|
+
nationality?: string;
|
|
832
|
+
birthYear?: number;
|
|
833
|
+
deathYear?: number;
|
|
834
|
+
openLibraryID?: string;
|
|
835
|
+
isbndbID?: string;
|
|
836
|
+
googleBooksID?: string;
|
|
837
|
+
goodreadsID?: string;
|
|
838
|
+
bookCount?: number;
|
|
839
|
+
}[];
|
|
840
|
+
resultCount: number;
|
|
841
|
+
};
|
|
842
|
+
metadata?: {
|
|
843
|
+
/** Format: date-time */
|
|
844
|
+
timestamp: string;
|
|
845
|
+
processingTime?: number;
|
|
846
|
+
/** @enum {string} */
|
|
847
|
+
provider?: "google_books" | "open_library" | "isbndb" | "kv_cache" | "d1_database" | "none";
|
|
848
|
+
cached?: boolean;
|
|
849
|
+
};
|
|
850
|
+
};
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
/** @description Invalid query parameters */
|
|
854
|
+
400: {
|
|
855
|
+
headers: {
|
|
856
|
+
[name: string]: unknown;
|
|
857
|
+
};
|
|
858
|
+
content: {
|
|
859
|
+
/**
|
|
860
|
+
* @example {
|
|
861
|
+
* "data": null,
|
|
862
|
+
* "metadata": {
|
|
863
|
+
* "timestamp": "2025-11-28T12:00:00.000Z"
|
|
864
|
+
* },
|
|
865
|
+
* "error": {
|
|
866
|
+
* "code": "INVALID_QUERY",
|
|
867
|
+
* "message": "Search query is required and must be 1-200 characters",
|
|
868
|
+
* "details": {
|
|
869
|
+
* "parameter": "q"
|
|
870
|
+
* }
|
|
871
|
+
* }
|
|
872
|
+
* }
|
|
873
|
+
*/
|
|
874
|
+
"application/json": {
|
|
875
|
+
data: unknown;
|
|
876
|
+
metadata?: {
|
|
877
|
+
/** Format: date-time */
|
|
878
|
+
timestamp: string;
|
|
879
|
+
cached?: boolean;
|
|
880
|
+
/** @enum {string} */
|
|
881
|
+
source?: "google_books" | "open_library" | "isbndb" | "kv_cache" | "d1_database" | "vectorize";
|
|
882
|
+
};
|
|
883
|
+
error: {
|
|
884
|
+
/** @enum {string} */
|
|
885
|
+
code: "NOT_FOUND" | "INVALID_REQUEST" | "INVALID_ISBN" | "INVALID_QUERY" | "MISSING_PARAMETER" | "UNAUTHORIZED" | "FORBIDDEN" | "INTERNAL_ERROR" | "API_ERROR" | "NETWORK_ERROR" | "RATE_LIMIT_EXCEEDED" | "CIRCUIT_OPEN" | "PROVIDER_ERROR" | "TIMEOUT";
|
|
886
|
+
message: string;
|
|
887
|
+
details?: {
|
|
888
|
+
[key: string]: unknown;
|
|
889
|
+
};
|
|
890
|
+
retryable?: boolean;
|
|
891
|
+
retryAfterMs?: number;
|
|
892
|
+
provider?: string;
|
|
893
|
+
};
|
|
894
|
+
};
|
|
895
|
+
};
|
|
896
|
+
};
|
|
897
|
+
/** @description Rate limit exceeded */
|
|
898
|
+
429: {
|
|
899
|
+
headers: {
|
|
900
|
+
[name: string]: unknown;
|
|
901
|
+
};
|
|
902
|
+
content: {
|
|
903
|
+
/**
|
|
904
|
+
* @example {
|
|
905
|
+
* "data": null,
|
|
906
|
+
* "metadata": {
|
|
907
|
+
* "timestamp": "2025-11-28T12:00:00.000Z"
|
|
908
|
+
* },
|
|
909
|
+
* "error": {
|
|
910
|
+
* "code": "RATE_LIMIT_EXCEEDED",
|
|
911
|
+
* "message": "Rate limit exceeded. Maximum 100 requests per minute.",
|
|
912
|
+
* "retryable": true,
|
|
913
|
+
* "retryAfterMs": 60000
|
|
914
|
+
* }
|
|
915
|
+
* }
|
|
916
|
+
*/
|
|
917
|
+
"application/json": {
|
|
918
|
+
data: unknown;
|
|
919
|
+
metadata?: {
|
|
920
|
+
/** Format: date-time */
|
|
921
|
+
timestamp: string;
|
|
922
|
+
cached?: boolean;
|
|
923
|
+
/** @enum {string} */
|
|
924
|
+
source?: "google_books" | "open_library" | "isbndb" | "kv_cache" | "d1_database" | "vectorize";
|
|
925
|
+
};
|
|
926
|
+
error: {
|
|
927
|
+
/** @enum {string} */
|
|
928
|
+
code: "NOT_FOUND" | "INVALID_REQUEST" | "INVALID_ISBN" | "INVALID_QUERY" | "MISSING_PARAMETER" | "UNAUTHORIZED" | "FORBIDDEN" | "INTERNAL_ERROR" | "API_ERROR" | "NETWORK_ERROR" | "RATE_LIMIT_EXCEEDED" | "CIRCUIT_OPEN" | "PROVIDER_ERROR" | "TIMEOUT";
|
|
929
|
+
message: string;
|
|
930
|
+
details?: {
|
|
931
|
+
[key: string]: unknown;
|
|
932
|
+
};
|
|
933
|
+
retryable?: boolean;
|
|
934
|
+
retryAfterMs?: number;
|
|
935
|
+
provider?: string;
|
|
936
|
+
};
|
|
937
|
+
};
|
|
938
|
+
};
|
|
939
|
+
};
|
|
940
|
+
/** @description Internal server error */
|
|
941
|
+
500: {
|
|
942
|
+
headers: {
|
|
943
|
+
[name: string]: unknown;
|
|
944
|
+
};
|
|
945
|
+
content: {
|
|
946
|
+
/**
|
|
947
|
+
* @example {
|
|
948
|
+
* "data": null,
|
|
949
|
+
* "metadata": {
|
|
950
|
+
* "timestamp": "2025-11-28T12:00:00.000Z"
|
|
951
|
+
* },
|
|
952
|
+
* "error": {
|
|
953
|
+
* "code": "INTERNAL_ERROR",
|
|
954
|
+
* "message": "An unexpected error occurred while processing the request"
|
|
955
|
+
* }
|
|
956
|
+
* }
|
|
957
|
+
*/
|
|
958
|
+
"application/json": {
|
|
959
|
+
data: unknown;
|
|
960
|
+
metadata?: {
|
|
961
|
+
/** Format: date-time */
|
|
962
|
+
timestamp: string;
|
|
963
|
+
cached?: boolean;
|
|
964
|
+
/** @enum {string} */
|
|
965
|
+
source?: "google_books" | "open_library" | "isbndb" | "kv_cache" | "d1_database" | "vectorize";
|
|
966
|
+
};
|
|
967
|
+
error: {
|
|
968
|
+
/** @enum {string} */
|
|
969
|
+
code: "NOT_FOUND" | "INVALID_REQUEST" | "INVALID_ISBN" | "INVALID_QUERY" | "MISSING_PARAMETER" | "UNAUTHORIZED" | "FORBIDDEN" | "INTERNAL_ERROR" | "API_ERROR" | "NETWORK_ERROR" | "RATE_LIMIT_EXCEEDED" | "CIRCUIT_OPEN" | "PROVIDER_ERROR" | "TIMEOUT";
|
|
970
|
+
message: string;
|
|
971
|
+
details?: {
|
|
972
|
+
[key: string]: unknown;
|
|
973
|
+
};
|
|
974
|
+
retryable?: boolean;
|
|
975
|
+
retryAfterMs?: number;
|
|
976
|
+
provider?: string;
|
|
977
|
+
};
|
|
978
|
+
};
|
|
979
|
+
};
|
|
980
|
+
};
|
|
981
|
+
};
|
|
982
|
+
};
|
|
983
|
+
put?: never;
|
|
984
|
+
post?: never;
|
|
985
|
+
delete?: never;
|
|
986
|
+
options?: never;
|
|
987
|
+
head?: never;
|
|
988
|
+
patch?: never;
|
|
989
|
+
trace?: never;
|
|
990
|
+
};
|
|
991
|
+
"/api/v2/capabilities": {
|
|
992
|
+
parameters: {
|
|
993
|
+
query?: never;
|
|
994
|
+
header?: never;
|
|
995
|
+
path?: never;
|
|
996
|
+
cookie?: never;
|
|
997
|
+
};
|
|
998
|
+
/**
|
|
999
|
+
* Get API capabilities and feature availability
|
|
1000
|
+
* @description Returns comprehensive feature availability and configuration.
|
|
1001
|
+
* Clients should call this on app startup to discover available features.
|
|
1002
|
+
*
|
|
1003
|
+
* **Use Cases:**
|
|
1004
|
+
* - Feature discovery (check which endpoints are available)
|
|
1005
|
+
* - Version compatibility (check API version)
|
|
1006
|
+
* - Rate limit awareness (know limits before hitting them)
|
|
1007
|
+
* - Deprecation notices (prepare for sunset endpoints)
|
|
1008
|
+
*/
|
|
1009
|
+
get: {
|
|
1010
|
+
parameters: {
|
|
1011
|
+
query?: never;
|
|
1012
|
+
header?: never;
|
|
1013
|
+
path?: never;
|
|
1014
|
+
cookie?: never;
|
|
1015
|
+
};
|
|
1016
|
+
requestBody?: never;
|
|
1017
|
+
responses: {
|
|
1018
|
+
/** @description API capabilities retrieved successfully */
|
|
1019
|
+
200: {
|
|
1020
|
+
headers: {
|
|
1021
|
+
[name: string]: unknown;
|
|
1022
|
+
};
|
|
1023
|
+
content: {
|
|
1024
|
+
"application/json": {
|
|
1025
|
+
data: {
|
|
1026
|
+
apiVersion: string;
|
|
1027
|
+
features: {
|
|
1028
|
+
name: string;
|
|
1029
|
+
enabled: boolean;
|
|
1030
|
+
version: string;
|
|
1031
|
+
endpoints: string[];
|
|
1032
|
+
rateLimit?: {
|
|
1033
|
+
requests: number;
|
|
1034
|
+
windowMs: number;
|
|
1035
|
+
};
|
|
1036
|
+
notes?: string;
|
|
1037
|
+
}[];
|
|
1038
|
+
limits: {
|
|
1039
|
+
maxBatchSize: number;
|
|
1040
|
+
maxCsvRows: number;
|
|
1041
|
+
maxImageSizeMb: number;
|
|
1042
|
+
maxConcurrentJobs: number;
|
|
1043
|
+
};
|
|
1044
|
+
deprecations: {
|
|
1045
|
+
endpoint: string;
|
|
1046
|
+
sunsetDate: string;
|
|
1047
|
+
replacement: string;
|
|
1048
|
+
}[];
|
|
1049
|
+
};
|
|
1050
|
+
metadata?: {
|
|
1051
|
+
/** Format: date-time */
|
|
1052
|
+
timestamp: string;
|
|
1053
|
+
cached?: boolean;
|
|
1054
|
+
/** @enum {string} */
|
|
1055
|
+
source?: "google_books" | "open_library" | "isbndb" | "kv_cache" | "d1_database" | "vectorize";
|
|
1056
|
+
};
|
|
1057
|
+
};
|
|
1058
|
+
};
|
|
1059
|
+
};
|
|
1060
|
+
/** @description Internal server error */
|
|
1061
|
+
500: {
|
|
1062
|
+
headers: {
|
|
1063
|
+
[name: string]: unknown;
|
|
1064
|
+
};
|
|
1065
|
+
content: {
|
|
1066
|
+
"application/json": {
|
|
1067
|
+
data: unknown;
|
|
1068
|
+
metadata?: {
|
|
1069
|
+
/** Format: date-time */
|
|
1070
|
+
timestamp: string;
|
|
1071
|
+
cached?: boolean;
|
|
1072
|
+
/** @enum {string} */
|
|
1073
|
+
source?: "google_books" | "open_library" | "isbndb" | "kv_cache" | "d1_database" | "vectorize";
|
|
1074
|
+
};
|
|
1075
|
+
error: {
|
|
1076
|
+
/** @enum {string} */
|
|
1077
|
+
code: "NOT_FOUND" | "INVALID_REQUEST" | "INVALID_ISBN" | "INVALID_QUERY" | "MISSING_PARAMETER" | "UNAUTHORIZED" | "FORBIDDEN" | "INTERNAL_ERROR" | "API_ERROR" | "NETWORK_ERROR" | "RATE_LIMIT_EXCEEDED" | "CIRCUIT_OPEN" | "PROVIDER_ERROR" | "TIMEOUT";
|
|
1078
|
+
message: string;
|
|
1079
|
+
details?: {
|
|
1080
|
+
[key: string]: unknown;
|
|
1081
|
+
};
|
|
1082
|
+
retryable?: boolean;
|
|
1083
|
+
retryAfterMs?: number;
|
|
1084
|
+
provider?: string;
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1089
|
+
};
|
|
1090
|
+
};
|
|
1091
|
+
put?: never;
|
|
1092
|
+
post?: never;
|
|
1093
|
+
delete?: never;
|
|
1094
|
+
options?: never;
|
|
1095
|
+
head?: never;
|
|
1096
|
+
patch?: never;
|
|
1097
|
+
trace?: never;
|
|
1098
|
+
};
|
|
1099
|
+
}
|
|
1100
|
+
export type webhooks = Record<string, never>;
|
|
1101
|
+
export interface components {
|
|
1102
|
+
schemas: never;
|
|
1103
|
+
responses: never;
|
|
1104
|
+
parameters: never;
|
|
1105
|
+
requestBodies: never;
|
|
1106
|
+
headers: never;
|
|
1107
|
+
pathItems: never;
|
|
1108
|
+
}
|
|
1109
|
+
export type $defs = Record<string, never>;
|
|
1110
|
+
export type operations = Record<string, never>;
|
|
1111
|
+
//# sourceMappingURL=schema.d.ts.map
|