File tree Expand file tree Collapse file tree 2 files changed +32
-28
lines changed
apps/sim/tools/google_books Expand file tree Collapse file tree 2 files changed +32
-28
lines changed Original file line number Diff line number Diff line change 11import type { ToolResponse } from '@/tools/types'
22
33/**
4- * Raw volume item from Google Books API response
4+ * Raw volume item from Google Books API search response
55 */
66export interface GoogleBooksVolumeItem {
77 id : string
@@ -30,6 +30,36 @@ export interface GoogleBooksVolumeItem {
3030 }
3131}
3232
33+ /**
34+ * Raw volume response from Google Books API details endpoint
35+ */
36+ export interface GoogleBooksVolumeResponse {
37+ id : string
38+ volumeInfo : {
39+ title ?: string
40+ subtitle ?: string
41+ authors ?: string [ ]
42+ publisher ?: string
43+ publishedDate ?: string
44+ description ?: string
45+ pageCount ?: number
46+ categories ?: string [ ]
47+ averageRating ?: number
48+ ratingsCount ?: number
49+ language ?: string
50+ previewLink ?: string
51+ infoLink ?: string
52+ imageLinks ?: {
53+ thumbnail ?: string
54+ smallThumbnail ?: string
55+ }
56+ industryIdentifiers ?: Array < {
57+ type : string
58+ identifier : string
59+ } >
60+ }
61+ }
62+
3363/**
3464 * Volume information structure shared between search and details responses
3565 */
Original file line number Diff line number Diff line change 11import type {
22 GoogleBooksVolumeDetailsParams ,
33 GoogleBooksVolumeDetailsResponse ,
4+ GoogleBooksVolumeResponse ,
45} from '@/tools/google_books/types'
56import type { ToolConfig } from '@/tools/types'
67
7- interface GoogleBooksVolumeResponse {
8- id : string
9- volumeInfo : {
10- title ?: string
11- subtitle ?: string
12- authors ?: string [ ]
13- publisher ?: string
14- publishedDate ?: string
15- description ?: string
16- pageCount ?: number
17- categories ?: string [ ]
18- averageRating ?: number
19- ratingsCount ?: number
20- language ?: string
21- previewLink ?: string
22- infoLink ?: string
23- imageLinks ?: {
24- thumbnail ?: string
25- smallThumbnail ?: string
26- }
27- industryIdentifiers ?: Array < {
28- type : string
29- identifier : string
30- } >
31- }
32- }
33-
348export const googleBooksVolumeDetailsTool : ToolConfig <
359 GoogleBooksVolumeDetailsParams ,
3610 GoogleBooksVolumeDetailsResponse
You can’t perform that action at this time.
0 commit comments