Files
juwan-frontend/lib/search/types.ts
T

29 lines
656 B
TypeScript

import type { Player, PlayerService, Shop } from "@/lib/types"
export type SearchSort = "composite" | "rating" | "orders" | "price_asc" | "price_desc"
export type SearchResultItem =
| {
type: "player"
player: Player
minPrice: number
unit: PlayerService["unit"]
rating: number
orders: number
}
| {
type: "shop"
shop: Shop
minPrice: number
unit: PlayerService["unit"]
rating: number
orders: number
games: string[]
hasAvailable: boolean
}
export interface SearchResponse {
items: SearchResultItem[]
meta: { total: number; offset: number; limit: number }
}