mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-13 07:55:09 -05:00
Migrate last response to types
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { ToolResponse } from '@/tools/types'
|
||||
|
||||
/**
|
||||
* Raw volume item from Google Books API response
|
||||
* Raw volume item from Google Books API search response
|
||||
*/
|
||||
export interface GoogleBooksVolumeItem {
|
||||
id: string
|
||||
@@ -30,6 +30,36 @@ export interface GoogleBooksVolumeItem {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw volume response from Google Books API details endpoint
|
||||
*/
|
||||
export interface GoogleBooksVolumeResponse {
|
||||
id: string
|
||||
volumeInfo: {
|
||||
title?: string
|
||||
subtitle?: string
|
||||
authors?: string[]
|
||||
publisher?: string
|
||||
publishedDate?: string
|
||||
description?: string
|
||||
pageCount?: number
|
||||
categories?: string[]
|
||||
averageRating?: number
|
||||
ratingsCount?: number
|
||||
language?: string
|
||||
previewLink?: string
|
||||
infoLink?: string
|
||||
imageLinks?: {
|
||||
thumbnail?: string
|
||||
smallThumbnail?: string
|
||||
}
|
||||
industryIdentifiers?: Array<{
|
||||
type: string
|
||||
identifier: string
|
||||
}>
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Volume information structure shared between search and details responses
|
||||
*/
|
||||
|
||||
@@ -1,36 +1,10 @@
|
||||
import type {
|
||||
GoogleBooksVolumeDetailsParams,
|
||||
GoogleBooksVolumeDetailsResponse,
|
||||
GoogleBooksVolumeResponse,
|
||||
} from '@/tools/google_books/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
interface GoogleBooksVolumeResponse {
|
||||
id: string
|
||||
volumeInfo: {
|
||||
title?: string
|
||||
subtitle?: string
|
||||
authors?: string[]
|
||||
publisher?: string
|
||||
publishedDate?: string
|
||||
description?: string
|
||||
pageCount?: number
|
||||
categories?: string[]
|
||||
averageRating?: number
|
||||
ratingsCount?: number
|
||||
language?: string
|
||||
previewLink?: string
|
||||
infoLink?: string
|
||||
imageLinks?: {
|
||||
thumbnail?: string
|
||||
smallThumbnail?: string
|
||||
}
|
||||
industryIdentifiers?: Array<{
|
||||
type: string
|
||||
identifier: string
|
||||
}>
|
||||
}
|
||||
}
|
||||
|
||||
export const googleBooksVolumeDetailsTool: ToolConfig<
|
||||
GoogleBooksVolumeDetailsParams,
|
||||
GoogleBooksVolumeDetailsResponse
|
||||
|
||||
Reference in New Issue
Block a user