fix: consolidate SearchResult type definition

- Remove duplicate generic SearchResult<T> from types.ts
- Export SearchResult from search.adapter.ts via index.ts
- Eliminates type conflict between two incompatible SearchResult definitions

This fixes "Type 'SearchResult' is not assignable to type 'SearchResult<any>'" errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Justin Edmund 2025-11-28 18:05:33 -08:00
parent a4b9e0e30a
commit a748884faf
2 changed files with 1 additions and 38 deletions

View file

@ -6,6 +6,7 @@ export { GridAdapter, gridAdapter } from './grid.adapter'
export { JobAdapter, jobAdapter } from './job.adapter'
export { PartyAdapter, partyAdapter } from './party.adapter'
export { SearchAdapter, searchAdapter } from './search.adapter'
export type { SearchResult, SearchParams, SearchResponse } from './search.adapter'
export { UserAdapter, userAdapter } from './user.adapter'
export { DEFAULT_ADAPTER_CONFIG } from './config'
export * from './types'

View file

@ -212,44 +212,6 @@ export interface SearchParams {
signal?: AbortSignal | undefined
}
/**
* Unified search result structure
*/
export interface SearchResult<T = any> {
/** Unique identifier */
id: string
/** Granblue Fantasy game ID */
granblueId: string
/** Item name (localized or string) */
name: { en?: string; ja?: string } | string
/** Display name (computed from name) */
displayName?: string
/** Element ID (0-6) */
element?: number
/** Rarity level */
rarity?: number
/** Primary proficiency (weapons) */
proficiency?: number
/** Series ID */
series?: number
/** URL to the item's image */
imageUrl?: string
/** Type of the search result */
type: 'weapon' | 'character' | 'summon'
/** The full entity data */
data?: T
}
/**
* Cache entry structure
*/