/** * Every value `items.status` can hold. * * 'pending' was missing here from the moment items started arriving pending, * while itemFilters.ts declared its own copy that had it. Two declarations of * one union is how that happens: nothing connects them, so one goes stale and * nothing says so. The stale one was harmless only because query rows were * `any` — typing them turned `status === 'pending'` in admin.ts into a compile * error about a comparison with no overlap, which is how it was found. * * This is now the single declaration. itemFilters.ts imports it. */ export type ItemStatus = 'pending' | 'available' | 'reserved' | 'sold'; export interface ItemImage { id: number; image_path: string; sort_order: number; } export interface ItemTag { id: number; name: string; color: string; } export interface Item { id: number; name: string; description: string | null; price_cents: number; images: ItemImage[]; status: ItemStatus; reserved_until: string | null; sold_at: string | null; paypal_order_id: string | null; created_at: string; }